@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["surfaces/NoticeRow.tsx"],"sourcesContent":["import { createSignal, type JSX, onCleanup, onMount, Show, splitProps } from \"solid-js\";\nimport { NoticeCard, type NoticeTone } from \"./NoticeCard\";\n\nexport type NoticeRowProps = Omit<JSX.HTMLAttributes<HTMLElement>, \"children\" | \"class\"> & {\n tone?: NoticeTone;\n /**\n * A Tabler icon class on a soft square tile at the start of the row, for the subject the notice is about, such as\n * images. The tile is decorative; the text names the state.\n */\n tile?: string;\n /** The tile's colour as a CSS colour, such as a subject token; defaults to the tone's ink. */\n tileColor?: string;\n /** A decorative icon; true resolves the tone's icon and its screen-reader word. */\n icon?: string | true;\n /** A quiet second line opts into the responsive summary: desktop action column, phone actions below. */\n detail?: JSX.Element;\n detailTitle?: string;\n /** A quiet text action that remains visible when the detail is truncated. */\n detailAction?: JSX.Element;\n /** Keep room for two title lines, two quiet lines and phone controls through transitions. */\n reserve?: boolean;\n detailLines?: 1 | 2;\n /** One or two public controls. The renderer selects their variants and sizes for the container width. */\n actions?: JSX.Element | ((layout: { narrow: boolean }) => JSX.Element);\n /** One short sentence; truncate it rather than letting the row grow. */\n children: JSX.Element;\n /** The one next step at the end of the row, such as a `Button` or a `SplitButton`. It never wraps below the text. */\n action?: JSX.Element;\n class?: string;\n};\n\nconst ROW_PROPS = [\n \"tone\",\n \"tile\",\n \"tileColor\",\n \"children\",\n \"action\",\n \"class\",\n \"icon\",\n \"detail\",\n \"detailTitle\",\n \"detailAction\",\n \"reserve\",\n \"detailLines\",\n \"actions\",\n] as const;\n\n/**\n * A notice with an optional quiet line. Without it, one row of at least 48px: the tile, one line of text, then the action, all centred. It has the tint and\n * tones of `NoticeCard`, so a notice that changes state in place, such as blocked, loading, and failed, keeps its row and\n * the content below never moves.\n * The one- or two-line form is chosen once at mount. Keep that form stable across state changes.\n * In the two-line form use `actions`; `action` belongs to the original single-line form.\n */\nexport function NoticeRow(props: NoticeRowProps): JSX.Element {\n const [local, articleProps] = splitProps(props, ROW_PROPS);\n if (\n !(\n props.detail !== undefined ||\n props.icon ||\n props.reserve !== undefined ||\n props.actions !== undefined ||\n props.detailAction !== undefined\n )\n )\n return (\n <article {...articleProps} class={`k2b-notice-card ${local.class ?? \"\"}`} data-tone={local.tone ?? \"neutral\"} data-row=\"\">\n <Show when={local.tile}>\n {(tile) => (\n <span class=\"k2b-notice-card__tile k2b-icon-tile\" style={{ color: local.tileColor }} aria-hidden=\"true\">\n <i class={tile()} />\n </span>\n )}\n </Show>\n <div class=\"k2b-notice-card__content\">{local.children}</div>\n <Show when={local.action}>{(action) => <div class=\"k2b-notice-card__action\">{action()}</div>}</Show>\n </article>\n );\n let host: HTMLDivElement | undefined;\n const [narrow, setNarrow] = createSignal(false);\n onMount(() => {\n if (!host) return;\n const isNarrow = (width: number) => width <= 35 * Number.parseFloat(getComputedStyle(document.documentElement).fontSize);\n // Receipts size to their content: choose the controls before the first paint. Later changes must not resize the\n // observed box inside the observer's callback, which would create a resize loop.\n const width = host.getBoundingClientRect().width;\n if (host.isConnected && width > 0) setNarrow(isNarrow(width));\n let frame = 0;\n const observer = new ResizeObserver(([entry]) => {\n const next = isNarrow(entry?.contentRect.width ?? 0);\n cancelAnimationFrame(frame);\n if (next !== narrow()) frame = requestAnimationFrame(() => setNarrow(next));\n });\n observer.observe(host);\n onCleanup(() => {\n cancelAnimationFrame(frame);\n observer.disconnect();\n });\n });\n return (\n <div class=\"k2b-notice-card-container\" ref={host} style={{ \"--k2b-notice-tile-color\": local.tileColor }}>\n <NoticeCard\n {...articleProps}\n class={local.class}\n tone={local.tone}\n layout=\"card\"\n icon={local.tile ?? local.icon}\n data-row=\"\"\n data-detail=\"\"\n data-detail-lines={local.detailLines === 2 ? \"2\" : undefined}\n data-row-tile={local.tile ? \"\" : undefined}\n data-reserve={local.reserve !== false ? \"\" : undefined}\n title={local.children}\n detail={\n <>\n <span class=\"k2b-notice-card__detail-text\" title={local.detailTitle}>\n {local.detail}\n </span>\n <Show when={local.detailAction}>{(action) => <span class=\"k2b-notice-card__detail-action\">{action()}</span>}</Show>\n </>\n }\n actions={typeof local.actions === \"function\" ? local.actions({ narrow: narrow() }) : local.actions}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,SAAS,YAAY,EAAY,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,QAAQ,UAAU;AACvF,SAAS,UAAU,
|
|
1
|
+
{"version":3,"names":[],"sources":["surfaces/NoticeRow.tsx"],"sourcesContent":["import { createSignal, type JSX, onCleanup, onMount, Show, splitProps } from \"solid-js\";\nimport { cssColor } from \"../internal/color\";\nimport { NoticeCard, type NoticeEyebrow, type NoticeTone } from \"./NoticeCard\";\n\nexport type NoticeRowProps = Omit<JSX.HTMLAttributes<HTMLElement>, \"children\" | \"class\"> & {\n tone?: NoticeTone;\n /**\n * A Tabler icon class on a soft square tile at the start of the row, for the subject the notice is about, such as\n * images. The tile is decorative; the text names the state.\n */\n tile?: string;\n /** The tile's colour as a CSS colour, such as a subject token; defaults to the tone's ink. */\n tileColor?: string;\n /** A decorative icon; true resolves the tone's icon and its screen-reader word. */\n icon?: string | true;\n /**\n * A quiet line above the sentence, in the two-line form: what kind of notice it is and from where (\"Approval · Grids\"),\n * and an optional fact at its end, such as when it expires. The row grows by that line and keeps it in every state.\n */\n eyebrow?: NoticeEyebrow;\n /** A quiet second line opts into the responsive summary: desktop action column, phone actions below. */\n detail?: JSX.Element;\n detailTitle?: string;\n /** A quiet text action that remains visible when the detail is truncated. */\n detailAction?: JSX.Element;\n /** Keep room for two title lines, two quiet lines and phone controls through transitions. */\n reserve?: boolean;\n detailLines?: 1 | 2;\n /** One or two public controls. The renderer selects their variants and sizes for the container width. */\n actions?: JSX.Element | ((layout: { narrow: boolean }) => JSX.Element);\n /** One short sentence; truncate it rather than letting the row grow. */\n children: JSX.Element;\n /** The one next step at the end of the row, such as a `Button` or a `SplitButton`. It never wraps below the text. */\n action?: JSX.Element;\n class?: string;\n};\n\nconst ROW_PROPS = [\n \"tone\",\n \"tile\",\n \"tileColor\",\n \"children\",\n \"action\",\n \"class\",\n \"icon\",\n \"detail\",\n \"detailTitle\",\n \"detailAction\",\n \"reserve\",\n \"detailLines\",\n \"actions\",\n \"eyebrow\",\n] as const;\n\n/**\n * A notice with an optional quiet line. Without it, one row of at least 48px: the tile, one line of text, then the action, all centred. It has the tint and\n * tones of `NoticeCard`, so a notice that changes state in place, such as blocked, loading, and failed, keeps its row and\n * the content below never moves.\n * The one- or two-line form is chosen once at mount. Keep that form stable across state changes.\n * In the two-line form use `actions`; `action` belongs to the original single-line form.\n */\nexport function NoticeRow(props: NoticeRowProps): JSX.Element {\n const [local, articleProps] = splitProps(props, ROW_PROPS);\n if (\n !(\n props.detail !== undefined ||\n props.icon ||\n props.reserve !== undefined ||\n props.actions !== undefined ||\n props.detailAction !== undefined\n )\n )\n return (\n <article {...articleProps} class={`k2b-notice-card ${local.class ?? \"\"}`} data-tone={local.tone ?? \"neutral\"} data-row=\"\">\n <Show when={local.tile}>\n {(tile) => (\n <span class=\"k2b-notice-card__tile k2b-icon-tile\" style={{ color: cssColor(local.tileColor) }} aria-hidden=\"true\">\n <i class={tile()} />\n </span>\n )}\n </Show>\n <div class=\"k2b-notice-card__content\">{local.children}</div>\n <Show when={local.action}>{(action) => <div class=\"k2b-notice-card__action\">{action()}</div>}</Show>\n </article>\n );\n let host: HTMLDivElement | undefined;\n const [narrow, setNarrow] = createSignal(false);\n onMount(() => {\n if (!host) return;\n const isNarrow = (width: number) => width <= 35 * Number.parseFloat(getComputedStyle(document.documentElement).fontSize);\n // Receipts size to their content: choose the controls before the first paint. Later changes must not resize the\n // observed box inside the observer's callback, which would create a resize loop.\n const width = host.getBoundingClientRect().width;\n if (host.isConnected && width > 0) setNarrow(isNarrow(width));\n let frame = 0;\n const observer = new ResizeObserver(([entry]) => {\n const next = isNarrow(entry?.contentRect.width ?? 0);\n cancelAnimationFrame(frame);\n if (next !== narrow()) frame = requestAnimationFrame(() => setNarrow(next));\n });\n observer.observe(host);\n onCleanup(() => {\n cancelAnimationFrame(frame);\n observer.disconnect();\n });\n });\n return (\n <div class=\"k2b-notice-card-container\" ref={host} style={{ \"--k2b-notice-tile-color\": cssColor(local.tileColor) }}>\n <NoticeCard\n {...articleProps}\n class={local.class}\n tone={local.tone}\n layout=\"card\"\n icon={local.tile ?? local.icon}\n data-row=\"\"\n data-detail=\"\"\n data-detail-lines={local.detailLines === 2 ? \"2\" : undefined}\n data-row-tile={local.tile ? \"\" : undefined}\n data-eyebrow={local.eyebrow ? \"\" : undefined}\n eyebrow={local.eyebrow}\n data-reserve={local.reserve !== false ? \"\" : undefined}\n title={local.children}\n detail={\n <>\n <span class=\"k2b-notice-card__detail-text\" title={local.detailTitle}>\n {local.detail}\n </span>\n <Show when={local.detailAction}>{(action) => <span class=\"k2b-notice-card__detail-action\">{action()}</span>}</Show>\n </>\n }\n actions={typeof local.actions === \"function\" ? local.actions({ narrow: narrow() }) : local.actions}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,SAAS,YAAY,EAAY,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,QAAQ,UAAU;AACvF,SAAS,QAAQ,QAAQ,mBAAmB;AAC5C,SAAS,UAAU,QAA6C,cAAc;AAmC9E,MAAM,SAAS,GAAG,CAChB,MAAM,EACN,MAAM,EACN,WAAW,EACX,UAAU,EACV,QAAQ,EACR,OAAO,EACP,MAAM,EACN,QAAQ,EACR,aAAa,EACb,cAAc,EACd,SAAS,EACT,aAAa,EACb,SAAS,EACT,SAAS,CACD;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,SAAS,CAAC,KAAqB,EAAe;EAC5D,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC;EAC1D,IACE,EACE,KAAK,CAAC,MAAM,KAAK,SAAS,IAC1B,KAAK,CAAC,IAAI,IACV,KAAK,CAAC,OAAO,KAAK,SAAS,IAC3B,KAAK,CAAC,OAAO,KAAK,SAAS,IAC3B,KAAK,CAAC,YAAY,KAAK,SAAS,CACjC,EAED;IAAA;MAAA;MAAA;MAAA;MAAA;MAAA;IAAA,4BACe,YAAY;MAAA;Q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AAM;YAAA;UAAA;QAAU;MAAA;MAAA,IAG/G,OAAO;QAAA,OAAE,oBAAO,KAAK,CAAC,OAAO,KAAK,UAAU,MAAG,KAAK,CAAC,OAAO,CAAC;UAAE,MAAM,EAAE,MAAM,CAAC;QAAE,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO;MAAA;IAAA;IAAA,qEAvBhB,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC;IAAA;EAAA;AA2BnH","ignoreList":[]}
|
|
@@ -13,7 +13,7 @@ export { Paper } from "./Paper";
|
|
|
13
13
|
export { default as Placeholder } from "./Placeholder";
|
|
14
14
|
export { ProgressBar, progressBarParts } from "./ProgressBar";
|
|
15
15
|
export { ProgressRing } from "./ProgressRing";
|
|
16
|
-
export { PERSON_COLORS, personColor } from "./person-color";
|
|
16
|
+
export { PERSON_COLORS, PERSON_COLORS_DARK, personColor, personColorDark, personMarkColor, personMarkColorOf } from "./person-color";
|
|
17
17
|
export { ResourceCard } from "./ResourceCard";
|
|
18
18
|
export { Section } from "./Section";
|
|
19
19
|
export { createDelayedLoading, Skeleton } from "./Skeleton";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["surfaces/index.ts"],"sourcesContent":["export type { AvatarProps, AvatarRing, AvatarShape, AvatarSize, AvatarTone } from \"./Avatar\";\nexport { Avatar } from \"./Avatar\";\nexport type { AvatarFacesPerson, AvatarFacesProps, AvatarStackPerson, AvatarStackProps } from \"./AvatarStack\";\nexport { AvatarFaces, AvatarStack } from \"./AvatarStack\";\nexport { type BudgetItem, type BudgetLevel, BudgetList, type BudgetListProps, budgetState } from \"./BudgetList\";\nexport type { ChangeListItem, ChangeListProps, ChangeTone } from \"./ChangeList\";\nexport { ChangeList } from \"./ChangeList\";\nexport type { DescriptionListItem, DescriptionListProps } from \"./DescriptionList\";\nexport { DescriptionList } from \"./DescriptionList\";\nexport type { DotStripProps, DotStripTone } from \"./DotStrip\";\nexport { DotStrip } from \"./DotStrip\";\nexport type { FieldRowProps } from \"./Field\";\nexport { Field } from \"./Field\";\nexport type { LinkCardColor, LinkCardProps } from \"./LinkCard\";\nexport { LinkCard } from \"./LinkCard\";\nexport type { NotFoundStateAction, NotFoundStateProps } from \"./NotFoundState\";\nexport { NotFoundState } from \"./NotFoundState\";\nexport type { NoticeCardProps, NoticeGridProps, NoticeTone } from \"./NoticeCard\";\nexport { NOTICE_CARD_CLASSES, NoticeCard } from \"./NoticeCard\";\nexport type { NoticeRowProps } from \"./NoticeRow\";\nexport { NoticeRow } from \"./NoticeRow\";\nexport type { PaperProps, PaperTag } from \"./Paper\";\nexport { Paper } from \"./Paper\";\nexport type {\n PlaceholderAlign,\n PlaceholderProps,\n PlaceholderState,\n PlaceholderSurface,\n PlaceholderVariant,\n} from \"./Placeholder\";\nexport { default as Placeholder } from \"./Placeholder\";\nexport type { ProgressBarPart, ProgressBarProps, ProgressBarSegment, ProgressBarTone } from \"./ProgressBar\";\nexport { ProgressBar, progressBarParts } from \"./ProgressBar\";\nexport type { ProgressRingProps, ProgressRingTone } from \"./ProgressRing\";\nexport { ProgressRing } from \"./ProgressRing\";\nexport { PERSON_COLORS, personColor } from \"./person-color\";\nexport type { ResourceCardColor, ResourceCardProps, ResourceCardState } from \"./ResourceCard\";\nexport { ResourceCard } from \"./ResourceCard\";\nexport type { SectionFrame, SectionPartProps, SectionProps, SectionSize, SectionState, SectionTone } from \"./Section\";\nexport { Section } from \"./Section\";\nexport { createDelayedLoading, type DelayedLoadingOptions, Skeleton, type SkeletonProps } from \"./Skeleton\";\nexport type { StatCellAccent, StatCellCompare, StatCellDelta, StatCellProps, StatCellSize, StatCellTone } from \"./StatCell\";\nexport { StatCell } from \"./StatCell\";\nexport type {\n StatGridAction,\n StatGridColumns,\n StatGridProps,\n StatGridSize,\n StatGridSurface,\n StatGridVariant,\n} from \"./StatGrid\";\nexport { StatGrid } from \"./StatGrid\";\nexport type { StatusBadgeProps, StatusTone } from \"./StatusBadge\";\nexport { StatusBadge } from \"./StatusBadge\";\nexport type { TagProps, TagSize } from \"./Tag\";\nexport { Tag } from \"./Tag\";\n"],"mappings":"AACA,SAAS,MAAM,QAAQ,UAAU;AAEjC,SAAS,WAAW,EAAE,WAAW,QAAQ,eAAe;AACxD,SAA4C,UAAU,EAAwB,WAAW,QAAQ,cAAc;AAE/G,SAAS,UAAU,QAAQ,cAAc;AAEzC,SAAS,eAAe,QAAQ,mBAAmB;AAEnD,SAAS,QAAQ,QAAQ,YAAY;AAErC,SAAS,KAAK,QAAQ,SAAS;AAE/B,SAAS,QAAQ,QAAQ,YAAY;AAErC,SAAS,aAAa,QAAQ,iBAAiB;AAE/C,SAAS,mBAAmB,EAAE,UAAU,QAAQ,cAAc;AAE9D,SAAS,SAAS,QAAQ,aAAa;AAEvC,SAAS,KAAK,QAAQ,SAAS;AAQ/B,SAAS,OAAO,IAAI,WAAW,QAAQ,eAAe;AAEtD,SAAS,WAAW,EAAE,gBAAgB,QAAQ,eAAe;AAE7D,SAAS,YAAY,QAAQ,gBAAgB;AAC7C,SAAS,aAAa,EAAE,WAAW,QAAQ,gBAAgB;
|
|
1
|
+
{"version":3,"names":[],"sources":["surfaces/index.ts"],"sourcesContent":["export type { AvatarProps, AvatarRing, AvatarShape, AvatarSize, AvatarTone } from \"./Avatar\";\nexport { Avatar } from \"./Avatar\";\nexport type { AvatarFacesPerson, AvatarFacesProps, AvatarStackPerson, AvatarStackProps } from \"./AvatarStack\";\nexport { AvatarFaces, AvatarStack } from \"./AvatarStack\";\nexport { type BudgetItem, type BudgetLevel, BudgetList, type BudgetListProps, budgetState } from \"./BudgetList\";\nexport type { ChangeListItem, ChangeListProps, ChangeTone } from \"./ChangeList\";\nexport { ChangeList } from \"./ChangeList\";\nexport type { DescriptionListItem, DescriptionListProps } from \"./DescriptionList\";\nexport { DescriptionList } from \"./DescriptionList\";\nexport type { DotStripProps, DotStripTone } from \"./DotStrip\";\nexport { DotStrip } from \"./DotStrip\";\nexport type { FieldRowProps } from \"./Field\";\nexport { Field } from \"./Field\";\nexport type { LinkCardColor, LinkCardProps } from \"./LinkCard\";\nexport { LinkCard } from \"./LinkCard\";\nexport type { NotFoundStateAction, NotFoundStateProps } from \"./NotFoundState\";\nexport { NotFoundState } from \"./NotFoundState\";\nexport type { NoticeCardProps, NoticeGridProps, NoticeTone } from \"./NoticeCard\";\nexport { NOTICE_CARD_CLASSES, NoticeCard } from \"./NoticeCard\";\nexport type { NoticeRowProps } from \"./NoticeRow\";\nexport { NoticeRow } from \"./NoticeRow\";\nexport type { PaperProps, PaperTag } from \"./Paper\";\nexport { Paper } from \"./Paper\";\nexport type {\n PlaceholderAlign,\n PlaceholderProps,\n PlaceholderState,\n PlaceholderSurface,\n PlaceholderVariant,\n} from \"./Placeholder\";\nexport { default as Placeholder } from \"./Placeholder\";\nexport type { ProgressBarPart, ProgressBarProps, ProgressBarSegment, ProgressBarTone } from \"./ProgressBar\";\nexport { ProgressBar, progressBarParts } from \"./ProgressBar\";\nexport type { ProgressRingProps, ProgressRingTone } from \"./ProgressRing\";\nexport { ProgressRing } from \"./ProgressRing\";\nexport { PERSON_COLORS, PERSON_COLORS_DARK, personColor, personColorDark, personMarkColor, personMarkColorOf } from \"./person-color\";\nexport type { ResourceCardColor, ResourceCardProps, ResourceCardState } from \"./ResourceCard\";\nexport { ResourceCard } from \"./ResourceCard\";\nexport type { SectionFrame, SectionPartProps, SectionProps, SectionSize, SectionState, SectionTone } from \"./Section\";\nexport { Section } from \"./Section\";\nexport { createDelayedLoading, type DelayedLoadingOptions, Skeleton, type SkeletonProps } from \"./Skeleton\";\nexport type { StatCellAccent, StatCellCompare, StatCellDelta, StatCellProps, StatCellSize, StatCellTone } from \"./StatCell\";\nexport { StatCell } from \"./StatCell\";\nexport type {\n StatGridAction,\n StatGridColumns,\n StatGridProps,\n StatGridSize,\n StatGridSurface,\n StatGridVariant,\n} from \"./StatGrid\";\nexport { StatGrid } from \"./StatGrid\";\nexport type { StatusBadgeProps, StatusTone } from \"./StatusBadge\";\nexport { StatusBadge } from \"./StatusBadge\";\nexport type { TagProps, TagSize } from \"./Tag\";\nexport { Tag } from \"./Tag\";\n"],"mappings":"AACA,SAAS,MAAM,QAAQ,UAAU;AAEjC,SAAS,WAAW,EAAE,WAAW,QAAQ,eAAe;AACxD,SAA4C,UAAU,EAAwB,WAAW,QAAQ,cAAc;AAE/G,SAAS,UAAU,QAAQ,cAAc;AAEzC,SAAS,eAAe,QAAQ,mBAAmB;AAEnD,SAAS,QAAQ,QAAQ,YAAY;AAErC,SAAS,KAAK,QAAQ,SAAS;AAE/B,SAAS,QAAQ,QAAQ,YAAY;AAErC,SAAS,aAAa,QAAQ,iBAAiB;AAE/C,SAAS,mBAAmB,EAAE,UAAU,QAAQ,cAAc;AAE9D,SAAS,SAAS,QAAQ,aAAa;AAEvC,SAAS,KAAK,QAAQ,SAAS;AAQ/B,SAAS,OAAO,IAAI,WAAW,QAAQ,eAAe;AAEtD,SAAS,WAAW,EAAE,gBAAgB,QAAQ,eAAe;AAE7D,SAAS,YAAY,QAAQ,gBAAgB;AAC7C,SAAS,aAAa,EAAE,kBAAkB,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,iBAAiB,QAAQ,gBAAgB;AAEpI,SAAS,YAAY,QAAQ,gBAAgB;AAE7C,SAAS,OAAO,QAAQ,WAAW;AACnC,SAAS,oBAAoB,EAA8B,QAAQ,QAA4B,YAAY;AAE3G,SAAS,QAAQ,QAAQ,YAAY;AASrC,SAAS,QAAQ,QAAQ,YAAY;AAErC,SAAS,WAAW,QAAQ,eAAe;AAE3C,SAAS,GAAG,QAAQ,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// The class names and tones of `NoticeCard`, apart from the component: Markdown's info blocks write the same markup as
|
|
2
|
+
// a string, and a module with components would bring them along into every bundle that needs only the names.
|
|
3
|
+
|
|
4
|
+
export const NOTICE_CARD_CLASSES = {
|
|
5
|
+
root: "k2b-notice-card",
|
|
6
|
+
icon: "k2b-notice-card__icon",
|
|
7
|
+
content: "k2b-notice-card__content",
|
|
8
|
+
head: "k2b-notice-card__head",
|
|
9
|
+
eyebrow: "k2b-notice-card__eyebrow",
|
|
10
|
+
title: "k2b-notice-card__title",
|
|
11
|
+
meta: "k2b-notice-card__meta",
|
|
12
|
+
description: "k2b-notice-card__description",
|
|
13
|
+
body: "k2b-notice-card__body",
|
|
14
|
+
actions: "k2b-notice-card__actions"
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=notice-card-classes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["surfaces/notice-card-classes.ts"],"sourcesContent":["import type { IntentTone } from \"../semantics\";\n\n// The class names and tones of `NoticeCard`, apart from the component: Markdown's info blocks write the same markup as\n// a string, and a module with components would bring them along into every bundle that needs only the names.\n\nexport type NoticeTone = Extract<IntentTone, \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\"> | \"ai\";\n\nexport const NOTICE_CARD_CLASSES = {\n root: \"k2b-notice-card\",\n icon: \"k2b-notice-card__icon\",\n content: \"k2b-notice-card__content\",\n head: \"k2b-notice-card__head\",\n eyebrow: \"k2b-notice-card__eyebrow\",\n title: \"k2b-notice-card__title\",\n meta: \"k2b-notice-card__meta\",\n description: \"k2b-notice-card__description\",\n body: \"k2b-notice-card__body\",\n actions: \"k2b-notice-card__actions\",\n} as const;\n"],"mappings":"AAEA;AACA;;AAIA,OAAO,MAAM,mBAAmB,GAAG;EACjC,IAAI,EAAE,iBAAiB;EACvB,IAAI,EAAE,uBAAuB;EAC7B,OAAO,EAAE,0BAA0B;EACnC,IAAI,EAAE,uBAAuB;EAC7B,OAAO,EAAE,0BAA0B;EACnC,KAAK,EAAE,wBAAwB;EAC/B,IAAI,EAAE,uBAAuB;EAC7B,WAAW,EAAE,8BAA8B;EAC3C,IAAI,EAAE,uBAAuB;EAC7B,OAAO,EAAE;AACX,CAAU","ignoreList":[]}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The colors that stand for a person: the tint behind avatar initials, a collaborator's cursor, and the marks and
|
|
3
|
-
* comments a person leaves.
|
|
4
|
-
*
|
|
3
|
+
* comments a person leaves. Eleven hues in the order of the color wheel, each dark enough for white initials (at least
|
|
4
|
+
* 4.5:1), and each pair apart by a CIEDE2000 of at least 5 also for people with protanopia, deuteranopia or tritanopia
|
|
5
|
+
* (person-color.test.ts checks both). The palette leaves out plum, which means AI, and yellow, which reads as a text
|
|
6
|
+
* highlight. Several people can share a color, so a person's name always appears next to it.
|
|
5
7
|
*/
|
|
6
|
-
export const PERSON_COLORS = ["#
|
|
8
|
+
export const PERSON_COLORS = ["#dc2626", "#9a3412", "#4d7c0f", "#15803d", "#065f46", "#0e7490", "#075985", "#475569", "#2563eb", "#3730a3", "#6d28d9"];
|
|
7
9
|
|
|
8
10
|
/** The palette index for a name, the order of the `.k2b-avatar[data-tint]` rules. Surrounding spaces do not count. */
|
|
9
11
|
export const personTint = name => {
|
|
@@ -13,6 +15,34 @@ export const personTint = name => {
|
|
|
13
15
|
return hash % PERSON_COLORS.length;
|
|
14
16
|
};
|
|
15
17
|
|
|
16
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* The same hues for the dark theme: each is the light hue 45 % towards white, one step for all, so the hues keep their
|
|
20
|
+
* order of lightness. A mark in a person's color (a comment bar, a passage, a dot, a presence swatch) keeps 3:1 on
|
|
21
|
+
* the dark surface with it, and soft initials 4.5:1 on their tint (person-color.test.ts checks both).
|
|
22
|
+
*/
|
|
23
|
+
export const PERSON_COLORS_DARK = ["#ec8888", "#c78f7d", "#9db77b", "#7eb994", "#76a799", "#7ab3c2", "#77a4bc", "#9aa2ac", "#87a9f4", "#918dcc", "#af89ea"];
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* A person's color from their display name, the same wherever Cloud shows that person. It is the fill behind white
|
|
27
|
+
* initials and a collaborator's caret with its white label, so it stays the same in both themes.
|
|
28
|
+
*/
|
|
17
29
|
export const personColor = name => PERSON_COLORS[personTint(name)];
|
|
30
|
+
|
|
31
|
+
/** A person's color for the dark theme (see `PERSON_COLORS_DARK`). */
|
|
32
|
+
export const personColorDark = name => PERSON_COLORS_DARK[personTint(name)];
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* A person's color for a mark drawn on the page (a comment bar, a dot, a swatch): `light-dark()` of both hues, so the
|
|
36
|
+
* mark keeps 3:1 against the surface in either theme. Use it in CSS only, never where a hex is expected.
|
|
37
|
+
*/
|
|
38
|
+
export const personMarkColor = name => personMarkColorOf(personColor(name));
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The mark color of a stored person color: a hue of `PERSON_COLORS` becomes `light-dark()` of it and its dark step;
|
|
42
|
+
* any other color stays as it is. For contracts that keep the hex (a comment's author color) and draw it in CSS.
|
|
43
|
+
*/
|
|
44
|
+
export const personMarkColorOf = color => {
|
|
45
|
+
const index = PERSON_COLORS.findIndex(hue => hue === color.trim().toLowerCase());
|
|
46
|
+
return index < 0 ? color : `light-dark(${PERSON_COLORS[index]}, ${PERSON_COLORS_DARK[index]})`;
|
|
47
|
+
};
|
|
18
48
|
//# sourceMappingURL=person-color.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["surfaces/person-color.ts"],"sourcesContent":["/**\n * The colors that stand for a person: the tint behind avatar initials, a collaborator's cursor, and the marks and\n * comments a person leaves. The palette leaves out plum, which means AI, and yellow, which reads as a text
|
|
1
|
+
{"version":3,"names":[],"sources":["surfaces/person-color.ts"],"sourcesContent":["/**\n * The colors that stand for a person: the tint behind avatar initials, a collaborator's cursor, and the marks and\n * comments a person leaves. Eleven hues in the order of the color wheel, each dark enough for white initials (at least\n * 4.5:1), and each pair apart by a CIEDE2000 of at least 5 also for people with protanopia, deuteranopia or tritanopia\n * (person-color.test.ts checks both). The palette leaves out plum, which means AI, and yellow, which reads as a text\n * highlight. Several people can share a color, so a person's name always appears next to it.\n */\nexport const PERSON_COLORS = [\n \"#dc2626\",\n \"#9a3412\",\n \"#4d7c0f\",\n \"#15803d\",\n \"#065f46\",\n \"#0e7490\",\n \"#075985\",\n \"#475569\",\n \"#2563eb\",\n \"#3730a3\",\n \"#6d28d9\",\n] as const;\n\n/** The palette index for a name, the order of the `.k2b-avatar[data-tint]` rules. Surrounding spaces do not count. */\nexport const personTint = (name: string): number => {\n const trimmed = name.trim();\n let hash = 0;\n for (let index = 0; index < trimmed.length; index++) hash = (hash * 31 + trimmed.charCodeAt(index)) >>> 0;\n return hash % PERSON_COLORS.length;\n};\n\n/**\n * The same hues for the dark theme: each is the light hue 45 % towards white, one step for all, so the hues keep their\n * order of lightness. A mark in a person's color (a comment bar, a passage, a dot, a presence swatch) keeps 3:1 on\n * the dark surface with it, and soft initials 4.5:1 on their tint (person-color.test.ts checks both).\n */\nexport const PERSON_COLORS_DARK = [\n \"#ec8888\",\n \"#c78f7d\",\n \"#9db77b\",\n \"#7eb994\",\n \"#76a799\",\n \"#7ab3c2\",\n \"#77a4bc\",\n \"#9aa2ac\",\n \"#87a9f4\",\n \"#918dcc\",\n \"#af89ea\",\n] as const;\n\n/**\n * A person's color from their display name, the same wherever Cloud shows that person. It is the fill behind white\n * initials and a collaborator's caret with its white label, so it stays the same in both themes.\n */\nexport const personColor = (name: string): string => PERSON_COLORS[personTint(name)]!;\n\n/** A person's color for the dark theme (see `PERSON_COLORS_DARK`). */\nexport const personColorDark = (name: string): string => PERSON_COLORS_DARK[personTint(name)]!;\n\n/**\n * A person's color for a mark drawn on the page (a comment bar, a dot, a swatch): `light-dark()` of both hues, so the\n * mark keeps 3:1 against the surface in either theme. Use it in CSS only, never where a hex is expected.\n */\nexport const personMarkColor = (name: string): string => personMarkColorOf(personColor(name));\n\n/**\n * The mark color of a stored person color: a hue of `PERSON_COLORS` becomes `light-dark()` of it and its dark step;\n * any other color stays as it is. For contracts that keep the hex (a comment's author color) and draw it in CSS.\n */\nexport const personMarkColorOf = (color: string): string => {\n const index = PERSON_COLORS.findIndex((hue) => hue === color.trim().toLowerCase());\n return index < 0 ? color : `light-dark(${PERSON_COLORS[index]}, ${PERSON_COLORS_DARK[index]})`;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM,aAAa,GAAG,CAC3B,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,CACD;;AAEV;AACA,OAAO,MAAM,UAAU,GAAI,IAAY,IAAa;EAClD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;EAC3B,IAAI,IAAI,GAAG,CAAC;EACZ,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,IAAI,GAAI,IAAI,GAAG,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,KAAM,CAAC;EACzG,OAAO,IAAI,GAAG,aAAa,CAAC,MAAM;AACpC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM,kBAAkB,GAAG,CAChC,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,CACD;;AAEV;AACA;AACA;AACA;AACA,OAAO,MAAM,WAAW,GAAI,IAAY,IAAa,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,CAAE;;AAErF;AACA,OAAO,MAAM,eAAe,GAAI,IAAY,IAAa,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAE;;AAE9F;AACA;AACA;AACA;AACA,OAAO,MAAM,eAAe,GAAI,IAAY,IAAa,iBAAiB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;;AAE7F;AACA;AACA;AACA;AACA,OAAO,MAAM,iBAAiB,GAAI,KAAa,IAAa;EAC1D,MAAM,KAAK,GAAG,aAAa,CAAC,SAAS,CAAE,GAAG,IAAK,GAAG,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;EAClF,OAAO,KAAK,GAAG,CAAC,GAAG,KAAK,GAAG,cAAc,aAAa,CAAC,KAAK,CAAC,KAAK,kBAAkB,CAAC,KAAK,CAAC,GAAG;AAChG,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { appTint, BLACK, contrast, hexOf, mix, rgbOf, SURFACE_DARK, SURFACE_LIGHT, safeColor, selectedTint, WHITE } from "./colors";
|
|
2
|
+
|
|
3
|
+
// A page's own accent (`Workspace accent`): a part of its own, as `NavQuota` and `navTree` are, so a page without one
|
|
4
|
+
// loads none of its contrast work (1.1 KB of every island with a Workspace before, #4567).
|
|
5
|
+
|
|
6
|
+
/** The near-black words of v2 (`--k2-text` in light), the other ink a primary may take besides white. */
|
|
7
|
+
const NEAR_BLACK = [9, 9, 11];
|
|
8
|
+
/** WCAG 1.4.3: type keeps 4.5:1; WCAG 1.4.11: a bar or a symbol keeps 3:1. */
|
|
9
|
+
const TEXT = 4.5;
|
|
10
|
+
const GRAPHIC = 3;
|
|
11
|
+
|
|
12
|
+
/** A colour as the screen paints it: whole channels, as `hexOf` writes them. */
|
|
13
|
+
const painted = rgb => rgb.map(channel => Math.round(channel));
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The mildest whole-percent step of `color` towards `target` that keeps `ratio` against every ground, judged on the
|
|
17
|
+
* channels it is painted with; `target` itself when no step does.
|
|
18
|
+
*/
|
|
19
|
+
const readableStep = (color, target, grounds, ratio) => {
|
|
20
|
+
for (let step = 0; step <= 100; step++) {
|
|
21
|
+
const moved = painted(mix(target, step / 100, color));
|
|
22
|
+
if (grounds.every(ground => contrast(moved, ground) >= ratio)) return moved;
|
|
23
|
+
}
|
|
24
|
+
return target;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The lightest tone of `color` (towards the surface, the first ground) that still keeps `ratio` against every ground;
|
|
29
|
+
* moved away from them first if it does not yet.
|
|
30
|
+
*/
|
|
31
|
+
const quietTone = (color, grounds, away, ratio) => {
|
|
32
|
+
let quiet = readableStep(color, away, grounds, ratio);
|
|
33
|
+
for (let step = 1; step <= 100; step++) {
|
|
34
|
+
const moved = painted(mix(grounds[0], step / 100, quiet));
|
|
35
|
+
if (grounds.some(ground => contrast(moved, ground) < ratio)) break;
|
|
36
|
+
quiet = moved;
|
|
37
|
+
}
|
|
38
|
+
return quiet;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The fill of the primary action and its words: white when it keeps 4.5:1 on the colour, else the near-black of v2
|
|
43
|
+
* when that does; a colour on which neither does (a narrow band of middle tones) is darkened until white does.
|
|
44
|
+
*/
|
|
45
|
+
const primaryOn = rgb => {
|
|
46
|
+
if (contrast(WHITE, rgb) >= TEXT) return {
|
|
47
|
+
fill: painted(rgb),
|
|
48
|
+
ink: WHITE
|
|
49
|
+
};
|
|
50
|
+
if (contrast(NEAR_BLACK, rgb) >= TEXT) return {
|
|
51
|
+
fill: painted(rgb),
|
|
52
|
+
ink: NEAR_BLACK
|
|
53
|
+
};
|
|
54
|
+
return {
|
|
55
|
+
fill: readableStep(rgb, BLACK, [WHITE], TEXT),
|
|
56
|
+
ink: WHITE
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/** A hex colour without alpha: the only form whose contrast can be worked out before the page paints. */
|
|
61
|
+
const OPAQUE_HEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The style values of a page's own accent (`Workspace accent`), a colour from data: the colour as the app's colour
|
|
65
|
+
* (`--k2-app`, from which the stylesheet mixes the tint), the primary's fill and words (`--k2-primary`,
|
|
66
|
+
* `--k2-primary-ink`, see `primaryOn`), and for each theme the colour as text (`--k2-accent-ink-light` / `-dark`:
|
|
67
|
+
* darkened in light, lightened in dark, until it keeps 4.5:1 on the surface and on the tint), the quiet tone of a bar
|
|
68
|
+
* (`--k2-accent-soft-light` / `-dark`: as light as 3:1 allows on every ground a bar stands on: the surface, the app's
|
|
69
|
+
* tint and the blue tint of a chosen row), and the primary's edge (`--k2-accent-edge-light` / `-dark`: the fill where
|
|
70
|
+
* it keeps 3:1 on the surface, else the mildest step of it that does, so a pale colour still shows its button). Only
|
|
71
|
+
* an opaque hex colour that passes `safeColor` counts; anything else gives nothing, and the app's colour stands.
|
|
72
|
+
*/
|
|
73
|
+
export const accentStyle = value => {
|
|
74
|
+
const color = safeColor(value);
|
|
75
|
+
const rgb = color !== undefined && OPAQUE_HEX.test(color) ? rgbOf(color) : undefined;
|
|
76
|
+
if (!rgb) return undefined;
|
|
77
|
+
const {
|
|
78
|
+
fill,
|
|
79
|
+
ink
|
|
80
|
+
} = primaryOn(rgb);
|
|
81
|
+
const tintLight = mix(rgb, appTint.light, SURFACE_LIGHT);
|
|
82
|
+
const tintDark = mix(rgb, appTint.dark, SURFACE_DARK);
|
|
83
|
+
const groundsLight = [SURFACE_LIGHT, tintLight, painted(tintLight), selectedTint.light];
|
|
84
|
+
const groundsDark = [SURFACE_DARK, tintDark, painted(tintDark), selectedTint.dark];
|
|
85
|
+
return {
|
|
86
|
+
"--k2-app": hexOf(rgb),
|
|
87
|
+
"--k2-primary": hexOf(fill),
|
|
88
|
+
"--k2-primary-ink": hexOf(ink),
|
|
89
|
+
"--k2-accent-edge-light": hexOf(readableStep(fill, BLACK, [SURFACE_LIGHT], GRAPHIC)),
|
|
90
|
+
"--k2-accent-edge-dark": hexOf(readableStep(fill, WHITE, [SURFACE_DARK], GRAPHIC)),
|
|
91
|
+
"--k2-accent-ink-light": hexOf(readableStep(rgb, BLACK, [SURFACE_LIGHT, tintLight, painted(tintLight)], TEXT)),
|
|
92
|
+
"--k2-accent-ink-dark": hexOf(readableStep(rgb, WHITE, [SURFACE_DARK, tintDark, painted(tintDark)], TEXT)),
|
|
93
|
+
"--k2-accent-soft-light": hexOf(quietTone(rgb, groundsLight, BLACK, GRAPHIC)),
|
|
94
|
+
"--k2-accent-soft-dark": hexOf(quietTone(rgb, groundsDark, WHITE, GRAPHIC))
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* A page's accent as `pageAccent` worked it out: the style values `Workspace accent` sets (each still passes the
|
|
100
|
+
* Workspace's value guard), and nothing else.
|
|
101
|
+
*/
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The accent of a page from a colour from data (such as the colour a place or a team chose), for `Workspace accent`:
|
|
105
|
+
* its readable tones, worked out where the colour arrives, on the server too, so the first paint is final (see
|
|
106
|
+
* `accentStyle`). Only `#rrggbb` or `#rgb` counts; any other value gives nothing, and the app's colour stands.
|
|
107
|
+
*/
|
|
108
|
+
export const pageAccent = color => {
|
|
109
|
+
const vars = accentStyle(color);
|
|
110
|
+
return vars ? {
|
|
111
|
+
vars
|
|
112
|
+
} : undefined;
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=accent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["v2/accent.ts"],"sourcesContent":["import {\n appTint,\n BLACK,\n contrast,\n hexOf,\n mix,\n type Rgb,\n rgbOf,\n SURFACE_DARK,\n SURFACE_LIGHT,\n safeColor,\n selectedTint,\n WHITE,\n} from \"./colors\";\n\n// A page's own accent (`Workspace accent`): a part of its own, as `NavQuota` and `navTree` are, so a page without one\n// loads none of its contrast work (1.1 KB of every island with a Workspace before, #4567).\n\n/** The near-black words of v2 (`--k2-text` in light), the other ink a primary may take besides white. */\nconst NEAR_BLACK: Rgb = [9, 9, 11];\n/** WCAG 1.4.3: type keeps 4.5:1; WCAG 1.4.11: a bar or a symbol keeps 3:1. */\nconst TEXT = 4.5;\nconst GRAPHIC = 3;\n\n/** A colour as the screen paints it: whole channels, as `hexOf` writes them. */\nconst painted = (rgb: Rgb): Rgb => rgb.map((channel) => Math.round(channel)) as unknown as Rgb;\n\n/**\n * The mildest whole-percent step of `color` towards `target` that keeps `ratio` against every ground, judged on the\n * channels it is painted with; `target` itself when no step does.\n */\nconst readableStep = (color: Rgb, target: Rgb, grounds: readonly Rgb[], ratio: number): Rgb => {\n for (let step = 0; step <= 100; step++) {\n const moved = painted(mix(target, step / 100, color));\n if (grounds.every((ground) => contrast(moved, ground) >= ratio)) return moved;\n }\n return target;\n};\n\n/**\n * The lightest tone of `color` (towards the surface, the first ground) that still keeps `ratio` against every ground;\n * moved away from them first if it does not yet.\n */\nconst quietTone = (color: Rgb, grounds: readonly [Rgb, ...Rgb[]], away: Rgb, ratio: number): Rgb => {\n let quiet = readableStep(color, away, grounds, ratio);\n for (let step = 1; step <= 100; step++) {\n const moved = painted(mix(grounds[0], step / 100, quiet));\n if (grounds.some((ground) => contrast(moved, ground) < ratio)) break;\n quiet = moved;\n }\n return quiet;\n};\n\n/**\n * The fill of the primary action and its words: white when it keeps 4.5:1 on the colour, else the near-black of v2\n * when that does; a colour on which neither does (a narrow band of middle tones) is darkened until white does.\n */\nconst primaryOn = (rgb: Rgb): { fill: Rgb; ink: Rgb } => {\n if (contrast(WHITE, rgb) >= TEXT) return { fill: painted(rgb), ink: WHITE };\n if (contrast(NEAR_BLACK, rgb) >= TEXT) return { fill: painted(rgb), ink: NEAR_BLACK };\n return { fill: readableStep(rgb, BLACK, [WHITE], TEXT), ink: WHITE };\n};\n\n/** A hex colour without alpha: the only form whose contrast can be worked out before the page paints. */\nconst OPAQUE_HEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;\n\n/**\n * The style values of a page's own accent (`Workspace accent`), a colour from data: the colour as the app's colour\n * (`--k2-app`, from which the stylesheet mixes the tint), the primary's fill and words (`--k2-primary`,\n * `--k2-primary-ink`, see `primaryOn`), and for each theme the colour as text (`--k2-accent-ink-light` / `-dark`:\n * darkened in light, lightened in dark, until it keeps 4.5:1 on the surface and on the tint), the quiet tone of a bar\n * (`--k2-accent-soft-light` / `-dark`: as light as 3:1 allows on every ground a bar stands on: the surface, the app's\n * tint and the blue tint of a chosen row), and the primary's edge (`--k2-accent-edge-light` / `-dark`: the fill where\n * it keeps 3:1 on the surface, else the mildest step of it that does, so a pale colour still shows its button). Only\n * an opaque hex colour that passes `safeColor` counts; anything else gives nothing, and the app's colour stands.\n */\nexport const accentStyle = (value: string | undefined): Record<string, string> | undefined => {\n const color = safeColor(value);\n const rgb = color !== undefined && OPAQUE_HEX.test(color) ? rgbOf(color) : undefined;\n if (!rgb) return undefined;\n const { fill, ink } = primaryOn(rgb);\n const tintLight = mix(rgb, appTint.light, SURFACE_LIGHT);\n const tintDark = mix(rgb, appTint.dark, SURFACE_DARK);\n const groundsLight = [SURFACE_LIGHT, tintLight, painted(tintLight), selectedTint.light] as const;\n const groundsDark = [SURFACE_DARK, tintDark, painted(tintDark), selectedTint.dark] as const;\n return {\n \"--k2-app\": hexOf(rgb),\n \"--k2-primary\": hexOf(fill),\n \"--k2-primary-ink\": hexOf(ink),\n \"--k2-accent-edge-light\": hexOf(readableStep(fill, BLACK, [SURFACE_LIGHT], GRAPHIC)),\n \"--k2-accent-edge-dark\": hexOf(readableStep(fill, WHITE, [SURFACE_DARK], GRAPHIC)),\n \"--k2-accent-ink-light\": hexOf(readableStep(rgb, BLACK, [SURFACE_LIGHT, tintLight, painted(tintLight)], TEXT)),\n \"--k2-accent-ink-dark\": hexOf(readableStep(rgb, WHITE, [SURFACE_DARK, tintDark, painted(tintDark)], TEXT)),\n \"--k2-accent-soft-light\": hexOf(quietTone(rgb, groundsLight, BLACK, GRAPHIC)),\n \"--k2-accent-soft-dark\": hexOf(quietTone(rgb, groundsDark, WHITE, GRAPHIC)),\n };\n};\n\n/**\n * A page's accent as `pageAccent` worked it out: the style values `Workspace accent` sets (each still passes the\n * Workspace's value guard), and nothing else.\n */\nexport type PageAccent = { readonly vars: Readonly<Record<string, string>> };\n\n/**\n * The accent of a page from a colour from data (such as the colour a place or a team chose), for `Workspace accent`:\n * its readable tones, worked out where the colour arrives, on the server too, so the first paint is final (see\n * `accentStyle`). Only `#rrggbb` or `#rgb` counts; any other value gives nothing, and the app's colour stands.\n */\nexport const pageAccent = (color: string | undefined): PageAccent | undefined => {\n const vars = accentStyle(color);\n return vars ? { vars } : undefined;\n};\n"],"mappings":"AAAA,SACE,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,EACL,GAAG,EAEH,KAAK,EACL,YAAY,EACZ,aAAa,EACb,SAAS,EACT,YAAY,EACZ,KAAK,QACA,UAAU;;AAEjB;AACA;;AAEA;AACA,MAAM,UAAe,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;AAClC;AACA,MAAM,IAAI,GAAG,GAAG;AAChB,MAAM,OAAO,GAAG,CAAC;;AAEjB;AACA,MAAM,OAAO,GAAI,GAAQ,IAAU,GAAG,CAAC,GAAG,CAAE,OAAO,IAAK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAmB;;AAE9F;AACA;AACA;AACA;AACA,MAAM,YAAY,GAAG,CAAC,KAAU,EAAE,MAAW,EAAE,OAAuB,EAAE,KAAa,KAAU;EAC7F,KAAK,IAAI,IAAI,GAAG,CAAC,EAAE,IAAI,IAAI,GAAG,EAAE,IAAI,EAAE,EAAE;IACtC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,GAAG,GAAG,EAAE,KAAK,CAAC,CAAC;IACrD,IAAI,OAAO,CAAC,KAAK,CAAE,MAAM,IAAK,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE,OAAO,KAAK;EAC/E;EACA,OAAO,MAAM;AACf,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAM,SAAS,GAAG,CAAC,KAAU,EAAE,OAAiC,EAAE,IAAS,EAAE,KAAa,KAAU;EAClG,I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SAAS,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC7E,uBAAuB,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,CAAC;EAC5E,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM,UAAU,GAAI,KAAyB,IAA6B;EAC/E,MAAM,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC;EAC/B,OAAO,IAAI,GAAG;IAAE;EAAK,CAAC,GAAG,SAAS;AACpC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { template as _$template } from "solid-js/web";
|
|
2
|
+
import { memo as _$memo } from "solid-js/web";
|
|
3
|
+
import { setAttribute as _$setAttribute } from "solid-js/web";
|
|
4
|
+
import { effect as _$effect } from "solid-js/web";
|
|
5
|
+
import { getNextMarker as _$getNextMarker } from "solid-js/web";
|
|
6
|
+
import { getNextElement as _$getNextElement } from "solid-js/web";
|
|
7
|
+
import { insert as _$insert } from "solid-js/web";
|
|
8
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
9
|
+
var _tmpl$ = /*#__PURE__*/_$template(`<span class=k2-actionbar-more>`),
|
|
10
|
+
_tmpl$2 = /*#__PURE__*/_$template(`<div class=k2-actionbar data-k2-part=ActionBar role=group><!$><!/><!$><!/>`),
|
|
11
|
+
_tmpl$3 = /*#__PURE__*/_$template(`<span class=k2-actionbar-words>`),
|
|
12
|
+
_tmpl$4 = /*#__PURE__*/_$template(`<span class=k2-actionbar-short>`),
|
|
13
|
+
_tmpl$5 = /*#__PURE__*/_$template(`<kbd class=k2-actionbar-keys aria-hidden=true>`),
|
|
14
|
+
_tmpl$6 = /*#__PURE__*/_$template(`<span class=k2-actionbar-item>`);
|
|
15
|
+
import { For, Show } from "solid-js";
|
|
16
|
+
import { Button } from "./button";
|
|
17
|
+
import { Menu } from "./menu";
|
|
18
|
+
/**
|
|
19
|
+
* The floating bar of the actions on one thing, such as a search hit in its preview: a light pill at the bottom of a
|
|
20
|
+
* scrolling column, in the middle, on the surface of the `UnsavedBar` (look rule 12); the main action filled, the
|
|
21
|
+
* others without a frame, each with the keys that do the same. Put it last in a column that scrolls in its own
|
|
22
|
+
* flex column: it sticks 16 px above the column's bottom and keeps the room of its own height at the end, so scrolled
|
|
23
|
+
* to the end the last line stands above it and it covers nothing. On the phone it spans the column above the safe
|
|
24
|
+
* area, without keys; actions with `folds` move into its "…" menu.
|
|
25
|
+
*/
|
|
26
|
+
export const ActionBar = props => {
|
|
27
|
+
const folding = () => props.actions.filter(action => action.folds);
|
|
28
|
+
return (() => {
|
|
29
|
+
var _el$ = _$getNextElement(_tmpl$2),
|
|
30
|
+
_el$3 = _el$.firstChild,
|
|
31
|
+
[_el$4, _co$] = _$getNextMarker(_el$3.nextSibling),
|
|
32
|
+
_el$5 = _el$4.nextSibling,
|
|
33
|
+
[_el$6, _co$2] = _$getNextMarker(_el$5.nextSibling);
|
|
34
|
+
_$insert(_el$, _$createComponent(For, {
|
|
35
|
+
get each() {
|
|
36
|
+
return props.actions;
|
|
37
|
+
},
|
|
38
|
+
children: action => (() => {
|
|
39
|
+
var _el$7 = _$getNextElement(_tmpl$6);
|
|
40
|
+
_$insert(_el$7, _$createComponent(Button, {
|
|
41
|
+
get variant() {
|
|
42
|
+
return action.primary ? "primary" : "ghost";
|
|
43
|
+
},
|
|
44
|
+
get icon() {
|
|
45
|
+
return action.icon;
|
|
46
|
+
},
|
|
47
|
+
get href() {
|
|
48
|
+
return action.href;
|
|
49
|
+
},
|
|
50
|
+
get onClick() {
|
|
51
|
+
return action.onClick && (event => action.onClick?.(event));
|
|
52
|
+
},
|
|
53
|
+
get disabled() {
|
|
54
|
+
return action.disabled;
|
|
55
|
+
},
|
|
56
|
+
get busy() {
|
|
57
|
+
return action.busy;
|
|
58
|
+
},
|
|
59
|
+
get label() {
|
|
60
|
+
return _$memo(() => !!action.short)() ? action.label : undefined;
|
|
61
|
+
},
|
|
62
|
+
get children() {
|
|
63
|
+
return [(() => {
|
|
64
|
+
var _el$8 = _$getNextElement(_tmpl$3);
|
|
65
|
+
_$insert(_el$8, () => action.label);
|
|
66
|
+
return _el$8;
|
|
67
|
+
})(), _$createComponent(Show, {
|
|
68
|
+
get when() {
|
|
69
|
+
return action.short;
|
|
70
|
+
},
|
|
71
|
+
get children() {
|
|
72
|
+
var _el$9 = _$getNextElement(_tmpl$4);
|
|
73
|
+
_$insert(_el$9, () => action.short);
|
|
74
|
+
return _el$9;
|
|
75
|
+
}
|
|
76
|
+
}), _$createComponent(Show, {
|
|
77
|
+
get when() {
|
|
78
|
+
return action.keys;
|
|
79
|
+
},
|
|
80
|
+
get children() {
|
|
81
|
+
var _el$0 = _$getNextElement(_tmpl$5);
|
|
82
|
+
_$insert(_el$0, () => action.keys);
|
|
83
|
+
return _el$0;
|
|
84
|
+
}
|
|
85
|
+
})];
|
|
86
|
+
}
|
|
87
|
+
}));
|
|
88
|
+
_$effect(_p$ => {
|
|
89
|
+
var _v$ = action.primary ? "" : undefined,
|
|
90
|
+
_v$2 = action.folds ? "" : undefined;
|
|
91
|
+
_v$ !== _p$.e && _$setAttribute(_el$7, "data-primary", _p$.e = _v$);
|
|
92
|
+
_v$2 !== _p$.t && _$setAttribute(_el$7, "data-folds", _p$.t = _v$2);
|
|
93
|
+
return _p$;
|
|
94
|
+
}, {
|
|
95
|
+
e: undefined,
|
|
96
|
+
t: undefined
|
|
97
|
+
});
|
|
98
|
+
return _el$7;
|
|
99
|
+
})()
|
|
100
|
+
}), _el$4, _co$);
|
|
101
|
+
_$insert(_el$, _$createComponent(Show, {
|
|
102
|
+
get when() {
|
|
103
|
+
return folding().length > 0;
|
|
104
|
+
},
|
|
105
|
+
get children() {
|
|
106
|
+
var _el$2 = _$getNextElement(_tmpl$);
|
|
107
|
+
_$insert(_el$2, _$createComponent(Menu, {
|
|
108
|
+
get items() {
|
|
109
|
+
return folding().map(action => ({
|
|
110
|
+
label: action.label,
|
|
111
|
+
icon: action.icon,
|
|
112
|
+
href: action.href,
|
|
113
|
+
disabled: action.disabled || action.busy,
|
|
114
|
+
onClick: action.href ? undefined : () => action.onClick?.()
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
}));
|
|
118
|
+
return _el$2;
|
|
119
|
+
}
|
|
120
|
+
}), _el$6, _co$2);
|
|
121
|
+
_$effect(() => _$setAttribute(_el$, "aria-label", props.label));
|
|
122
|
+
return _el$;
|
|
123
|
+
})();
|
|
124
|
+
};
|
|
125
|
+
//# sourceMappingURL=action-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["v2/action-bar.tsx"],"sourcesContent":["import { For, Show } from \"solid-js\";\nimport { Button } from \"./button\";\nimport { Menu } from \"./menu\";\n\nexport type ActionBarAction = {\n /** The words of the action, such as \"Antworten\" or \"In Mail öffnen\". */\n label: string;\n /** Shorter words for the phone, where the bar spans the screen, such as \"Öffnen\" for \"In Mail öffnen\". */\n short?: string;\n /** A Tabler icon name before the words. */\n icon?: string;\n /** The one main action of the bar: filled blue, and on the phone it takes the room the others leave. At most one. */\n primary?: boolean;\n /** The keys that do the same, shown beside the words on a wide screen: \"⌘↵\". */\n keys?: string;\n /** On the phone the action moves into the bar's \"…\" menu; the main action and the others stay in sight. */\n folds?: boolean;\n /** The page the action opens, as a link. */\n href?: string;\n /** The deed; a press on the button passes its event (a modified click), an entry of the \"…\" menu none. */\n onClick?: (event?: MouseEvent) => void;\n /** The action cannot be taken now. */\n disabled?: boolean;\n /** The action is under way: a turning sign, no second press. */\n busy?: boolean;\n};\n\nexport type ActionBarProps = {\n /** The name of the bar for assistive technology, such as \"Aktionen für Rechnung 2026-118\". */\n label: string;\n /** The actions in their order; the main one carries `primary`. */\n actions: readonly ActionBarAction[];\n};\n\n/**\n * The floating bar of the actions on one thing, such as a search hit in its preview: a light pill at the bottom of a\n * scrolling column, in the middle, on the surface of the `UnsavedBar` (look rule 12); the main action filled, the\n * others without a frame, each with the keys that do the same. Put it last in a column that scrolls in its own\n * flex column: it sticks 16 px above the column's bottom and keeps the room of its own height at the end, so scrolled\n * to the end the last line stands above it and it covers nothing. On the phone it spans the column above the safe\n * area, without keys; actions with `folds` move into its \"…\" menu.\n */\nexport const ActionBar = (props: ActionBarProps) => {\n const folding = () => props.actions.filter((action) => action.folds);\n return (\n <div class=\"k2-actionbar\" data-k2-part=\"ActionBar\" role=\"group\" aria-label={props.label}>\n <For each={props.actions}>\n {(action) => (\n <span class=\"k2-actionbar-item\" data-primary={action.primary ? \"\" : undefined} data-folds={action.folds ? \"\" : undefined}>\n <Button\n variant={action.primary ? \"primary\" : \"ghost\"}\n icon={action.icon}\n href={action.href}\n onClick={action.onClick && ((event) => action.onClick?.(event))}\n disabled={action.disabled}\n busy={action.busy}\n label={action.short ? action.label : undefined}\n >\n <span class=\"k2-actionbar-words\">{action.label}</span>\n <Show when={action.short}>\n <span class=\"k2-actionbar-short\">{action.short}</span>\n </Show>\n <Show when={action.keys}>\n <kbd class=\"k2-actionbar-keys\" aria-hidden=\"true\">\n {action.keys}\n </kbd>\n </Show>\n </Button>\n </span>\n )}\n </For>\n <Show when={folding().length > 0}>\n <span class=\"k2-actionbar-more\">\n <Menu\n items={folding().map((action) => ({\n label: action.label,\n icon: action.icon,\n href: action.href,\n disabled: action.disabled || action.busy,\n onClick: action.href ? undefined : () => action.onClick?.(),\n }))}\n />\n </span>\n </Show>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,GAAG,EAAE,IAAI,QAAQ,UAAU;AACpC,SAAS,MAAM,QAAQ,UAAU;AACjC,SAAS,IAAI,QAAQ,QAAQ;AAgC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM,SAAS,GAAI,KAAqB,IAAK;EAClD,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,MAAM,CAA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AAI;MAAA,IAAC,IAAI;QAAA,OAAE,OAAO,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC;MAAA;MAAA;QAAA;QAAA,kCAE3B,IAAI;UAAA,IACH,KAAK;YAAA,OAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAE,MAAM,KAAM;cAChC,KAAK,EAAE,MAAM,CAAC,KAAK;cACnB,IAAI,EAAE,MAAM,CAAC,IAAI;cACjB,IAAI,EAAE,MAAM,CAAC,IAAI;cACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI;cACxC,OAAO,EAAE,MAAM,CAAC,IAAI,GAAG,SAAS,GAAG,MAAM,MAAM,CAAC,OAAO,GAAG;YAC5D,CAAC,CAAC,CAAC;UAAA;QAAA;QAAA;MAAA;IAAA;IAAA,kDAnCiE,KAAK,CAAC,KAAK;IAAA;EAAA;AAyC3F,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* E-mail addresses in a typed or pasted text, read in one pass: `a@b.example`, `Name <a@b.example>`,
|
|
3
|
+
* `"Berg, Anna" <a@b.example>` and Outlook's `'a@b.example' <a@b.example>`. A semicolon and a new line always end an
|
|
4
|
+
* entry; a comma ends one too, except a comma before `<…>` with no address before it, which belongs to the name
|
|
5
|
+
* (`Berg, Anna <a@b.example>`); a space ends a bare address. A quote or a `<` that is never closed holds the rest of
|
|
6
|
+
* the text, which is then no address and stays. The time grows with the length of the text, never faster.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const separator = c => c === "," || c === ";" || c === "\n" || c === "\r";
|
|
10
|
+
/** A separator that always ends an entry: only a comma may belong to a name. */
|
|
11
|
+
const hard = c => c === ";" || c === "\n" || c === "\r";
|
|
12
|
+
const space = c => c === " " || c === "\t";
|
|
13
|
+
|
|
14
|
+
/** The address of a display form: what stands in `<…>`, or the whole. */
|
|
15
|
+
export const addressOf = display => {
|
|
16
|
+
const open = display.lastIndexOf("<");
|
|
17
|
+
return (open >= 0 && display.endsWith(">") ? display.slice(open + 1, -1) : display).trim();
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** Whether a text is one address: a local part, an @ and a domain with a dot, no spaces, quotes or brackets. */
|
|
21
|
+
export const isAddress = text => {
|
|
22
|
+
const at = text.indexOf("@");
|
|
23
|
+
if (at <= 0 || at !== text.lastIndexOf("@")) return false;
|
|
24
|
+
const domain = text.slice(at + 1);
|
|
25
|
+
const dot = domain.indexOf(".");
|
|
26
|
+
if (dot <= 0 || domain.endsWith(".") || domain.includes("..")) return false;
|
|
27
|
+
for (const c of text) if (space(c) || separator(c) || c === "<" || c === ">" || c === '"' || c === "\n") return false;
|
|
28
|
+
return true;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** The same address in another form or case: the key two chips must not share. */
|
|
32
|
+
export const addressKey = display => addressOf(display).toLowerCase();
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* With `final` the last entry counts too; without, only entries a separator closed, so an address still being typed
|
|
36
|
+
* (`mia@lindqvist.e`) is not taken before it is done (Enter, a paste or leaving the field take it).
|
|
37
|
+
*/
|
|
38
|
+
export const scanAddresses = (text, {
|
|
39
|
+
final = true
|
|
40
|
+
} = {}) => {
|
|
41
|
+
const tokens = [];
|
|
42
|
+
let start = 0;
|
|
43
|
+
// the quote that opened a quoted name: `"`, or `'` at the start of an entry (Outlook's `'a@b' <a@b>`; inside a
|
|
44
|
+
// name, as in O'Brien, it is a letter)
|
|
45
|
+
let quoted = null;
|
|
46
|
+
let fresh = true;
|
|
47
|
+
let angled = false;
|
|
48
|
+
let address = false;
|
|
49
|
+
// separators in a token before its address: they end it, unless `<…>` comes after them (then they are its name's)
|
|
50
|
+
let held = [];
|
|
51
|
+
const cut = end => {
|
|
52
|
+
let from = start;
|
|
53
|
+
for (const at of held) {
|
|
54
|
+
tokens.push([from, at]);
|
|
55
|
+
from = at + 1;
|
|
56
|
+
}
|
|
57
|
+
tokens.push([from, end]);
|
|
58
|
+
held = [];
|
|
59
|
+
address = false;
|
|
60
|
+
fresh = true;
|
|
61
|
+
start = end + 1;
|
|
62
|
+
};
|
|
63
|
+
for (let i = 0; i < text.length; i++) {
|
|
64
|
+
const c = text[i];
|
|
65
|
+
if (quoted) {
|
|
66
|
+
if (c === "\\") i++;else if (c === quoted) quoted = null;
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
if (angled) {
|
|
70
|
+
if (c === ">") {
|
|
71
|
+
angled = false;
|
|
72
|
+
address = true;
|
|
73
|
+
}
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
const first = fresh && !space(c) && !separator(c);
|
|
77
|
+
if (!space(c) && !separator(c)) fresh = false;
|
|
78
|
+
if (c === '"' || c === "'" && first) quoted = c;else if (c === "<") {
|
|
79
|
+
angled = true;
|
|
80
|
+
held = [];
|
|
81
|
+
} else if (c === "@") address = true;else if (separator(c) || space(c) && address) {
|
|
82
|
+
if (address || hard(c)) cut(i);else held.push(i);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
// the entry after the last separator: taken when the text is done, else it is still being typed, and stays so
|
|
86
|
+
const typing = final ? "" : text.slice(start);
|
|
87
|
+
if (final) cut(text.length);
|
|
88
|
+
const found = [];
|
|
89
|
+
const taken = [];
|
|
90
|
+
for (const [from, to] of tokens) {
|
|
91
|
+
const display = text.slice(from, to).trim();
|
|
92
|
+
if (display && isAddress(addressOf(display))) {
|
|
93
|
+
found.push(display);
|
|
94
|
+
taken.push([from, to]);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// the rest keeps its own words and separators; only the addresses taken out leave it
|
|
98
|
+
let rest = "";
|
|
99
|
+
let at = 0;
|
|
100
|
+
for (const [from, to] of taken) {
|
|
101
|
+
rest += text.slice(at, from);
|
|
102
|
+
at = to;
|
|
103
|
+
}
|
|
104
|
+
rest += text.slice(at, final ? text.length : start);
|
|
105
|
+
const closed = trimSeparators(rest);
|
|
106
|
+
const open = typing.trimStart();
|
|
107
|
+
if (!open) return {
|
|
108
|
+
found,
|
|
109
|
+
rest: closed
|
|
110
|
+
};
|
|
111
|
+
// a closed rest and the open entry keep the separator between them
|
|
112
|
+
const between = text[start - 1] === "," || text[start - 1] === ";" ? `${text[start - 1]} ` : "\n";
|
|
113
|
+
return {
|
|
114
|
+
found,
|
|
115
|
+
rest: closed ? closed + between + open : open
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/** A text without separators and spaces at its ends, and with one in place of a run of them inside. */
|
|
120
|
+
const trimSeparators = text => {
|
|
121
|
+
let out = "";
|
|
122
|
+
let pending = "";
|
|
123
|
+
for (const c of text) {
|
|
124
|
+
if (separator(c) || space(c)) {
|
|
125
|
+
// a separator wins over a space inside a run, so "a , b" keeps its comma
|
|
126
|
+
if (!pending || separator(c) && !separator(pending)) pending = c === "\r" ? "\n" : c;
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
if (out && pending) out += pending === "\n" ? "\n" : separator(pending) ? `${pending} ` : " ";
|
|
130
|
+
pending = "";
|
|
131
|
+
out += c;
|
|
132
|
+
}
|
|
133
|
+
return out;
|
|
134
|
+
};
|
|
135
|
+
//# sourceMappingURL=addresses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["v2/addresses.ts"],"sourcesContent":["/**\n * E-mail addresses in a typed or pasted text, read in one pass: `a@b.example`, `Name <a@b.example>`,\n * `\"Berg, Anna\" <a@b.example>` and Outlook's `'a@b.example' <a@b.example>`. A semicolon and a new line always end an\n * entry; a comma ends one too, except a comma before `<…>` with no address before it, which belongs to the name\n * (`Berg, Anna <a@b.example>`); a space ends a bare address. A quote or a `<` that is never closed holds the rest of\n * the text, which is then no address and stays. The time grows with the length of the text, never faster.\n */\n\nexport type ScannedAddresses = {\n /** The addresses in their display form (`Name <a@b.example>` or `a@b.example`), in their order. */\n found: string[];\n /** What is no address, with its own separators, to stay in the field. */\n rest: string;\n};\n\nconst separator = (c: string) => c === \",\" || c === \";\" || c === \"\\n\" || c === \"\\r\";\n/** A separator that always ends an entry: only a comma may belong to a name. */\nconst hard = (c: string) => c === \";\" || c === \"\\n\" || c === \"\\r\";\nconst space = (c: string) => c === \" \" || c === \"\\t\";\n\n/** The address of a display form: what stands in `<…>`, or the whole. */\nexport const addressOf = (display: string): string => {\n const open = display.lastIndexOf(\"<\");\n return (open >= 0 && display.endsWith(\">\") ? display.slice(open + 1, -1) : display).trim();\n};\n\n/** Whether a text is one address: a local part, an @ and a domain with a dot, no spaces, quotes or brackets. */\nexport const isAddress = (text: string): boolean => {\n const at = text.indexOf(\"@\");\n if (at <= 0 || at !== text.lastIndexOf(\"@\")) return false;\n const domain = text.slice(at + 1);\n const dot = domain.indexOf(\".\");\n if (dot <= 0 || domain.endsWith(\".\") || domain.includes(\"..\")) return false;\n for (const c of text) if (space(c) || separator(c) || c === \"<\" || c === \">\" || c === '\"' || c === \"\\n\") return false;\n return true;\n};\n\n/** The same address in another form or case: the key two chips must not share. */\nexport const addressKey = (display: string): string => addressOf(display).toLowerCase();\n\n/**\n * With `final` the last entry counts too; without, only entries a separator closed, so an address still being typed\n * (`mia@lindqvist.e`) is not taken before it is done (Enter, a paste or leaving the field take it).\n */\nexport const scanAddresses = (text: string, { final = true }: { final?: boolean } = {}): ScannedAddresses => {\n const tokens: [number, number][] = [];\n let start = 0;\n // the quote that opened a quoted name: `\"`, or `'` at the start of an entry (Outlook's `'a@b' <a@b>`; inside a\n // name, as in O'Brien, it is a letter)\n let quoted: string | null = null;\n let fresh = true;\n let angled = false;\n let address = false;\n // separators in a token before its address: they end it, unless `<…>` comes after them (then they are its name's)\n let held: number[] = [];\n const cut = (end: number) => {\n let from = start;\n for (const at of held) {\n tokens.push([from, at]);\n from = at + 1;\n }\n tokens.push([from, end]);\n held = [];\n address = false;\n fresh = true;\n start = end + 1;\n };\n for (let i = 0; i < text.length; i++) {\n const c = text[i]!;\n if (quoted) {\n if (c === \"\\\\\") i++;\n else if (c === quoted) quoted = null;\n continue;\n }\n if (angled) {\n if (c === \">\") {\n angled = false;\n address = true;\n }\n continue;\n }\n const first = fresh && !space(c) && !separator(c);\n if (!space(c) && !separator(c)) fresh = false;\n if (c === '\"' || (c === \"'\" && first)) quoted = c;\n else if (c === \"<\") {\n angled = true;\n held = [];\n } else if (c === \"@\") address = true;\n else if (separator(c) || (space(c) && address)) {\n if (address || hard(c)) cut(i);\n else held.push(i);\n }\n }\n // the entry after the last separator: taken when the text is done, else it is still being typed, and stays so\n const typing = final ? \"\" : text.slice(start);\n if (final) cut(text.length);\n\n const found: string[] = [];\n const taken: [number, number][] = [];\n for (const [from, to] of tokens) {\n const display = text.slice(from, to).trim();\n if (display && isAddress(addressOf(display))) {\n found.push(display);\n taken.push([from, to]);\n }\n }\n // the rest keeps its own words and separators; only the addresses taken out leave it\n let rest = \"\";\n let at = 0;\n for (const [from, to] of taken) {\n rest += text.slice(at, from);\n at = to;\n }\n rest += text.slice(at, final ? text.length : start);\n const closed = trimSeparators(rest);\n const open = typing.trimStart();\n if (!open) return { found, rest: closed };\n // a closed rest and the open entry keep the separator between them\n const between = text[start - 1] === \",\" || text[start - 1] === \";\" ? `${text[start - 1]} ` : \"\\n\";\n return { found, rest: closed ? closed + between + open : open };\n};\n\n/** A text without separators and spaces at its ends, and with one in place of a run of them inside. */\nconst trimSeparators = (text: string): string => {\n let out = \"\";\n let pending = \"\";\n for (const c of text) {\n if (separator(c) || space(c)) {\n // a separator wins over a space inside a run, so \"a , b\" keeps its comma\n if (!pending || (separator(c) && !separator(pending))) pending = c === \"\\r\" ? \"\\n\" : c;\n continue;\n }\n if (out && pending) out += pending === \"\\n\" ? \"\\n\" : separator(pending) ? `${pending} ` : \" \";\n pending = \"\";\n out += c;\n }\n return out;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,MAAM,SAAS,GAAI,CAAS,IAAK,CAAC,KAAK,GAAG,IAAI,CAA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