@bigpixelrocket/uiok 0.1.4 → 0.2.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/CHANGELOG.md +88 -1
- package/README.md +1 -1
- package/dist/activity/ActivityBar.d.ts +21 -8
- package/dist/activity/ActivityBar.js +15 -5
- package/dist/activity/activity.css +53 -6
- package/dist/button/Button.d.ts +10 -6
- package/dist/button/Button.js +6 -1
- package/dist/button/button.css +201 -33
- package/dist/charts/Line.logic.d.ts +6 -0
- package/dist/charts/Line.logic.js +9 -0
- package/dist/charts/LineChart.js +11 -4
- package/dist/charts/Pie.logic.d.ts +89 -1
- package/dist/charts/Pie.logic.js +272 -2
- package/dist/charts/PieChart.d.ts +2 -1
- package/dist/charts/PieChart.js +12 -5
- package/dist/charts/PieFill.d.ts +15 -0
- package/dist/charts/PieFill.js +33 -0
- package/dist/charts/ResultChart.d.ts +2 -2
- package/dist/charts/ResultChart.js +173 -47
- package/dist/charts/ResultChart.logic.d.ts +60 -4
- package/dist/charts/ResultChart.logic.js +105 -6
- package/dist/charts/Scatter.logic.d.ts +18 -4
- package/dist/charts/Scatter.logic.js +98 -22
- package/dist/charts/ScatterChart.js +19 -5
- package/dist/charts/charts.css +233 -116
- package/dist/charts/seriesColour.d.ts +2 -0
- package/dist/charts/seriesColour.js +1 -1
- package/dist/datetime/DateTimePicker.d.ts +12 -2
- package/dist/datetime/DateTimePicker.js +61 -16
- package/dist/datetime/DateTimePicker.logic.d.ts +29 -0
- package/dist/datetime/DateTimePicker.logic.js +25 -0
- package/dist/datetime/datetime.css +89 -49
- package/dist/dialog/ConfirmDialog.d.ts +69 -20
- package/dist/dialog/ConfirmDialog.js +39 -12
- package/dist/dialog/DialogLayer.d.ts +25 -0
- package/dist/dialog/DialogLayer.js +24 -0
- package/dist/dialog/DialogLegend.d.ts +2 -1
- package/dist/dialog/DialogLegend.js +10 -5
- package/dist/dialog/DialogLegend.logic.d.ts +15 -3
- package/dist/dialog/DialogLegend.logic.js +8 -4
- package/dist/dialog/DialogLists.d.ts +157 -0
- package/dist/dialog/DialogLists.js +137 -0
- package/dist/dialog/ModalDialog.d.ts +20 -15
- package/dist/dialog/ModalDialog.js +22 -7
- package/dist/dialog/dialog.css +570 -127
- package/dist/dialog/index.d.ts +7 -1
- package/dist/dialog/index.js +7 -1
- package/dist/field/Check.d.ts +15 -0
- package/dist/field/Check.js +23 -0
- package/dist/field/field.css +812 -0
- package/dist/field/index.d.ts +10 -0
- package/dist/field/index.js +10 -0
- package/dist/field/labelHelp.d.ts +33 -0
- package/dist/field/labelHelp.js +22 -0
- package/dist/filter/FilterIcon.js +2 -1
- package/dist/filter/filter.css +72 -20
- package/dist/grid/DataGrid.d.ts +8 -1
- package/dist/grid/DataGrid.js +115 -40
- package/dist/grid/DataGrid.logic.d.ts +15 -3
- package/dist/grid/DataGrid.logic.js +18 -5
- package/dist/grid/grid.css +481 -56
- package/dist/icon/Spinner.d.ts +16 -0
- package/dist/icon/Spinner.js +13 -0
- package/dist/icon/index.d.ts +5 -0
- package/dist/icon/index.js +5 -0
- package/dist/icon/sizes.d.ts +19 -0
- package/dist/icon/sizes.js +19 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/keychord/KeyChord.d.ts +12 -1
- package/dist/keychord/KeyChord.js +2 -2
- package/dist/keychord/index.d.ts +1 -1
- package/dist/keychord/keychord.css +87 -9
- package/dist/labels/dialog.d.ts +12 -1
- package/dist/labels/dialog.js +3 -1
- package/dist/labels/selectAll.d.ts +4 -4
- package/dist/labels/selectAll.js +1 -1
- package/dist/legend/KeyLegendStrip.js +1 -1
- package/dist/legend/legend.css +82 -57
- package/dist/listing/Listing.d.ts +17 -10
- package/dist/listing/Listing.js +33 -26
- package/dist/listing/listing.css +1665 -237
- package/dist/menu/menu.css +227 -67
- package/dist/menu/useBellBeat.js +2 -2
- package/dist/namecut/NameCut.d.ts +3 -1
- package/dist/namecut/NameCut.js +152 -5
- package/dist/namecut/NameCut.logic.d.ts +5 -3
- package/dist/namecut/NameCut.logic.js +20 -5
- package/dist/namecut/namecut.css +27 -7
- package/dist/pager/Pager.d.ts +12 -4
- package/dist/pager/Pager.js +21 -7
- package/dist/pager/pager.css +41 -30
- package/dist/palette/Palette.js +2 -1
- package/dist/palette/palette.css +121 -60
- package/dist/pane/PaneActions.d.ts +56 -14
- package/dist/pane/PaneActions.js +64 -16
- package/dist/pane/PaneFrame.d.ts +37 -5
- package/dist/pane/PaneFrame.js +246 -11
- package/dist/pane/index.d.ts +4 -2
- package/dist/pane/index.js +4 -2
- package/dist/pane/toolWords.d.ts +14 -0
- package/dist/pane/toolWords.js +26 -0
- package/dist/pane/useToolbarFit.d.ts +25 -0
- package/dist/pane/useToolbarFit.js +95 -0
- package/dist/run/RunHeader.d.ts +5 -3
- package/dist/run/RunHeader.js +11 -8
- package/dist/run/run.css +64 -79
- package/dist/segmented/SegmentedChoice.d.ts +18 -2
- package/dist/segmented/SegmentedChoice.js +18 -7
- package/dist/segmented/segmented.css +62 -22
- package/dist/selectall/SelectAllBar.d.ts +4 -3
- package/dist/selectall/SelectAllBar.js +4 -3
- package/dist/selectall/selectall.css +17 -12
- package/dist/shell/shell.css +1073 -0
- package/dist/styles.css +620 -22
- package/dist/surface/surface.css +154 -0
- package/dist/tabs/PageTabs.d.ts +10 -5
- package/dist/tabs/PageTabs.js +126 -37
- package/dist/tabs/tabs.css +131 -51
- package/dist/terminal/Terminal.js +3 -1
- package/dist/terminal/Terminal.logic.d.ts +5 -4
- package/dist/terminal/Terminal.logic.js +9 -4
- package/dist/terminal/TerminalMenu.d.ts +4 -1
- package/dist/terminal/TerminalMenu.js +12 -5
- package/dist/terminal/ghostty/contrast.logic.d.ts +45 -0
- package/dist/terminal/ghostty/contrast.logic.js +130 -0
- package/dist/terminal/ghostty/core.d.ts +6 -0
- package/dist/terminal/ghostty/renderer.d.ts +9 -2
- package/dist/terminal/ghostty/renderer.js +91 -14
- package/dist/terminal/ghostty/surface.d.ts +8 -0
- package/dist/terminal/ghostty/surface.js +27 -1
- package/dist/terminal/terminal.css +87 -61
- package/dist/text/text.css +16 -7
- package/dist/themes/catalog.js +4 -3
- package/dist/themes/themes.generated.css +1307 -264
- package/dist/themes/tokens.d.ts +69 -14
- package/dist/themes/tokens.js +920 -97
- package/dist/tokens.css +239 -0
- package/dist/tooltip/Tooltip.d.ts +6 -0
- package/dist/tooltip/Tooltip.js +48 -6
- package/dist/tooltip/Tooltip.logic.d.ts +89 -12
- package/dist/tooltip/Tooltip.logic.js +142 -20
- package/dist/tooltip/index.d.ts +1 -1
- package/dist/tooltip/index.js +1 -1
- package/dist/tooltip/tooltip.css +39 -9
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,92 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.2.0] - 2026-11-13
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Scale tokens in `@bigpixelrocket/uiok/styles.css`, the same in every theme: type sizes (`--font-size-key` to `--font-size-heading`, and `--font-size-display` for a startup or splash title), line heights, weights, `--tracking-caps`, spacing (`--space-1` to `--space-16`), corners (`--radius-xs` to `--radius-pill`), line widths (`--line`, `--line-strong`), motion (`--duration-*`, `--ease-out`, `--ease-in-out`, `--transition-control`; `--duration-base`, 120ms, is the longest a state change takes and `--duration-slow` is for signals such as a refusal or a bell; the fast, base, and slow durations drop to zero under reduced motion), control, row, and bar heights (`--control-height`, `-sm`, `-xs`, `--row-height`, `--bar-height`, `--hit-target`), focus geometry (`--focus-ring-width`, `--focus-offset*`), icon sizes (`--icon-sm` to `--icon-xl`, `--icon-column`, `--dot`), and a fuller layer scale (`--z-below`, `--z-raised`, `--z-local-overlay`, `--z-menu`, `--z-drag`, `--z-overlay`, `--z-dialog-popover` beside the existing `--z-panel`, `--z-dialog`, `--z-tooltip`). See `docs/tokens.md`.
|
|
14
|
+
- Colour roles in every theme, each with a contrast floor: text roles (`--accent-text`, `--danger-text`, `--warning-text`, `--success-text`, `--text-dim-on-surface`, `--text-faint`, `--text-placeholder`), control outlines (`--control-border`, `--control-border-strong`, `--control-track`), washes and lines per hue (`--accent-wash`, `--danger-wash`, `--warning-line`, and their strong forms), pressed fills (`--primary-pressed`, `--tonal-pressed`, `--accent-pressed`, `--danger-pressed`, `--warning-pressed`, `--accent-wash-pressed`), row states (`--cursor-row`, `--cursor-bar`, `--row-hover`, `--row-zebra`, `--selected-bg`, `--on-selected`, `--marked-bg`, `--marked-bar`), the current item (`--current-bg`, `--current-text`, `--current-mark`, `--current-ring`), search matches (`--match-bg`, `--match-mark`), scrollbars, text selection, scrims, `--terminal-selection-text`, and three shadow levels (`--shadow-raised`, `--shadow-popover`, `--shadow-modal`). See `docs/themes.md`.
|
|
15
|
+
- Form controls (`@bigpixelrocket/uiok/field`, `docs/components/field.md`): classes for native elements (`.field` with `.field-sm` and `.field-xs`, `.field-short` for a short value such as a port or a count, `.field-box`, `.check` with `data-tone`, `.switch`, `.range`, `.field-label`, `.field-note`, `.field-problem`, `.field-group`, `.field-choice`, `.field-grid`), a themed `meter`, and `Check` (`CheckProps`), a checkbox whose `checked` may be `'mixed'`. A toned field adds a 2px bar in its tone inside its leading edge; a number field shows a stepper at its end; a textarea shows no corner grip. `.field-grid`'s label column is as wide as its longest label, capped at 40% of the form (`--field-label-width` fixes it), and centres a label on a 28px field. `.field-problem` leads with the danger glyph and sets its words in `--text`. Under `data-window-inactive` a check box or switch that is on greys to `--control-border-strong`.
|
|
16
|
+
- `labelHelp` (`LabelHelp`) in `@bigpixelrocket/uiok/field`: help that explains a control goes in its label's tooltip and the control's `aria-description`, with a dashed `--text-faint` underline cue on the label (`data-label-help`). The tooltip opens above the label, or at its end where the window has no room above, never over the control. `SegmentedChoice` takes `aria-description` for the same help.
|
|
17
|
+
- Notices and shared recipes (`docs/components/surface.md`): `.notice` with `.notice-danger`, `.notice-warning`, and `.notice-success`, an application's status line rather than a web alert (a glyph in the tone, the words in `--text`, `.notice-actions` right after the words); `.notice-card`, a window's status line under its header (a hairline under it, no fill, one line cut with an ellipsis); `.card`, a framed panel that groups one subject's lines (`--card-bg`); and the shared recipes in the base sheet: `.quiet-control`, `.quiet-track-item`, `.toggle-chip` (`-sm`, `-xs`; it keeps its `--control-border` outline when off), the on look of any `button[aria-pressed='true']`, `.overline`, `.scroll-fade` (`-end`, `-x`), `.hit-target`, `.selectable`, `.spinner`, and the `uiok-spin` keyframes. Only a control holding a pop-up open (`aria-expanded` with `aria-haspopup`) keeps its hovered face.
|
|
18
|
+
- A shell stylesheet (`docs/components/shell.md`): classes for a Settings dialog (frame, a sidebar whose subsection in view is bold beside a rail with its segment in the accent, pages, subsections, a settings file's problems), a theme picker with theme miniatures, the Updates page (the check cadence and the update's status, each a `.card`, with a hairline between the status's head and its download or release notes; a failure is a headline in `--danger-text` with its glyph, the system's reason, and the time; the release notes list scrolls in a frame that draws its focus ring), an update pill and its failed state, `.channel-tag`, an About window in a fixed frame, sign-in prompts with the secret on the label column, and a load failure block.
|
|
19
|
+
- `.disclosure` (`docs/components/button.md`): a disclosure chevron (the icon family's `ChevronRight`) and a plain label on a `button` with `aria-expanded`, for a section a user shows or hides, in place of a push button with a chevron.
|
|
20
|
+
- Icons (`@bigpixelrocket/uiok/icon`, `docs/components/icon.md`): `ICON_SM`, `ICON_MD`, `ICON_LG`, and `ICON_XL` for lucide's `size` prop, and `Spinner` (`SpinnerProps`), the one turning ring.
|
|
21
|
+
- `DialogLayer` (`DialogLayerProps`) and `ModalDialog`'s `container` prop: dialogs rendered inside the layer mount after the content, so they paint above every pane. Dialog width steps `.dialog-size-md`, `.dialog-size-lg`, and `.dialog-size-xl`, and body classes `.dialog-body`, `.dialog-help`, `.dialog-label`, and `.dialog-value`. The `--dialog-inset-top` hook sets the backdrop's top inset. See `docs/components/dialog.md`.
|
|
22
|
+
- `ConfirmDialog`'s `items` (`DialogItem`: `name`, `detail`, `icon`), `itemIcon`, `itemCount`, `groups` (`DialogItemGroup`), and `facts` props, with the `DialogItems` (`DialogItemsProps`, `shownItems`, `DIALOG_ITEMS_SHOWN`) and `DialogFacts` (`DialogFact`, `DialogFactsProps`) components they draw through; both take an `id`. The `dialog` label group gains `moreItems(count)` and `itemCount(count)`. See "One anatomy for every case" under Changed.
|
|
23
|
+
- `DialogStatements` (`DialogStatementsProps`) and `ConfirmDialog`'s `statements` prop (`{ label, lines }`): the statements a confirmation runs, every one, under the host's label and their count in a framed block in the code face, each wrapping whole under a hanging indent and selectable. Past about eight lines the block scrolls on its own; it is never sliced and never ends in "+N more". The block is a named region and a Tab stop, so the keys scroll it and a screen reader reads every statement. A confirmation that holds the block, from the prop or as a `DialogStatements` child, takes the 480px confirmation width. See "Statements" in `docs/components/dialog.md`.
|
|
24
|
+
- A dialog legend verb takes `help` (`DialogLegendVerb.help`), its slot's tooltip and accessible description, so a dialog says what a verb does without a sentence in its body.
|
|
25
|
+
- `useToolbarFit()` in `@bigpixelrocket/uiok/pane`: a ref for a toolbar of `QuietAction`s that shows each tool's glyph and word while they fit on its one line and steps every tool to its glyph alone (its word then its tooltip) when they do not, as a path bar does, counting the bar's other items at their full size; `QuietAction` `keepWord` keeps a consequential command's word until last. See `docs/components/pane.md`.
|
|
26
|
+
- `PathFact` (`PathFactProps`) in `@bigpixelrocket/uiok/pane`: a page's state at the end of a `PanePathBar`, with a tone and a mark. Its `tone` colours the mark only; its words stay in `--text` and are cut in one clamped line with a tooltip while cut (a host box that may cut takes `.path-fact-text`). See `docs/components/pane.md`.
|
|
27
|
+
- Tooltip options: `tooltip()` takes a `Chord` and draws it as key glyphs, and an options argument (`TooltipOptions`: `value` for a monospace value, `side` for a tooltip beside or above its control); `describedTooltip()` takes the same options; `cutTooltip()` opens an element's own text only while it is cut; `cutsItsText`, `tooltipChord`, `TooltipSide` (with `'above'`), and `TooltipBeside`. `placeTooltip()` takes optional `beside`, `rtl`, `glyph`, and `preferAbove` arguments after `pointerX`. See `docs/components/tooltip.md`.
|
|
28
|
+
- `KeyChord` `tone` (`KeyChordTone`: `accent`, `lit`, `quiet`) and `recording` props, and the `.keycap` class that draws every chord inside an element as the shared key cap. See `docs/components/keychord.md`.
|
|
29
|
+
- `SegmentedChoice` `disabledChoices`; its look can be drawn on plain `aria-pressed` buttons with `segmented-choice` and `segmented-choice-option`. `Pager` `size` (`'inline'`, `'small'`, `'regular'`). `DateTimePicker` `size` (`'small'` by default, `'regular'` beside a 28px field). `DataGrid` `empty`, the content of a grid with no rows, and `initialWidth`'s optional fourth argument for a sort mark's room.
|
|
30
|
+
- Danger tones: `Button` `variant="danger"` (`.button-danger`), `LegendSecondary.danger` (`.legend-danger`) in a dialog's key legend, a `danger` prop on `QuietAction` and `RowIconAction`, and `.folder-menu-option.danger` for a menu row.
|
|
31
|
+
- `Button` `size="xs"` (`.button-xs`): the 20px push button for a row or a strip, with the 4px corner, caption words at medium weight, a 12px glyph, and a pointer target grown to `--hit-target` in the block axis. It has the strip action's values, so the library draws one 20px push button. See `docs/components/button.md`.
|
|
32
|
+
- Listing row states: `.row.selected`, `.row.marked`, `.row.pane-add`, `.pane-list.pointer` for a hover wash on rows that act on a click, and `.pane-listing.pane-pin-end`, which pins the actions column while the listing scrolls sideways. A host colours its own parts of a selected row with the `--row-selected-text` and `--row-selected-text-dim` hooks, which follow the selection into its grey look. `.pane-well-note` (`.beside-terminal`) sets an empty well's note in the terminal's type, and `.pane-empty-detail` sets a failed pane's error under its actions. See `docs/components/listing.md`.
|
|
33
|
+
- Desktop menu looks (`docs/components/menu.md`): a row with `aria-checked="true"` shows a check mark in its icon column, a row with `aria-haspopup="menu"` ends in a submenu chevron, a row may be a `button`, and `.folder-menu-separator` draws a plain hairline between groups.
|
|
34
|
+
- `.filter-field` draws a listing's filter row; `.folder-menu-compact` and the `--menu-font-size` hook size a menu; `.palette-command` sets a palette row's context as a command line; `.chart-empty`, `.chart-empty-text`, and `.chart-swatch` for charts and legends a host draws.
|
|
35
|
+
- `DataGrid` styles `cell-null` and `cell-binary` cells.
|
|
36
|
+
- A test fails on a delivered token that nothing in the library or its site reads, apart from the ones listed there as read by script or by an app.
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
|
|
40
|
+
- Breaking: theme tokens retired. `--shadow-menu`, `--shadow-notice`, `--shadow-card`, and `--shadow-card-hover` are gone: read `--shadow-popover`. Read `--shadow-modal` for `--shadow-dialog`, `--shadow-raised` for `--shadow-segment` and `--shadow-knob`, `--surface` (off) or `--on-primary` (on) for `--switch-knob`, and the `--tonal-hover` colour for `--tonal-hover-brightness`. `--page-tabs-fade-start` and `--page-tabs-fade-end` are gone with the tab fades. See "Retired names" in `docs/themes.md`.
|
|
41
|
+
- Breaking: `ThemeOverrides` takes a six-digit hex colour for colour tokens only; a factor override such as `--tonal-hover-brightness` no longer type-checks. Move a factor override into the host's own stylesheet.
|
|
42
|
+
- Breaking: `themeStylesheet()` throws when `extraFixed` or an app token names any token the library now defines, the new scale tokens and colour roles included (`--space-4`, `--control-border`). Rename such an app token.
|
|
43
|
+
- Breaking: the base stylesheet now themes elements that carry no class: a text input, textarea, or select gets the field outline and ground; a checkbox or radio gets the `.check` look; scrollbars, the caret, `accent-color`, `::selection`, `::placeholder`, and `meter` take theme colours; every focusable element gets a 2px accent ring on `:focus-visible`; a `button[aria-pressed='true']` gets the on look. The text-field floor, scrollbars, the caret, and `accent-color` weigh nothing (`:where()`), so any host rule wins over them. The rest carry some weight: the `.check` look on a checkbox or radio with no class weighs a class (it is `.check`'s own rule), the focus ring and the on look weigh one pseudo-class or attribute, and `meter`, `::placeholder`, and `::selection` one element. A host rule of more weight, or of the same weight after the base sheet (a class, for most), wins over them; a bare element rule such as `button { outline: none }` does not. To keep a native checkbox's platform drawing, give it a class.
|
|
44
|
+
- Breaking: chrome is not selectable. The base sheet sets `user-select: none` on the body; fields, the new `.selectable` class, and each component's content (values, paths, messages, statements, a load failure, output) opt back in at zero weight. `code`, `pre`, and `samp` are chrome by their tag (a command in a label, a token in a menu). Listings and grids select rows and cells, not text: a drag, Shift-click, or double-click on a row never starts a text selection, even inside a region a host opts into selection; status summaries, pane messages, an empty grid's line, and output in a well stay selectable. Selected text greys to `--fill` under `data-window-inactive` on the root. Mark a host's own copyable content, a code value included, `.selectable`.
|
|
45
|
+
- Breaking: the pointer is the arrow over every control (buttons, tabs, rows, links, crumbs, toggles), as in a desktop application, from a zero-weight `cursor: default` on links, buttons, labels, and control roles; no stylesheet sets the hand, and a dragged `DataGrid` heading no longer shows the grabbing hands. The I-beam stays in text and the resize cursors on column edges. Drop `cursor: pointer` from a host's own controls (`docs/tokens.md`, "Pointer").
|
|
46
|
+
- Breaking: the menu, palette, and match-highlight classes (`.folder-menu*`, `.entry-menu-heading`, `.palette*`, `.name-hit`) apply anywhere, not only under `.listing-root`. Rename a host's own elements that used these class names outside the scope, or they take the library's look.
|
|
47
|
+
- Breaking: `ActivityBar` draws its own track and fill (`.activity-bar`, `.activity-fill`); `className` and `fillClassName` are optional and add to them. Remove host rules that sized or coloured the track. A determinate fill that is not `moving` now dims to `--progress-idle`: a static meter passes `moving`.
|
|
48
|
+
- Breaking: `DataGrid` markup. `role="grid"`, the keyboard focus, and the scrolling moved from `.data-grid` to a new `.data-grid-scroll` inside it, which holds the header row and the `rowgroup`; `.data-grid` is now the frame. Point selectors, tests, and scroll handling at `.data-grid-scroll`.
|
|
49
|
+
- Breaking: `PageTabs` markup and look. The `.page-tabs` strip sits in a `.page-tabs-frame` with `.page-tabs-more` chevron buttons at an edge that hides tabs, and the edge fades are gone. A tab that does not fit whole carries `data-clipped`, is not drawn, and takes no click, though it stays reachable by the arrow keys; a tab wider than the span between both chevrons is drawn cut instead. Every strip is small cornered tabs, the current one on `--current-bg` with a `--current-ring` edge and no `--current-mark` underline, with room above and below: 24px tabs in a 36px strip, and in a `pills` strip 20px tabs in a 28px one. The strip scrolls at once, never smoothly. Point selectors at the new frame and `data-clipped`, and give the strip its new height.
|
|
50
|
+
- Breaking: `Pager` keeps a step that cannot act in its place as a disabled button. It used to be an empty `span.pager-step` (icon steps) or left out (worded steps). Update tests that count the pager's buttons.
|
|
51
|
+
- Breaking: `ResultChart` shows the hovered value in a `.result-chart-float` panel beside the mark. `.result-chart-readout` is now a visually hidden live line for assistive technology and has no styles; style `.result-chart-float` instead.
|
|
52
|
+
- Breaking: listing labels, row names, `StateMark` words, `PaneStatus` summaries, `RunHeader`'s headline, and a `PanePathBar` string crumb carry their tooltip only while the text is cut (`cutTooltip`, `data-tooltip-cut`), not always. A string crumb's tooltip moved from `.crumb-label` to its inner `.crumb-text`, and a control crumb without `tip` gains the same cut-only tooltip there. `StateMark` wraps its word in `.pane-state-word`, draws a shape per tone (dot, diamond, square, rings), and its busy spinner is the shared `Spinner`; with `word=""` it draws no gap after its mark. `QuietAction` wraps its verb in `.pane-act-word`. Tests that look for these tooltips need a cut element.
|
|
53
|
+
- Breaking: `KeyLegendStrip` drops verbs that do not fit whole instead of clipping the last one at the edge. Tests that expect a clipped verb need a wider strip.
|
|
54
|
+
- Breaking: the terminal's context menu is portalled to the document body at `--z-dialog-popover`, and `BELL_FLASH_MS` is 280 (was 250), matching `--duration-slow`. Point selectors for the menu at the body, not the terminal.
|
|
55
|
+
- Breaking: `DateTimePicker`'s panel is `position: fixed` at `--z-menu` and opens above its button when the room below is short, so a scrolling pane or dialog no longer clips it. Remove host rules that positioned it inside its container.
|
|
56
|
+
- Breaking: a terminal that cannot start shows `.terminal-failure` as terminal text: a `role="alert"` block holding the danger glyph (`.terminal-failure-glyph`) and the words (`.terminal-failure-text`) in the terminal's monospace and text colour at its inset. Point selectors that read the `p.terminal-failure` at `.terminal-failure-text`.
|
|
57
|
+
- Breaking: a dialog's title is always one line, `ConfirmDialog`'s included: a title too long for its strip is cut with an ellipsis, and a string title carries its text as a tooltip only while cut. A title names the action and carries no data ("Delete Now?", not "Delete 7 Items Now?"): the count, names, and paths go in the body. Nothing stands beside the title: `ModalDialog`'s `titleAside` and `ConfirmDialog`'s `context` are gone; put that context in the body's first line. See "The title" in `docs/components/dialog.md`.
|
|
58
|
+
- Breaking: one confirmation anatomy for every case. `ConfirmDialog` has four parts whatever it acts on: a one-line title with no count, the lead (`message`), the things it acts on as one framed list, and the buttons. `items` draws one row per item (the kind's glyph, the name in monospace, a dim detail at the row's end) in a framed well: five rows in full, then "+N more"; `groups` adds a labelled, counted list per further group. The name and the detail share the row by what they hold, so a short detail keeps one line while the row has room. A name or detail wraps, up to three lines and after a separator where it can; a name still too long is cut at its end, a detail at its start behind an ellipsis, so a folder keeps its nearest folders, and either shows its whole text as a tooltip while cut. A confirmation with items is 480px wide whatever their number (`.confirm-items`), and its description reads the lead, the count, then the names. `facts` are for facts about the action, drawn under the items; a fact's value wraps up to three lines before it is cut, and `more` ends the row in "+N more". `message` is optional: without it no empty `.dialog-message` is drawn and the items (or else the facts) describe the dialog. `paths` is deprecated and draws through the same list (a path's last part as the name, its folder as the detail); `.dialog-paths` is gone. Pass `items` with the kind's glyph and a detail instead of `paths`, and move the things acted on out of `facts` into `items`. See "One anatomy for every case" in `docs/components/dialog.md`.
|
|
59
|
+
- Breaking: an action is never drawn as a link. `.pane-strip-link` (Update all, Clear) is a small push button: words in `--text` inside a 20px `--control-border` bezel (a `--danger` bezel for `.danger`), with the shared quiet hover and press; in a column strip it takes its height from the strip and draws its focus ring inside. A `DataGrid` cell with `onOpen` leads to another record, so it keeps a link's look (`--accent-text` over an `--accent-line` underline) with the arrow pointer, and an `ArrowRight` glyph at its trailing edge on the cursor cell; a download cell (`cell-binary`) keeps a quieter `--text-faint` underline. Give `onOpen` to a value that leads out of its row, never the row's own name or id, and size a strip for the 20px button.
|
|
60
|
+
- Breaking: lists select as a desktop list does. Whatever marks a row (the cursor, a mark, a checked box, a selection) goes quiet in a pane that does not hold the keys and, under the new root attribute `data-window-inactive`, in every pane, where the active pane's frame takes `--border-strong`. A quiet selection or mark stands on `--fill` with its words in `--text` and `--text-on-surface`, a quiet mark's bar and a checked box on the row take `--control-border-strong`, and a quiet cursor is a hairline frame in `--control-border-strong` with no fill and no bar. A `DataGrid` goes quiet under the same conditions: its marked rows and columns take `--fill`, its cursor cell takes the hairline frame, and its row checkboxes grey. Set `data-window-inactive` on the root while the host's window is not focused.
|
|
61
|
+
- Breaking: row actions are glyphs; tools say their words. In a listing row the keys reach, `QuietAction` follows `RowLinkLookContext` as `RowIconAction` does: under the default `icons` it draws its glyph alone (`.pane-act.wordless`), its `word` as its tooltip (with `shortcut`) and kept for assistive technology; under `text` or `both`, which a host sets from a user's preference, its glyph and word. In a `PanePathBar`, in a `tabbable` row, and anywhere else it draws its glyph and word. A lit `QuietAction` and the cursor row's actions are full words in `--text`, a lit one a weight up with its glyph in `--accent`. A row's `.pane-hover-cell` icons stay in view on every row in their quiet tone instead of appearing on hover. A listing that sized an action column for words (`ACTION_COLUMN`) can take `iconLinksColumn(1, 0)` for a glyph.
|
|
62
|
+
- Breaking: `SelectAllBar` says how many rows are checked ("3 of 8 selected", `.select-all-count`) where it said "With selected:"; `SelectAllLabels.withSelected` is replaced by `selected(checked, total)`, and its checkbox is a `.check`. Rename a `withSelected` label override to `selected`.
|
|
63
|
+
- Breaking: `.pane-message.danger` leads with the danger glyph and sets its words in `--text`, not the danger colour. Give a host's own glyph-led message the glyph as its first child, which the rule then leaves alone.
|
|
64
|
+
- Every component stylesheet reads the new scale tokens and colour roles instead of fixed values, so sizes, spacing, corners, and colours line up across components. Most visual changes in this release follow from this.
|
|
65
|
+
- A listing lays its strip and rows on one grid (subgrid) with a name column floor (`--pane-name-floor`, 14 characters), so a narrow pane scrolls sideways instead of cutting every name. A listing with no rows hides its column labels. Rows keep their state bar and a fade at the scroller's start edge while scrolled sideways. The pane's end glyphs share one edge (`--pane-glyph-reach`).
|
|
66
|
+
- Empty and failed panes: `Listing`'s `empty` line (`.pane-message.empty`) is a quiet row starting where a row's icon starts, in the rows' own type, for a list with nothing in it and nothing to do. `.pane-empty` stays the centred block of glyph, heading, sentence, and actions as buttons, now also for a pane that could not load, with the system's error under the actions. Every `.pane-message` starts on the row inset. `DataGrid`'s `empty` content sits where the first row would be, in the grid's cell type. See "Empty" in `docs/components/listing.md`.
|
|
67
|
+
- Hover is one clear step from rest and a press one clear step from hover in every theme; every outlined control and key cap shares one pressed look (`--press-frost`). A disabled primary, tonal, or danger button is drawn as a disabled neutral one. A neutral `Button`, an `IconButton`, or a strip action that is on draws one ring, and a toggle that is on stays on under the pointer.
|
|
68
|
+
- Key caps are one shared look across `KeyChord`, `KeyLegendStrip`, dialog legends, and `FilterEscape`. `SegmentedChoice`, `PageTabs`, `Pager`, menus, palettes, tooltips, `RunHeader`, and `SelectAllBar` take the shared hover, press, focus, and field looks.
|
|
69
|
+
- Dialogs set their own type (monospace for values, the interface font for sentences and labels), cap their height to the window and scroll their body under a pinned title strip and legend, and carry the lit top edge and `--shadow-modal`. Nothing animates in: a dialog and its frosted wash appear on the next frame, with no fade, drop, or scale.
|
|
70
|
+
- `PanePathBar` cuts every crumb in an inner `.crumb-text` and gives way in one stated order (`docs/components/pane.md`, "How a narrow bar gives way"): the crumbs before the last, the last to a stem of eight characters, a fact's words, then the crumbs before the last scroll out of view, then its quiet actions' words step down to icons (`data-tight` on the row), then the last crumb. Nothing is drawn over anything and no control leaves the row. A trail its row cannot hold scrolls sideways with its scrollbar hidden and fades the side that hides crumbs; a focused crumb scrolls into view clear of the fade, and the trail rests on its end, a slash first (`data-cramped`, `--pane-crumb-fit`). The bar re-fits when any box in it resizes and once fonts load. It sets `--pane-crumb-count` and `--pane-crumb-here-room` on `.pane-path-row`; a hand-written trail sets them there too.
|
|
71
|
+
- A tooltip wider than its control hangs from the control's leading edge (its right edge in a right-to-left page), as a desktop tooltip starts where the pointer is. A glyph button (a button, link, tab, radio, or input no wider than it is tall) keeps its tooltip centred, a control wider than its tooltip still centres it on the pointer, and the window-margin clamp and `side` are unchanged.
|
|
72
|
+
- `RunHeader`'s figure is 14px, the headline's size, its running glyph is the `Spinner`, and a failed headline keeps the text colour: only the glyph and the bar carry the danger tone, and the reason is `--text-dim`. A palette's `.palette-failure` leads with the danger glyph and sets its words in `--text`.
|
|
73
|
+
- A menu's `.folder-menu-note` wraps to two lines before it is cut with an ellipsis; a reason a row cannot act goes in that row's tooltip.
|
|
74
|
+
- `DataGrid` fills the width it is given, as a desktop table view fills its pane, and leaves the slack after its last column empty.
|
|
75
|
+
- Charts share one look (axis, grid lines, swatches, hovered mark); a chart with no values keeps its plot's place and centres a dim line; a `ScatterChart` axis and a `ResultChart`'s numeric horizontal axis write numbers from a million up short (`2.5M`); a pie with more than eight slices hatches the later ones, and a `ResultChart` legend ends in a `+N` count of entries it leaves out. A plot that takes a range or zoom drag keeps the arrow, and the scatter frame's corner still resizes it without drawing the browser's striped grip.
|
|
76
|
+
- The terminal's scrollback thumb behaves as an overlay scroll bar, hidden at rest and shown while the reader scrolls (`data-scrolling`) or the pointer or keyboard is on the rail, and the pointer stays the I-beam over a link.
|
|
77
|
+
- Syntax tokens (`--syntax-*`) and `--on-tonal` in Catppuccin Latte are adjusted to keep 4.5:1 on the ground and a panel.
|
|
78
|
+
|
|
79
|
+
### Fixed
|
|
80
|
+
|
|
81
|
+
- The terminal keeps every cell's text at 4.5:1 against that cell's background, draws selected text in `--terminal-selection-text`, shows a quiet outline cursor while unfocused, and shows a start failure in its place.
|
|
82
|
+
- `NameCut` never leaves a gap between an ellipsis and the next part, nor after a head shorter than an ellipsis's room (`~/` in `~/n1000/.controller 85977`), and cuts a right-to-left name the mirrored way.
|
|
83
|
+
- `DataGrid` keeps an open editor inside the grid's frame with its cell's text inset, and its focus ring on the frame. `DateTimePicker` keeps its time fields on one row.
|
|
84
|
+
- The pinned actions column and side fades follow a right-to-left `dir`, and scroll fades never cover a scroller's border or scrollbar.
|
|
85
|
+
- A pinned actions column (`.pane-pin-end`) in a scroller of the host's own (neither a `.pane-list` nor the listing itself) stops with its end inset inside that scroller, so its words no longer end against the scroller's edge. A pinned listing now ends its grid with an empty track as wide as the row inset in place of its end padding, and its pinned cells stick at `inset-inline-end: 0` wherever they scroll; a host style that sticks another cell at the last column's track width from the end must add the row inset to that width.
|
|
86
|
+
- On a state row, every control the shared recipes wash keeps the row's fill under its words, in listings and the `DataGrid`; a quiet row's busy ring and spinner take `--text-on-surface` on a quiet mark or selection and keep the accent on a quiet cursor.
|
|
87
|
+
|
|
88
|
+
### Removed
|
|
89
|
+
|
|
90
|
+
- The tokens retired under Changed: `--shadow-menu`, `--shadow-dialog`, `--shadow-notice`, `--shadow-card`, `--shadow-card-hover`, `--shadow-segment`, `--shadow-knob`, `--switch-knob`, `--tonal-hover-brightness`, `--page-tabs-fade-start`, and `--page-tabs-fade-end`.
|
|
91
|
+
- `ModalDialog`'s `titleAside` prop and its `.dialog-context` class, `ConfirmDialog`'s `context` prop, and `.dialog-paths`.
|
|
92
|
+
- `SelectAllLabels.withSelected` and `.select-all-with` (see `selected` and `.select-all-count`).
|
|
93
|
+
- The `.result-chart-readout` styles, and the `dialog-settle` and `dialog-wash-in` keyframes.
|
|
94
|
+
|
|
9
95
|
## [0.1.4] - 2026-11-12
|
|
10
96
|
|
|
11
97
|
### Fixed
|
|
@@ -60,7 +146,8 @@ The first published version. The package is published to npm as `@bigpixelrocket
|
|
|
60
146
|
- `lucide-react` 1.31 or later within 1.x is a peer dependency.
|
|
61
147
|
- Terminal (`@bigpixelrocket/uiok/terminal`, `docs/components/terminal.md`): `Terminal`, Ghostty's VT engine as WebAssembly drawn on a canvas, read-only without `onInput`, with a Copy and Paste menu whose chords come from `menuChords`, a visual bell, line-editing actions bound by `actionForKey`, and `TerminalScrollbackContext`. The package root does not export it, so an app without a terminal never loads its assets. Its words are the new `terminal` label group; the package now ships a `NOTICE` with the engine's, adapter's, and font's licences.
|
|
62
148
|
|
|
63
|
-
[Unreleased]: https://github.com/Bigpixelrocket/uiok/compare/v0.
|
|
149
|
+
[Unreleased]: https://github.com/Bigpixelrocket/uiok/compare/v0.2.0...HEAD
|
|
150
|
+
[0.2.0]: https://github.com/Bigpixelrocket/uiok/compare/v0.1.4...v0.2.0
|
|
64
151
|
[0.1.4]: https://github.com/Bigpixelrocket/uiok/compare/v0.1.3...v0.1.4
|
|
65
152
|
[0.1.3]: https://github.com/Bigpixelrocket/uiok/compare/v0.1.2...v0.1.3
|
|
66
153
|
[0.1.2]: https://github.com/Bigpixelrocket/uiok/compare/v0.1.1...v0.1.2
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ UIOK is a React UI library with a retro look: compact controls set in system and
|
|
|
6
6
|
|
|
7
7
|
## Status
|
|
8
8
|
|
|
9
|
-
Pre-1.0; expect breaking changes in minor releases until 1.0. Version 0.1.0 ships the base stylesheet with 18 light and dark themes ([docs/themes.md](docs/themes.md)), shared labels, keyboard helpers, and component areas from buttons, tooltips, and dialogs to listings, data grids, pickers, palettes, and charts ([docs/components/](docs/components/)). Each area is importable on its own as `@bigpixelrocket/uiok/<area>`.
|
|
9
|
+
Pre-1.0; expect breaking changes in minor releases until 1.0. Version 0.1.0 ships the base stylesheet with 18 light and dark themes ([docs/themes.md](docs/themes.md)) and one set of size, spacing, corner, motion, and layer tokens ([docs/tokens.md](docs/tokens.md)), shared labels, keyboard helpers, and component areas from buttons, tooltips, and dialogs to listings, data grids, pickers, palettes, and charts ([docs/components/](docs/components/)). Each area is importable on its own as `@bigpixelrocket/uiok/<area>`.
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
@@ -5,12 +5,19 @@ export interface ActivityBarProps {
|
|
|
5
5
|
readonly fraction: number | null;
|
|
6
6
|
/** The bar's accessible name ("Whole transfer"). */
|
|
7
7
|
readonly label: string;
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Whether the run is working now. Only then do the stripes move and does a
|
|
10
|
+
* fill keep the accent; a bar that is not moving dims to the idle tone. A
|
|
11
|
+
* static meter that is never "working" (space used) passes `true`.
|
|
12
|
+
*/
|
|
9
13
|
readonly moving: boolean;
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
/**
|
|
15
|
+
* A class for the track beside its own `activity-bar`, for a host that
|
|
16
|
+
* places the bar or recolours it for a state (a failed run's fill).
|
|
17
|
+
*/
|
|
18
|
+
readonly className?: string;
|
|
19
|
+
/** A class for the fill beside its own `activity-fill`; also put on the stripes. */
|
|
20
|
+
readonly fillClassName?: string;
|
|
14
21
|
}
|
|
15
22
|
/**
|
|
16
23
|
* A progress bar that is either determinate, a fill as wide as the fraction
|
|
@@ -22,8 +29,14 @@ export interface ActivityBarProps {
|
|
|
22
29
|
* An indeterminate bar has no value for assistive technology, which reads
|
|
23
30
|
* it as busy while it moves.
|
|
24
31
|
*
|
|
25
|
-
* The
|
|
26
|
-
*
|
|
27
|
-
*
|
|
32
|
+
* The bar draws its own track and fill (`.activity-bar`, `.activity-fill`):
|
|
33
|
+
* an 8px trough in `--control-track` ringed in `--control-border`, and an
|
|
34
|
+
* accent fill, so every caller's bar looks the same. The caller's classes
|
|
35
|
+
* sit beside them and win over them, for placement and for a state colour.
|
|
36
|
+
* The stripes take their colour from `--stripe-ink` on the fill, the accent
|
|
37
|
+
* while moving and `--progress-idle` while standing still; a fill does the
|
|
38
|
+
* same, so a paused or stopped bar never reads as a working one in either
|
|
39
|
+
* form. Any fraction above zero draws at least a 4px nub, so a run at 1%
|
|
40
|
+
* still shows it has started.
|
|
28
41
|
*/
|
|
29
42
|
export declare function ActivityBar({ fraction, label, moving, className, fillClassName }: ActivityBarProps): ReactElement;
|
|
@@ -9,13 +9,23 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
9
9
|
* An indeterminate bar has no value for assistive technology, which reads
|
|
10
10
|
* it as busy while it moves.
|
|
11
11
|
*
|
|
12
|
-
* The
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* The bar draws its own track and fill (`.activity-bar`, `.activity-fill`):
|
|
13
|
+
* an 8px trough in `--control-track` ringed in `--control-border`, and an
|
|
14
|
+
* accent fill, so every caller's bar looks the same. The caller's classes
|
|
15
|
+
* sit beside them and win over them, for placement and for a state colour.
|
|
16
|
+
* The stripes take their colour from `--stripe-ink` on the fill, the accent
|
|
17
|
+
* while moving and `--progress-idle` while standing still; a fill does the
|
|
18
|
+
* same, so a paused or stopped bar never reads as a working one in either
|
|
19
|
+
* form. Any fraction above zero draws at least a 4px nub, so a run at 1%
|
|
20
|
+
* still shows it has started.
|
|
15
21
|
*/
|
|
16
22
|
export function ActivityBar({ fraction, label, moving, className, fillClassName }) {
|
|
23
|
+
const track = className ? `activity-bar ${className}` : 'activity-bar';
|
|
24
|
+
const motion = moving ? ' moving' : '';
|
|
25
|
+
const fill = fillClassName ? `activity-fill ${fillClassName}` : 'activity-fill';
|
|
17
26
|
if (fraction === null) {
|
|
18
|
-
return (_jsx("div", { "aria-busy": moving, "aria-label": label, className: `${
|
|
27
|
+
return (_jsx("div", { "aria-busy": moving, "aria-label": label, className: `${track} indeterminate${motion}`, role: "progressbar", children: _jsx("div", { className: `${fill} activity-stripes` }) }));
|
|
19
28
|
}
|
|
20
|
-
|
|
29
|
+
const done = Math.min(Math.max(fraction, 0), 1);
|
|
30
|
+
return (_jsx("div", { "aria-label": label, "aria-valuemax": 100, "aria-valuemin": 0, "aria-valuenow": Math.round(fraction * 100), className: track + motion, role: "progressbar", children: _jsx("div", { className: fill, style: { width: `${done * 100}%`, minWidth: done > 0 ? 'var(--space-2)' : undefined } }) }));
|
|
21
31
|
}
|
|
@@ -1,17 +1,59 @@
|
|
|
1
|
-
/* ----
|
|
1
|
+
/* ---- Progress bar (ActivityBar) ----
|
|
2
|
+
|
|
3
|
+
The bar's own track and fill, so every caller's bar is the same picture:
|
|
4
|
+
an 8px trough in --control-track (the trough every control shares, on
|
|
5
|
+
which the accent keeps 3:1), ringed in --control-border so its empty part
|
|
6
|
+
shows even where the trough is close to the ground, and an accent fill
|
|
7
|
+
with the trough's rounded ends. Both are written at no weight, so a
|
|
8
|
+
caller's class beside them (a run's state colour, a wider bar) wins. The
|
|
9
|
+
fill moves at the motion scale's fast step, linearly, as every progress
|
|
10
|
+
fill does. Any fraction above zero keeps a 4px nub (set inline by
|
|
11
|
+
ActivityBar), so a bar at 1% still shows that the work has started. */
|
|
12
|
+
:where(.activity-bar) {
|
|
13
|
+
position: relative;
|
|
14
|
+
display: flex;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
height: var(--space-4);
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
border-radius: var(--radius-sm);
|
|
19
|
+
background: var(--control-track);
|
|
20
|
+
box-shadow: inset 0 0 0 var(--line) var(--control-border);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:where(.activity-fill) {
|
|
24
|
+
height: 100%;
|
|
25
|
+
border-radius: var(--radius-sm);
|
|
26
|
+
background: var(--accent);
|
|
27
|
+
transition: width var(--duration-fast) linear;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* A fill that is not moving (paused, stopped, waiting) dims to the idle
|
|
31
|
+
tone, as standing stripes do, so a halted bar never looks like a working
|
|
32
|
+
one. At no weight: a caller that shows a settled state (done, failed)
|
|
33
|
+
colours the fill with its own class and wins. */
|
|
34
|
+
:where(.activity-bar:not(.moving, .indeterminate)) > :where(.activity-fill) {
|
|
35
|
+
background: var(--progress-idle);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* ---- Activity stripes ----
|
|
2
39
|
|
|
3
40
|
The bar of a run that works without reporting how far it has got: diagonal
|
|
4
41
|
stripes across the whole track, in the bar's own colour (--stripe-ink)
|
|
5
42
|
over a fainter band of it (--stripe-ground). They scroll left to right
|
|
6
|
-
while the run goes on and stand still in every other state
|
|
7
|
-
|
|
8
|
-
|
|
43
|
+
while the run goes on and stand still in every other state, where they
|
|
44
|
+
dim to --progress-idle on a fainter band, so a still frame (or reduced
|
|
45
|
+
motion) never shows a waiting bar as a working one. A container that
|
|
46
|
+
shows a state of its own (a failed run) sets --stripe-ink and
|
|
47
|
+
--stripe-ground on the stripes from a more specific selector. The stripe period is 12px across the
|
|
9
48
|
stripes, 12 / sin 45deg = 16.97px along the track, which is how far one
|
|
10
|
-
loop moves them, so the loop is seamless.
|
|
49
|
+
loop moves them, so the loop is seamless. The loop's 0.9s is a deliberate
|
|
50
|
+
exception to the motion tokens: it sets the stripes' speed against that
|
|
51
|
+
period, not the length of a change. */
|
|
11
52
|
.indeterminate > .activity-stripes {
|
|
12
53
|
--stripe-ink: var(--accent);
|
|
54
|
+
--stripe-band: color-mix(in srgb, var(--stripe-ink) var(--stripe-ground, 38%), transparent);
|
|
13
55
|
width: 100%;
|
|
14
|
-
background-color:
|
|
56
|
+
background-color: var(--stripe-band);
|
|
15
57
|
background-image: repeating-linear-gradient(
|
|
16
58
|
-45deg,
|
|
17
59
|
var(--stripe-ink) 0 6px,
|
|
@@ -20,6 +62,11 @@
|
|
|
20
62
|
transition: none;
|
|
21
63
|
}
|
|
22
64
|
|
|
65
|
+
.indeterminate:not(.moving) > .activity-stripes {
|
|
66
|
+
--stripe-ink: var(--progress-idle);
|
|
67
|
+
--stripe-ground: 16%;
|
|
68
|
+
}
|
|
69
|
+
|
|
23
70
|
.indeterminate.moving > .activity-stripes {
|
|
24
71
|
animation: activity-stripes 0.9s linear infinite;
|
|
25
72
|
}
|
package/dist/button/Button.d.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes, ReactElement, Ref } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* The action tiers: `primary` for the one main action of a view, `tonal` for
|
|
4
|
-
* a row's routine positive action (Install), `
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* a row's routine positive action (Install), `danger` for a button that
|
|
5
|
+
* destroys something (Delete, Remove), drawn red-outlined, and `neutral` for
|
|
6
|
+
* everything else. A confirmation's destructive verb is the red lit primary
|
|
7
|
+
* of its dialog's key legend, not a button tier.
|
|
7
8
|
*/
|
|
8
|
-
export type ButtonVariant = 'primary' | 'tonal' | 'neutral';
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
export type ButtonVariant = 'primary' | 'tonal' | 'danger' | 'neutral';
|
|
10
|
+
/**
|
|
11
|
+
* The button heights: `regular` (28px), `small` (24px), and `xs` (20px, for a
|
|
12
|
+
* push button inside a row or a strip, its pointer target grown to 24px).
|
|
13
|
+
*/
|
|
14
|
+
export type ButtonSize = 'regular' | 'small' | 'xs';
|
|
11
15
|
/** Props for {@link Button}: every `<button>` attribute, plus its tier and size. */
|
|
12
16
|
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
13
17
|
/** The action tier; `neutral` unless given. */
|
package/dist/button/Button.js
CHANGED
|
@@ -7,7 +7,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
7
7
|
* type, so it never submits a form by accident.
|
|
8
8
|
*/
|
|
9
9
|
export function Button({ variant = 'neutral', size = 'regular', className, type = 'button', ...rest }) {
|
|
10
|
-
const classes = [
|
|
10
|
+
const classes = [
|
|
11
|
+
'button',
|
|
12
|
+
`button-${variant}`,
|
|
13
|
+
size === 'regular' ? '' : `button-${size}`,
|
|
14
|
+
className
|
|
15
|
+
]
|
|
11
16
|
.filter(Boolean)
|
|
12
17
|
.join(' ');
|
|
13
18
|
return _jsx("button", { ...rest, className: classes, type: type });
|