@kerfjs/ui 5.0.0-beta.124 → 5.0.0-beta.125
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 +1 -0
- package/ai/component-catalog.json +91 -1
- package/ai/component-composition.json +70 -0
- package/ai/component-props.json +202 -0
- package/ai/components/README.md +1 -0
- package/ai/components/gauge.md +83 -0
- package/ai/components/segmented-control.md +1 -0
- package/ai/public-api-signatures-v1.md +100 -1
- package/ai/skill.md +26 -23
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/browser/gauge.js +3 -0
- package/dist/browser/segmented-control.js +1 -0
- package/dist/catalog.js +3 -3
- package/dist/{chunk-F3PZGFEA.js → chunk-6OT7FOSA.js} +2 -2
- package/dist/{chunk-F3PZGFEA.js.map → chunk-6OT7FOSA.js.map} +1 -1
- package/dist/{chunk-NYNNNEAU.js → chunk-KQZIC5CA.js} +4 -4
- package/dist/{chunk-NYNNNEAU.js.map → chunk-KQZIC5CA.js.map} +1 -1
- package/dist/{chunk-3JOEJT2Z.js → chunk-NHQOX7T4.js} +2 -2
- package/dist/{chunk-3JOEJT2Z.js.map → chunk-NHQOX7T4.js.map} +1 -1
- package/dist/{chunk-7AUZG5EW.js → chunk-SVUJIVMR.js} +2 -2
- package/dist/{chunk-7AUZG5EW.js.map → chunk-SVUJIVMR.js.map} +1 -1
- package/dist/{chunk-4Z4QSTRF.js → chunk-TTFW6E6C.js} +37 -4
- package/dist/chunk-TTFW6E6C.js.map +1 -0
- package/dist/collapsible-panel.js +2 -2
- package/dist/editor.js +7 -7
- package/dist/gauge.d.ts +73 -0
- package/dist/gauge.js +157 -0
- package/dist/gauge.js.map +1 -0
- package/dist/index.js +8 -8
- package/dist/list-detail-dialog.js +2 -2
- package/dist/nav-stack.js +1 -1
- package/dist/segmented-control.d.ts +21 -0
- package/dist/segmented-control.js +3 -1
- package/dist/split-view.js +1 -1
- package/dist/styles/badge.css +39 -0
- package/dist/styles/components/feedback/badge/badge.css +39 -0
- package/dist/styles/components/feedback/gauge/gauge.css +132 -0
- package/dist/styles/components/forms/segmented-control/segmented-control.css +16 -0
- package/dist/styles/gauge.css +132 -0
- package/dist/styles/segmented-control.css +16 -0
- package/dist/styles/styles.css +1 -0
- package/dist/workbench-dialog.js +1 -1
- package/dist/workbench.js +1 -1
- package/docs/component-selection.md +2 -1
- package/docs/design/sketch/Kerf-UI.sketch +0 -0
- package/docs/design/sketch/README.md +1 -1
- package/docs/design/sketch/content/README.md +8 -8
- package/docs/design/sketch/coverage.md +7 -5
- package/docs/design/sketch/unified/README.md +1 -1
- package/docs/design/sketch/unified/pages/content.png +0 -0
- package/docs/design/templates/button/full-width-dark.svg +1 -1
- package/docs/design/templates/button/full-width.svg +1 -1
- package/docs/design/templates/button/icons-dark.svg +1 -1
- package/docs/design/templates/button/icons.svg +1 -1
- package/docs/design/templates/button/pill-dark.svg +1 -1
- package/docs/design/templates/button/pill.svg +1 -1
- package/docs/design/templates/button/toggles-dark.svg +1 -1
- package/docs/design/templates/button/toggles.svg +1 -1
- package/docs/design/templates/button-dark.svg +1 -1
- package/docs/design/templates/button.svg +1 -1
- package/docs/design/templates/checkbox/compact-dark.svg +1 -1
- package/docs/design/templates/checkbox/compact.svg +1 -1
- package/docs/design/templates/checkbox/mixed-dark.svg +1 -1
- package/docs/design/templates/checkbox/mixed.svg +1 -1
- package/docs/design/templates/checkbox/states-dark.svg +1 -1
- package/docs/design/templates/checkbox/states.svg +1 -1
- package/docs/design/templates/checkbox-dark.svg +1 -1
- package/docs/design/templates/checkbox-group/vertical-dark.svg +1 -1
- package/docs/design/templates/checkbox-group/vertical.svg +1 -1
- package/docs/design/templates/checkbox-group-dark.svg +1 -1
- package/docs/design/templates/checkbox-group.svg +1 -1
- package/docs/design/templates/checkbox.svg +1 -1
- package/docs/design/templates/chip/tags-dark.svg +1 -1
- package/docs/design/templates/chip/tags.svg +1 -1
- package/docs/design/templates/chip-dark.svg +1 -1
- package/docs/design/templates/chip.svg +1 -1
- package/docs/design/templates/choice-chips/compact-icons-dark.svg +1 -1
- package/docs/design/templates/choice-chips/compact-icons.svg +1 -1
- package/docs/design/templates/choice-chips-dark.svg +1 -1
- package/docs/design/templates/choice-chips.svg +1 -1
- package/docs/design/templates/color-field/compact-dark.svg +1 -1
- package/docs/design/templates/color-field/compact.svg +1 -1
- package/docs/design/templates/color-field/error-dark.svg +1 -1
- package/docs/design/templates/color-field/error.svg +1 -1
- package/docs/design/templates/color-field/hint-dark.svg +1 -1
- package/docs/design/templates/color-field/hint.svg +1 -1
- package/docs/design/templates/color-field-dark.svg +1 -1
- package/docs/design/templates/color-field.svg +1 -1
- package/docs/design/templates/color-picker/gray-dark.svg +1 -1
- package/docs/design/templates/color-picker/gray.svg +1 -1
- package/docs/design/templates/color-picker/hsb-dark.svg +1 -1
- package/docs/design/templates/color-picker/hsb.svg +1 -1
- package/docs/design/templates/color-picker/rgb-dark.svg +1 -1
- package/docs/design/templates/color-picker/rgb.svg +1 -1
- package/docs/design/templates/color-picker-dark.svg +1 -1
- package/docs/design/templates/color-picker.svg +1 -1
- package/docs/design/templates/disclosure/embedded-dark.svg +1 -1
- package/docs/design/templates/disclosure/embedded.svg +1 -1
- package/docs/design/templates/disclosure/framed-sunken-dark.svg +1 -1
- package/docs/design/templates/disclosure/framed-sunken.svg +1 -1
- package/docs/design/templates/disclosure/plain-dark.svg +1 -1
- package/docs/design/templates/disclosure/plain.svg +1 -1
- package/docs/design/templates/disclosure-dark.svg +1 -1
- package/docs/design/templates/disclosure.svg +1 -1
- package/docs/design/templates/empty-state/filtered-dark.svg +1 -1
- package/docs/design/templates/empty-state/filtered.svg +1 -1
- package/docs/design/templates/empty-state/with-action-dark.svg +1 -1
- package/docs/design/templates/empty-state/with-action.svg +1 -1
- package/docs/design/templates/empty-state-dark.svg +1 -1
- package/docs/design/templates/empty-state.svg +1 -1
- package/docs/design/templates/gauge/bare-dark.svg +1 -0
- package/docs/design/templates/gauge/bare.svg +1 -0
- package/docs/design/templates/gauge/full-dark.svg +1 -0
- package/docs/design/templates/gauge/full.svg +1 -0
- package/docs/design/templates/gauge-dark.svg +1 -0
- package/docs/design/templates/gauge.svg +1 -0
- package/docs/design/templates/list/compact-dark.svg +1 -1
- package/docs/design/templates/list/compact.svg +1 -1
- package/docs/design/templates/list/stack-dark.svg +1 -1
- package/docs/design/templates/list/stack.svg +1 -1
- package/docs/design/templates/list-action-row/default-dark.svg +1 -1
- package/docs/design/templates/list-action-row/default.svg +1 -1
- package/docs/design/templates/list-action-row/icon-tile-dark.svg +1 -1
- package/docs/design/templates/list-action-row/icon-tile.svg +1 -1
- package/docs/design/templates/list-action-row/selected-dark.svg +1 -1
- package/docs/design/templates/list-action-row/selected.svg +1 -1
- package/docs/design/templates/list-action-row/trailing-menu-dark.svg +1 -1
- package/docs/design/templates/list-action-row/trailing-menu.svg +1 -1
- package/docs/design/templates/list-action-row-dark.svg +1 -1
- package/docs/design/templates/list-action-row.svg +1 -1
- package/docs/design/templates/list-dark.svg +1 -1
- package/docs/design/templates/list-header/action-dark.svg +1 -1
- package/docs/design/templates/list-header/action.svg +1 -1
- package/docs/design/templates/list-header/inline-action-dark.svg +1 -1
- package/docs/design/templates/list-header/inline-action.svg +1 -1
- package/docs/design/templates/list-header/toggle-collapsed-dark.svg +1 -1
- package/docs/design/templates/list-header/toggle-collapsed.svg +1 -1
- package/docs/design/templates/list-header/toggle-expanded-dark.svg +1 -1
- package/docs/design/templates/list-header/toggle-expanded.svg +1 -1
- package/docs/design/templates/list-header-dark.svg +1 -1
- package/docs/design/templates/list-header.svg +1 -1
- package/docs/design/templates/list-item/default-dark.svg +1 -1
- package/docs/design/templates/list-item/default.svg +1 -1
- package/docs/design/templates/list-item/icon-tile-dark.svg +1 -1
- package/docs/design/templates/list-item/icon-tile.svg +1 -1
- package/docs/design/templates/list-item/multiline-dark.svg +1 -1
- package/docs/design/templates/list-item/multiline.svg +1 -1
- package/docs/design/templates/list-item/selected-dark.svg +1 -1
- package/docs/design/templates/list-item/selected.svg +1 -1
- package/docs/design/templates/list-item/trailing-dark.svg +1 -1
- package/docs/design/templates/list-item/trailing.svg +1 -1
- package/docs/design/templates/list-item-dark.svg +1 -1
- package/docs/design/templates/list-item.svg +1 -1
- package/docs/design/templates/list.svg +1 -1
- package/docs/design/templates/progress-ring/sizes-dark.svg +1 -1
- package/docs/design/templates/progress-ring/sizes.svg +1 -1
- package/docs/design/templates/progress-ring/tones-dark.svg +1 -1
- package/docs/design/templates/progress-ring/tones.svg +1 -1
- package/docs/design/templates/progress-ring-dark.svg +1 -1
- package/docs/design/templates/progress-ring.svg +1 -1
- package/docs/design/templates/search-field/empty-dark.svg +1 -1
- package/docs/design/templates/search-field/empty.svg +1 -1
- package/docs/design/templates/search-field/tokens-dark.svg +1 -1
- package/docs/design/templates/search-field/tokens.svg +1 -1
- package/docs/design/templates/search-field-dark.svg +1 -1
- package/docs/design/templates/search-field.svg +1 -1
- package/docs/design/templates/segmented-control/equal-dark.svg +1 -1
- package/docs/design/templates/segmented-control/equal.svg +1 -1
- package/docs/design/templates/segmented-control/pill-small-dark.svg +1 -1
- package/docs/design/templates/segmented-control/pill-small.svg +1 -1
- package/docs/design/templates/segmented-control-dark.svg +1 -1
- package/docs/design/templates/segmented-control.svg +1 -1
- package/docs/design/templates/select/compact-dark.svg +1 -1
- package/docs/design/templates/select/compact.svg +1 -1
- package/docs/design/templates/select/form-dark.svg +1 -1
- package/docs/design/templates/select/form.svg +1 -1
- package/docs/design/templates/select/icons-dark.svg +1 -1
- package/docs/design/templates/select/icons.svg +1 -1
- package/docs/design/templates/select-dark.svg +1 -1
- package/docs/design/templates/select.svg +1 -1
- package/docs/design/templates/split-button/full-width-dark.svg +1 -1
- package/docs/design/templates/split-button/full-width.svg +1 -1
- package/docs/design/templates/split-button/pill-dark.svg +1 -1
- package/docs/design/templates/split-button/pill.svg +1 -1
- package/docs/design/templates/split-button/states-dark.svg +1 -1
- package/docs/design/templates/split-button/states.svg +1 -1
- package/docs/design/templates/split-button/tones-dark.svg +1 -1
- package/docs/design/templates/split-button/tones.svg +1 -1
- package/docs/design/templates/split-button-dark.svg +1 -1
- package/docs/design/templates/split-button.svg +1 -1
- package/docs/design/templates/state-banner/danger-dark.svg +1 -1
- package/docs/design/templates/state-banner/danger.svg +1 -1
- package/docs/design/templates/state-banner/info-badge-dark.svg +1 -1
- package/docs/design/templates/state-banner/info-badge.svg +1 -1
- package/docs/design/templates/state-banner/info-dark.svg +1 -1
- package/docs/design/templates/state-banner/info.svg +1 -1
- package/docs/design/templates/state-banner/strip-dark.svg +1 -1
- package/docs/design/templates/state-banner/strip.svg +1 -1
- package/docs/design/templates/state-banner/success-dark.svg +1 -1
- package/docs/design/templates/state-banner/success.svg +1 -1
- package/docs/design/templates/state-banner/warning-dark.svg +1 -1
- package/docs/design/templates/state-banner/warning.svg +1 -1
- package/docs/design/templates/state-banner-dark.svg +1 -1
- package/docs/design/templates/state-banner.svg +1 -1
- package/docs/design/templates/tab-bar/workspace-tabs-dark.svg +1 -1
- package/docs/design/templates/tab-bar/workspace-tabs.svg +1 -1
- package/docs/design/templates/tab-bar-dark.svg +1 -1
- package/docs/design/templates/tab-bar.svg +1 -1
- package/docs/design/templates/tag-field/error-dark.svg +1 -1
- package/docs/design/templates/tag-field/error.svg +1 -1
- package/docs/design/templates/tag-field/tags-dark.svg +1 -1
- package/docs/design/templates/tag-field/tags.svg +1 -1
- package/docs/design/templates/tag-field-dark.svg +1 -1
- package/docs/design/templates/tag-field.svg +1 -1
- package/docs/design/templates/text-field/labeled-dark.svg +1 -1
- package/docs/design/templates/text-field/labeled.svg +1 -1
- package/docs/design/templates/text-field/search-dark.svg +1 -1
- package/docs/design/templates/text-field/search.svg +1 -1
- package/docs/design/templates/text-field-dark.svg +1 -1
- package/docs/design/templates/text-field.svg +1 -1
- package/docs/design/templates/toolbar/title-and-actions-dark.svg +1 -1
- package/docs/design/templates/toolbar/title-and-actions.svg +1 -1
- package/docs/design/templates/toolbar/width-visibility-320-dark.svg +1 -1
- package/docs/design/templates/toolbar/width-visibility-320.svg +1 -1
- package/docs/design/templates/toolbar/width-visibility-600-dark.svg +1 -1
- package/docs/design/templates/toolbar/width-visibility-600.svg +1 -1
- package/docs/design/templates/toolbar-control-group/borderless-single-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group/borderless-single.svg +1 -1
- package/docs/design/templates/toolbar-control-group/glass-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group/glass.svg +1 -1
- package/docs/design/templates/toolbar-control-group/icon-buttons-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group/icon-buttons.svg +1 -1
- package/docs/design/templates/toolbar-control-group/icon-tile-brand-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group/icon-tile-brand.svg +1 -1
- package/docs/design/templates/toolbar-control-group/icon-tile-danger-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group/icon-tile-danger.svg +1 -1
- package/docs/design/templates/toolbar-control-group/icon-tile-neutral-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group/icon-tile-neutral.svg +1 -1
- package/docs/design/templates/toolbar-control-group/icon-tile-success-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group/icon-tile-success.svg +1 -1
- package/docs/design/templates/toolbar-control-group/icon-tile-warning-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group/icon-tile-warning.svg +1 -1
- package/docs/design/templates/toolbar-control-group/push-buttons-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group/push-buttons.svg +1 -1
- package/docs/design/templates/toolbar-control-group/with-text-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group/with-text.svg +1 -1
- package/docs/design/templates/toolbar-control-group-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group.svg +1 -1
- package/docs/design/templates/toolbar-dark.svg +1 -1
- package/docs/design/templates/toolbar.svg +1 -1
- package/docs/design/templates/tree-list/files-dark.svg +1 -1
- package/docs/design/templates/tree-list/files.svg +1 -1
- package/docs/design/templates/tree-list/outline-dark.svg +1 -1
- package/docs/design/templates/tree-list/outline.svg +1 -1
- package/docs/design/templates/tree-list-dark.svg +1 -1
- package/docs/design/templates/tree-list.svg +1 -1
- package/docs/design/templates/value-table/details-dark.svg +1 -1
- package/docs/design/templates/value-table/details.svg +1 -1
- package/docs/design/templates/value-table-dark.svg +1 -1
- package/docs/design/templates/value-table.svg +1 -1
- package/docs/gauge.md +55 -0
- package/docs/progress.md +3 -2
- package/llms.txt +10 -1
- package/package.json +8 -2
- package/dist/chunk-4Z4QSTRF.js.map +0 -1
package/README.md
CHANGED
|
@@ -221,6 +221,7 @@ interchangeable. `ListItem` and `ListActionRow` deliberately expose no raw
|
|
|
221
221
|
| `Disclosure` | `@kerfjs/ui/disclosure` | `@kerfjs/ui/disclosure.css` |
|
|
222
222
|
| `ProgressBar` | `@kerfjs/ui/progress-bar` | `@kerfjs/ui/progress-bar.css` |
|
|
223
223
|
| `ProgressRing` | `@kerfjs/ui/progress-ring` | `@kerfjs/ui/progress-ring.css` |
|
|
224
|
+
| `Gauge` | `@kerfjs/ui/gauge` | `@kerfjs/ui/gauge.css` |
|
|
224
225
|
| `Slider` | `@kerfjs/ui/slider` | `@kerfjs/ui/slider.css` |
|
|
225
226
|
| `wireSliders`, `syncSlider` | `@kerfjs/ui/wire-sliders` | — |
|
|
226
227
|
| `TagField` | `@kerfjs/ui/tag-field` | `@kerfjs/ui/tag-field.css` |
|
|
@@ -6549,7 +6549,8 @@
|
|
|
6549
6549
|
"equal width",
|
|
6550
6550
|
"small",
|
|
6551
6551
|
"placeholder (loading)",
|
|
6552
|
-
"disabled (whole control)"
|
|
6552
|
+
"disabled (whole control)",
|
|
6553
|
+
"choice corner badge: count (hidden at 0, capped at badgeMax as 99+), short text, or dot, in any semantic badgeTone"
|
|
6553
6554
|
],
|
|
6554
6555
|
"accessibility": [
|
|
6555
6556
|
"Keep choice labels meaningful and every enabled native button in sequential Tab order."
|
|
@@ -9979,6 +9980,95 @@
|
|
|
9979
9980
|
"recipe": "docs/component-selection.md#problem-to-component-matrix"
|
|
9980
9981
|
}
|
|
9981
9982
|
},
|
|
9983
|
+
{
|
|
9984
|
+
"id": "gauge",
|
|
9985
|
+
"name": "Gauge",
|
|
9986
|
+
"category": "Feedback",
|
|
9987
|
+
"kind": "component",
|
|
9988
|
+
"source": "kerf",
|
|
9989
|
+
"description": "A speedometer-style dial for a reading on a scale that is not progress, such as a live rate: a 240-degree track arc, a fill from zero to the value, and a needle scaled to max. The full variant adds ticks and the value and unit inside the dial; the bare variant is the arc, fill, and needle alone at chip height, as a named meter.",
|
|
9990
|
+
"uses": [],
|
|
9991
|
+
"purpose": "Show a live rate or level against a ceiling at a glance (tokens per minute, tickets updated per hour) on a stats tile, a chip, or a standby display.",
|
|
9992
|
+
"publicExports": [
|
|
9993
|
+
"Gauge",
|
|
9994
|
+
"GaugeProps",
|
|
9995
|
+
"GaugeVariant",
|
|
9996
|
+
"GaugeColors",
|
|
9997
|
+
"GaugeRootAttributes",
|
|
9998
|
+
"ProgressTone"
|
|
9999
|
+
],
|
|
10000
|
+
"useWhen": [
|
|
10001
|
+
"A live rate or level on a glance surface: pass value, max, a label, and optional valueText and unit.",
|
|
10002
|
+
"A chip-height indicator beside other status: variant=\"bare\", which carries the value in its accessible name and hover title.",
|
|
10003
|
+
"A themed display such as a night palette: pass colors with typed CssColor values instead of writing CSS."
|
|
10004
|
+
],
|
|
10005
|
+
"avoidWhen": [
|
|
10006
|
+
"Do not use it for progress toward done; use ProgressBar or ProgressRing.",
|
|
10007
|
+
"Do not use it where a precise number matters more than the glance; show the number in Text.",
|
|
10008
|
+
"Do not target its classes to recolor it; pass tone or colors."
|
|
10009
|
+
],
|
|
10010
|
+
"alternatives": [
|
|
10011
|
+
{
|
|
10012
|
+
"id": "progress-ring",
|
|
10013
|
+
"relationship": "nearest",
|
|
10014
|
+
"when": "Use a ProgressRing for compact progress toward done."
|
|
10015
|
+
},
|
|
10016
|
+
{
|
|
10017
|
+
"id": "progress-bar",
|
|
10018
|
+
"relationship": "nearest",
|
|
10019
|
+
"when": "Use a ProgressBar for measurable progress with a label row."
|
|
10020
|
+
}
|
|
10021
|
+
],
|
|
10022
|
+
"appOwns": [
|
|
10023
|
+
"the value, max, valueText, and unit",
|
|
10024
|
+
"the label",
|
|
10025
|
+
"the variant, tone, size, and any colors"
|
|
10026
|
+
],
|
|
10027
|
+
"variants": [
|
|
10028
|
+
"full (ticks, value, and unit)",
|
|
10029
|
+
"bare (arc, fill, and needle)",
|
|
10030
|
+
"brand, success, warning, or danger tone",
|
|
10031
|
+
"pinned at the end when the value exceeds max"
|
|
10032
|
+
],
|
|
10033
|
+
"accessibility": [
|
|
10034
|
+
"It is role meter named by label, with aria-valuemin 0, aria-valuemax max, aria-valuenow clamped to max, and aria-valuetext set to the value text and unit; the SVG is decorative.",
|
|
10035
|
+
"A bare gauge also sets a hover title of the label and value.",
|
|
10036
|
+
"The needle and fill transition only when the value changes and hold still under prefers-reduced-motion or the static-effects switch; forced colors draw a GrayText track, a Highlight fill, and a CanvasText needle and readout."
|
|
10037
|
+
],
|
|
10038
|
+
"geometry": {
|
|
10039
|
+
"margin": "none",
|
|
10040
|
+
"border": "none",
|
|
10041
|
+
"padding": "none",
|
|
10042
|
+
"notes": [
|
|
10043
|
+
"Its width is size (88px full, 40px bare by default) and its height follows the dial; the drawing scales with the width."
|
|
10044
|
+
]
|
|
10045
|
+
},
|
|
10046
|
+
"delivery": {
|
|
10047
|
+
"moduleImport": "@kerfjs/ui/gauge",
|
|
10048
|
+
"browserImport": "@kerfjs/ui/gauge",
|
|
10049
|
+
"manualCssImport": "@kerfjs/ui/gauge.css",
|
|
10050
|
+
"sideEffects": [
|
|
10051
|
+
"browser-condition-css"
|
|
10052
|
+
]
|
|
10053
|
+
},
|
|
10054
|
+
"wiring": [],
|
|
10055
|
+
"publicClasses": [
|
|
10056
|
+
"kui-gauge",
|
|
10057
|
+
"kui-gauge__track",
|
|
10058
|
+
"kui-gauge__fill",
|
|
10059
|
+
"kui-gauge__tick",
|
|
10060
|
+
"kui-gauge__tick--major",
|
|
10061
|
+
"kui-gauge__needle",
|
|
10062
|
+
"kui-gauge__value",
|
|
10063
|
+
"kui-gauge__unit"
|
|
10064
|
+
],
|
|
10065
|
+
"publicTokens": [],
|
|
10066
|
+
"links": {
|
|
10067
|
+
"catalogRoute": "?component=gauge",
|
|
10068
|
+
"documentation": "docs/gauge.md",
|
|
10069
|
+
"recipe": "docs/component-selection.md#problem-to-component-matrix"
|
|
10070
|
+
}
|
|
10071
|
+
},
|
|
9982
10072
|
{
|
|
9983
10073
|
"id": "skeleton",
|
|
9984
10074
|
"name": "Skeleton",
|
|
@@ -7778,6 +7778,76 @@
|
|
|
7778
7778
|
"composition": "generated-permissive-default"
|
|
7779
7779
|
}
|
|
7780
7780
|
},
|
|
7781
|
+
{
|
|
7782
|
+
"key": "@kerfjs/ui:gauge",
|
|
7783
|
+
"package": "@kerfjs/ui",
|
|
7784
|
+
"id": "gauge",
|
|
7785
|
+
"name": "Gauge",
|
|
7786
|
+
"kind": "component",
|
|
7787
|
+
"source": "kerf",
|
|
7788
|
+
"parents": { "mode": "any", "entries": [] },
|
|
7789
|
+
"contexts": ["application-ui"],
|
|
7790
|
+
"zones": [],
|
|
7791
|
+
"children": { "mode": "any", "concepts": [], "requiredConcepts": [] },
|
|
7792
|
+
"state": [
|
|
7793
|
+
{
|
|
7794
|
+
"id": "the value, max, valueText, and unit",
|
|
7795
|
+
"owner": "application",
|
|
7796
|
+
"required": false
|
|
7797
|
+
},
|
|
7798
|
+
{ "id": "the label", "owner": "application", "required": false },
|
|
7799
|
+
{
|
|
7800
|
+
"id": "the variant, tone, size, and any colors",
|
|
7801
|
+
"owner": "application",
|
|
7802
|
+
"required": false
|
|
7803
|
+
}
|
|
7804
|
+
],
|
|
7805
|
+
"wiring": {
|
|
7806
|
+
"required": false,
|
|
7807
|
+
"helpers": [],
|
|
7808
|
+
"obligations": [],
|
|
7809
|
+
"stateAttributes": []
|
|
7810
|
+
},
|
|
7811
|
+
"responsive": { "owner": "not-applicable", "behaviors": [] },
|
|
7812
|
+
"layout": {
|
|
7813
|
+
"roles": ["feedback"],
|
|
7814
|
+
"geometry": {
|
|
7815
|
+
"margin": "none",
|
|
7816
|
+
"border": "none",
|
|
7817
|
+
"padding": "none",
|
|
7818
|
+
"notes": [
|
|
7819
|
+
"Its width is size (88px full, 40px bare by default) and its height follows the dial; the drawing scales with the width."
|
|
7820
|
+
]
|
|
7821
|
+
}
|
|
7822
|
+
},
|
|
7823
|
+
"accessibility": {
|
|
7824
|
+
"obligations": [
|
|
7825
|
+
"It is role meter named by label, with aria-valuemin 0, aria-valuemax max, aria-valuenow clamped to max, and aria-valuetext set to the value text and unit; the SVG is decorative.",
|
|
7826
|
+
"A bare gauge also sets a hover title of the label and value.",
|
|
7827
|
+
"The needle and fill transition only when the value changes and hold still under prefers-reduced-motion or the static-effects switch; forced colors draw a GrayText track, a Highlight fill, and a CanvasText needle and readout."
|
|
7828
|
+
]
|
|
7829
|
+
},
|
|
7830
|
+
"cssValueProps": [],
|
|
7831
|
+
"boundaries": {
|
|
7832
|
+
"rootClass": "kui-gauge",
|
|
7833
|
+
"publicClasses": [
|
|
7834
|
+
"kui-gauge",
|
|
7835
|
+
"kui-gauge__track",
|
|
7836
|
+
"kui-gauge__fill",
|
|
7837
|
+
"kui-gauge__tick",
|
|
7838
|
+
"kui-gauge__tick--major",
|
|
7839
|
+
"kui-gauge__needle",
|
|
7840
|
+
"kui-gauge__value",
|
|
7841
|
+
"kui-gauge__unit"
|
|
7842
|
+
],
|
|
7843
|
+
"publicTokens": []
|
|
7844
|
+
},
|
|
7845
|
+
"diagnostics": [],
|
|
7846
|
+
"provenance": {
|
|
7847
|
+
"selection": "ai/component-catalog.json",
|
|
7848
|
+
"composition": "generated-permissive-default"
|
|
7849
|
+
}
|
|
7850
|
+
},
|
|
7781
7851
|
{
|
|
7782
7852
|
"key": "@kerfjs/ui:skeleton",
|
|
7783
7853
|
"package": "@kerfjs/ui",
|
package/ai/component-props.json
CHANGED
|
@@ -4700,6 +4700,118 @@
|
|
|
4700
4700
|
"nativeAttributes": [],
|
|
4701
4701
|
"dataChannel": "rootAttributes"
|
|
4702
4702
|
},
|
|
4703
|
+
{
|
|
4704
|
+
"key": "@kerfjs/ui:gauge",
|
|
4705
|
+
"id": "gauge",
|
|
4706
|
+
"source": "kerf",
|
|
4707
|
+
"import": "@kerfjs/ui/gauge",
|
|
4708
|
+
"export": "Gauge",
|
|
4709
|
+
"description": "A speedometer-style dial for a reading on a scale that is not progress,\nsuch as a live rate: a track arc, a fill from zero to the value, and a\nneedle, scaled to `max`. `full` adds ticks and the value and unit inside\nthe dial; `bare` is the arc, fill, and needle alone, for chip height. It is\na `role=\"meter\"` named by `label`, with the value and unit as\n`aria-valuetext`. The needle and fill transition only when the value\nchanges, and hold still under reduced motion.",
|
|
4710
|
+
"props": [
|
|
4711
|
+
{
|
|
4712
|
+
"name": "value",
|
|
4713
|
+
"type": { "kind": "number", "text": "number" },
|
|
4714
|
+
"required": true,
|
|
4715
|
+
"description": "The reading, zero or more. A value above `max` pins the needle and fill\nat the end of the scale while the text still shows the real value."
|
|
4716
|
+
},
|
|
4717
|
+
{
|
|
4718
|
+
"name": "max",
|
|
4719
|
+
"type": { "kind": "number", "text": "number" },
|
|
4720
|
+
"required": true,
|
|
4721
|
+
"description": "The end of the scale, such as the highest expected rate."
|
|
4722
|
+
},
|
|
4723
|
+
{
|
|
4724
|
+
"name": "label",
|
|
4725
|
+
"type": { "kind": "string", "text": "string" },
|
|
4726
|
+
"required": true,
|
|
4727
|
+
"description": "The gauge's accessible name, such as \"Tokens per minute\"."
|
|
4728
|
+
},
|
|
4729
|
+
{
|
|
4730
|
+
"name": "valueText",
|
|
4731
|
+
"type": { "kind": "string", "text": "string", "nullable": true },
|
|
4732
|
+
"required": false,
|
|
4733
|
+
"description": "The value as shown in a `full` dial and spoken, such as \"1.2k\"; defaults\nto the value rounded to one decimal place."
|
|
4734
|
+
},
|
|
4735
|
+
{
|
|
4736
|
+
"name": "unit",
|
|
4737
|
+
"type": { "kind": "string", "text": "string", "nullable": true },
|
|
4738
|
+
"required": false,
|
|
4739
|
+
"description": "The unit under the value in a `full` dial, such as \"tok/min\"."
|
|
4740
|
+
},
|
|
4741
|
+
{
|
|
4742
|
+
"name": "variant",
|
|
4743
|
+
"type": {
|
|
4744
|
+
"kind": "enum",
|
|
4745
|
+
"values": ["full", "bare"],
|
|
4746
|
+
"text": "GaugeVariant | undefined",
|
|
4747
|
+
"nullable": true
|
|
4748
|
+
},
|
|
4749
|
+
"required": false
|
|
4750
|
+
},
|
|
4751
|
+
{
|
|
4752
|
+
"name": "tone",
|
|
4753
|
+
"type": {
|
|
4754
|
+
"kind": "enum",
|
|
4755
|
+
"values": ["brand", "success", "warning", "danger"],
|
|
4756
|
+
"text": "ProgressTone | undefined",
|
|
4757
|
+
"nullable": true
|
|
4758
|
+
},
|
|
4759
|
+
"required": false,
|
|
4760
|
+
"default": "brand"
|
|
4761
|
+
},
|
|
4762
|
+
{
|
|
4763
|
+
"name": "size",
|
|
4764
|
+
"type": {
|
|
4765
|
+
"kind": "css-value",
|
|
4766
|
+
"grammar": "CssLength",
|
|
4767
|
+
"text": "CssLength",
|
|
4768
|
+
"nullable": true
|
|
4769
|
+
},
|
|
4770
|
+
"required": false,
|
|
4771
|
+
"description": "The gauge's width as a typed `CssLength`; its height follows the dial.\nDefaults to 88px for `full` and 40px for `bare`."
|
|
4772
|
+
},
|
|
4773
|
+
{
|
|
4774
|
+
"name": "colors",
|
|
4775
|
+
"type": {
|
|
4776
|
+
"kind": "ref",
|
|
4777
|
+
"ref": "GaugeColors",
|
|
4778
|
+
"text": "GaugeColors",
|
|
4779
|
+
"nullable": true
|
|
4780
|
+
},
|
|
4781
|
+
"required": false
|
|
4782
|
+
},
|
|
4783
|
+
{
|
|
4784
|
+
"name": "id",
|
|
4785
|
+
"type": { "kind": "string", "text": "string", "nullable": true },
|
|
4786
|
+
"required": false
|
|
4787
|
+
},
|
|
4788
|
+
{
|
|
4789
|
+
"name": "rootAttributes",
|
|
4790
|
+
"type": {
|
|
4791
|
+
"kind": "record",
|
|
4792
|
+
"text": "Readonly<Record<`data-${string}`, string | undefined>>",
|
|
4793
|
+
"nullable": true
|
|
4794
|
+
},
|
|
4795
|
+
"required": false,
|
|
4796
|
+
"control": "hidden"
|
|
4797
|
+
},
|
|
4798
|
+
{
|
|
4799
|
+
"name": "className",
|
|
4800
|
+
"type": { "kind": "string", "text": "string", "nullable": true },
|
|
4801
|
+
"required": false,
|
|
4802
|
+
"control": "classes"
|
|
4803
|
+
},
|
|
4804
|
+
{
|
|
4805
|
+
"name": "slot",
|
|
4806
|
+
"type": { "kind": "string", "text": "string", "nullable": true },
|
|
4807
|
+
"required": false,
|
|
4808
|
+
"description": "Native named-slot assignment when composed inside a web component.",
|
|
4809
|
+
"control": "hidden"
|
|
4810
|
+
}
|
|
4811
|
+
],
|
|
4812
|
+
"nativeAttributes": [],
|
|
4813
|
+
"dataChannel": "rootAttributes"
|
|
4814
|
+
},
|
|
4703
4815
|
{
|
|
4704
4816
|
"key": "@kerfjs/ui:grid",
|
|
4705
4817
|
"id": "grid",
|
|
@@ -25230,6 +25342,56 @@
|
|
|
25230
25342
|
],
|
|
25231
25343
|
"text": "DialogSurfaceStack"
|
|
25232
25344
|
},
|
|
25345
|
+
"GaugeColors": {
|
|
25346
|
+
"kind": "object",
|
|
25347
|
+
"props": [
|
|
25348
|
+
{
|
|
25349
|
+
"name": "track",
|
|
25350
|
+
"type": {
|
|
25351
|
+
"kind": "css-value",
|
|
25352
|
+
"grammar": "CssColor",
|
|
25353
|
+
"text": "CssColor",
|
|
25354
|
+
"nullable": true
|
|
25355
|
+
},
|
|
25356
|
+
"required": false,
|
|
25357
|
+
"description": "The unfilled arc."
|
|
25358
|
+
},
|
|
25359
|
+
{
|
|
25360
|
+
"name": "fill",
|
|
25361
|
+
"type": {
|
|
25362
|
+
"kind": "css-value",
|
|
25363
|
+
"grammar": "CssColor",
|
|
25364
|
+
"text": "CssColor",
|
|
25365
|
+
"nullable": true
|
|
25366
|
+
},
|
|
25367
|
+
"required": false,
|
|
25368
|
+
"description": "The filled arc from zero to the value."
|
|
25369
|
+
},
|
|
25370
|
+
{
|
|
25371
|
+
"name": "needle",
|
|
25372
|
+
"type": {
|
|
25373
|
+
"kind": "css-value",
|
|
25374
|
+
"grammar": "CssColor",
|
|
25375
|
+
"text": "CssColor",
|
|
25376
|
+
"nullable": true
|
|
25377
|
+
},
|
|
25378
|
+
"required": false,
|
|
25379
|
+
"description": "The needle and its hub."
|
|
25380
|
+
},
|
|
25381
|
+
{
|
|
25382
|
+
"name": "text",
|
|
25383
|
+
"type": {
|
|
25384
|
+
"kind": "css-value",
|
|
25385
|
+
"grammar": "CssColor",
|
|
25386
|
+
"text": "CssColor",
|
|
25387
|
+
"nullable": true
|
|
25388
|
+
},
|
|
25389
|
+
"required": false,
|
|
25390
|
+
"description": "The value, unit, and ticks of a `full` gauge."
|
|
25391
|
+
}
|
|
25392
|
+
],
|
|
25393
|
+
"text": "GaugeColors"
|
|
25394
|
+
},
|
|
25233
25395
|
"ListActionRowTrailingMenu": {
|
|
25234
25396
|
"kind": "object",
|
|
25235
25397
|
"props": [
|
|
@@ -27725,6 +27887,46 @@
|
|
|
27725
27887
|
"nullable": true
|
|
27726
27888
|
},
|
|
27727
27889
|
"required": false
|
|
27890
|
+
},
|
|
27891
|
+
{
|
|
27892
|
+
"name": "badge",
|
|
27893
|
+
"type": {
|
|
27894
|
+
"kind": "union",
|
|
27895
|
+
"members": [
|
|
27896
|
+
{ "kind": "string", "text": "string" },
|
|
27897
|
+
{ "kind": "number", "text": "number" },
|
|
27898
|
+
{ "kind": "literal", "value": true, "text": "true" }
|
|
27899
|
+
],
|
|
27900
|
+
"text": "BadgeValue | undefined",
|
|
27901
|
+
"nullable": true
|
|
27902
|
+
},
|
|
27903
|
+
"required": false,
|
|
27904
|
+
"description": "A count, short text, or `true` for a text-free dot over the choice's\ntop-trailing corner, such as how many workers are live. A count of 0 (or\nless) and empty text show no badge, and a `placeholder` control shows\nnone. The badge is decorative (`aria-hidden`): put its meaning in `label`\nand `title` yourself, for example \"Workers View, 2 live\". Since `label`\nis also the visible text when `content` is omitted, give a badged choice\nits own `content`, such as an icon."
|
|
27905
|
+
},
|
|
27906
|
+
{
|
|
27907
|
+
"name": "badgeTone",
|
|
27908
|
+
"type": {
|
|
27909
|
+
"kind": "enum",
|
|
27910
|
+
"values": [
|
|
27911
|
+
"neutral",
|
|
27912
|
+
"info",
|
|
27913
|
+
"pop",
|
|
27914
|
+
"success",
|
|
27915
|
+
"warning",
|
|
27916
|
+
"danger"
|
|
27917
|
+
],
|
|
27918
|
+
"text": "SemanticTone | undefined",
|
|
27919
|
+
"nullable": true
|
|
27920
|
+
},
|
|
27921
|
+
"required": false,
|
|
27922
|
+
"default": "danger",
|
|
27923
|
+
"description": "The badge's tone (default `danger`)."
|
|
27924
|
+
},
|
|
27925
|
+
{
|
|
27926
|
+
"name": "badgeMax",
|
|
27927
|
+
"type": { "kind": "number", "text": "number", "nullable": true },
|
|
27928
|
+
"required": false,
|
|
27929
|
+
"description": "The largest count shown in full; a larger count shows as `{badgeMax}+`\n(default 99, so 100 shows \"99+\"). Text badges are shown as given."
|
|
27728
27930
|
}
|
|
27729
27931
|
],
|
|
27730
27932
|
"text": "SegmentedControlChoice<Value>"
|
package/ai/components/README.md
CHANGED
|
@@ -104,6 +104,7 @@ Exact prop and callback types live in [`public-api-signatures-v1.md`](../public-
|
|
|
104
104
|
- [LoadingSpinner](./loading-spinner.md) — Meaningfully labeled or decorative progress.
|
|
105
105
|
- [ProgressBar](./progress-bar.md) — Show how far a measurable task has gone (an upload, a migration, a quota) or that work of unknown size is under way.
|
|
106
106
|
- [ProgressRing](./progress-ring.md) — Show compact progress (a claim's time remaining, a per-row upload) where a bar does not fit.
|
|
107
|
+
- [Gauge](./gauge.md) — Show a live rate or level against a ceiling at a glance (tokens per minute, tickets updated per hour) on a stats tile, a chip, or a standby display.
|
|
107
108
|
- [Skeleton](./skeleton.md) — A subtle, unanimated loading placeholder block for a not-yet-known value slot.
|
|
108
109
|
|
|
109
110
|
## Web Awesome — Actions
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Gauge
|
|
2
|
+
|
|
3
|
+
<!-- Generated by scripts/sync-component-docs.mjs from ai/component-catalog.json and ai/component-composition.json. Do not edit; run `npm run catalog:sync`. -->
|
|
4
|
+
|
|
5
|
+
`@kerfjs/ui:gauge` · Kerf UI · component · Feedback
|
|
6
|
+
|
|
7
|
+
A speedometer-style dial for a reading on a scale that is not progress, such as a live rate: a 240-degree track arc, a fill from zero to the value, and a needle scaled to max. The full variant adds ticks and the value and unit inside the dial; the bare variant is the arc, fill, and needle alone at chip height, as a named meter.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
Show a live rate or level against a ceiling at a glance (tokens per minute, tickets updated per hour) on a stats tile, a chip, or a standby display.
|
|
12
|
+
|
|
13
|
+
- A live rate or level on a glance surface: pass value, max, a label, and optional valueText and unit.
|
|
14
|
+
- A chip-height indicator beside other status: variant="bare", which carries the value in its accessible name and hover title.
|
|
15
|
+
- A themed display such as a night palette: pass colors with typed CssColor values instead of writing CSS.
|
|
16
|
+
|
|
17
|
+
**Not when:**
|
|
18
|
+
|
|
19
|
+
- Do not use it for progress toward done; use ProgressBar or ProgressRing.
|
|
20
|
+
- Do not use it where a precise number matters more than the glance; show the number in Text.
|
|
21
|
+
- Do not target its classes to recolor it; pass tone or colors.
|
|
22
|
+
|
|
23
|
+
**Alternatives:**
|
|
24
|
+
|
|
25
|
+
- [ProgressRing](./progress-ring.md) (nearest) — Use a ProgressRing for compact progress toward done.
|
|
26
|
+
- [ProgressBar](./progress-bar.md) (nearest) — Use a ProgressBar for measurable progress with a label row.
|
|
27
|
+
|
|
28
|
+
## Imports
|
|
29
|
+
|
|
30
|
+
- JavaScript: `@kerfjs/ui/gauge` — exports `Gauge`, `GaugeProps`, `GaugeVariant`, `GaugeColors`, `GaugeRootAttributes`, `ProgressTone`.
|
|
31
|
+
- CSS: the browser build of `@kerfjs/ui/gauge` pulls its CSS automatically; import `@kerfjs/ui/gauge.css` manually only without the `browser` export condition.
|
|
32
|
+
- Declared side effects: browser-condition-css.
|
|
33
|
+
|
|
34
|
+
## Props
|
|
35
|
+
|
|
36
|
+
Exact prop names and types: [`@kerfjs/ui/gauge`](../public-api-signatures-v1.md#kerfjsuigauge) in `public-api-signatures-v1.md`. Do not infer props from examples.
|
|
37
|
+
|
|
38
|
+
**Variants (configure, do not restyle):**
|
|
39
|
+
|
|
40
|
+
- full (ticks, value, and unit)
|
|
41
|
+
- bare (arc, fill, and needle)
|
|
42
|
+
- brand, success, warning, or danger tone
|
|
43
|
+
- pinned at the end when the value exceeds max
|
|
44
|
+
|
|
45
|
+
## Composition
|
|
46
|
+
|
|
47
|
+
- Parents: any.
|
|
48
|
+
- Contexts: `application-ui`.
|
|
49
|
+
- Children: unrestricted.
|
|
50
|
+
|
|
51
|
+
## State and wiring
|
|
52
|
+
|
|
53
|
+
**The app owns:** the value, max, valueText, and unit; the label; the variant, tone, size, and any colors.
|
|
54
|
+
|
|
55
|
+
No wiring helper.
|
|
56
|
+
|
|
57
|
+
## Geometry
|
|
58
|
+
|
|
59
|
+
Margin: none · border: none · padding: none (layout role: feedback). `self` means the component already owns it — do not add wrapper padding, margin, or borders around it.
|
|
60
|
+
|
|
61
|
+
- Its width is size (88px full, 40px bare by default) and its height follows the dial; the drawing scales with the width.
|
|
62
|
+
|
|
63
|
+
## Accessibility
|
|
64
|
+
|
|
65
|
+
- It is role meter named by label, with aria-valuemin 0, aria-valuemax max, aria-valuenow clamped to max, and aria-valuetext set to the value text and unit; the SVG is decorative.
|
|
66
|
+
- A bare gauge also sets a hover title of the label and value.
|
|
67
|
+
- The needle and fill transition only when the value changes and hold still under prefers-reduced-motion or the static-effects switch; forced colors draw a GrayText track, a Highlight fill, and a CanvasText needle and readout.
|
|
68
|
+
|
|
69
|
+
## Styling boundary
|
|
70
|
+
|
|
71
|
+
The component owns its own styles. Configure it through its props and variants; do not override its internals.
|
|
72
|
+
|
|
73
|
+
Public class hooks (select for layout placement only, never to change the component's look): `kui-gauge`, `kui-gauge__track`, `kui-gauge__fill`, `kui-gauge__tick`, `kui-gauge__tick--major`, `kui-gauge__needle`, `kui-gauge__value`, `kui-gauge__unit`.
|
|
74
|
+
|
|
75
|
+
Never put `kui-gauge`, `kui-gauge__track`, `kui-gauge__fill`, `kui-gauge__tick`, `kui-gauge__tick--major`, `kui-gauge__needle`, `kui-gauge__value`, `kui-gauge__unit` on an element you write; render `Gauge` instead (`KUI-L103`).
|
|
76
|
+
|
|
77
|
+
Everything else is internal: `kerf-ui-analyze` reports private or unknown `.kui-*` selectors (`KUI-L001`, `KUI-L010`), unknown or private tokens (`KUI-L002`, `KUI-L012`), and any application rule that restyles the component, forced dimensions included (`KUI-L019`).
|
|
78
|
+
|
|
79
|
+
## Related
|
|
80
|
+
|
|
81
|
+
- Components: [ProgressRing](./progress-ring.md), [ProgressBar](./progress-bar.md).
|
|
82
|
+
- Docs: [`docs/gauge.md`](../../docs/gauge.md), [`docs/component-selection.md#problem-to-component-matrix`](../../docs/component-selection.md#problem-to-component-matrix).
|
|
83
|
+
- UX catalog route: `?component=gauge`.
|
|
@@ -41,6 +41,7 @@ Exact prop names and types: [`@kerfjs/ui/segmented-control`](../public-api-signa
|
|
|
41
41
|
- small
|
|
42
42
|
- placeholder (loading)
|
|
43
43
|
- disabled (whole control)
|
|
44
|
+
- choice corner badge: count (hidden at 0, capped at badgeMax as 99+), short text, or dot, in any semantic badgeTone
|
|
44
45
|
|
|
45
46
|
## Composition
|
|
46
47
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Public API signatures for the UI authoring corpus
|
|
2
2
|
|
|
3
|
-
Generated from emitted declarations for `@kerfjs/ui@5.0.0-beta.
|
|
3
|
+
Generated from emitted declarations for `@kerfjs/ui@5.0.0-beta.125` and `kerfjs@5.0.0-beta.125`. This bounded reference covers only APIs used by the seven-task corpus. It is interface evidence, not an implementation or runtime guarantee.
|
|
4
4
|
|
|
5
5
|
## `@kerfjs/ui/css-values`
|
|
6
6
|
|
|
@@ -3892,6 +3892,10 @@ export { type CatalogRevealOptions, type WireCatalogOptions, revealCatalogEntry,
|
|
|
3892
3892
|
import * as kerfjs from 'kerfjs';
|
|
3893
3893
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
3894
3894
|
import { R as RootDataAttributes } from './extension-attributes-IJ4decoa.js';
|
|
3895
|
+
import { S as SemanticTone } from './semantic-tone-CdW013KF.js';
|
|
3896
|
+
|
|
3897
|
+
/** A badge's value: a count, short text, or `true` for a text-free dot. */
|
|
3898
|
+
type BadgeValue = number | string | true;
|
|
3895
3899
|
|
|
3896
3900
|
type SegmentedControlAppearance = 'filled' | 'outlined' | 'toolbar';
|
|
3897
3901
|
type SegmentedControlShape = 'rounded' | 'pill';
|
|
@@ -3903,6 +3907,23 @@ interface SegmentedControlChoice<Value extends string = string> {
|
|
|
3903
3907
|
content?: KerfUiContent;
|
|
3904
3908
|
title?: string;
|
|
3905
3909
|
disabled?: boolean;
|
|
3910
|
+
/**
|
|
3911
|
+
* A count, short text, or `true` for a text-free dot over the choice's
|
|
3912
|
+
* top-trailing corner, such as how many workers are live. A count of 0 (or
|
|
3913
|
+
* less) and empty text show no badge, and a `placeholder` control shows
|
|
3914
|
+
* none. The badge is decorative (`aria-hidden`): put its meaning in `label`
|
|
3915
|
+
* and `title` yourself, for example "Workers View, 2 live". Since `label`
|
|
3916
|
+
* is also the visible text when `content` is omitted, give a badged choice
|
|
3917
|
+
* its own `content`, such as an icon.
|
|
3918
|
+
*/
|
|
3919
|
+
badge?: BadgeValue;
|
|
3920
|
+
/** The badge's tone (default `danger`). */
|
|
3921
|
+
badgeTone?: SemanticTone;
|
|
3922
|
+
/**
|
|
3923
|
+
* The largest count shown in full; a larger count shows as `{badgeMax}+`
|
|
3924
|
+
* (default 99, so 100 shows "99+"). Text badges are shown as given.
|
|
3925
|
+
*/
|
|
3926
|
+
badgeMax?: number;
|
|
3906
3927
|
}
|
|
3907
3928
|
interface SegmentedControlProps<Value extends string = string> {
|
|
3908
3929
|
id: string;
|
|
@@ -8342,3 +8363,81 @@ declare function ProgressRing({ value, max, label, valueText, tone, size, id, ro
|
|
|
8342
8363
|
|
|
8343
8364
|
export { ProgressRing, type ProgressRingProps, type ProgressRingRootAttributes, type ProgressRingSize, ProgressTone };
|
|
8344
8365
|
```
|
|
8366
|
+
|
|
8367
|
+
## `@kerfjs/ui/gauge`
|
|
8368
|
+
|
|
8369
|
+
```ts
|
|
8370
|
+
import * as kerfjs from 'kerfjs';
|
|
8371
|
+
import { CssLength, CssColor } from './css-values.js';
|
|
8372
|
+
import { ProgressTone } from './progress-bar.js';
|
|
8373
|
+
|
|
8374
|
+
/**
|
|
8375
|
+
* `full` draws ticks with the value and unit inside the dial, for a stats
|
|
8376
|
+
* tile or a standby display; `bare` draws only the arc, fill, and needle, for
|
|
8377
|
+
* chip height, and carries the value in its accessible name and hover title.
|
|
8378
|
+
*/
|
|
8379
|
+
type GaugeVariant = 'full' | 'bare';
|
|
8380
|
+
/**
|
|
8381
|
+
* A consumer palette, such as dark red on black for a night display. Each
|
|
8382
|
+
* color is a typed `CssColor` from `uiColor()`, `colorVar()`, or
|
|
8383
|
+
* `fillColor()`; an omitted one keeps the tone's color.
|
|
8384
|
+
*/
|
|
8385
|
+
interface GaugeColors {
|
|
8386
|
+
/** The unfilled arc. */
|
|
8387
|
+
track?: CssColor;
|
|
8388
|
+
/** The filled arc from zero to the value. */
|
|
8389
|
+
fill?: CssColor;
|
|
8390
|
+
/** The needle and its hub. */
|
|
8391
|
+
needle?: CssColor;
|
|
8392
|
+
/** The value, unit, and ticks of a `full` gauge. */
|
|
8393
|
+
text?: CssColor;
|
|
8394
|
+
}
|
|
8395
|
+
/**
|
|
8396
|
+
* Application `data-*` identity on the Gauge root, such as `data-key`; its
|
|
8397
|
+
* own configuration attributes stay protected.
|
|
8398
|
+
*/
|
|
8399
|
+
type GaugeRootAttributes = Readonly<Record<`data-${string}`, string | undefined>>;
|
|
8400
|
+
interface GaugeProps {
|
|
8401
|
+
/**
|
|
8402
|
+
* The reading, zero or more. A value above `max` pins the needle and fill
|
|
8403
|
+
* at the end of the scale while the text still shows the real value.
|
|
8404
|
+
*/
|
|
8405
|
+
value: number;
|
|
8406
|
+
/** The end of the scale, such as the highest expected rate. */
|
|
8407
|
+
max: number;
|
|
8408
|
+
/** The gauge's accessible name, such as "Tokens per minute". */
|
|
8409
|
+
label: string;
|
|
8410
|
+
/**
|
|
8411
|
+
* The value as shown in a `full` dial and spoken, such as "1.2k"; defaults
|
|
8412
|
+
* to the value rounded to one decimal place.
|
|
8413
|
+
*/
|
|
8414
|
+
valueText?: string;
|
|
8415
|
+
/** The unit under the value in a `full` dial, such as "tok/min". */
|
|
8416
|
+
unit?: string;
|
|
8417
|
+
variant?: GaugeVariant;
|
|
8418
|
+
tone?: ProgressTone;
|
|
8419
|
+
/**
|
|
8420
|
+
* The gauge's width as a typed `CssLength`; its height follows the dial.
|
|
8421
|
+
* Defaults to 88px for `full` and 40px for `bare`.
|
|
8422
|
+
*/
|
|
8423
|
+
size?: CssLength;
|
|
8424
|
+
colors?: GaugeColors;
|
|
8425
|
+
id?: string;
|
|
8426
|
+
rootAttributes?: GaugeRootAttributes;
|
|
8427
|
+
className?: string;
|
|
8428
|
+
/** Native named-slot assignment when composed inside a web component. */
|
|
8429
|
+
slot?: string;
|
|
8430
|
+
}
|
|
8431
|
+
/**
|
|
8432
|
+
* A speedometer-style dial for a reading on a scale that is not progress,
|
|
8433
|
+
* such as a live rate: a track arc, a fill from zero to the value, and a
|
|
8434
|
+
* needle, scaled to `max`. `full` adds ticks and the value and unit inside
|
|
8435
|
+
* the dial; `bare` is the arc, fill, and needle alone, for chip height. It is
|
|
8436
|
+
* a `role="meter"` named by `label`, with the value and unit as
|
|
8437
|
+
* `aria-valuetext`. The needle and fill transition only when the value
|
|
8438
|
+
* changes, and hold still under reduced motion.
|
|
8439
|
+
*/
|
|
8440
|
+
declare function Gauge({ value, max, label, valueText, unit, variant, tone, size, colors, id, rootAttributes, className, slot, }: GaugeProps): kerfjs.SafeHtml;
|
|
8441
|
+
|
|
8442
|
+
export { Gauge, type GaugeColors, type GaugeProps, type GaugeRootAttributes, type GaugeVariant, ProgressTone };
|
|
8443
|
+
```
|