@20baht/ui 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +501 -2
- package/dist/components/baht-form.d.ts +191 -0
- package/dist/components/baht-form.js +614 -0
- package/dist/components/baht-workflow.d.ts +173 -0
- package/dist/components/baht-workflow.js +430 -0
- package/dist/components/base.d.ts +92 -0
- package/dist/components/base.js +138 -0
- package/dist/components/combobox-controller.d.ts +65 -0
- package/dist/components/combobox-controller.js +82 -0
- package/dist/components/define.d.ts +7 -0
- package/dist/components/define.js +16 -0
- package/dist/components/field-base.d.ts +84 -0
- package/dist/components/field-base.js +152 -0
- package/dist/components/floating.d.ts +84 -0
- package/dist/components/floating.js +182 -0
- package/dist/components/form-layout.d.ts +39 -0
- package/dist/components/form-layout.js +67 -0
- package/dist/components/form-options.d.ts +39 -0
- package/dist/components/form-options.js +65 -0
- package/dist/components/form-readonly.d.ts +20 -0
- package/dist/components/form-readonly.js +70 -0
- package/dist/components/layers.d.ts +4 -0
- package/dist/components/layers.js +15 -0
- package/dist/components/menu-controller.d.ts +65 -0
- package/dist/components/menu-controller.js +134 -0
- package/dist/components/motion.d.ts +9 -0
- package/dist/components/motion.js +16 -0
- package/dist/components/primitives/baht-accordion.d.ts +29 -0
- package/dist/components/primitives/baht-accordion.js +66 -0
- package/dist/components/primitives/baht-alert.d.ts +20 -0
- package/dist/components/primitives/baht-alert.js +62 -0
- package/dist/components/primitives/baht-app-shell.d.ts +81 -0
- package/dist/components/primitives/baht-app-shell.js +161 -0
- package/dist/components/primitives/baht-approval-chain.d.ts +59 -0
- package/dist/components/primitives/baht-approval-chain.js +80 -0
- package/dist/components/primitives/baht-avatar.d.ts +19 -0
- package/dist/components/primitives/baht-avatar.js +43 -0
- package/dist/components/primitives/baht-badge.d.ts +24 -0
- package/dist/components/primitives/baht-badge.js +41 -0
- package/dist/components/primitives/baht-bar-chart.d.ts +78 -0
- package/dist/components/primitives/baht-bar-chart.js +361 -0
- package/dist/components/primitives/baht-breadcrumbs.d.ts +23 -0
- package/dist/components/primitives/baht-breadcrumbs.js +45 -0
- package/dist/components/primitives/baht-button.d.ts +89 -0
- package/dist/components/primitives/baht-button.js +146 -0
- package/dist/components/primitives/baht-calendar.d.ts +96 -0
- package/dist/components/primitives/baht-calendar.js +398 -0
- package/dist/components/primitives/baht-card.d.ts +34 -0
- package/dist/components/primitives/baht-card.js +70 -0
- package/dist/components/primitives/baht-catalog-card.d.ts +52 -0
- package/dist/components/primitives/baht-catalog-card.js +90 -0
- package/dist/components/primitives/baht-checkbox.d.ts +7 -0
- package/dist/components/primitives/baht-checkbox.js +40 -0
- package/dist/components/primitives/baht-choice-group.d.ts +52 -0
- package/dist/components/primitives/baht-choice-group.js +71 -0
- package/dist/components/primitives/baht-code.d.ts +18 -0
- package/dist/components/primitives/baht-code.js +33 -0
- package/dist/components/primitives/baht-column-picker.d.ts +69 -0
- package/dist/components/primitives/baht-column-picker.js +234 -0
- package/dist/components/primitives/baht-comments.d.ts +38 -0
- package/dist/components/primitives/baht-comments.js +102 -0
- package/dist/components/primitives/baht-currency.d.ts +13 -0
- package/dist/components/primitives/baht-currency.js +69 -0
- package/dist/components/primitives/baht-datepicker.d.ts +77 -0
- package/dist/components/primitives/baht-datepicker.js +235 -0
- package/dist/components/primitives/baht-donut-chart.d.ts +24 -0
- package/dist/components/primitives/baht-donut-chart.js +88 -0
- package/dist/components/primitives/baht-edit-table.d.ts +45 -0
- package/dist/components/primitives/baht-edit-table.js +176 -0
- package/dist/components/primitives/baht-empty-state.d.ts +26 -0
- package/dist/components/primitives/baht-empty-state.js +51 -0
- package/dist/components/primitives/baht-error-state.d.ts +21 -0
- package/dist/components/primitives/baht-error-state.js +44 -0
- package/dist/components/primitives/baht-facts.d.ts +42 -0
- package/dist/components/primitives/baht-facts.js +49 -0
- package/dist/components/primitives/baht-fieldset.d.ts +19 -0
- package/dist/components/primitives/baht-fieldset.js +42 -0
- package/dist/components/primitives/baht-file.d.ts +27 -0
- package/dist/components/primitives/baht-file.js +158 -0
- package/dist/components/primitives/baht-filter-builder.d.ts +39 -0
- package/dist/components/primitives/baht-filter-builder.js +201 -0
- package/dist/components/primitives/baht-filter.d.ts +36 -0
- package/dist/components/primitives/baht-filter.js +64 -0
- package/dist/components/primitives/baht-heatmap.d.ts +49 -0
- package/dist/components/primitives/baht-heatmap.js +168 -0
- package/dist/components/primitives/baht-input.d.ts +10 -0
- package/dist/components/primitives/baht-input.js +44 -0
- package/dist/components/primitives/baht-keyvalue-editor.d.ts +28 -0
- package/dist/components/primitives/baht-keyvalue-editor.js +106 -0
- package/dist/components/primitives/baht-line-chart.d.ts +45 -0
- package/dist/components/primitives/baht-line-chart.js +183 -0
- package/dist/components/primitives/baht-link.d.ts +26 -0
- package/dist/components/primitives/baht-link.js +48 -0
- package/dist/components/primitives/baht-list.d.ts +29 -0
- package/dist/components/primitives/baht-list.js +79 -0
- package/dist/components/primitives/baht-loading-overlay.d.ts +15 -0
- package/dist/components/primitives/baht-loading-overlay.js +33 -0
- package/dist/components/primitives/baht-markdown-view.d.ts +17 -0
- package/dist/components/primitives/baht-markdown-view.js +39 -0
- package/dist/components/primitives/baht-markdown.d.ts +34 -0
- package/dist/components/primitives/baht-markdown.js +177 -0
- package/dist/components/primitives/baht-menu.d.ts +53 -0
- package/dist/components/primitives/baht-menu.js +100 -0
- package/dist/components/primitives/baht-meter.d.ts +67 -0
- package/dist/components/primitives/baht-meter.js +107 -0
- package/dist/components/primitives/baht-modal.d.ts +71 -0
- package/dist/components/primitives/baht-modal.js +164 -0
- package/dist/components/primitives/baht-multiselect.d.ts +8 -0
- package/dist/components/primitives/baht-multiselect.js +47 -0
- package/dist/components/primitives/baht-notification-bell.d.ts +54 -0
- package/dist/components/primitives/baht-notification-bell.js +143 -0
- package/dist/components/primitives/baht-number.d.ts +5 -0
- package/dist/components/primitives/baht-number.js +39 -0
- package/dist/components/primitives/baht-order-box.d.ts +24 -0
- package/dist/components/primitives/baht-order-box.js +50 -0
- package/dist/components/primitives/baht-otp.d.ts +49 -0
- package/dist/components/primitives/baht-otp.js +109 -0
- package/dist/components/primitives/baht-page-header.d.ts +43 -0
- package/dist/components/primitives/baht-page-header.js +78 -0
- package/dist/components/primitives/baht-pagination.d.ts +33 -0
- package/dist/components/primitives/baht-pagination.js +86 -0
- package/dist/components/primitives/baht-popover.d.ts +45 -0
- package/dist/components/primitives/baht-popover.js +112 -0
- package/dist/components/primitives/baht-progress-ring.d.ts +22 -0
- package/dist/components/primitives/baht-progress-ring.js +62 -0
- package/dist/components/primitives/baht-progress.d.ts +17 -0
- package/dist/components/primitives/baht-progress.js +48 -0
- package/dist/components/primitives/baht-radio.d.ts +7 -0
- package/dist/components/primitives/baht-radio.js +74 -0
- package/dist/components/primitives/baht-range.d.ts +38 -0
- package/dist/components/primitives/baht-range.js +88 -0
- package/dist/components/primitives/baht-rating.d.ts +40 -0
- package/dist/components/primitives/baht-rating.js +107 -0
- package/dist/components/primitives/baht-record-bar.d.ts +30 -0
- package/dist/components/primitives/baht-record-bar.js +60 -0
- package/dist/components/primitives/baht-reference-dialog.d.ts +87 -0
- package/dist/components/primitives/baht-reference-dialog.js +418 -0
- package/dist/components/primitives/baht-reference-picker.d.ts +110 -0
- package/dist/components/primitives/baht-reference-picker.js +321 -0
- package/dist/components/primitives/baht-repeater.d.ts +59 -0
- package/dist/components/primitives/baht-repeater.js +315 -0
- package/dist/components/primitives/baht-rule-builder.d.ts +24 -0
- package/dist/components/primitives/baht-rule-builder.js +177 -0
- package/dist/components/primitives/baht-saved-filters.d.ts +41 -0
- package/dist/components/primitives/baht-saved-filters.js +126 -0
- package/dist/components/primitives/baht-search.d.ts +34 -0
- package/dist/components/primitives/baht-search.js +71 -0
- package/dist/components/primitives/baht-section-header.d.ts +28 -0
- package/dist/components/primitives/baht-section-header.js +48 -0
- package/dist/components/primitives/baht-section.d.ts +23 -0
- package/dist/components/primitives/baht-section.js +49 -0
- package/dist/components/primitives/baht-select.d.ts +49 -0
- package/dist/components/primitives/baht-select.js +197 -0
- package/dist/components/primitives/baht-skeleton.d.ts +16 -0
- package/dist/components/primitives/baht-skeleton.js +37 -0
- package/dist/components/primitives/baht-sparkline.d.ts +23 -0
- package/dist/components/primitives/baht-sparkline.js +56 -0
- package/dist/components/primitives/baht-spinner.d.ts +13 -0
- package/dist/components/primitives/baht-spinner.js +30 -0
- package/dist/components/primitives/baht-split-button.d.ts +43 -0
- package/dist/components/primitives/baht-split-button.js +87 -0
- package/dist/components/primitives/baht-stat-chart.d.ts +14 -0
- package/dist/components/primitives/baht-stat-chart.js +38 -0
- package/dist/components/primitives/baht-stat.d.ts +56 -0
- package/dist/components/primitives/baht-stat.js +117 -0
- package/dist/components/primitives/baht-steps.d.ts +33 -0
- package/dist/components/primitives/baht-steps.js +60 -0
- package/dist/components/primitives/baht-swipe-row.d.ts +64 -0
- package/dist/components/primitives/baht-swipe-row.js +178 -0
- package/dist/components/primitives/baht-table.d.ts +315 -0
- package/dist/components/primitives/baht-table.js +640 -0
- package/dist/components/primitives/baht-tabs.d.ts +54 -0
- package/dist/components/primitives/baht-tabs.js +128 -0
- package/dist/components/primitives/baht-tags.d.ts +96 -0
- package/dist/components/primitives/baht-tags.js +323 -0
- package/dist/components/primitives/baht-text.d.ts +10 -0
- package/dist/components/primitives/baht-text.js +29 -0
- package/dist/components/primitives/baht-textarea.d.ts +5 -0
- package/dist/components/primitives/baht-textarea.js +40 -0
- package/dist/components/primitives/baht-theme-toggle.d.ts +44 -0
- package/dist/components/primitives/baht-theme-toggle.js +101 -0
- package/dist/components/primitives/baht-timeline.d.ts +21 -0
- package/dist/components/primitives/baht-timeline.js +42 -0
- package/dist/components/primitives/baht-toast.d.ts +29 -0
- package/dist/components/primitives/baht-toast.js +83 -0
- package/dist/components/primitives/baht-toggle.d.ts +6 -0
- package/dist/components/primitives/baht-toggle.js +42 -0
- package/dist/components/primitives/baht-tooltip.d.ts +34 -0
- package/dist/components/primitives/baht-tooltip.js +85 -0
- package/dist/components/primitives/baht-tree.d.ts +58 -0
- package/dist/components/primitives/baht-tree.js +159 -0
- package/dist/components/primitives/baht-typeahead.d.ts +92 -0
- package/dist/components/primitives/baht-typeahead.js +258 -0
- package/dist/components/primitives/baht-upload.d.ts +108 -0
- package/dist/components/primitives/baht-upload.js +325 -0
- package/dist/components/primitives/baht-wizard.d.ts +57 -0
- package/dist/components/primitives/baht-wizard.js +147 -0
- package/dist/components/primitives/charts.d.ts +134 -0
- package/dist/components/primitives/charts.js +184 -0
- package/dist/components/primitives/column-map.d.ts +56 -0
- package/dist/components/primitives/column-map.js +70 -0
- package/dist/components/primitives/control-icons.d.ts +2 -0
- package/dist/components/primitives/control-icons.js +40 -0
- package/dist/components/primitives/icons.d.ts +24 -0
- package/dist/components/primitives/icons.js +86 -0
- package/dist/components/primitives/illustrations.d.ts +21 -0
- package/dist/components/primitives/illustrations.js +78 -0
- package/dist/components/primitives/index.d.ts +89 -0
- package/dist/components/primitives/kbd.d.ts +6 -0
- package/dist/components/primitives/kbd.js +9 -0
- package/dist/components/primitives/listbox.d.ts +2 -0
- package/dist/components/primitives/listbox.js +7 -0
- package/dist/components/primitives/markdown-render.d.ts +9 -0
- package/dist/components/primitives/markdown-render.js +77 -0
- package/dist/components/primitives/rule-rows.d.ts +55 -0
- package/dist/components/primitives/rule-rows.js +75 -0
- package/dist/components/primitives/tag-map.d.ts +6 -0
- package/dist/components/primitives/tag-map.js +39 -0
- package/dist/components/reference-labels.d.ts +22 -0
- package/dist/components/reference-labels.js +29 -0
- package/dist/components/shortcuts.d.ts +7 -0
- package/dist/components/shortcuts.js +43 -0
- package/dist/css/components.css +7517 -0
- package/dist/css/datepicker.css +346 -0
- package/dist/css/tokens.css +679 -0
- package/dist/custom-elements.json +45110 -0
- package/dist/engine.d.ts +1 -0
- package/dist/engine.js +1 -0
- package/dist/hydrate.d.ts +9 -0
- package/dist/hydrate.js +46 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +210 -0
- package/dist/overlay.d.ts +50 -0
- package/dist/overlay.js +140 -0
- package/dist/react.d.ts +557 -0
- package/dist/react.js +1 -0
- package/dist/register.d.ts +106 -0
- package/dist/register.js +99 -0
- package/dist/ssr.d.ts +16 -0
- package/dist/ssr.js +125 -0
- package/dist/tokens.css +8197 -0
- package/dist/vscode.css-custom-data.json +6 -0
- package/dist/vscode.html-custom-data.json +2261 -0
- package/dist/web-types.json +6523 -0
- package/package.json +157 -4
|
@@ -0,0 +1,2261 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
|
|
3
|
+
"version": 1.1,
|
|
4
|
+
"tags": [
|
|
5
|
+
{
|
|
6
|
+
"name": "baht-form",
|
|
7
|
+
"description": "<baht-form> — dumb controlled form renderer (spec 01).\nJSON in (form + value + registry) -> UI out; emits `baht-change` / `baht-validity`.\nNo buttons, no cross-field logic — that's <baht-workflow> or the host.\n---\n\n\n### **Events:**\n - **baht-tab-change** - A tab of a tabbed layout was picked.\n- **baht-submit** - `submit()` (or Enter with `submit-on-enter`) passed `validate()`.\n- **baht-change** - A field changed (an edit or a script); `data` is the whole form.\n- **baht-validity** - `validate()` ran.\n- **name**\n\n### **Methods:**\n - **setValue(patch: _Record<string, unknown>_): _void_** - Merge values programmatically. Runs each key's `change` scripts (like\nServiceNow's g_form.setValue) but emits no `baht-change` — the host\nalready knows, and a store adapter would otherwise loop.\n- **revert(keys: _readonly string[]_): _void_** - Drop the user's edits to these keys, so each shows `value` again. For a host that refused an\nedit and has no new `value` to say so with: `<baht-workflow>` calls it when a rule wrote the\nfield back (spec 02 §4). Emits nothing and runs no scripts.\n- **validate(): _{ valid: boolean; errors: ValidationError[] }_** - Full validation pass: validators, then `submit` scripts (spec 01 §14). A\nscript returning `false` blocks; its `addErrorMessage()` calls become\n`{ key: '$' }` errors so hosts see why.\n- **submit(): _boolean_** - The host's Save: `validate()`, then `baht-submit { data }` when it passes. Returns\nwhether it submitted (never while `busy`).\n\n",
|
|
8
|
+
"attributes": [
|
|
9
|
+
{
|
|
10
|
+
"name": "show-optional",
|
|
11
|
+
"description": "Label every non-required field \"(optional)\" (localized) instead of relying on asterisks alone.",
|
|
12
|
+
"values": []
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "view",
|
|
16
|
+
"description": "Name of a view from `form.views`. Display-only: when set, only that view's\nfields are rendered and validated (the user can only fix what they see),\nbut getData() still returns the FULL form — the server always validates\nthe complete schema, views never change the submit payload.",
|
|
17
|
+
"values": []
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "tab",
|
|
21
|
+
"description": "Key of the open tab section; the first one showing when unset or gone.",
|
|
22
|
+
"values": []
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "readonly",
|
|
26
|
+
"description": "Force every field readonly — a display-only render of this form's own layout/widths.",
|
|
27
|
+
"values": []
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "submit-on-enter",
|
|
31
|
+
"description": "Enter in a single-line field (text, email, password, number, currency; never a textarea,\nand not while an input method is composing) calls `submit()`. Off by default, so a host\nthat binds its own Enter handler does not submit twice.",
|
|
32
|
+
"values": []
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "busy",
|
|
36
|
+
"description": "A save is in flight: every field is disabled, `aria-busy` is set and `submit()` does nothing.",
|
|
37
|
+
"values": []
|
|
38
|
+
},
|
|
39
|
+
{ "name": "defer-hydration", "values": [] }
|
|
40
|
+
],
|
|
41
|
+
"references": []
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "baht-workflow",
|
|
45
|
+
"description": "<baht-workflow> — the optional brain (spec 03). Wraps the current form in an\ninternal <baht-form>, evaluates rules on every change, walks the visible forms\nin linear `order`, and owns the single Next/Submit button.\nForms with kind 'approval' render a decision step instead (spec 03 §4):\na summary of earlier answers plus Approve/Reject (+ optional comment); the\ndecision lands in data as `<form_name>.decision` so rules can branch on it.\nThe runtime navigates; the host acts (on baht-next / baht-submit / baht-approve /\nbaht-reject / baht-complete).\nWith `chrome=\"none\"` it renders the current form only — no Next/Back/Submit, no\nstep announcement — so a lone form with rules is a one-form workflow whose page\nowns the buttons and calls `validate()` / `next()` (spec 03 §2, \"Chrome\").\n---\n\n\n### **Events:**\n - **baht-data-change** - Any value changed.\n- **baht-next** - Moved forward to `form_name`.\n- **baht-step-change** - The visible step changed.\n- **baht-nav-blocked** - Next resolved to no visible step.\n- **baht-submit** - The last step was submitted.\n- **baht-complete** - The workflow ended.\n- **baht-approve** - An approval step was approved.\n- **baht-reject** - An approval step was rejected.\n- **baht-transition** - One step of the run, after its own events: the message, the state before and after, the events. For a log, a replay (`replayWorkflow`) or undo (`restore(snapshotOf(before))`).\n- **baht-rule-error** - The rules' errors changed (a rule aimed at nothing, rules that never settle); empty once they are gone.\n- **name**\n\n### **Methods:**\n - **setValue(form_name: _string_, patch: _Record<string, unknown>_): _void_** - Host/store write into one form's data — same path a user edit takes\n(rules reevaluate, `baht-data-change` fires) but WITHOUT the step reset\nthat re-feeding the `value` prop causes.\n- **validate(): _{ valid: boolean; errors: ValidationError[] }_** - Validate the current form (rule-hidden fields skipped, rule-derived `required`\napplied) and show its errors, without advancing or emitting navigation events.\nValid with no errors when no data-entry form is showing.\n- **approve(): _void_** - Approve the current approval step (same as pressing its Approve button).\n- **reject(): _void_** - Reject the current approval step (same as pressing its Reject button).\n- **getState(): _WorkflowSnapshot_** - The run as JSON: `{ data, current, history }`. Keep it (a draft on the server, the session)\nand hand it to `restore()` to pick the run up on the same step, or keep one per change for undo.\n- **restore(snapshot: _unknown_): _void_** - Pick up a run kept with `getState()`: its data, its step and its Back history. The rules run\non the data again; a step they hide falls back to the first visible one. Emits no navigation\nevents. Called before `workflow` is bound, it applies once it is.\n\n",
|
|
46
|
+
"attributes": [
|
|
47
|
+
{ "name": "validate-gate", "values": [] },
|
|
48
|
+
{
|
|
49
|
+
"name": "next-label",
|
|
50
|
+
"description": "Label attributes beat the i18n catalog; unset = t('next')/t('submit')/t('back').",
|
|
51
|
+
"values": []
|
|
52
|
+
},
|
|
53
|
+
{ "name": "submit-label", "values": [] },
|
|
54
|
+
{ "name": "back-label", "values": [] },
|
|
55
|
+
{ "name": "show-back", "values": [] },
|
|
56
|
+
{
|
|
57
|
+
"name": "chrome",
|
|
58
|
+
"description": "`full` (default) renders the step announcement and the Back + Next/Submit bar.\n`none` renders the current form only: the host supplies its own buttons and drives\nthe runtime with `validate()`, `next()` and `back()`. Rules run either way.",
|
|
59
|
+
"values": [{ "name": "full" }, { "name": "none" }]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "submit-on-enter",
|
|
63
|
+
"description": "Enter in a single-line field of the current form presses Next/Submit (validated first).",
|
|
64
|
+
"values": []
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "busy",
|
|
68
|
+
"description": "A save is in flight: the current form's fields are disabled, Enter, `next()`, `back()` and\nthe approval decision do nothing, and the nav buttons carry `aria-busy` / `aria-disabled`.\nThe host clears it when the request settles.",
|
|
69
|
+
"values": []
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "debounce",
|
|
73
|
+
"description": "Debounce (ms) for the approval comment, the one typed field the workflow renders itself;\nunset = the field default (`BahtFieldBase.defaultDebounce`), 0 = every keystroke. A decision,\nleaving the box and `getData()` flush what is pending.",
|
|
74
|
+
"values": []
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "show-steps",
|
|
78
|
+
"description": "Render a <baht-steps> progress indicator above the current form.",
|
|
79
|
+
"values": []
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "steps-variant",
|
|
83
|
+
"description": "'default' horizontal markers, or 'sidebar' vertical nav list — forwarded to <baht-steps>.",
|
|
84
|
+
"values": [{ "name": "default" }, { "name": "sidebar" }]
|
|
85
|
+
},
|
|
86
|
+
{ "name": "defer-hydration", "values": [] }
|
|
87
|
+
],
|
|
88
|
+
"references": []
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "baht-accordion",
|
|
92
|
+
"description": "Accordion. `items` drive the panels; `multiple` allows several open at once.\nEmits `baht-toggle { index, open }`.\n\n el.items = [\n { title: 'What is a workflow?', content: 'Workflows run when something happens…' },\n { title: 'Pricing', content: '฿20 / month.', open: true },\n ];\n---\n\n\n### **Events:**\n - **baht-toggle** - A section opened or closed.\n- **name**\n\n### **Methods:**\n \n",
|
|
93
|
+
"attributes": [
|
|
94
|
+
{ "name": "multiple", "values": [] },
|
|
95
|
+
{ "name": "defer-hydration", "values": [] }
|
|
96
|
+
],
|
|
97
|
+
"references": []
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "baht-alert",
|
|
101
|
+
"description": "Inline alert / callout.\n\n <baht-alert tone=\"danger\" heading=\"Couldn't reach the webhook\"\n message=\"Check the URL and try again.\" dismissible></baht-alert>\n---\n\n\n### **Events:**\n - **baht-dismiss** - The close button was pressed.\n- **name**\n\n### **Methods:**\n \n",
|
|
102
|
+
"attributes": [
|
|
103
|
+
{
|
|
104
|
+
"name": "tone",
|
|
105
|
+
"values": [
|
|
106
|
+
{ "name": "info" },
|
|
107
|
+
{ "name": "success" },
|
|
108
|
+
{ "name": "warning" },
|
|
109
|
+
{ "name": "danger" }
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
{ "name": "heading", "values": [] },
|
|
113
|
+
{ "name": "message", "values": [] },
|
|
114
|
+
{ "name": "dismissible", "values": [] },
|
|
115
|
+
{ "name": "defer-hydration", "values": [] }
|
|
116
|
+
],
|
|
117
|
+
"references": []
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "baht-app-shell",
|
|
121
|
+
"description": "An application's frame: a header band, a navigator on the left and the page. Children are the\npage; children with `data-slot=\"actions\"` go at the end of the header, side by side in document\norder (no wrapper needed). Below 900px the navigator becomes a strip that scrolls sideways.\nA `data-slot=\"breadcrumb\"` child sits in the header after the brand (a `<baht-breadcrumbs>`,\n\"Workspace / Servers\"); a `data-slot=\"nav-start\"` child sits above the navigator (a project\nor region card).\n\n`scroll=\"main\"` keeps the header and the navigator still from 900px up: the shell is the\nwindow's height and the page and the navigator scroll on their own. `scroll=\"page\"` (the\ndefault) lets the whole frame grow with the page and scroll as one.\n\n <baht-app-shell brand=\"itsm\" brand-sub=\"IT service management\" value=\"home\" filterable>\n <baht-theme-toggle data-slot=\"actions\"></baht-theme-toggle>\n <baht-menu data-slot=\"actions\" label=\"Account\"></baht-menu>\n <main-page></main-page>\n </baht-app-shell>\n shell.items = [{ key: 'home', label: 'Home', href: '/' }, { key: 'tasks', label: 'My tasks', href: '/tasks', badge: 3 }];\n\nEntries with a `group` sit under a heading that folds them away; `collapsed-groups` names the\nones folded at first. The group holding the current entry, and every group while filtering,\nis shown open. Below 900px groups flatten into the one strip.\n---\n\n\n### **Events:**\n - **baht-nav** - An entry was pressed. `detail: { key, href }`. Cancelable: `preventDefault()` to route yourself. Clicks with a modifier key are left to the browser.\n- **baht-nav-group** - A group heading was pressed. `detail: { group, collapsed }`.\n- **name**\n\n### **Methods:**\n \n",
|
|
122
|
+
"attributes": [
|
|
123
|
+
{ "name": "brand", "values": [] },
|
|
124
|
+
{ "name": "brand-sub", "values": [] },
|
|
125
|
+
{ "name": "brand-href", "values": [] },
|
|
126
|
+
{
|
|
127
|
+
"name": "context",
|
|
128
|
+
"description": "A further line in the header, naming the part of the application.",
|
|
129
|
+
"values": []
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "value",
|
|
133
|
+
"description": "Key of the current entry.",
|
|
134
|
+
"values": []
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "filterable",
|
|
138
|
+
"description": "Show a box that narrows the navigator as you type.",
|
|
139
|
+
"values": []
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "label",
|
|
143
|
+
"description": "Accessible name of the navigator.",
|
|
144
|
+
"values": []
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "scroll",
|
|
148
|
+
"description": "`'page'` (default): the frame grows with the page and the window scrolls. `'main'`: from\n900px up the shell is the window's height, header and navigator stay put, and the page\nscrolls inside `.baht-shell-main` (the navigator on its own too).",
|
|
149
|
+
"values": [{ "name": "page" }, { "name": "main" }]
|
|
150
|
+
},
|
|
151
|
+
{ "name": "defer-hydration", "values": [] }
|
|
152
|
+
],
|
|
153
|
+
"references": []
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "baht-approval-chain",
|
|
157
|
+
"description": "An approval route: each step in order, who it is with and how far it got. The current step and a\nstalled one start open; the others fold.\n\n <baht-approval-chain heading=\"Approvals\"></baht-approval-chain>\n chain.steps = [{ key: 'mgr', label: 'Manager', status: 'current', statusLabel: 'Waiting',\n rule: 'Any one approver', approvers: [{ key: 'a', name: 'Alice', stateLabel: 'Pending' }] }];\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
158
|
+
"attributes": [
|
|
159
|
+
{ "name": "heading", "values": [] },
|
|
160
|
+
{ "name": "defer-hydration", "values": [] }
|
|
161
|
+
],
|
|
162
|
+
"references": []
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "baht-avatar",
|
|
166
|
+
"description": "Small circular identity chip — initials derived from `label`, or an\nexplicit `initials` override.\n\n <baht-avatar label=\"Pear Nattapong\"></baht-avatar>\n <baht-avatar initials=\"P\" size=\"sm\"></baht-avatar>\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
167
|
+
"attributes": [
|
|
168
|
+
{
|
|
169
|
+
"name": "label",
|
|
170
|
+
"description": "Full name; initials are derived from it when `initials` isn't set.",
|
|
171
|
+
"values": []
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "initials",
|
|
175
|
+
"description": "Explicit override — first 1-2 characters are shown as-is.",
|
|
176
|
+
"values": []
|
|
177
|
+
},
|
|
178
|
+
{ "name": "size", "values": [{ "name": "AvatarSize" }] },
|
|
179
|
+
{ "name": "defer-hydration", "values": [] }
|
|
180
|
+
],
|
|
181
|
+
"references": []
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "baht-badge",
|
|
185
|
+
"description": "Status pill / tag / counter (20baht badges).\nStatus tones (neutral/success/danger/warning/info) show a colored dot;\ntag tones (outline/solid/gold/inverse/mono) don't.\n\n <baht-badge tone=\"success\" label=\"Running\"></baht-badge>\n <baht-badge tone=\"mono\" label=\"฿20 / mo\"></baht-badge>\n <baht-badge tone=\"info\" label=\"Building\" busy></baht-badge>\n\n`busy` puts a small spinner where the dot goes (on any tone) for states still in progress.\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
186
|
+
"attributes": [
|
|
187
|
+
{ "name": "tone", "values": [{ "name": "BadgeTone" }] },
|
|
188
|
+
{ "name": "label", "values": [] },
|
|
189
|
+
{
|
|
190
|
+
"name": "busy",
|
|
191
|
+
"description": "Work in progress (\"Building\", \"Downloading\"): a small spinner in place of the dot.",
|
|
192
|
+
"values": []
|
|
193
|
+
},
|
|
194
|
+
{ "name": "defer-hydration", "values": [] }
|
|
195
|
+
],
|
|
196
|
+
"references": []
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"name": "baht-bar-chart",
|
|
200
|
+
"description": "\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n\n\n\n\n\n\n\n\n",
|
|
201
|
+
"attributes": [
|
|
202
|
+
{
|
|
203
|
+
"name": "orientation",
|
|
204
|
+
"description": "Bars across (default) or columns up.",
|
|
205
|
+
"values": [{ "name": "horizontal" }, { "name": "vertical" }]
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "stacked",
|
|
209
|
+
"description": "Stack the series inside one band instead of grouping them side by side.",
|
|
210
|
+
"values": []
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"name": "compare-label",
|
|
214
|
+
"description": "Names the muted `compare` bar in the key and the table twin.",
|
|
215
|
+
"values": []
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"name": "label-values",
|
|
219
|
+
"description": "`ends` prints the value at the bar tip; `none` leaves it to the tooltip.",
|
|
220
|
+
"values": [{ "name": "ends" }, { "name": "none" }]
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"name": "emphasis",
|
|
224
|
+
"description": "Index of the series (2+ series) or category (one series) to highlight.",
|
|
225
|
+
"values": []
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"name": "color",
|
|
229
|
+
"description": "Single color for every bar; per-series palette otherwise.",
|
|
230
|
+
"values": []
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "label",
|
|
234
|
+
"description": "Accessible summary used by the vertical (graphics-only) rendering.",
|
|
235
|
+
"values": []
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"name": "empty-message",
|
|
239
|
+
"description": "Shown instead of the marks when there is nothing to plot.",
|
|
240
|
+
"values": []
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"name": "loading",
|
|
244
|
+
"description": "Hold the previous render at reduced opacity while new data loads.",
|
|
245
|
+
"values": []
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"name": "show-table",
|
|
249
|
+
"description": "Render the \"View as table\" twin under the chart.",
|
|
250
|
+
"values": []
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"name": "format",
|
|
254
|
+
"description": "How values are rendered in labels, ticks, tooltips and the table twin:\n`number` | `currency` | `percent` | `percent-100` | `compact`. `percent` expects a\nfraction (`0.14` → \"14%\"); `percent-100` expects 0 to 100 (`14` → \"14%\").",
|
|
255
|
+
"values": [{ "name": "ChartFormat" }]
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"name": "currency",
|
|
259
|
+
"description": "ISO currency code for `format=\"currency\"` (THB renders `฿`).",
|
|
260
|
+
"values": []
|
|
261
|
+
},
|
|
262
|
+
{ "name": "defer-hydration", "values": [] }
|
|
263
|
+
],
|
|
264
|
+
"references": []
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"name": "baht-breadcrumbs",
|
|
268
|
+
"description": "Breadcrumb trail. Last item renders as the current page (no link). Items\nwithout `href` emit `baht-navigate { item, index }` for router-driven apps.\n\n el.items = [\n { label: 'Workflows', href: '/workflows' },\n { label: 'Signup', href: '/workflows/signup' },\n { label: 'Run #812' },\n ];\n---\n\n\n### **Events:**\n - **baht-navigate** - A crumb was pressed.\n- **name**\n\n### **Methods:**\n \n",
|
|
269
|
+
"attributes": [
|
|
270
|
+
{ "name": "separator", "values": [] },
|
|
271
|
+
{ "name": "defer-hydration", "values": [] }
|
|
272
|
+
],
|
|
273
|
+
"references": []
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"name": "baht-button",
|
|
277
|
+
"description": "Design-system button (20baht: no scale, no shadow change — color does the work).\nStandalone primitive: children become the label, listen for the native `click`.\n(Light DOM has no <slot>, so the initial children are moved into the button.)\n\n <baht-button variant=\"danger\" size=\"sm\">Delete</baht-button>\n <baht-button label=\"Save workflow\"></baht-button>\n <baht-button icon=\"copy\" variant=\"ghost\" size=\"sm\">Copy</baht-button>\n <baht-button icon=\"close\" icon-only label=\"Close\"></baht-button> <!-- label = a11y name -->\n <baht-button aria-label=\"Previous month\">‹</baht-button> <!-- glyph child, host aria-label wins -->\n <baht-button variant=\"secondary\" shortcut=\"alt+q\">Close</baht-button> <!-- ⌥Q / Alt+Q -->\n\n`shortcut` binds a document-wide key combo that clicks the button (NOTES 2026-10-31):\nhover/focus shows a tooltip with the label and the keys (`⌥Q` on Mac, `Alt+Q`\nelsewhere) and the inner button gets `aria-keyshortcuts`. Disabled buttons, buttons\noutside the topmost open `<baht-modal>`, and modifier-less combos while typing in a\nfield never fire.\n\n`loading` shows a spinner over the label while a request is in flight: the button keeps\nits width and its focus, swallows clicks (no submit, no shortcut) and tells assistive tech\nthrough `aria-busy`, `aria-disabled` and a status message (`loading-label`).\n\n <baht-button type=\"submit\" loading>Save</baht-button>\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
278
|
+
"attributes": [
|
|
279
|
+
{ "name": "variant", "values": [{ "name": "ButtonVariant" }] },
|
|
280
|
+
{ "name": "size", "values": [{ "name": "ButtonSize" }] },
|
|
281
|
+
{ "name": "disabled", "values": [] },
|
|
282
|
+
{
|
|
283
|
+
"name": "loading",
|
|
284
|
+
"description": "A request is in flight: a spinner covers the label (the width holds), clicks and the\nshortcut do nothing, and the button stays focusable with `aria-busy` / `aria-disabled`.",
|
|
285
|
+
"values": []
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"name": "loading-label",
|
|
289
|
+
"description": "Status message announced while `loading`.",
|
|
290
|
+
"values": []
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"name": "type",
|
|
294
|
+
"description": "Forwarded to the native button — 'button' (default) or 'submit'.",
|
|
295
|
+
"values": [{ "name": "button" }, { "name": "submit" }]
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"name": "label",
|
|
299
|
+
"description": "Alternative to children for setting the label programmatically.",
|
|
300
|
+
"values": []
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"name": "icon",
|
|
304
|
+
"description": "Optional leading icon from the curated set (copy/check/download/…).",
|
|
305
|
+
"values": [{ "name": "IconName" }, { "name": "''" }]
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"name": "icon-only",
|
|
309
|
+
"description": "Square icon-only button. Requires `label` for the accessible name.",
|
|
310
|
+
"values": []
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"name": "aria-label",
|
|
314
|
+
"description": "A host `aria-label` never reaches assistive tech on its own — light DOM has no\nimplicit ARIA relationship between a custom element and its rendered children, so an\n`aria-label` written on `<baht-button>` stays on the host and the inner native\n`<button>` keeps whatever text (or none) is inside it. Mirroring the attribute into\nthis property forwards it to the inner button's `aria-label`, taking priority over\n`label`/icon-only fallback — this is how a glyph-only child (e.g. `‹`) gets a real\naccessible name without `icon-only`. Mapped to the plain `aria-label` attribute so\nhosts write it the way they naturally would; kept off the `ariaLabel` IDL accessor to\navoid shadowing the platform's own ARIAMixin.",
|
|
315
|
+
"values": []
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"name": "shortcut",
|
|
319
|
+
"description": "Keyboard shortcut that clicks this button from anywhere on the page, e.g. `alt+q`,\n`shift+alt+s`, `mod+enter` (`mod` = ⌘ on Mac, Ctrl elsewhere). Also shown in a\nhover/focus tooltip and announced through `aria-keyshortcuts`.",
|
|
320
|
+
"values": []
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"name": "tooltip-position",
|
|
324
|
+
"description": "Where the shortcut tooltip sits.",
|
|
325
|
+
"values": [{ "name": "top" }, { "name": "bottom" }]
|
|
326
|
+
},
|
|
327
|
+
{ "name": "defer-hydration", "values": [] }
|
|
328
|
+
],
|
|
329
|
+
"references": []
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"name": "baht-calendar",
|
|
333
|
+
"description": "A read-only calendar: month, week and day views of `events`, with holidays and freezes\n(`marks`) shaded. The host fetches what to show for the days `calendarRange(view, date)`\nnames, and again on every `baht-navigate`; a click on an event fires `baht-event-open`.\nThe calendar never edits anything.\n\n el.events = [{ id: 't1', title: 'Approve CHG-6', start: '2026-11-20T03:00:00Z',\n end: '2026-11-20T04:00:00Z', tone: 'primary', meta: 'Core banking' }];\n el.marks = [{ date: '2026-12-10', label: 'Constitution Day', kind: 'off' }];\n el.addEventListener('baht-navigate', (e) => load(e.detail.from, e.detail.to));\n---\n\n\n### **Events:**\n - **baht-event-open** - An event was clicked.\n- **baht-navigate** - The view or the days shown changed.\n- **name**\n\n### **Methods:**\n \n",
|
|
334
|
+
"attributes": [
|
|
335
|
+
{
|
|
336
|
+
"name": "view",
|
|
337
|
+
"description": "`month`, `week` or `day`.",
|
|
338
|
+
"values": [{ "name": "CalendarView" }]
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"name": "date",
|
|
342
|
+
"description": "A day the view shows, `YYYY-MM-DD`; empty for today.",
|
|
343
|
+
"values": []
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"name": "label",
|
|
347
|
+
"description": "Accessible name of the calendar.",
|
|
348
|
+
"values": []
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"name": "today",
|
|
352
|
+
"description": "Today, `YYYY-MM-DD`; empty for the real today (set it for server rendering and tests).",
|
|
353
|
+
"values": []
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"name": "week-start",
|
|
357
|
+
"description": "First day of the week: 1 Monday (default), 0 Sunday.",
|
|
358
|
+
"values": []
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"name": "locale",
|
|
362
|
+
"description": "Locale for day and month names.",
|
|
363
|
+
"values": []
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"name": "first-hour",
|
|
367
|
+
"description": "Hour the time grid opens scrolled to (7.5 = 07:30).",
|
|
368
|
+
"values": []
|
|
369
|
+
},
|
|
370
|
+
{ "name": "defer-hydration", "values": [] }
|
|
371
|
+
],
|
|
372
|
+
"references": []
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"name": "baht-card",
|
|
376
|
+
"description": "Surface card (20baht: white on cream, 1px border, no shadow at rest — the\nborder carries the separation). Children become the body; a child with\n`data-slot=\"actions\"` (a badge, a button, a \"…\" menu) goes in the header,\nat the end of the heading's row. Several such children sit in a row.\n\n <baht-card heading=\"Runs\" subtitle=\"Last 30 days\">…content…</baht-card>\n <baht-card heading=\"Rules\"><baht-menu data-slot=\"actions\" …></baht-menu>…</baht-card>\n <baht-card hero>…large feature card (20px radius)…</baht-card>\n <baht-card heading=\"Running\" accent=\"success\" level=\"2\">…a stat card…</baht-card>\n\n`accent` draws a 3px rule along the top edge in a tone (`primary`, `success`, `warning`,\n`danger`, `neutral`); `level` makes the title a heading for the page outline.\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
377
|
+
"attributes": [
|
|
378
|
+
{
|
|
379
|
+
"name": "heading",
|
|
380
|
+
"description": "Title at the top of the card.",
|
|
381
|
+
"values": []
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"name": "subtitle",
|
|
385
|
+
"description": "Muted line under the title.",
|
|
386
|
+
"values": []
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"name": "hero",
|
|
390
|
+
"description": "hero = 20px radius + roomier padding (large/feature cards).",
|
|
391
|
+
"values": []
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"name": "accent",
|
|
395
|
+
"description": "A coloured rule along the card's top edge (a stat card's tone).",
|
|
396
|
+
"values": [{ "name": "CardAccent" }, { "name": "''" }]
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"name": "level",
|
|
400
|
+
"description": "Heading level (2 to 6) for the title, for a page outline; 0 (default) leaves it a plain line.",
|
|
401
|
+
"values": []
|
|
402
|
+
},
|
|
403
|
+
{ "name": "defer-hydration", "values": [] }
|
|
404
|
+
],
|
|
405
|
+
"references": []
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"name": "baht-catalog-card",
|
|
409
|
+
"description": "A card that opens something: picture, name, one line about it. Lay several out with your own grid.\n\n <baht-catalog-card heading=\"New server\" description=\"Ask for a server\" image=\"/server.png\" href=\"/new\"></baht-catalog-card>\n\nChildren fill three places: `data-slot=\"art\"` (a sticker or any picture; it replaces `image`),\n`data-slot=\"facts\"` (badges in a row under the description; unmarked children go here too) and\n`data-slot=\"actions\"` (buttons at the foot of the card). Without actions the whole card is the\nlink; with them only the heading is, so the buttons can be pressed. Without `href` nothing is a\nlink: the heading is plain text (a card that only carries actions). A `data-slot=\"corner\"` child\n(a `<baht-menu>`, a badge) sits in the top end corner, above the card's link.\n\n`layout=\"stacked\"` puts the art above the text instead of beside it; `level` makes the heading a\nheading (`role=\"heading\"`, `aria-level`) for a page outline.\n\n <baht-catalog-card heading=\"Web server\" description=\"nginx on Ubuntu\" href=\"/presets/web\">\n <baht-sticker data-slot=\"art\" name=\"rack\"></baht-sticker>\n <baht-badge data-slot=\"facts\" tone=\"mono\" label=\"2 vCPU · 4 GB\"></baht-badge>\n <baht-button data-slot=\"actions\" variant=\"primary\">Launch</baht-button>\n </baht-catalog-card>\n---\n\n\n### **Events:**\n - **baht-open** - The link was pressed. `detail: { href }`. Cancelable: `preventDefault()` to route yourself.\n- **name**\n\n### **Methods:**\n \n",
|
|
410
|
+
"attributes": [
|
|
411
|
+
{
|
|
412
|
+
"name": "heading",
|
|
413
|
+
"description": "The card's name; also its link.",
|
|
414
|
+
"values": []
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"name": "description",
|
|
418
|
+
"description": "One line about it.",
|
|
419
|
+
"values": []
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"name": "image",
|
|
423
|
+
"description": "Picture URL, shown at the start of the card. A `data-slot=\"art\"` child replaces it.",
|
|
424
|
+
"values": []
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"name": "href",
|
|
428
|
+
"description": "Where the card goes. Empty: the card is not a link and the heading is plain text.",
|
|
429
|
+
"values": []
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"name": "layout",
|
|
433
|
+
"description": "`'row'` (default): art beside the text. `'stacked'`: art on top.",
|
|
434
|
+
"values": [{ "name": "row" }, { "name": "stacked" }]
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"name": "level",
|
|
438
|
+
"description": "Heading level (2 to 6) for the page outline; 0 (default) leaves the name a plain link or text.",
|
|
439
|
+
"values": []
|
|
440
|
+
},
|
|
441
|
+
{ "name": "defer-hydration", "values": [] }
|
|
442
|
+
],
|
|
443
|
+
"references": []
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"name": "baht-checkbox",
|
|
447
|
+
"description": "\n---\n\n\n### **Events:**\n - **baht-input** - Field mode: the user edited the value.\n- **name**\n\n### **Methods:**\n \n\n- **flushTyped(): _void_** - Hand a pending typed edit to the host now (blur, disconnect, host reads). Idempotent.\n- **discardTyped(): _void_** - The host did not take the edit: forget the keystrokes and show `value` again. Without this\na refused edit stays on screen, since `value` never moves to say the text has landed.\n\n\n\n\n",
|
|
448
|
+
"attributes": [
|
|
449
|
+
{ "name": "disabled", "values": [] },
|
|
450
|
+
{ "name": "readonly", "values": [] },
|
|
451
|
+
{ "name": "required", "values": [] },
|
|
452
|
+
{
|
|
453
|
+
"name": "show-optional",
|
|
454
|
+
"description": "Append the localized \"(optional)\" marker to the label when not required (set by <baht-form show-optional>).",
|
|
455
|
+
"values": []
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"name": "debounce",
|
|
459
|
+
"description": "Debounce for typed edits (ms); unset = BahtFieldBase.defaultDebounce.",
|
|
460
|
+
"values": []
|
|
461
|
+
},
|
|
462
|
+
{ "name": "defer-hydration", "values": [] }
|
|
463
|
+
],
|
|
464
|
+
"references": []
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"name": "baht-choice-group",
|
|
468
|
+
"description": "Choice tiles outside a form: a row of cards of which one is picked (a template picker, a\nplan). Each tile is a real radio, so the group has one tab stop and arrow keys move the\npick; the picked tile carries the primary border and wash. Inside a `<baht-form>` use a\n`radio` field with `variant: 'card'` instead: this element holds no field state and does no\nvalidation.\n\n <baht-choice-group label=\"Template\" value=\"web\"></baht-choice-group>\n group.options = [{ key: 'web', label: 'Web server', description: 'nginx', meta: '2 vCPU · 4 GB' }];\n group.addEventListener('baht-change', (e) => pick(e.detail.value));\n\nTiles share the row (`flex: 1 1 var(--baht-choice-min, 200px)`) and wrap; set\n`--baht-choice-min` on the element for narrower or wider tiles.\n---\n\n\n### **Events:**\n - **baht-change** - A tile was picked; `value` is already set to its key.\n- **name**\n\n### **Methods:**\n \n",
|
|
469
|
+
"attributes": [
|
|
470
|
+
{
|
|
471
|
+
"name": "value",
|
|
472
|
+
"description": "Key of the picked tile; empty = none picked.",
|
|
473
|
+
"values": []
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"name": "label",
|
|
477
|
+
"description": "Accessible name of the group (there is no visible legend; put a heading beside it).",
|
|
478
|
+
"values": []
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"name": "disabled",
|
|
482
|
+
"description": "Turn every tile off.",
|
|
483
|
+
"values": []
|
|
484
|
+
},
|
|
485
|
+
{ "name": "defer-hydration", "values": [] }
|
|
486
|
+
],
|
|
487
|
+
"references": []
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"name": "baht-code",
|
|
491
|
+
"description": "Monospace code (20baht): an inline chip or a block. Content is the light-DOM\nchildren (or the `code` property). Not a syntax highlighter — just the\ndesign-system's canonical way to show code/identifiers/tokens.\n\n <baht-code>baht-button</baht-code>\n <baht-code variant=\"block\">npm i\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
492
|
+
"attributes": [
|
|
493
|
+
{ "name": "variant", "values": [{ "name": "CodeVariant" }] },
|
|
494
|
+
{
|
|
495
|
+
"name": "code",
|
|
496
|
+
"description": "Alternative to children for setting the code text programmatically.",
|
|
497
|
+
"values": []
|
|
498
|
+
},
|
|
499
|
+
{ "name": "defer-hydration", "values": [] }
|
|
500
|
+
],
|
|
501
|
+
"references": []
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"name": "baht-column-picker",
|
|
505
|
+
"description": "The Available / Selected dialog behind a table's Columns button: add, remove and reorder columns,\nand expand a reference column to dot-walk into its fields.\n---\n\n\n### **Events:**\n - **baht-columns-change** - OK was pressed. `detail: ColumnsChangeDetail`.\n- **baht-close** - The dialog was dismissed, or OK was pressed.\n- **name**\n\n### **Methods:**\n \n",
|
|
506
|
+
"attributes": [
|
|
507
|
+
{ "name": "open", "values": [] },
|
|
508
|
+
{ "name": "defer-hydration", "values": [] }
|
|
509
|
+
],
|
|
510
|
+
"references": []
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"name": "baht-comments",
|
|
514
|
+
"description": "A conversation on a record: the thread, oldest first, and a composer. With\n`allow-internal` the composer offers \"internal note\" next to a normal\ncomment (ServiceNow's work notes vs additional comments). Submitting emits\n`baht-submit` with `{ body, internal }` and clears the box; the host stores\nit and feeds the new `entries` back.\n\n <baht-comments allow-internal></baht-comments>\n el.entries = [{ id: 1, author: 'Bob', time: '14:44', body: 'Still broken' }];\n---\n\n\n### **Events:**\n - **baht-submit** - The composer was submitted; the box clears.\n- **name**\n\n### **Methods:**\n \n",
|
|
515
|
+
"attributes": [
|
|
516
|
+
{ "name": "allow-internal", "values": [] },
|
|
517
|
+
{ "name": "placeholder", "values": [] },
|
|
518
|
+
{ "name": "internal-label", "values": [] },
|
|
519
|
+
{ "name": "empty-message", "values": [] },
|
|
520
|
+
{ "name": "busy", "values": [] },
|
|
521
|
+
{ "name": "defer-hydration", "values": [] }
|
|
522
|
+
],
|
|
523
|
+
"references": []
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"name": "baht-currency",
|
|
527
|
+
"description": "Money input: plain digits while typing, thousands-separated on blur.\nReformatting every keystroke fights the caret and recomputes on every key\nfor no reason — so the separator only appears once the field is quiet.\nEmits a plain `number | null`, same as `number` (spec 01 §2).\n---\n\n\n### **Events:**\n - **baht-input** - Field mode: the user edited the value.\n- **name**\n\n### **Methods:**\n \n- **flushTyped(): _void_** - Hand a pending typed edit to the host now (blur, disconnect, host reads). Idempotent.\n- **discardTyped(): _void_** - The host did not take the edit: forget the keystrokes and show `value` again. Without this\na refused edit stays on screen, since `value` never moves to say the text has landed.\n\n\n\n\n",
|
|
528
|
+
"attributes": [
|
|
529
|
+
{ "name": "disabled", "values": [] },
|
|
530
|
+
{ "name": "readonly", "values": [] },
|
|
531
|
+
{ "name": "required", "values": [] },
|
|
532
|
+
{
|
|
533
|
+
"name": "show-optional",
|
|
534
|
+
"description": "Append the localized \"(optional)\" marker to the label when not required (set by <baht-form show-optional>).",
|
|
535
|
+
"values": []
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"name": "debounce",
|
|
539
|
+
"description": "Debounce for typed edits (ms); unset = BahtFieldBase.defaultDebounce.",
|
|
540
|
+
"values": []
|
|
541
|
+
},
|
|
542
|
+
{ "name": "defer-hydration", "values": [] }
|
|
543
|
+
],
|
|
544
|
+
"references": []
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"name": "baht-datepicker",
|
|
548
|
+
"description": "Calendar field on top of flatpickr. The VALUE is always ISO `yyyy-mm-dd`\nregardless of `field.date_format` (display only):\n - `date_mode: 'single'` (default) -> `string | null`\n - `date_mode: 'range'` -> `[start, end] | null` (inclusive)\n - `date_mode: 'multiple'` -> `string[]`\n`min` / `max` bound the calendar; `disabled_dates` (ISO days or `a/b`\nintervals) and `disabled_weekdays` (0 = Sun … 6 = Sat) grey days out — and\nthe engine re-checks them on validate, so the calendar is UX, not the gate.\n\nThe calendar renders INSIDE the element (flatpickr `static`), so it lives in\nlight DOM like every other node and picks up a theme set on any ancestor.\nWhile open it is drawn in the top layer (`floatPanel`), as wide as the field\n(at most 26rem), under it or above it, so a modal body or any `overflow`\ncontainer cannot cut it off.\n\nA footer under the grid carries **Today** (picks today — greyed out when\nmin/max/disabled rules exclude it) and **Clear** (empties the value). With\n`field.enable_time` the first button reads **Now** (i18n key `now`) and picks\ntoday at the current time, to the minute (seconds dropped), under the same\nmin/max/disabled rules; like Today it closes the calendar. Both\n`await el.updateComplete` resolves only once the calendar is attached (the\nlazy flatpickr load is folded into it), so hosts and tests need no extra wait.\nToday / Clear go through flatpickr, so they emit exactly like a click on a day. `disableMobile`\nkeeps this calendar on phones too — never the OS date wheel.\n---\n\n\n### **Events:**\n - **baht-input** - Field mode: the user edited the value.\n- **name**\n\n### **Methods:**\n \n- **flushTyped(): _void_** - Hand a pending typed edit to the host now (blur, disconnect, host reads). Idempotent.\n- **discardTyped(): _void_** - The host did not take the edit: forget the keystrokes and show `value` again. Without this\na refused edit stays on screen, since `value` never moves to say the text has landed.\n\n\n\n\n",
|
|
549
|
+
"attributes": [
|
|
550
|
+
{ "name": "disabled", "values": [] },
|
|
551
|
+
{ "name": "readonly", "values": [] },
|
|
552
|
+
{ "name": "required", "values": [] },
|
|
553
|
+
{
|
|
554
|
+
"name": "show-optional",
|
|
555
|
+
"description": "Append the localized \"(optional)\" marker to the label when not required (set by <baht-form show-optional>).",
|
|
556
|
+
"values": []
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
"name": "debounce",
|
|
560
|
+
"description": "Debounce for typed edits (ms); unset = BahtFieldBase.defaultDebounce.",
|
|
561
|
+
"values": []
|
|
562
|
+
},
|
|
563
|
+
{ "name": "defer-hydration", "values": [] }
|
|
564
|
+
],
|
|
565
|
+
"references": []
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"name": "baht-donut-chart",
|
|
569
|
+
"description": "Pure-SVG donut with a legend that carries value and share.\n\n const el = document.createElement('baht-donut-chart');\n el.groups = [{ label: 'Open', count: 4 }, { label: 'Closed', count: 9 }];\n\n`total` defaults to the group sum; set it when the center number differs\n(e.g. records vs. groups). Segments are separated by a 2px gap that shows the\nsurface through, never by a stroke drawn around them.\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n\n\n\n\n\n\n\n\n",
|
|
570
|
+
"attributes": [
|
|
571
|
+
{ "name": "total", "values": [] },
|
|
572
|
+
{
|
|
573
|
+
"name": "color",
|
|
574
|
+
"description": "Single-series color override (first segment).",
|
|
575
|
+
"values": []
|
|
576
|
+
},
|
|
577
|
+
{ "name": "center-label", "values": [] },
|
|
578
|
+
{
|
|
579
|
+
"name": "other-label",
|
|
580
|
+
"description": "Label of the folded tail bucket.",
|
|
581
|
+
"values": []
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
"name": "empty-message",
|
|
585
|
+
"description": "Shown instead of the marks when there is nothing to plot.",
|
|
586
|
+
"values": []
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"name": "loading",
|
|
590
|
+
"description": "Hold the previous render at reduced opacity while new data loads.",
|
|
591
|
+
"values": []
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"name": "show-table",
|
|
595
|
+
"description": "Render the \"View as table\" twin under the chart.",
|
|
596
|
+
"values": []
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
"name": "format",
|
|
600
|
+
"description": "How values are rendered in labels, ticks, tooltips and the table twin:\n`number` | `currency` | `percent` | `percent-100` | `compact`. `percent` expects a\nfraction (`0.14` → \"14%\"); `percent-100` expects 0 to 100 (`14` → \"14%\").",
|
|
601
|
+
"values": [{ "name": "ChartFormat" }]
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
"name": "currency",
|
|
605
|
+
"description": "ISO currency code for `format=\"currency\"` (THB renders `฿`).",
|
|
606
|
+
"values": []
|
|
607
|
+
},
|
|
608
|
+
{ "name": "defer-hydration", "values": [] }
|
|
609
|
+
],
|
|
610
|
+
"references": []
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"name": "baht-edit-table",
|
|
614
|
+
"description": "A table whose cells are edited in place (reference lists, catalog items,\ngroups). Each changed row shows Save; Save emits `baht-row-save`\n`{ key, row }`, Remove emits `baht-row-delete` `{ key, row }`. With\n`addable`, a blank first row emits `baht-row-add` `{ row }`. The host\npersists and feeds the new `rows` back, which clears the edits.\n---\n\n\n### **Events:**\n - **baht-row-add** - The blank first row was added (`addable`).\n- **baht-row-save** - A changed row's Save was pressed.\n- **baht-row-delete** - Remove was pressed (`removable`).\n- **name**\n\n### **Methods:**\n \n",
|
|
615
|
+
"attributes": [
|
|
616
|
+
{ "name": "row-key", "values": [] },
|
|
617
|
+
{ "name": "addable", "values": [] },
|
|
618
|
+
{ "name": "removable", "values": [] },
|
|
619
|
+
{ "name": "label", "values": [] },
|
|
620
|
+
{ "name": "defer-hydration", "values": [] }
|
|
621
|
+
],
|
|
622
|
+
"references": []
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
"name": "baht-empty-state",
|
|
626
|
+
"description": "Centered \"nothing here\" placeholder for lists, tables, and searches. Children are the actions,\nlaid out in a row under the hint; a child with `data-slot=\"art\"` (a sticker, a picture) takes the\nplace of the `icon` illustration.\n\n <baht-empty-state message=\"No records to display\" hint=\"Try clearing the filter\"></baht-empty-state>\n <baht-empty-state message=\"No presets\" hint=\"Make one to launch with a click\">\n <baht-sticker data-slot=\"art\" name=\"rack\"></baht-sticker>\n <baht-button variant=\"primary\">New preset</baht-button>\n </baht-empty-state>\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
627
|
+
"attributes": [
|
|
628
|
+
{
|
|
629
|
+
"name": "icon",
|
|
630
|
+
"description": "Illustration name (`empty-box`, `search-slash`, `folder`, …), or any emoji / short text. Empty string hides it. Hidden while a `data-slot=\"art\"` child is present.",
|
|
631
|
+
"values": []
|
|
632
|
+
},
|
|
633
|
+
{ "name": "message", "description": "The main line.", "values": [] },
|
|
634
|
+
{
|
|
635
|
+
"name": "hint",
|
|
636
|
+
"description": "A muted line under the message.",
|
|
637
|
+
"values": []
|
|
638
|
+
},
|
|
639
|
+
{ "name": "defer-hydration", "values": [] }
|
|
640
|
+
],
|
|
641
|
+
"references": []
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"name": "baht-error-state",
|
|
645
|
+
"description": "Centered failure placeholder with an optional retry action.\nEmits `baht-retry` when the retry button is clicked.\n\n <baht-error-state heading=\"Backend unavailable\"\n message=\"The API is not responding.\"\n retry-label=\"Retry\"></baht-error-state>\n---\n\n\n### **Events:**\n - **baht-retry** - Retry was pressed.\n- **name**\n\n### **Methods:**\n \n",
|
|
646
|
+
"attributes": [
|
|
647
|
+
{
|
|
648
|
+
"name": "icon",
|
|
649
|
+
"description": "Illustration name (`error` by default), or any emoji / short text. Empty string hides it.",
|
|
650
|
+
"values": []
|
|
651
|
+
},
|
|
652
|
+
{ "name": "heading", "values": [] },
|
|
653
|
+
{ "name": "message", "values": [] },
|
|
654
|
+
{
|
|
655
|
+
"name": "retry-label",
|
|
656
|
+
"description": "Renders a retry button with this label; omit for no action.",
|
|
657
|
+
"values": []
|
|
658
|
+
},
|
|
659
|
+
{ "name": "defer-hydration", "values": [] }
|
|
660
|
+
],
|
|
661
|
+
"references": []
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"name": "baht-facts",
|
|
665
|
+
"description": "Label/value facts as a definition list (`<dl>`): labels in a muted column, values beside\nthem. Stacks each label over its value when the element itself is narrow (under 20rem: a\ndrawer, a phone), whatever the viewport.\n\n <baht-facts></baht-facts>\n el.items = [\n { label: 'Status', value: 'Active' },\n { label: 'Private IP', value: '10.0.0.12', mono: true },\n { label: 'Pools', value: ['10.0.0.10-10.0.0.50', '10.0.1.0/24'] },\n ];\n\nA child with `data-fact=\"<key>\"` goes into the value of the item whose `key` matches, after the\ntext: a Copy button beside a command, a badge beside a state.\n\n <baht-facts><baht-button data-fact=\"ssh\" size=\"sm\" variant=\"ghost\">Copy</baht-button></baht-facts>\n el.items = [{ label: 'SSH', value: 'ssh ubuntu@10.0.0.4', key: 'ssh', mono: true }];\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
666
|
+
"attributes": [{ "name": "defer-hydration", "values": [] }],
|
|
667
|
+
"references": []
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"name": "baht-fieldset",
|
|
671
|
+
"description": "Semantic group wrapper (native <fieldset>/<legend>). Children become the\ncontent — typically a set of baht-* fields.\n\n <baht-fieldset legend=\"Billing\" help=\"Shown on invoices\">\n <baht-input>…</baht-input>\n </baht-fieldset>\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
672
|
+
"attributes": [
|
|
673
|
+
{ "name": "legend", "values": [] },
|
|
674
|
+
{
|
|
675
|
+
"name": "help",
|
|
676
|
+
"description": "Muted help line under the group (e.g. \"Fill both languages for accurate reading\").",
|
|
677
|
+
"values": []
|
|
678
|
+
},
|
|
679
|
+
{ "name": "disabled", "values": [] },
|
|
680
|
+
{ "name": "defer-hydration", "values": [] }
|
|
681
|
+
],
|
|
682
|
+
"references": []
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
"name": "baht-file",
|
|
686
|
+
"description": "File field (spec 01 §2 + §13). Two modes:\n- capture (default): value = File handle(s); the lib never uploads.\n- upload (`field.uploader` + host `uploader` fn from the registry):\n picking uploads immediately, value becomes serializable UploadedFile\n ref(s), and the control shows chips with remove buttons.\nmax_size (bytes) is enforced here as a soft filter — oversize files rejected.\n---\n\n\n### **Events:**\n - **baht-input** - Field mode: the user edited the value.\n- **name**\n\n### **Methods:**\n \n- **flushTyped(): _void_** - Hand a pending typed edit to the host now (blur, disconnect, host reads). Idempotent.\n- **discardTyped(): _void_** - The host did not take the edit: forget the keystrokes and show `value` again. Without this\na refused edit stays on screen, since `value` never moves to say the text has landed.\n\n\n\n\n",
|
|
687
|
+
"attributes": [
|
|
688
|
+
{ "name": "disabled", "values": [] },
|
|
689
|
+
{ "name": "readonly", "values": [] },
|
|
690
|
+
{ "name": "required", "values": [] },
|
|
691
|
+
{
|
|
692
|
+
"name": "show-optional",
|
|
693
|
+
"description": "Append the localized \"(optional)\" marker to the label when not required (set by <baht-form show-optional>).",
|
|
694
|
+
"values": []
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
"name": "debounce",
|
|
698
|
+
"description": "Debounce for typed edits (ms); unset = BahtFieldBase.defaultDebounce.",
|
|
699
|
+
"values": []
|
|
700
|
+
},
|
|
701
|
+
{ "name": "defer-hydration", "values": [] }
|
|
702
|
+
],
|
|
703
|
+
"references": []
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
"name": "baht-filter-builder",
|
|
707
|
+
"description": "Builds a filter for a list: rows of column, comparison and value, all or any of them. It only\nedits the filter; the host applies it.\n\n filter.fields = [{ key: 'state', label: 'State', type: 'choice', options: [...] }];\n filter.addEventListener('baht-change', (e) => load(e.detail.value));\n---\n\n\n### **Events:**\n - **baht-change** - The filter changed. `detail: { value }`.\n- **name**\n\n### **Methods:**\n \n",
|
|
708
|
+
"attributes": [{ "name": "defer-hydration", "values": [] }],
|
|
709
|
+
"references": []
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
"name": "baht-filter",
|
|
713
|
+
"description": "Filter chip group. Controlled: emits `baht-change { selected }` (array of\noption keys), host re-feeds `selected`. Typical use: above an <baht-table>,\nthe handler refetches page 1 with the new filters.\n\n const f = document.querySelector('baht-filter');\n f.options = [{ key: 'running', label: 'Running' }, { key: 'failed', label: 'Failed' }];\n f.selected = ['running'];\n f.addEventListener('baht-change', (e) => refetch({ status: e.detail.selected }));\n\n`variant=\"segmented\"` draws the same options as one joined segmented\ncontrol (a single bordered group, active segment filled with the ink\ncolour) — for a period switch like Week / Month / Year. Pair it with\n`multiple=\"false\"`: a segmented control always holds one value, so clicking\nthe active segment does nothing (no `baht-change`) instead of clearing it.\n---\n\n\n### **Events:**\n - **baht-change** - The selection changed.\n- **name**\n\n### **Methods:**\n \n",
|
|
714
|
+
"attributes": [
|
|
715
|
+
{
|
|
716
|
+
"name": "variant",
|
|
717
|
+
"description": "Look: `'chips'` (default) = separate pill chips; `'segmented'` = one joined\nsegmented control. With `multiple=false` a segmented control never clears.",
|
|
718
|
+
"values": [{ "name": "FilterVariant" }]
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
"name": "multiple",
|
|
722
|
+
"description": "false = radio behavior (max one active; clicking it again clears — except\nwith `variant=\"segmented\"`, where the active segment stays selected).",
|
|
723
|
+
"values": []
|
|
724
|
+
},
|
|
725
|
+
{ "name": "disabled", "values": [] },
|
|
726
|
+
{
|
|
727
|
+
"name": "label",
|
|
728
|
+
"description": "Accessible name for the chip group.",
|
|
729
|
+
"values": []
|
|
730
|
+
},
|
|
731
|
+
{ "name": "defer-hydration", "values": [] }
|
|
732
|
+
],
|
|
733
|
+
"references": []
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"name": "baht-heatmap",
|
|
737
|
+
"description": "Calendar heat for one month or N weeks: one cell per day, colored on the\nsequential ramp, with a weekday header, a per-cell tooltip and a\n\"less / more\" scale legend.\n\n const el = document.createElement('baht-heatmap');\n el.values = [{ date: '2026-09-01', value: 420 }];\n el.from = '2026-09-01'; el.to = '2026-09-30';\n\n`show-values` swaps the compact GitHub-style SVG (weeks as columns) for a\nmonth grid rendered as HTML (weeks as rows): seven weekday headers, one\nfocusable button per day carrying the day number and the formatted value,\ntoday's cell outlined. Being HTML, the grid fills its container while text\nkeeps its real size — nothing is scaled. Cell height follows\n`--baht-heatmap-cell-min` (56px). The two darkest ramp steps flip to light\ntext.\n\n <baht-heatmap show-values format=\"currency\" zero-label=\"none\" .values=${daily}></baht-heatmap>\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n\n\n\n\n\n\n\n\n",
|
|
738
|
+
"attributes": [
|
|
739
|
+
{
|
|
740
|
+
"name": "from",
|
|
741
|
+
"description": "First day (inclusive), `YYYY-MM-DD`. Defaults to the earliest value.",
|
|
742
|
+
"values": []
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
"name": "to",
|
|
746
|
+
"description": "Last day (inclusive), `YYYY-MM-DD`. Defaults to the latest value.",
|
|
747
|
+
"values": []
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
"name": "less-label",
|
|
751
|
+
"description": "Caption on the low end of the scale legend.",
|
|
752
|
+
"values": []
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"name": "more-label",
|
|
756
|
+
"description": "Caption on the high end of the scale legend.",
|
|
757
|
+
"values": []
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
"name": "zero-label",
|
|
761
|
+
"description": "Text shown in a zero/empty cell in `show-values` mode.",
|
|
762
|
+
"values": []
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
"name": "show-values",
|
|
766
|
+
"description": "Roomier month-grid layout with the day number and value printed in each cell.",
|
|
767
|
+
"values": []
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"name": "label",
|
|
771
|
+
"description": "Accessible summary; falls back to a generated sentence.",
|
|
772
|
+
"values": []
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
"name": "empty-message",
|
|
776
|
+
"description": "Shown instead of the marks when there is nothing to plot.",
|
|
777
|
+
"values": []
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"name": "loading",
|
|
781
|
+
"description": "Hold the previous render at reduced opacity while new data loads.",
|
|
782
|
+
"values": []
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
"name": "show-table",
|
|
786
|
+
"description": "Render the \"View as table\" twin under the chart.",
|
|
787
|
+
"values": []
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
"name": "format",
|
|
791
|
+
"description": "How values are rendered in labels, ticks, tooltips and the table twin:\n`number` | `currency` | `percent` | `percent-100` | `compact`. `percent` expects a\nfraction (`0.14` → \"14%\"); `percent-100` expects 0 to 100 (`14` → \"14%\").",
|
|
792
|
+
"values": [{ "name": "ChartFormat" }]
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"name": "currency",
|
|
796
|
+
"description": "ISO currency code for `format=\"currency\"` (THB renders `฿`).",
|
|
797
|
+
"values": []
|
|
798
|
+
},
|
|
799
|
+
{ "name": "defer-hydration", "values": [] }
|
|
800
|
+
],
|
|
801
|
+
"references": []
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"name": "baht-input",
|
|
805
|
+
"description": "text + email + password + time share one control; email differs only in input type +\nvalidator, password only in input type (masked, never formatted or logged), time is the\nbrowser's time-of-day input (value `HH:mm`, minutes only, bounded by `min` / `max`).\n---\n\n\n### **Events:**\n - **baht-input** - Field mode: the user edited the value.\n- **name**\n\n### **Methods:**\n \n- **flushTyped(): _void_** - Hand a pending typed edit to the host now (blur, disconnect, host reads). Idempotent.\n- **discardTyped(): _void_** - The host did not take the edit: forget the keystrokes and show `value` again. Without this\na refused edit stays on screen, since `value` never moves to say the text has landed.\n\n\n\n\n",
|
|
806
|
+
"attributes": [
|
|
807
|
+
{ "name": "disabled", "values": [] },
|
|
808
|
+
{ "name": "readonly", "values": [] },
|
|
809
|
+
{ "name": "required", "values": [] },
|
|
810
|
+
{
|
|
811
|
+
"name": "show-optional",
|
|
812
|
+
"description": "Append the localized \"(optional)\" marker to the label when not required (set by <baht-form show-optional>).",
|
|
813
|
+
"values": []
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"name": "debounce",
|
|
817
|
+
"description": "Debounce for typed edits (ms); unset = BahtFieldBase.defaultDebounce.",
|
|
818
|
+
"values": []
|
|
819
|
+
},
|
|
820
|
+
{ "name": "defer-hydration", "values": [] }
|
|
821
|
+
],
|
|
822
|
+
"references": []
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
"name": "baht-keyvalue-editor",
|
|
826
|
+
"description": "Inline key = value row editor (field maps, config objects, …).\nControlled: set `value`, listen for `baht-change` ({ value }) — rows with an\nempty key are kept while editing but dropped from the emitted object.\n\n const el = document.createElement('baht-keyvalue-editor');\n el.value = { state: 'resolved' };\n el.addEventListener('baht-change', (e) => save(e.detail.value));\n---\n\n\n### **Events:**\n - **baht-change** - A pair was added, edited or removed.\n- **name**\n\n### **Methods:**\n \n",
|
|
827
|
+
"attributes": [
|
|
828
|
+
{ "name": "key-placeholder", "values": [] },
|
|
829
|
+
{ "name": "value-placeholder", "values": [] },
|
|
830
|
+
{ "name": "add-label", "values": [] },
|
|
831
|
+
{ "name": "disabled", "values": [] },
|
|
832
|
+
{ "name": "defer-hydration", "values": [] }
|
|
833
|
+
],
|
|
834
|
+
"references": []
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
"name": "baht-line-chart",
|
|
838
|
+
"description": "Multi-series line chart with a crosshair tooltip that lists every series at\nthe hovered x. One y axis only — never a second scale.\n\n const el = document.createElement('baht-line-chart');\n el.categories = ['Oct', 'Nov', 'Dec'];\n el.series = [{ name: 'Income', values: [1, 2, 3] }];\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n\n\n\n\n\n\n\n\n",
|
|
839
|
+
"attributes": [
|
|
840
|
+
{
|
|
841
|
+
"name": "area",
|
|
842
|
+
"description": "Fill under the line at 10% opacity. Single series only.",
|
|
843
|
+
"values": []
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
"name": "forecast",
|
|
847
|
+
"description": "Draw the last N points dashed — a projection, not measured data.",
|
|
848
|
+
"values": []
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"name": "baseline",
|
|
852
|
+
"description": "Hairline at this value (0, a target). `null` draws none.",
|
|
853
|
+
"values": []
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
"name": "label-values",
|
|
857
|
+
"description": "`ends` labels the last point of each line when the labels do not collide.",
|
|
858
|
+
"values": [{ "name": "ends" }, { "name": "none" }]
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
"name": "label",
|
|
862
|
+
"description": "Accessible summary; falls back to a generated sentence.",
|
|
863
|
+
"values": []
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
"name": "empty-message",
|
|
867
|
+
"description": "Shown instead of the marks when there is nothing to plot.",
|
|
868
|
+
"values": []
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
"name": "loading",
|
|
872
|
+
"description": "Hold the previous render at reduced opacity while new data loads.",
|
|
873
|
+
"values": []
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
"name": "show-table",
|
|
877
|
+
"description": "Render the \"View as table\" twin under the chart.",
|
|
878
|
+
"values": []
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
"name": "format",
|
|
882
|
+
"description": "How values are rendered in labels, ticks, tooltips and the table twin:\n`number` | `currency` | `percent` | `percent-100` | `compact`. `percent` expects a\nfraction (`0.14` → \"14%\"); `percent-100` expects 0 to 100 (`14` → \"14%\").",
|
|
883
|
+
"values": [{ "name": "ChartFormat" }]
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"name": "currency",
|
|
887
|
+
"description": "ISO currency code for `format=\"currency\"` (THB renders `฿`).",
|
|
888
|
+
"values": []
|
|
889
|
+
},
|
|
890
|
+
{ "name": "defer-hydration", "values": [] }
|
|
891
|
+
],
|
|
892
|
+
"references": []
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
"name": "baht-link",
|
|
896
|
+
"description": "Styled anchor (20baht underline treatment). `external` opens a new tab and\nshows the ↗ mark.\n\n <baht-link href=\"/docs\" label=\"Read the docs\"></baht-link>\n <baht-link href=\"https://…\" label=\"Status page\" external></baht-link>\n\nA press on an in-app link (not `external`) fires a cancelable `baht-navigate`: a router calls\n`preventDefault()` and navigates itself, so a federation host does no full page load. A\npress with a modifier key (new tab) is left to the browser.\n---\n\n\n### **Events:**\n - **baht-navigate** - An in-app link was pressed. Cancelable: `preventDefault()` to route yourself.\n- **name**\n\n### **Methods:**\n \n",
|
|
897
|
+
"attributes": [
|
|
898
|
+
{ "name": "href", "values": [] },
|
|
899
|
+
{ "name": "label", "values": [] },
|
|
900
|
+
{ "name": "external", "values": [] },
|
|
901
|
+
{
|
|
902
|
+
"name": "external-hint",
|
|
903
|
+
"description": "Screen-reader suffix for external links (override to localize).",
|
|
904
|
+
"values": []
|
|
905
|
+
},
|
|
906
|
+
{ "name": "defer-hydration", "values": [] }
|
|
907
|
+
],
|
|
908
|
+
"references": []
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
"name": "baht-list",
|
|
912
|
+
"description": "Display list — same server-side contract as <baht-table>: `items` is the\ncurrent page, `loading` shows skeleton rows, the host fetches on\n`baht-page-change` (pair with <baht-pagination>).\n---\n\n\n### **Events:**\n - **baht-item-click** - An item was pressed.\n- **name**\n\n### **Methods:**\n \n",
|
|
913
|
+
"attributes": [
|
|
914
|
+
{ "name": "loading", "values": [] },
|
|
915
|
+
{ "name": "error", "values": [] },
|
|
916
|
+
{ "name": "error-message", "values": [] },
|
|
917
|
+
{ "name": "empty-message", "values": [] },
|
|
918
|
+
{ "name": "skeleton-rows", "values": [] },
|
|
919
|
+
{ "name": "clickable", "values": [] },
|
|
920
|
+
{ "name": "defer-hydration", "values": [] }
|
|
921
|
+
],
|
|
922
|
+
"references": []
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
"name": "baht-loading-overlay",
|
|
926
|
+
"description": "Full-viewport loading scrim with a centered spinner (0.4 ink scrim, same\nas `<baht-modal>`'s). Controlled: the host flips `open` — e.g. from an\nin-flight HTTP request counter.\n\n <baht-loading-overlay [open]=\"loading()\"></baht-loading-overlay>\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
927
|
+
"attributes": [
|
|
928
|
+
{ "name": "open", "values": [] },
|
|
929
|
+
{ "name": "label", "values": [] },
|
|
930
|
+
{ "name": "defer-hydration", "values": [] }
|
|
931
|
+
],
|
|
932
|
+
"references": []
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"name": "baht-markdown-view",
|
|
936
|
+
"description": "`<baht-markdown-view>` — markdown source as sanitized HTML: GitHub-flavoured, raw HTML\nshown as text, and images only where `allowImage` says (same origin by default).\nUntil the `marked` and `dompurify` peers land, or if they are missing, it shows the source.\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
937
|
+
"attributes": [
|
|
938
|
+
{
|
|
939
|
+
"name": "source",
|
|
940
|
+
"description": "The markdown source.",
|
|
941
|
+
"values": []
|
|
942
|
+
},
|
|
943
|
+
{ "name": "defer-hydration", "values": [] }
|
|
944
|
+
],
|
|
945
|
+
"references": []
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"name": "baht-markdown",
|
|
949
|
+
"description": "`type: 'markdown'` — GitHub's comment box: Write and Preview tabs over a plain string\nof markdown. With `field.uploader`, files pasted, dropped or picked upload at once and\nland in the text as `` for an image and `[name](url)` for anything else.\nRead-only or disabled, it shows the rendered markdown alone.\n---\n\n\n### **Events:**\n - **baht-input** - Field mode: the user edited the value.\n- **name**\n\n### **Methods:**\n \n- **flushTyped(): _void_** - Hand a pending typed edit to the host now (blur, disconnect, host reads). Idempotent.\n- **discardTyped(): _void_** - The host did not take the edit: forget the keystrokes and show `value` again. Without this\na refused edit stays on screen, since `value` never moves to say the text has landed.\n\n\n\n\n",
|
|
950
|
+
"attributes": [
|
|
951
|
+
{ "name": "disabled", "values": [] },
|
|
952
|
+
{ "name": "readonly", "values": [] },
|
|
953
|
+
{ "name": "required", "values": [] },
|
|
954
|
+
{
|
|
955
|
+
"name": "show-optional",
|
|
956
|
+
"description": "Append the localized \"(optional)\" marker to the label when not required (set by <baht-form show-optional>).",
|
|
957
|
+
"values": []
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
"name": "debounce",
|
|
961
|
+
"description": "Debounce for typed edits (ms); unset = BahtFieldBase.defaultDebounce.",
|
|
962
|
+
"values": []
|
|
963
|
+
},
|
|
964
|
+
{ "name": "defer-hydration", "values": [] }
|
|
965
|
+
],
|
|
966
|
+
"references": []
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
"name": "baht-menu",
|
|
970
|
+
"description": "Action menu behind a button: the ⋯ \"more\" menu on a table row or card, or a labelled\n\"Export ▾\" menu. Same menu as `<baht-split-button>` — items with optional `shortcut`\nhints (bound page-wide), disabled and danger entries, the APG menu-button keyboard.\n\n <baht-menu></baht-menu> <!-- ⋯ icon trigger -->\n <baht-menu trigger-label=\"Export\" align=\"start\"></baht-menu>\n el.items = [{ value: 'rename', label: 'Rename', shortcut: 'f2' },\n { value: 'delete', label: 'Delete', danger: true }];\n el.addEventListener('baht-select', (e) => run(e.detail.value));\n\nA child marked `data-trigger` becomes the trigger's content (an avatar menu); `heading`\nadds a non-item first line (\"Signed in as …\"); items with `checked` are settings\n(`menuitemcheckbox`) and can carry a `description` line.\n\n <baht-menu label=\"Account\" heading=\"somchai@20baht.com\">\n <baht-avatar data-trigger label=\"Somchai\"></baht-avatar>\n </baht-menu>\n---\n\n\n### **Events:**\n - **baht-select** - An item was picked (click, keyboard or its shortcut). `detail: { value, item }`.\n- **name**\n\n### **Methods:**\n \n",
|
|
971
|
+
"attributes": [
|
|
972
|
+
{
|
|
973
|
+
"name": "trigger-label",
|
|
974
|
+
"description": "Visible trigger text; empty = an icon-only trigger.",
|
|
975
|
+
"values": []
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"name": "icon",
|
|
979
|
+
"description": "Trigger icon from the curated set (default `more`, the ⋯). Ignored when `trigger-label` is set.",
|
|
980
|
+
"values": [{ "name": "IconName" }, { "name": "''" }]
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
"name": "label",
|
|
984
|
+
"description": "Accessible name of the trigger (and the menu). Defaults to the trigger text, else \"More actions\".",
|
|
985
|
+
"values": []
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
"name": "variant",
|
|
989
|
+
"description": "Trigger look: `ghost` (default) or `secondary`.",
|
|
990
|
+
"values": [{ "name": "ghost" }, { "name": "secondary" }]
|
|
991
|
+
},
|
|
992
|
+
{ "name": "size", "values": [{ "name": "sm" }, { "name": "md" }] },
|
|
993
|
+
{
|
|
994
|
+
"name": "align",
|
|
995
|
+
"description": "Menu edge aligned with the trigger: `'end'` (default) or `'start'`.",
|
|
996
|
+
"values": [{ "name": "start" }, { "name": "end" }]
|
|
997
|
+
},
|
|
998
|
+
{ "name": "disabled", "values": [] },
|
|
999
|
+
{
|
|
1000
|
+
"name": "heading",
|
|
1001
|
+
"description": "Non-item first line of the menu (\"Signed in as …\").",
|
|
1002
|
+
"values": []
|
|
1003
|
+
},
|
|
1004
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1005
|
+
],
|
|
1006
|
+
"references": []
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
"name": "baht-meter",
|
|
1010
|
+
"description": "Spent-against-budget meter. The fill carries severity (accent → warning →\ndanger) and the unfilled track is a lighter step of the same ramp, so state\nreads across the whole bar. Severity is always paired with an icon and a\nworded status, never color alone.\n\n <baht-meter label=\"Food\" value=\"4200\" max=\"4000\" format=\"currency\"></baht-meter>\n <baht-meter kind=\"capacity\" label=\"vCPUs\" value=\"18\" max=\"20\"></baht-meter>\n\n`kind=\"capacity\"` measures room used rather than money spent: the status words become\n\"Almost full\", \"Full\" and \"Over quota\". An explicit `near-label` / `at-label` / `over-label`\nstill wins.\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
1011
|
+
"attributes": [
|
|
1012
|
+
{ "name": "value", "description": "Amount used so far.", "values": [] },
|
|
1013
|
+
{
|
|
1014
|
+
"name": "max",
|
|
1015
|
+
"description": "The budget / capacity the value is measured against.",
|
|
1016
|
+
"values": []
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
"name": "label",
|
|
1020
|
+
"description": "Sentence-case caption.",
|
|
1021
|
+
"values": []
|
|
1022
|
+
},
|
|
1023
|
+
{
|
|
1024
|
+
"name": "format",
|
|
1025
|
+
"description": "How value, max and the pace read: number | currency | percent | percent-100 |\ncompact. The fill is always `value / max`. `percent` expects fractions (value\n`0.14`, max `1` → \"14% of 100%\"); for 0 to 100 values (value `14`, the default max\n`100`) use `percent-100`.",
|
|
1026
|
+
"values": [{ "name": "ChartFormat" }]
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
"name": "currency",
|
|
1030
|
+
"description": "ISO currency code for `format=\"currency\"` (THB renders `฿`).",
|
|
1031
|
+
"values": []
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
"name": "expected",
|
|
1035
|
+
"description": "Pace marker: where the value *should* be by now. `null` hides the tick.",
|
|
1036
|
+
"values": []
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
"name": "kind",
|
|
1040
|
+
"description": "What the meter measures: `budget` (money spent) or `capacity` (room used: \"Almost full\",\n\"Full\", \"Over quota\"). Picks the status words a label left at its default shows.",
|
|
1041
|
+
"values": [{ "name": "MeterKind" }]
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
"name": "over-label",
|
|
1045
|
+
"description": "Word shown after the numbers when the meter is over budget.",
|
|
1046
|
+
"values": []
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
"name": "at-label",
|
|
1050
|
+
"description": "Word shown when the value has reached the budget exactly, but not passed it.",
|
|
1051
|
+
"values": []
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
"name": "near-label",
|
|
1055
|
+
"description": "Word shown after the numbers when the meter is near its limit.",
|
|
1056
|
+
"values": []
|
|
1057
|
+
},
|
|
1058
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1059
|
+
],
|
|
1060
|
+
"references": []
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
"name": "baht-modal",
|
|
1064
|
+
"description": "Modal dialog (20baht: 0.4 ink scrim, no blur; float shadow; 20px radius).\nControlled: the host flips `open`. Children become the body; children with\n`data-slot=\"footer\"` go in a footer row under it, right-aligned, that stays\nin view while the body scrolls (in every `placement`) and is part of the\nfocus trap.\n\n <baht-modal heading=\"Delete this workflow?\">\n <p>Steps and run history will be removed.</p>\n <baht-button data-slot=\"footer\" variant=\"secondary\">Cancel</baht-button>\n <baht-button data-slot=\"footer\" variant=\"danger\">Delete</baht-button>\n </baht-modal>\n modal.open = true;\n modal.addEventListener('baht-close', (e) => (modal.open = false));\n\n`placement` moves the panel: `'center'` (default) is the dialog above;\n`'sheet'` docks it to the bottom as a bottom sheet below 600px viewport\nwidth (full width, rounded top corners, a grab handle, max 90dvh with the\nbody scrolling, slides up) and is a centered dialog from 600px up; `'side'`\nis a full-height drawer at the inline end, `min(420px, 100vw)` wide, sliding\nin from that edge. Scrim, focus trap/restore and `baht-close` are the same in\nevery placement. Modifier classes: `.baht-modal--sheet` / `.baht-modal--side`\non the panel, `.baht-modal-scrim--sheet` / `.baht-modal-scrim--side` on the scrim.\n---\n\n\n### **Events:**\n - **baht-close** - Asked to close; the host sets `open` to false.\n- **name**\n\n### **Methods:**\n \n- **requestClose(reason: _'escape' | 'scrim' | 'button'_): _void_** - Ask the host to close (the host owns `open`).\n",
|
|
1065
|
+
"attributes": [
|
|
1066
|
+
{ "name": "open", "values": [] },
|
|
1067
|
+
{ "name": "heading", "values": [] },
|
|
1068
|
+
{
|
|
1069
|
+
"name": "description",
|
|
1070
|
+
"description": "One muted line under the heading; also becomes the dialog's aria-describedby.",
|
|
1071
|
+
"values": []
|
|
1072
|
+
},
|
|
1073
|
+
{ "name": "show-close", "values": [] },
|
|
1074
|
+
{
|
|
1075
|
+
"name": "placement",
|
|
1076
|
+
"description": "`'center'` (default) dialog, `'sheet'` bottom sheet below 600px (centered\nfrom 600px up), or `'side'` full-height drawer at the inline end.",
|
|
1077
|
+
"values": [{ "name": "ModalPlacement" }]
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
"name": "size",
|
|
1081
|
+
"description": "Widest a centered dialog (and a sheet from 600px up) grows: `'sm'` 400px, `'md'` 560px\n(default), `'lg'` 760px, all capped by the window. A `'side'` drawer keeps its own width.",
|
|
1082
|
+
"values": [{ "name": "ModalSize" }]
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
"name": "close-on-scrim",
|
|
1086
|
+
"description": "Scrim click requests close. Off by default: a stray click outside the panel\nmust not throw away what the user typed — close via ×, Escape or your buttons.",
|
|
1087
|
+
"values": []
|
|
1088
|
+
},
|
|
1089
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1090
|
+
],
|
|
1091
|
+
"references": []
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
"name": "baht-multiselect",
|
|
1095
|
+
"description": "Multi-pick rendered as a checkbox group; value = array of option keys.\n---\n\n\n### **Events:**\n - **baht-input** - Field mode: the user edited the value.\n- **name**\n\n### **Methods:**\n \n- **flushTyped(): _void_** - Hand a pending typed edit to the host now (blur, disconnect, host reads). Idempotent.\n- **discardTyped(): _void_** - The host did not take the edit: forget the keystrokes and show `value` again. Without this\na refused edit stays on screen, since `value` never moves to say the text has landed.\n\n\n\n\n",
|
|
1096
|
+
"attributes": [
|
|
1097
|
+
{ "name": "disabled", "values": [] },
|
|
1098
|
+
{ "name": "readonly", "values": [] },
|
|
1099
|
+
{ "name": "required", "values": [] },
|
|
1100
|
+
{
|
|
1101
|
+
"name": "show-optional",
|
|
1102
|
+
"description": "Append the localized \"(optional)\" marker to the label when not required (set by <baht-form show-optional>).",
|
|
1103
|
+
"values": []
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
"name": "debounce",
|
|
1107
|
+
"description": "Debounce for typed edits (ms); unset = BahtFieldBase.defaultDebounce.",
|
|
1108
|
+
"values": []
|
|
1109
|
+
},
|
|
1110
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1111
|
+
],
|
|
1112
|
+
"references": []
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
"name": "baht-notification-bell",
|
|
1116
|
+
"description": "Header bell: an icon button with the unread count and a panel listing the\nnotifications. Opening emits `baht-open` (refresh then); picking one emits\n`baht-select` `{ id, href? }` and closes; \"Mark all read\" emits `baht-mark-all`.\nAn item with `href` is a link: its `baht-select` is cancelable, `preventDefault()` to route\nyourself. An item's `tag` draws a `<baht-badge>` beside its title. `all-href` adds a footer\nlink (`all-label`, \"See all\") that fires a cancelable `baht-all` `{ href }`.\nEscape and a click outside close the panel. The host owns the data.\n---\n\n\n### **Events:**\n - **baht-open** - The panel opened (refresh the items then).\n- **baht-select** - A notification was picked; the panel closes. Cancelable when the item has an `href`: `preventDefault()` to route yourself.\n- **baht-mark-all** - \"Mark all read\" was pressed.\n- **baht-all** - The footer link (`all-href`) was pressed; the panel closes. Cancelable: `preventDefault()` to route yourself.\n- **name**\n\n### **Methods:**\n \n",
|
|
1117
|
+
"attributes": [
|
|
1118
|
+
{
|
|
1119
|
+
"name": "count",
|
|
1120
|
+
"description": "Unread count on the badge; defaults to the unread items.",
|
|
1121
|
+
"values": []
|
|
1122
|
+
},
|
|
1123
|
+
{ "name": "label", "values": [] },
|
|
1124
|
+
{ "name": "empty-message", "values": [] },
|
|
1125
|
+
{
|
|
1126
|
+
"name": "all-href",
|
|
1127
|
+
"description": "A page with every notification: a footer link to it (`baht-all`).",
|
|
1128
|
+
"values": []
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
"name": "all-label",
|
|
1132
|
+
"description": "The footer link's text.",
|
|
1133
|
+
"values": []
|
|
1134
|
+
},
|
|
1135
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1136
|
+
],
|
|
1137
|
+
"references": []
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
"name": "baht-number",
|
|
1141
|
+
"description": "\n---\n\n\n### **Events:**\n - **baht-input** - Field mode: the user edited the value.\n- **name**\n\n### **Methods:**\n \n- **flushTyped(): _void_** - Hand a pending typed edit to the host now (blur, disconnect, host reads). Idempotent.\n- **discardTyped(): _void_** - The host did not take the edit: forget the keystrokes and show `value` again. Without this\na refused edit stays on screen, since `value` never moves to say the text has landed.\n\n\n\n\n",
|
|
1142
|
+
"attributes": [
|
|
1143
|
+
{ "name": "disabled", "values": [] },
|
|
1144
|
+
{ "name": "readonly", "values": [] },
|
|
1145
|
+
{ "name": "required", "values": [] },
|
|
1146
|
+
{
|
|
1147
|
+
"name": "show-optional",
|
|
1148
|
+
"description": "Append the localized \"(optional)\" marker to the label when not required (set by <baht-form show-optional>).",
|
|
1149
|
+
"values": []
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
"name": "debounce",
|
|
1153
|
+
"description": "Debounce for typed edits (ms); unset = BahtFieldBase.defaultDebounce.",
|
|
1154
|
+
"values": []
|
|
1155
|
+
},
|
|
1156
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1157
|
+
],
|
|
1158
|
+
"references": []
|
|
1159
|
+
},
|
|
1160
|
+
{
|
|
1161
|
+
"name": "baht-order-box",
|
|
1162
|
+
"description": "The box beside a catalog item that orders it. Children go between the heading and the button:\na price, a quantity.\n\n <baht-order-box heading=\"Order this item\" label=\"Submit\"></baht-order-box>\n---\n\n\n### **Events:**\n - **baht-order** - The button was pressed.\n- **name**\n\n### **Methods:**\n \n",
|
|
1163
|
+
"attributes": [
|
|
1164
|
+
{ "name": "heading", "values": [] },
|
|
1165
|
+
{ "name": "label", "description": "The button's text.", "values": [] },
|
|
1166
|
+
{ "name": "disabled", "values": [] },
|
|
1167
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1168
|
+
],
|
|
1169
|
+
"references": []
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
"name": "baht-otp",
|
|
1173
|
+
"description": "One-time-code input: N boxes, auto-advance, backspace steps back, paste\ndistributes. Emits `baht-change { value }` per edit and `baht-otp-complete { value }`\nwhen every box is filled.\n\n <baht-otp length=\"6\"></baht-otp>\n---\n\n\n### **Events:**\n - **baht-change** - A digit changed.\n- **baht-otp-complete** - Every box is filled.\n- **name**\n\n### **Methods:**\n \n",
|
|
1174
|
+
"attributes": [
|
|
1175
|
+
{ "name": "length", "values": [] },
|
|
1176
|
+
{ "name": "value", "values": [] },
|
|
1177
|
+
{ "name": "disabled", "values": [] },
|
|
1178
|
+
{
|
|
1179
|
+
"name": "mode",
|
|
1180
|
+
"description": "'numeric' restricts to digits; 'text' allows anything.",
|
|
1181
|
+
"values": [{ "name": "numeric" }, { "name": "text" }]
|
|
1182
|
+
},
|
|
1183
|
+
{
|
|
1184
|
+
"name": "label",
|
|
1185
|
+
"description": "Accessible name for the group of boxes.",
|
|
1186
|
+
"values": []
|
|
1187
|
+
},
|
|
1188
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1189
|
+
],
|
|
1190
|
+
"references": []
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
"name": "baht-page-header",
|
|
1194
|
+
"description": "The top of a page: a way back, the title, what the page is for and its actions. Children are the\nactions; a child with `data-slot=\"meta\"` goes under the description, and one with\n`data-slot=\"art\"` (a sticker, an illustration) at the end of the header, after the actions.\n`art-position=\"start\"` leads with the art instead: two columns, the art beside the text with the\nactions under it, one column when the window is narrow (the art's track is\n`--baht-page-header-art-size`, by default `minmax(180px, 28%)`). `size=\"lg\"` sets a larger title\nand more room, for a landing page's hero.\n\n <baht-page-header heading=\"Assets\" description=\"Hardware the bank owns\" back-label=\"Admin\" back-href=\"/admin\">\n <baht-button variant=\"primary\">New asset</baht-button>\n </baht-page-header>\n---\n\n\n### **Events:**\n - **baht-back** - The back link was pressed. Cancelable: `preventDefault()` to route yourself.\n- **name**\n\n### **Methods:**\n \n",
|
|
1195
|
+
"attributes": [
|
|
1196
|
+
{ "name": "heading", "values": [] },
|
|
1197
|
+
{ "name": "description", "values": [] },
|
|
1198
|
+
{
|
|
1199
|
+
"name": "eyebrow",
|
|
1200
|
+
"description": "Small line above the title.",
|
|
1201
|
+
"values": []
|
|
1202
|
+
},
|
|
1203
|
+
{ "name": "back-label", "values": [] },
|
|
1204
|
+
{ "name": "back-href", "values": [] },
|
|
1205
|
+
{
|
|
1206
|
+
"name": "size",
|
|
1207
|
+
"description": "`'md'` (default) or `'lg'`: a larger title and more room (a hero).",
|
|
1208
|
+
"values": [{ "name": "md" }, { "name": "lg" }]
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
"name": "art-position",
|
|
1212
|
+
"description": "Where a `data-slot=\"art\"` child sits: `'end'` (default, after the actions) or `'start'` (first,\nin a column of its own beside the text and the actions).",
|
|
1213
|
+
"values": [{ "name": "end" }, { "name": "start" }]
|
|
1214
|
+
},
|
|
1215
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1216
|
+
],
|
|
1217
|
+
"references": []
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
"name": "baht-pagination",
|
|
1221
|
+
"description": "Server-side pagination control: it never slices data — it only reports the\npage the user asked for via `baht-page-change`; the host fetches that page.\n\n <baht-pagination page=\"4\" total-pages=\"20\"></baht-pagination>\n <baht-pagination variant=\"compact\" page=\"1\" total-pages=\"3\"></baht-pagination>\n\n`variant=\"cursor\"` drops page numbers entirely — the host doesn't know a\ntotal, only whether another page exists in either direction:\n\n <baht-pagination variant=\"cursor\" has-next has-prev></baht-pagination>\n el.addEventListener('baht-cursor-change', (e) => fetchPage(e.detail.direction));\n---\n\n\n### **Events:**\n - **baht-page-change** - A page was picked.\n- **baht-cursor-change** - Cursor mode: next or previous was pressed.\n- **name**\n\n### **Methods:**\n \n",
|
|
1222
|
+
"attributes": [
|
|
1223
|
+
{ "name": "page", "values": [] },
|
|
1224
|
+
{ "name": "total-pages", "values": [] },
|
|
1225
|
+
{
|
|
1226
|
+
"name": "variant",
|
|
1227
|
+
"description": "'numbered' = 1 … 4 5 6 … 20 · 'compact' = « Page 4 of 20 · 'cursor' = « Prev / Next »",
|
|
1228
|
+
"values": [
|
|
1229
|
+
{ "name": "numbered" },
|
|
1230
|
+
{ "name": "compact" },
|
|
1231
|
+
{ "name": "cursor" }
|
|
1232
|
+
]
|
|
1233
|
+
},
|
|
1234
|
+
{
|
|
1235
|
+
"name": "siblings",
|
|
1236
|
+
"description": "Numbered pages shown on each side of the current page.",
|
|
1237
|
+
"values": []
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
"name": "has-next",
|
|
1241
|
+
"description": "cursor variant only — whether a next/previous page is available.",
|
|
1242
|
+
"values": []
|
|
1243
|
+
},
|
|
1244
|
+
{ "name": "has-prev", "values": [] },
|
|
1245
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1246
|
+
],
|
|
1247
|
+
"references": []
|
|
1248
|
+
},
|
|
1249
|
+
{
|
|
1250
|
+
"name": "baht-popover",
|
|
1251
|
+
"description": "A floating panel anchored to a trigger — filters, a quick-edit form, a hover card you click\nopen. While open it is drawn in the top layer (`floatPanel`), so a modal body, a table or any\n`overflow` container cannot cut it off; `placement` is where it asks to go, and it moves to the\nother side of the trigger when there is more room there. The FIRST child is the trigger; everything after it becomes the panel (a non-modal\n`role=\"dialog\"`, named by `label`).\n\n <baht-popover label=\"Filters\" placement=\"bottom-start\">\n <baht-button variant=\"secondary\" icon=\"search\">Filters</baht-button>\n <baht-select …></baht-select>\n <baht-button size=\"sm\">Apply</baht-button>\n </baht-popover>\n\nClicking the trigger toggles it; opening moves focus to the first field in the panel\n(or the panel). Escape closes it and returns focus to the trigger (marked handled, so a\nsurrounding `<baht-modal>` stays open); a click outside closes it too. `open` can also be\nset by the host. The trigger gets `aria-haspopup=\"dialog\"`, `aria-expanded`, `aria-controls`.\n---\n\n\n### **Events:**\n - **baht-toggle** - The user opened or closed it. `detail: { open }`.\n- **name**\n\n### **Methods:**\n \n",
|
|
1252
|
+
"attributes": [
|
|
1253
|
+
{ "name": "open", "values": [] },
|
|
1254
|
+
{
|
|
1255
|
+
"name": "label",
|
|
1256
|
+
"description": "Accessible name of the panel.",
|
|
1257
|
+
"values": []
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
"name": "placement",
|
|
1261
|
+
"description": "Where the panel sits relative to the trigger.",
|
|
1262
|
+
"values": [{ "name": "PopoverPlacement" }]
|
|
1263
|
+
},
|
|
1264
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1265
|
+
],
|
|
1266
|
+
"references": []
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
"name": "baht-progress-ring",
|
|
1270
|
+
"description": "Circular single-value \"percent used\" ring — the round counterpart to\n`<baht-progress>`'s linear bar. Center shows the rounded percentage; an\noptional caption reads what it's a percentage of.\n\n <baht-progress-ring value=\"80\" label=\"of budget used\"></baht-progress-ring>\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
1271
|
+
"attributes": [
|
|
1272
|
+
{
|
|
1273
|
+
"name": "value",
|
|
1274
|
+
"description": "Percent used, 0 to 100 (clamped), not a fraction: `80` reads \"80%\".",
|
|
1275
|
+
"values": []
|
|
1276
|
+
},
|
|
1277
|
+
{ "name": "tone", "values": [{ "name": "ProgressRingTone" }] },
|
|
1278
|
+
{
|
|
1279
|
+
"name": "label",
|
|
1280
|
+
"description": "Caption under the percentage, e.g. \"of budget used\".",
|
|
1281
|
+
"values": []
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
"name": "size",
|
|
1285
|
+
"description": "Rendered pixel size (square).",
|
|
1286
|
+
"values": []
|
|
1287
|
+
},
|
|
1288
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1289
|
+
],
|
|
1290
|
+
"references": []
|
|
1291
|
+
},
|
|
1292
|
+
{
|
|
1293
|
+
"name": "baht-progress",
|
|
1294
|
+
"description": "Progress bar. `value` 0–100; omit (null) for indeterminate.\n\n <baht-progress value=\"65\" show-label></baht-progress>\n <baht-progress></baht-progress> <!-- indeterminate -->\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
1295
|
+
"attributes": [
|
|
1296
|
+
{
|
|
1297
|
+
"name": "value",
|
|
1298
|
+
"description": "Percent complete, 0 to 100 (clamped), not a fraction. `null` is indeterminate.",
|
|
1299
|
+
"values": []
|
|
1300
|
+
},
|
|
1301
|
+
{
|
|
1302
|
+
"name": "tone",
|
|
1303
|
+
"values": [
|
|
1304
|
+
{ "name": "primary" },
|
|
1305
|
+
{ "name": "success" },
|
|
1306
|
+
{ "name": "warning" },
|
|
1307
|
+
{ "name": "danger" }
|
|
1308
|
+
]
|
|
1309
|
+
},
|
|
1310
|
+
{ "name": "show-label", "values": [] },
|
|
1311
|
+
{
|
|
1312
|
+
"name": "label",
|
|
1313
|
+
"description": "Accessible name for the progressbar.",
|
|
1314
|
+
"values": []
|
|
1315
|
+
},
|
|
1316
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1317
|
+
],
|
|
1318
|
+
"references": []
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
"name": "baht-radio",
|
|
1322
|
+
"description": "\n---\n\n\n### **Events:**\n - **baht-input** - Field mode: the user edited the value.\n- **name**\n\n### **Methods:**\n \n- **flushTyped(): _void_** - Hand a pending typed edit to the host now (blur, disconnect, host reads). Idempotent.\n- **discardTyped(): _void_** - The host did not take the edit: forget the keystrokes and show `value` again. Without this\na refused edit stays on screen, since `value` never moves to say the text has landed.\n\n\n\n\n",
|
|
1323
|
+
"attributes": [
|
|
1324
|
+
{ "name": "disabled", "values": [] },
|
|
1325
|
+
{ "name": "readonly", "values": [] },
|
|
1326
|
+
{ "name": "required", "values": [] },
|
|
1327
|
+
{
|
|
1328
|
+
"name": "show-optional",
|
|
1329
|
+
"description": "Append the localized \"(optional)\" marker to the label when not required (set by <baht-form show-optional>).",
|
|
1330
|
+
"values": []
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
"name": "debounce",
|
|
1334
|
+
"description": "Debounce for typed edits (ms); unset = BahtFieldBase.defaultDebounce.",
|
|
1335
|
+
"values": []
|
|
1336
|
+
},
|
|
1337
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1338
|
+
],
|
|
1339
|
+
"references": []
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
"name": "baht-range",
|
|
1343
|
+
"description": "Range slider. Two modes, one tag:\n\n- **Standalone** (no `field`): `value` / `min` / `max` / `step` / `label`; emits\n `baht-change { value }` (a number) on every input.\n\n <baht-range min=\"0\" max=\"100\" step=\"5\" value=\"40\" label=\"Retry limit\"></baht-range>\n\n- **Form field** (`type: 'range'`, set by `<baht-form>`): bounds from `field.min` /\n `field.max` / `field.step` (default 0 / 100 / 1), field label / help / error; emits\n `baht-input { key, value }` debounced while sliding and at once on release. `null`\n (untouched) parks the thumb at `min` and reads \"—\".\n---\n\n\n### **Events:**\n - **baht-change** - Standalone mode: the slider moved. `detail: { value }`.\n- **baht-input** - Field mode: the slider moved. `detail: { key, value }`.\n- **name**\n\n### **Methods:**\n \n- **flushTyped(): _void_** - Hand a pending typed edit to the host now (blur, disconnect, host reads). Idempotent.\n- **discardTyped(): _void_** - The host did not take the edit: forget the keystrokes and show `value` again. Without this\na refused edit stays on screen, since `value` never moves to say the text has landed.\n\n\n\n\n",
|
|
1344
|
+
"attributes": [
|
|
1345
|
+
{
|
|
1346
|
+
"name": "value",
|
|
1347
|
+
"description": "Current value. Standalone: a number. Field mode: `number | null` (null = untouched).",
|
|
1348
|
+
"values": []
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
"name": "min",
|
|
1352
|
+
"description": "Standalone lower bound; a field uses `field.min`.",
|
|
1353
|
+
"values": []
|
|
1354
|
+
},
|
|
1355
|
+
{
|
|
1356
|
+
"name": "max",
|
|
1357
|
+
"description": "Standalone upper bound; a field uses `field.max`.",
|
|
1358
|
+
"values": []
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
"name": "step",
|
|
1362
|
+
"description": "Standalone step; a field uses `field.step`.",
|
|
1363
|
+
"values": []
|
|
1364
|
+
},
|
|
1365
|
+
{
|
|
1366
|
+
"name": "label",
|
|
1367
|
+
"description": "Standalone visible label; a field uses its label.",
|
|
1368
|
+
"values": []
|
|
1369
|
+
},
|
|
1370
|
+
{
|
|
1371
|
+
"name": "show-value",
|
|
1372
|
+
"description": "Show the current value next to the slider.",
|
|
1373
|
+
"values": []
|
|
1374
|
+
},
|
|
1375
|
+
{ "name": "disabled", "values": [] },
|
|
1376
|
+
{ "name": "readonly", "values": [] },
|
|
1377
|
+
{ "name": "required", "values": [] },
|
|
1378
|
+
{
|
|
1379
|
+
"name": "show-optional",
|
|
1380
|
+
"description": "Append the localized \"(optional)\" marker to the label when not required (set by <baht-form show-optional>).",
|
|
1381
|
+
"values": []
|
|
1382
|
+
},
|
|
1383
|
+
{
|
|
1384
|
+
"name": "debounce",
|
|
1385
|
+
"description": "Debounce for typed edits (ms); unset = BahtFieldBase.defaultDebounce.",
|
|
1386
|
+
"values": []
|
|
1387
|
+
},
|
|
1388
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1389
|
+
],
|
|
1390
|
+
"references": []
|
|
1391
|
+
},
|
|
1392
|
+
{
|
|
1393
|
+
"name": "baht-rating",
|
|
1394
|
+
"description": "Star rating. Two modes, one tag:\n\n- **Standalone** (no `field`): controlled by `value` / `max` / `label`; emits\n `baht-change { value }`, where re-picking the current star clears to `0`.\n\n <baht-rating value=\"3\" max=\"5\"></baht-rating>\n <baht-rating value=\"4\" readonly></baht-rating>\n\n- **Form field** (`type: 'rating'`, set by `<baht-form>`): `field.max` stars\n (1–10, default 5), field label / help / error, emits `baht-input { key, value }`\n with a whole number of stars, or `null` when re-picking the current star clears it.\n\nKeyboard (APG radio group): arrows move the value, Home / End jump the ends.\n---\n\n\n### **Events:**\n - **baht-change** - Standalone mode: a star was picked. `detail: { value }` (0 = cleared).\n- **baht-input** - Field mode: a star was picked. `detail: { key, value }` (null = cleared).\n- **name**\n\n### **Methods:**\n \n- **flushTyped(): _void_** - Hand a pending typed edit to the host now (blur, disconnect, host reads). Idempotent.\n- **discardTyped(): _void_** - The host did not take the edit: forget the keystrokes and show `value` again. Without this\na refused edit stays on screen, since `value` never moves to say the text has landed.\n\n\n\n\n",
|
|
1395
|
+
"attributes": [
|
|
1396
|
+
{
|
|
1397
|
+
"name": "value",
|
|
1398
|
+
"description": "Picked star count. Standalone: a number (`0` = none). Field mode: `number | null`.",
|
|
1399
|
+
"values": []
|
|
1400
|
+
},
|
|
1401
|
+
{
|
|
1402
|
+
"name": "max",
|
|
1403
|
+
"description": "Standalone star count; a field uses `field.max` instead.",
|
|
1404
|
+
"values": []
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
"name": "label",
|
|
1408
|
+
"description": "Standalone accessible name for the radiogroup; a field uses its label.",
|
|
1409
|
+
"values": []
|
|
1410
|
+
},
|
|
1411
|
+
{ "name": "disabled", "values": [] },
|
|
1412
|
+
{ "name": "readonly", "values": [] },
|
|
1413
|
+
{ "name": "required", "values": [] },
|
|
1414
|
+
{
|
|
1415
|
+
"name": "show-optional",
|
|
1416
|
+
"description": "Append the localized \"(optional)\" marker to the label when not required (set by <baht-form show-optional>).",
|
|
1417
|
+
"values": []
|
|
1418
|
+
},
|
|
1419
|
+
{
|
|
1420
|
+
"name": "debounce",
|
|
1421
|
+
"description": "Debounce for typed edits (ms); unset = BahtFieldBase.defaultDebounce.",
|
|
1422
|
+
"values": []
|
|
1423
|
+
},
|
|
1424
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1425
|
+
],
|
|
1426
|
+
"references": []
|
|
1427
|
+
},
|
|
1428
|
+
{
|
|
1429
|
+
"name": "baht-record-bar",
|
|
1430
|
+
"description": "The bar over a record: what it is, and what can be done to it, kept in sight while the form below\nscrolls. Children are the actions.\n\n <baht-record-bar .lines=${['Change - CHG-12', 'Patch the gateway']}>\n <baht-button variant=\"primary\">Request approval</baht-button>\n </baht-record-bar>\n\n`--baht-record-bar-top` sets where it sticks, under a fixed header for instance.\n---\n\n\n### **Events:**\n - **baht-back** - The back link was pressed. Cancelable: `preventDefault()` to route yourself.\n- **name**\n\n### **Methods:**\n \n",
|
|
1431
|
+
"attributes": [
|
|
1432
|
+
{ "name": "back-href", "values": [] },
|
|
1433
|
+
{ "name": "back-label", "values": [] },
|
|
1434
|
+
{
|
|
1435
|
+
"name": "sticky",
|
|
1436
|
+
"description": "`false` lets it scroll away with the page.",
|
|
1437
|
+
"values": []
|
|
1438
|
+
},
|
|
1439
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1440
|
+
],
|
|
1441
|
+
"references": []
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
"name": "baht-reference-dialog",
|
|
1445
|
+
"description": "A reference's records as a table in a modal: search one column or every column, build a filter,\nsort by a header, add, remove and reorder columns, page through, and press a row's first cell to\npick it. The host answers `lister`, on the server or with `pageOfRows`. `walk` is every column on\noffer, dot-walked ones included; `columns` is what shows until the person chooses.\n---\n\n\n### **Events:**\n - **baht-pick** - A record was picked. `detail: { key, label }`.\n- **baht-close** - The modal was dismissed.\n- **baht-columns-change** - The columns were chosen. `detail: ColumnsChangeDetail`.\n- **baht-saved-filters-change** - A filter was saved or deleted. `detail: { filters }`.\n- **name**\n\n### **Methods:**\n \n",
|
|
1446
|
+
"attributes": [
|
|
1447
|
+
{ "name": "open", "values": [] },
|
|
1448
|
+
{ "name": "heading", "values": [] },
|
|
1449
|
+
{
|
|
1450
|
+
"name": "selected",
|
|
1451
|
+
"description": "The record the field holds now, marked in the table.",
|
|
1452
|
+
"values": []
|
|
1453
|
+
},
|
|
1454
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1455
|
+
],
|
|
1456
|
+
"references": []
|
|
1457
|
+
},
|
|
1458
|
+
{
|
|
1459
|
+
"name": "baht-reference-picker",
|
|
1460
|
+
"description": "Reference lookup: read-only input + magnifier opening a typeahead dropdown.\nThe host supplies the data via `fetcher(term)`; the component owns the\ndebounce, the dropdown, and the keyboard interaction.\n\n const el = document.createElement('baht-reference-picker');\n el.fetcher = (term) => api.search('sys_user', term); // Promise<ReferenceOption[]>\n el.value = '6816f79cc0a8016401c5a33be04be441';\n el.display = 'Abel Tuter';\n el.addEventListener('baht-change', (e) => onPick(e.detail)); // { value, label }\n\nClearing emits `baht-change` with `{ value: '', label: '' }`. Set `href` to\nrender an open-record link next to the lookup button.\n\n**Form field** (`type: 'reference'`, set by `<baht-form>`): `lookup` replaces `fetcher` /\n`display` — `<baht-form>` binds `registry.references[field.reference]` with the form data.\nThe value is the picked record's id (`null` when cleared), emitted as\n`baht-input { key, value }`; an existing id is shown by `lookup.resolve(id)`'s label (or\nraw, without a resolver). Field label / help / error as for every field.\n\n**With `lookup.list`** the field is a box to type in, which suggests matches, and the search\nbutton opens the records as a table in `<baht-reference-dialog>`.\n---\n\n\n### **Events:**\n - **baht-change** - Standalone mode: a record was picked or cleared. `detail: { value, label }`.\n- **baht-input** - Field mode: a record was picked or cleared. `detail: { key, value }`.\n- **name**\n\n### **Methods:**\n \n- **flushTyped(): _void_** - Hand a pending typed edit to the host now (blur, disconnect, host reads). Idempotent.\n- **discardTyped(): _void_** - The host did not take the edit: forget the keystrokes and show `value` again. Without this\na refused edit stays on screen, since `value` never moves to say the text has landed.\n\n\n\n\n",
|
|
1461
|
+
"attributes": [
|
|
1462
|
+
{
|
|
1463
|
+
"name": "label",
|
|
1464
|
+
"description": "Accessible name for the combobox + its option list (standalone; a field uses its label).",
|
|
1465
|
+
"values": []
|
|
1466
|
+
},
|
|
1467
|
+
{
|
|
1468
|
+
"name": "value",
|
|
1469
|
+
"description": "Selected id (the reference's key). Field mode: `string | null`.",
|
|
1470
|
+
"values": []
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
"name": "display",
|
|
1474
|
+
"description": "Human-readable label for `value`; falls back to showing the raw id.",
|
|
1475
|
+
"values": []
|
|
1476
|
+
},
|
|
1477
|
+
{ "name": "placeholder", "values": [] },
|
|
1478
|
+
{
|
|
1479
|
+
"name": "invalid",
|
|
1480
|
+
"description": "Marks the control invalid (styles + aria-invalid).",
|
|
1481
|
+
"values": []
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
"name": "href",
|
|
1485
|
+
"description": "Optional link to the selected record, rendered as an external-link button.",
|
|
1486
|
+
"values": []
|
|
1487
|
+
},
|
|
1488
|
+
{
|
|
1489
|
+
"name": "lookup-label",
|
|
1490
|
+
"description": "Accessible name for the lookup button.",
|
|
1491
|
+
"values": []
|
|
1492
|
+
},
|
|
1493
|
+
{
|
|
1494
|
+
"name": "debounce",
|
|
1495
|
+
"description": "Debounce for search calls, ms (default 200).",
|
|
1496
|
+
"values": []
|
|
1497
|
+
},
|
|
1498
|
+
{ "name": "disabled", "values": [] },
|
|
1499
|
+
{ "name": "readonly", "values": [] },
|
|
1500
|
+
{ "name": "required", "values": [] },
|
|
1501
|
+
{
|
|
1502
|
+
"name": "show-optional",
|
|
1503
|
+
"description": "Append the localized \"(optional)\" marker to the label when not required (set by <baht-form show-optional>).",
|
|
1504
|
+
"values": []
|
|
1505
|
+
},
|
|
1506
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1507
|
+
],
|
|
1508
|
+
"references": []
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
"name": "baht-repeater",
|
|
1512
|
+
"description": "<baht-repeater> — array-of-rows control (spec 01 §10). `value` is an array\nof row objects; every row renders the same `field.fields` sub-descriptors\n(one level deep — nested repeaters are skipped). Controlled like every\nprimitive: edits emit the WHOLE array via `baht-input`; the host re-feeds.\n---\n\n\n### **Events:**\n - **baht-input** - Field mode: the user edited the value.\n- **name**\n\n### **Methods:**\n - **flushTyped(): _void_** - Pending keystrokes in any row land in the array before the host reads it.\n\n- **discardTyped(): _void_** - The host did not take the edit: forget the keystrokes and show `value` again. Without this\na refused edit stays on screen, since `value` never moves to say the text has landed.\n\n\n\n\n",
|
|
1513
|
+
"attributes": [
|
|
1514
|
+
{ "name": "disabled", "values": [] },
|
|
1515
|
+
{ "name": "readonly", "values": [] },
|
|
1516
|
+
{ "name": "required", "values": [] },
|
|
1517
|
+
{
|
|
1518
|
+
"name": "show-optional",
|
|
1519
|
+
"description": "Append the localized \"(optional)\" marker to the label when not required (set by <baht-form show-optional>).",
|
|
1520
|
+
"values": []
|
|
1521
|
+
},
|
|
1522
|
+
{
|
|
1523
|
+
"name": "debounce",
|
|
1524
|
+
"description": "Debounce for typed edits (ms); unset = BahtFieldBase.defaultDebounce.",
|
|
1525
|
+
"values": []
|
|
1526
|
+
},
|
|
1527
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1528
|
+
],
|
|
1529
|
+
"references": []
|
|
1530
|
+
},
|
|
1531
|
+
{
|
|
1532
|
+
"name": "baht-rule-builder",
|
|
1533
|
+
"description": "Edits a workflow's `rules` without code: \"when all / any of <field> <is>\n<value>, then show / hide / make mandatory / set value / skip step\". Takes\nthe `workflow` (its fields and steps are the choices) and emits\n`baht-change` with `{ rules }` on every edit. A rule it cannot represent\n(nested conditions) is shown as such and returned untouched.\n---\n\n\n### **Events:**\n - **baht-change** - A rule was edited.\n- **name**\n\n### **Methods:**\n \n",
|
|
1534
|
+
"attributes": [{ "name": "defer-hydration", "values": [] }],
|
|
1535
|
+
"references": []
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
"name": "baht-saved-filters",
|
|
1539
|
+
"description": "ServiceNow's Save Filters: name the filter being built, apply a saved one, delete one. It only\nedits the list; the host keeps it. A saved filter naming a column no longer on offer can be\ndeleted but not applied, because dropping that condition would quietly match more rows than it\nwas saved for.\n---\n\n\n### **Events:**\n - **baht-filter-pick** - A saved filter was chosen. `detail: { value }`.\n- **baht-saved-filters-change** - One was saved or deleted. `detail: { filters }`.\n- **name**\n\n### **Methods:**\n \n",
|
|
1540
|
+
"attributes": [{ "name": "defer-hydration", "values": [] }],
|
|
1541
|
+
"references": []
|
|
1542
|
+
},
|
|
1543
|
+
{
|
|
1544
|
+
"name": "baht-search",
|
|
1545
|
+
"description": "A search box outside a form: beside a table's title, over a list. It sends the term as you\ntype, after a quiet spell (`debounce`), and at once on Enter; Escape clears it. The element\nfilters nothing itself: the host narrows its rows on `baht-search`.\n\n <baht-search placeholder=\"Search servers\" label=\"Search servers\"></baht-search>\n search.addEventListener('baht-search', (e) => (term = e.detail.value));\n---\n\n\n### **Events:**\n - **baht-search** - The term changed (after `debounce` ms of quiet, on Enter, or cleared by Escape); `value` is already set.\n- **name**\n\n### **Methods:**\n \n",
|
|
1546
|
+
"attributes": [
|
|
1547
|
+
{ "name": "value", "description": "The term.", "values": [] },
|
|
1548
|
+
{ "name": "placeholder", "values": [] },
|
|
1549
|
+
{
|
|
1550
|
+
"name": "label",
|
|
1551
|
+
"description": "Accessible name; `t('search')` when empty.",
|
|
1552
|
+
"values": []
|
|
1553
|
+
},
|
|
1554
|
+
{
|
|
1555
|
+
"name": "debounce",
|
|
1556
|
+
"description": "Milliseconds of quiet before the term is sent while typing; 0 sends every keystroke.",
|
|
1557
|
+
"values": []
|
|
1558
|
+
},
|
|
1559
|
+
{ "name": "disabled", "values": [] },
|
|
1560
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1561
|
+
],
|
|
1562
|
+
"references": []
|
|
1563
|
+
},
|
|
1564
|
+
{
|
|
1565
|
+
"name": "baht-section-header",
|
|
1566
|
+
"description": "The head of a titled section of a page: a heading, a line about it and its actions. Lighter\nthan `<baht-page-header>` (one per page), heavier than `<baht-card heading>` (one per card).\nChildren are the actions, at the end of the row.\n\n <baht-section-header heading=\"In your cloud\" description=\"Images you uploaded or downloaded.\">\n <baht-button variant=\"secondary\" icon=\"upload\">Upload</baht-button>\n </baht-section-header>\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
1567
|
+
"attributes": [
|
|
1568
|
+
{ "name": "heading", "description": "Section title.", "values": [] },
|
|
1569
|
+
{
|
|
1570
|
+
"name": "description",
|
|
1571
|
+
"description": "One line about the section, under the title.",
|
|
1572
|
+
"values": []
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
"name": "level",
|
|
1576
|
+
"description": "Heading level: 2 (default), 3 or 4. Anything else renders `<h2>`.",
|
|
1577
|
+
"values": [{ "name": "2" }, { "name": "3" }, { "name": "4" }]
|
|
1578
|
+
},
|
|
1579
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1580
|
+
],
|
|
1581
|
+
"references": []
|
|
1582
|
+
},
|
|
1583
|
+
{
|
|
1584
|
+
"name": "baht-section",
|
|
1585
|
+
"description": "Section divider (`type: \"section\"`): heading + rule, no value. With `field.collapsible` the\nheading is a button that folds what follows; `<baht-form>` hides those fields.\n---\n\n\n### **Events:**\n - **baht-section-toggle** - The user folded or unfolded it. `detail: { collapsed }`.\n- **name**\n\n### **Methods:**\n \n",
|
|
1586
|
+
"attributes": [
|
|
1587
|
+
{
|
|
1588
|
+
"name": "collapsed",
|
|
1589
|
+
"description": "Folded right now.",
|
|
1590
|
+
"values": []
|
|
1591
|
+
},
|
|
1592
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1593
|
+
],
|
|
1594
|
+
"references": []
|
|
1595
|
+
},
|
|
1596
|
+
{
|
|
1597
|
+
"name": "baht-select",
|
|
1598
|
+
"description": "Single-choice dropdown. Renders ITS OWN list (light DOM, positioned under\nthe trigger) instead of the native `<select>` — so the picker looks the same\non iOS/macOS as everywhere else (no UIKit wheel, no AppKit menu), and every\noption is styleable with the tokens.\n\nARIA: APG \"select-only combobox\". The trigger is a `<button role=\"combobox\">`\n(so `<label for>` still names it); `aria-activedescendant` tracks the\nhighlighted option while focus stays on the trigger. Keys: Arrow Up/Down,\nHome/End, Enter/Space pick, Escape closes, Tab picks the highlighted option\nand moves on, typing jumps to the first option starting with those letters\n(while closed it picks it directly, like a native select).\n\nAn option's `description` renders as a muted second line under its label in\nthe list, and after the label on the closed trigger while it is selected\n(e.g. label \"Food\", description \"฿580 left\").\n\nValue contract unchanged: option `key`, or `null` for the placeholder row.\n---\n\n\n### **Events:**\n - **baht-input** - Field mode: the user edited the value.\n- **name**\n\n### **Methods:**\n \n- **flushTyped(): _void_** - Hand a pending typed edit to the host now (blur, disconnect, host reads). Idempotent.\n- **discardTyped(): _void_** - The host did not take the edit: forget the keystrokes and show `value` again. Without this\na refused edit stays on screen, since `value` never moves to say the text has landed.\n\n\n\n\n",
|
|
1599
|
+
"attributes": [
|
|
1600
|
+
{ "name": "disabled", "values": [] },
|
|
1601
|
+
{ "name": "readonly", "values": [] },
|
|
1602
|
+
{ "name": "required", "values": [] },
|
|
1603
|
+
{
|
|
1604
|
+
"name": "show-optional",
|
|
1605
|
+
"description": "Append the localized \"(optional)\" marker to the label when not required (set by <baht-form show-optional>).",
|
|
1606
|
+
"values": []
|
|
1607
|
+
},
|
|
1608
|
+
{
|
|
1609
|
+
"name": "debounce",
|
|
1610
|
+
"description": "Debounce for typed edits (ms); unset = BahtFieldBase.defaultDebounce.",
|
|
1611
|
+
"values": []
|
|
1612
|
+
},
|
|
1613
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1614
|
+
],
|
|
1615
|
+
"references": []
|
|
1616
|
+
},
|
|
1617
|
+
{
|
|
1618
|
+
"name": "baht-skeleton",
|
|
1619
|
+
"description": "Loading placeholder (opacity pulse — the 20baht system bans gradients in\ncore UI, so no shimmer).\n\n <baht-skeleton variant=\"text\" width=\"60%\"></baht-skeleton>\n <baht-skeleton variant=\"circle\" width=\"40px\" height=\"40px\"></baht-skeleton>\n <baht-skeleton height=\"120px\"></baht-skeleton>\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
1620
|
+
"attributes": [
|
|
1621
|
+
{
|
|
1622
|
+
"name": "variant",
|
|
1623
|
+
"values": [
|
|
1624
|
+
{ "name": "rect" },
|
|
1625
|
+
{ "name": "text" },
|
|
1626
|
+
{ "name": "circle" }
|
|
1627
|
+
]
|
|
1628
|
+
},
|
|
1629
|
+
{ "name": "width", "values": [] },
|
|
1630
|
+
{ "name": "height", "values": [] },
|
|
1631
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1632
|
+
],
|
|
1633
|
+
"references": []
|
|
1634
|
+
},
|
|
1635
|
+
{
|
|
1636
|
+
"name": "baht-sparkline",
|
|
1637
|
+
"description": "Micro trend line — no axes, no ticks, no tooltip. Used inside `<baht-stat>`\nand anywhere a number needs its recent shape beside it.\n\n <baht-sparkline values=\"[4,7,6,9,12]\" accent-last></baht-sparkline>\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
1638
|
+
"attributes": [
|
|
1639
|
+
{
|
|
1640
|
+
"name": "values",
|
|
1641
|
+
"description": "The points, oldest first. Fewer than two points renders nothing.",
|
|
1642
|
+
"values": [{ "name": "number[]" }]
|
|
1643
|
+
},
|
|
1644
|
+
{
|
|
1645
|
+
"name": "width",
|
|
1646
|
+
"description": "Drawing width in px.",
|
|
1647
|
+
"values": []
|
|
1648
|
+
},
|
|
1649
|
+
{
|
|
1650
|
+
"name": "height",
|
|
1651
|
+
"description": "Drawing height in px.",
|
|
1652
|
+
"values": []
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
"name": "accent-last",
|
|
1656
|
+
"description": "Mark the newest point with an accent dot.",
|
|
1657
|
+
"values": []
|
|
1658
|
+
},
|
|
1659
|
+
{
|
|
1660
|
+
"name": "color",
|
|
1661
|
+
"description": "Line color; defaults to the de-emphasis chart token.",
|
|
1662
|
+
"values": []
|
|
1663
|
+
},
|
|
1664
|
+
{
|
|
1665
|
+
"name": "label",
|
|
1666
|
+
"description": "Accessible name; falls back to a plain \"Trend of N points\" sentence.",
|
|
1667
|
+
"values": []
|
|
1668
|
+
},
|
|
1669
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1670
|
+
],
|
|
1671
|
+
"references": []
|
|
1672
|
+
},
|
|
1673
|
+
{
|
|
1674
|
+
"name": "baht-spinner",
|
|
1675
|
+
"description": "Loading spinner — the single animated icon the 20baht system allows.\n\n <baht-spinner></baht-spinner>\n <baht-spinner size=\"lg\"></baht-spinner>\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
1676
|
+
"attributes": [
|
|
1677
|
+
{
|
|
1678
|
+
"name": "size",
|
|
1679
|
+
"values": [{ "name": "sm" }, { "name": "md" }, { "name": "lg" }]
|
|
1680
|
+
},
|
|
1681
|
+
{ "name": "label", "values": [] },
|
|
1682
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1683
|
+
],
|
|
1684
|
+
"references": []
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
"name": "baht-split-button",
|
|
1688
|
+
"description": "Split button: a main action plus a ▾ toggle that opens a menu of related actions\n(NOTES 2026-10-31). Each action can carry a keyboard `shortcut` — the main one shows\nin the main button's tooltip, item ones as a right-aligned hint in the menu — and all\nof them are bound document-wide (same scoping as `<baht-button shortcut>`).\n\n <baht-split-button label=\"Save\" shortcut=\"alt+s\"></baht-split-button>\n el.items = [{ value: 'save-close', label: 'Save and close', shortcut: 'shift+alt+s' }];\n el.addEventListener('baht-click', save);\n el.addEventListener('baht-select', (e) => run(e.detail.value));\n\nKeyboard: ↓ / Enter / Space on the toggle opens on the first item, ↑ on the last;\nin the menu ↑ ↓ (wrapping, skipping disabled) · Home · End · Enter/Space picks ·\nEscape closes back to the toggle (and is marked handled, so a surrounding\n`<baht-modal>` stays open) · Tab closes and moves on. A click outside closes.\n---\n\n\n### **Events:**\n - **baht-click** - The main action was activated (click or its shortcut).\n- **baht-select** - A menu item was picked. `detail: { value, item }`.\n- **name**\n\n### **Methods:**\n \n",
|
|
1689
|
+
"attributes": [
|
|
1690
|
+
{ "name": "label", "description": "Main action label.", "values": [] },
|
|
1691
|
+
{ "name": "variant", "values": [{ "name": "ButtonVariant" }] },
|
|
1692
|
+
{ "name": "size", "values": [{ "name": "ButtonSize" }] },
|
|
1693
|
+
{ "name": "disabled", "values": [] },
|
|
1694
|
+
{
|
|
1695
|
+
"name": "shortcut",
|
|
1696
|
+
"description": "Shortcut for the main action, e.g. `alt+s` (see `<baht-button shortcut>`).",
|
|
1697
|
+
"values": []
|
|
1698
|
+
},
|
|
1699
|
+
{
|
|
1700
|
+
"name": "align",
|
|
1701
|
+
"description": "Menu edge aligned with the button: `'end'` (default, right in LTR) or `'start'`.",
|
|
1702
|
+
"values": [{ "name": "start" }, { "name": "end" }]
|
|
1703
|
+
},
|
|
1704
|
+
{
|
|
1705
|
+
"name": "menu-label",
|
|
1706
|
+
"description": "Accessible name of the ▾ toggle. Defaults to the localized \"More actions\".",
|
|
1707
|
+
"values": []
|
|
1708
|
+
},
|
|
1709
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1710
|
+
],
|
|
1711
|
+
"references": []
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
"name": "baht-stat-chart",
|
|
1715
|
+
"description": "Big single-number stat (report type \"count\").\n\n <baht-stat-chart total=\"1284\" label=\"Open incidents\"></baht-stat-chart>\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
1716
|
+
"attributes": [
|
|
1717
|
+
{ "name": "total", "values": [] },
|
|
1718
|
+
{ "name": "label", "values": [] },
|
|
1719
|
+
{
|
|
1720
|
+
"name": "color",
|
|
1721
|
+
"description": "Overrides the number color (defaults to the primary token).",
|
|
1722
|
+
"values": []
|
|
1723
|
+
},
|
|
1724
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1725
|
+
],
|
|
1726
|
+
"references": []
|
|
1727
|
+
},
|
|
1728
|
+
{
|
|
1729
|
+
"name": "baht-stat",
|
|
1730
|
+
"description": "\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
1731
|
+
"attributes": [
|
|
1732
|
+
{
|
|
1733
|
+
"name": "label",
|
|
1734
|
+
"description": "Sentence-case caption above the figure, no trailing colon.",
|
|
1735
|
+
"values": []
|
|
1736
|
+
},
|
|
1737
|
+
{ "name": "value", "description": "The figure.", "values": [] },
|
|
1738
|
+
{
|
|
1739
|
+
"name": "format",
|
|
1740
|
+
"description": "How the figure reads: number | currency | percent | percent-100 | compact.\n`percent` expects a fraction (`0.14` → \"14%\"); `percent-100` expects 0 to 100\n(`14` → \"14%\").",
|
|
1741
|
+
"values": [{ "name": "ChartFormat" }]
|
|
1742
|
+
},
|
|
1743
|
+
{
|
|
1744
|
+
"name": "currency",
|
|
1745
|
+
"description": "ISO currency code for `format=\"currency\"` (THB renders `฿`).",
|
|
1746
|
+
"values": []
|
|
1747
|
+
},
|
|
1748
|
+
{
|
|
1749
|
+
"name": "delta",
|
|
1750
|
+
"description": "Change against the previous period. `null` hides the delta row.\nWith `delta-kind=\"pct\"` it is a percentage on a 0 to 100 scale (18 → \"18%\"),\nwhatever `format` is; with `\"abs\"` it is\na raw amount rendered with this tile's `format`.",
|
|
1751
|
+
"values": []
|
|
1752
|
+
},
|
|
1753
|
+
{
|
|
1754
|
+
"name": "delta-kind",
|
|
1755
|
+
"description": "Whether `delta` is a percentage or an absolute amount.",
|
|
1756
|
+
"values": [{ "name": "abs" }, { "name": "pct" }]
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
"name": "delta-label",
|
|
1760
|
+
"description": "What the delta is measured against, e.g. \"vs August\". With no `delta` it is\nstill rendered on its own as a muted caption, so a figure can name its period.",
|
|
1761
|
+
"values": []
|
|
1762
|
+
},
|
|
1763
|
+
{
|
|
1764
|
+
"name": "up-is-good",
|
|
1765
|
+
"description": "Is a rise good news? Spending tiles set `up-is-good=\"false\"`.",
|
|
1766
|
+
"values": []
|
|
1767
|
+
},
|
|
1768
|
+
{
|
|
1769
|
+
"name": "trend",
|
|
1770
|
+
"description": "Recent points drawn as a muted sparkline with an accent on the newest.",
|
|
1771
|
+
"values": [{ "name": "number[]" }]
|
|
1772
|
+
},
|
|
1773
|
+
{
|
|
1774
|
+
"name": "size",
|
|
1775
|
+
"description": "`hero` is the one 48px+ figure a view leads with.",
|
|
1776
|
+
"values": [{ "name": "md" }, { "name": "hero" }]
|
|
1777
|
+
},
|
|
1778
|
+
{
|
|
1779
|
+
"name": "icon",
|
|
1780
|
+
"description": "Icon name from the curated set (see icons.ts), shown in a chip before the label.",
|
|
1781
|
+
"values": []
|
|
1782
|
+
},
|
|
1783
|
+
{
|
|
1784
|
+
"name": "previous",
|
|
1785
|
+
"description": "The previous period's figure. With no `delta`, the tile works the % change out itself, and a\nbase under 5 reads \"was 1\" in grey instead of a loud −100% on a tiny count.",
|
|
1786
|
+
"values": []
|
|
1787
|
+
},
|
|
1788
|
+
{
|
|
1789
|
+
"name": "delta-tone",
|
|
1790
|
+
"description": "`neutral` keeps the delta grey both ways: spend or volume, where up is neither good nor bad.",
|
|
1791
|
+
"values": [{ "name": "auto" }, { "name": "neutral" }]
|
|
1792
|
+
},
|
|
1793
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1794
|
+
],
|
|
1795
|
+
"references": []
|
|
1796
|
+
},
|
|
1797
|
+
{
|
|
1798
|
+
"name": "baht-steps",
|
|
1799
|
+
"description": "<baht-steps> — wizard progress indicator (spec 03). Standalone display\nprimitive: numbered markers + labels, the current one highlighted, done\nones checked. <baht-workflow show-steps> renders it automatically from its\nvisible forms.\n\n`variant=\"compact\"` is for narrow places (a modal, a drawer): numbered markers joined by a rule,\nand only the current step's label, once, under them. Five steps fit in 400px without scrolling;\nevery label stays in the list for assistive tech.\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
1800
|
+
"attributes": [
|
|
1801
|
+
{
|
|
1802
|
+
"name": "current",
|
|
1803
|
+
"description": "0-based index of the current step.",
|
|
1804
|
+
"values": []
|
|
1805
|
+
},
|
|
1806
|
+
{
|
|
1807
|
+
"name": "variant",
|
|
1808
|
+
"description": "'default' = horizontal numbered markers; 'sidebar' = vertical nav list, current pilled;\n'chevron' = a joined strip of states, scrolling sideways when it does not fit;\n'compact' = markers only, the current label under them (fits a narrow modal).",
|
|
1809
|
+
"values": [
|
|
1810
|
+
{ "name": "default" },
|
|
1811
|
+
{ "name": "sidebar" },
|
|
1812
|
+
{ "name": "chevron" },
|
|
1813
|
+
{ "name": "compact" }
|
|
1814
|
+
]
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
"name": "show-done",
|
|
1818
|
+
"description": "chevron: tick the steps before the current one. Off when the strip lists states, not progress.",
|
|
1819
|
+
"values": []
|
|
1820
|
+
},
|
|
1821
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1822
|
+
],
|
|
1823
|
+
"references": []
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
"name": "baht-swipe-row",
|
|
1827
|
+
"description": "Row container for touch lists: the children are the row, `actions` sit behind\nit on the right and are revealed by swiping the row left.\n\n <baht-swipe-row><my-expense-row …></my-expense-row></baht-swipe-row>\n row.actions = [{ key: 'edit', label: 'Edit' }, { key: 'delete', label: 'Delete', tone: 'danger' }];\n row.addEventListener('baht-action', (e) => handle(e.detail.key));\n\nPointer events (touch, pen, mouse): a horizontal drag moves the row; released\nmore than 40px left it snaps open, more than 40px right (from open) it snaps\nshut, otherwise it springs back. Vertical drags are left to the page\n(`touch-action: pan-y`). An open row closes on a pointerdown outside it, on a\ntap on the row (that tap is swallowed, so the row's own click handler does not\nfire), on Escape, and after an action is pressed. The click that ends a drag\nis swallowed too.\n\nKeyboard: the actions are real buttons after the row content in tab order;\nfocusing one reveals the row, focus leaving the row hides it again. The\ngesture is physical (swipe left, actions on the right) in either text direction.\n---\n\n\n### **Events:**\n - **baht-action** - A revealed action was pressed.\n- **name**\n\n### **Methods:**\n \n",
|
|
1828
|
+
"attributes": [
|
|
1829
|
+
{
|
|
1830
|
+
"name": "open",
|
|
1831
|
+
"description": "Revealed state. Reflected; set it to open or close the row from the host.",
|
|
1832
|
+
"values": []
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
"name": "label",
|
|
1836
|
+
"description": "Accessible name of the action group (default: the i18n `rowActions` string).",
|
|
1837
|
+
"values": []
|
|
1838
|
+
},
|
|
1839
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1840
|
+
],
|
|
1841
|
+
"references": []
|
|
1842
|
+
},
|
|
1843
|
+
{
|
|
1844
|
+
"name": "baht-table",
|
|
1845
|
+
"description": "Server-side data table. `items` is ONE page of rows — the component never\nslices or fetches; on `baht-page-change` the host fetches the next page and\nre-feeds `items`/`page`. While that fetch runs, set `loading` to show\nskeleton rows.\n\n const t = document.querySelector('baht-table');\n t.columns = { name: 'Name', created_at: 'Created' };\n t.items = pageRows; // current page only\n t.loading = false; t.page = 1; t.totalPages = 12;\n t.addEventListener('baht-page-change', (e) => fetchPage(e.detail.page));\n t.addEventListener('baht-row-click', (e) => open(e.detail.id));\n\nSet `cursor-mode` for cursor-based APIs (no total count) — the footer\nbecomes a Prev/Next pair gated by `has-next`/`has-prev`, and the host\nlistens for `baht-cursor-change` instead of `baht-page-change`:\n\n t.cursorMode = true; t.hasNext = true; t.hasPrev = false;\n t.addEventListener('baht-cursor-change', (e) => fetchPage(e.detail.direction));\n\nA built-in \"Columns\" button is ON by default — it opens a ServiceNow-style\nAvailable/Selected dual-list modal (add/remove, reorder, Select all/Clear\nall) derived from `columns` (or the first row's keys), no host wiring\nrequired. Set `t.columnPicker = false` (JS property — a boolean attribute\ncan't express \"off\") to hide it. OK emits `baht-columns-change` with the\nchosen keys and their labels; persist that and feed it back as\n`visibleColumns` to remember a person's layout:\n\n t.addEventListener('baht-columns-change', (e) => save(e.detail.visibleColumns));\n\nDot-walking (spec: reference columns). A column may declare `fields`, in\nwhich case the picker lets the person expand it and pick a sub-field —\nthe key becomes `requester.department`, the header reads\n\"Requested by › Department\", and the cell resolves the path on the row.\nRows whose values are plain objects get the same treatment automatically\nwhen no `columns` map is given.\n\n t.columns = {\n number: 'Number',\n requester: { label: 'Requested by', fields: { name: 'Name', department: 'Department' } },\n };\n t.visibleColumns = ['number', 'requester.name'];\n\nCell kinds: a column renders a `<baht-badge>` or a `<baht-code>` chip without a renderer.\n`tone`, `labels` and `busy` (a badge's spinner) map a value (JSON) or are functions of the value\nand row (property); `empty` is plain text for an empty value; a `renderers` entry still wins.\n\n t.columns = {\n state: { label: 'State', cell: 'badge', tone: { ACTIVE: 'success' }, labels: { ACTIVE: 'Running' }, busy: { BUILD: true } },\n address: { label: 'Address', cell: 'code', empty: '-' },\n };\n\n`variant=\"plain\"` turns both the picker and the \"No.\" column off in one go (small tables).\n\nEmpty state: a child with `data-slot=\"empty\"` (an illustration, a button) takes the place\nof the `empty-message` text when there are no rows; it is hidden while loading or on error.\n\n`visibleColumns` still works standalone for a host-controlled subset (no\nrefetch) — pass it explicitly and the built-in picker (if also enabled)\nstarts from that selection and keeps emitting updates for it.\n\nToolbar, selection, sorting, row actions (all server-side, all off by default):\n\n t.total = 143; // \"143 results\" in the toolbar (search/filter UI lives outside)\n t.selectable = true; t.selected = ['g1']; // checkbox column, controlled by row key\n t.addEventListener('baht-selection-change', (e) => (t.selected = e.detail.selected));\n t.columns = { amount: { label: 'Amount', numeric: true, sortable: true } };\n t.sort = { key: 'amount', direction: 'desc' };\n t.addEventListener('baht-sort-change', (e) => refetch({ sort: e.detail }));\n t.rowActions = true; // trailing \"...\" button -> baht-row-actions { row, index, id }\n t.rowMenu = [{ value: 'delete', label: 'Delete', danger: true }]; // a real menu per row\n t.rowMenu = (row) => itemsFor(row); // or per-row items\n t.addEventListener('baht-row-menu-select', (e) => run(e.detail.value, e.detail.row));\n\nGrouping (ServiceNow \"Group by\" on a list): `group-by` names a (dotted)\nrow key, or pass a function as the property. Every row on the CURRENT page\nis bucketed by that value in first-appearance order; each bucket is its own\n`<tbody>` headed by a `th[scope=rowgroup]` disclosure reading\n\"Column: value (n)\". Click the header to collapse/expand the group\n(`baht-group-toggle`); `group-collapsed` starts them all closed, and the\nopen/closed state resets when `items`/`page` change. Grouping is per page\nonly — it rides on the existing pagination and never fetches or sorts, so\na value split across pages shows up on each. `groupLabel` replaces the\ndefault header text (it still sits inside the toggle). Row numbers and\nevent indexes stay page-global. `hide-header` drops the column header row\nfor list-style layouts.\n\n t.groupBy = 'state'; // \"State: Open (12)\"\n t.groupBy = (row) => row.occurred_at.slice(0, 10);\n t.groupLabel = (day, rows) => `${formatDay(day)} · ${rows.length}`;\n t.groupCollapsed = true;\n t.addEventListener('baht-group-toggle', (e) => console.log(e.detail)); // { value, collapsed }\n\nFilter (ServiceNow's condition builder and breadcrumbs): `filterable` adds a Filter button. Its\npanel builds conditions on any column, dot-walked ones included; Run emits `baht-filter-change`\nand the conditions stay above the table, each one removable. The table never filters: the host\nrefetches, or tests rows with `matchesFilter`, and feeds `filter` back. `type` and `options` on a\ncolumn say how it compares.\n\n t.filterable = true;\n t.columns = { state: { label: 'State', type: 'choice', options: [...] } };\n t.addEventListener('baht-filter-change', (e) => refetch({ filter: e.detail.value }));\n\nSave Filters: set `savedFilters` (an empty list will do) and the panel can name a filter, apply\none and delete one. The host keeps the list, in localStorage or on a server:\n\n t.savedFilters = load();\n t.addEventListener('baht-saved-filters-change', (e) => store(e.detail.filters));\n---\n\n\n### **Events:**\n - **baht-row-click** - A row was pressed.\n- **baht-selection-change** - The selection changed.\n- **baht-sort-change** - A sortable header was pressed.\n- **baht-columns-change** - The column picker was confirmed.\n- **baht-filter-change** - The filter changed.\n- **baht-group-toggle** - A group was collapsed or expanded.\n- **baht-row-actions** - A row's actions button was pressed.\n- **baht-row-menu-select** - An item was picked from a row's `rowMenu`.\n- **baht-page-change** - A page was picked in the footer; the host fetches it.\n- **baht-cursor-change** - Cursor mode: next or previous was pressed.\n- **baht-saved-filters-change** - A filter was saved or deleted.\n- **name**\n\n### **Methods:**\n \n\n",
|
|
1846
|
+
"attributes": [
|
|
1847
|
+
{ "name": "loading", "values": [] },
|
|
1848
|
+
{ "name": "error", "values": [] },
|
|
1849
|
+
{ "name": "error-message", "values": [] },
|
|
1850
|
+
{ "name": "empty-message", "values": [] },
|
|
1851
|
+
{
|
|
1852
|
+
"name": "show-index",
|
|
1853
|
+
"description": "Row-number column (No.). Offset lets numbering continue across pages.",
|
|
1854
|
+
"values": []
|
|
1855
|
+
},
|
|
1856
|
+
{ "name": "index-offset", "values": [] },
|
|
1857
|
+
{ "name": "skeleton-rows", "values": [] },
|
|
1858
|
+
{
|
|
1859
|
+
"name": "row-key",
|
|
1860
|
+
"description": "Which row key identifies a row in baht-row-click detail.id (e.g. 'group_id').",
|
|
1861
|
+
"values": []
|
|
1862
|
+
},
|
|
1863
|
+
{
|
|
1864
|
+
"name": "clickable",
|
|
1865
|
+
"description": "Rows emit baht-row-click + get hover/keyboard affordances.",
|
|
1866
|
+
"values": []
|
|
1867
|
+
},
|
|
1868
|
+
{
|
|
1869
|
+
"name": "group-by",
|
|
1870
|
+
"description": "Group the page's rows by this (dotted) column key — or a function of the row (property). Unset = no grouping.",
|
|
1871
|
+
"values": [{ "name": "GroupKey" }]
|
|
1872
|
+
},
|
|
1873
|
+
{
|
|
1874
|
+
"name": "group-collapsible",
|
|
1875
|
+
"description": "Group headers are disclosures (click to collapse). Set the JS property to `false` for static headers.",
|
|
1876
|
+
"values": []
|
|
1877
|
+
},
|
|
1878
|
+
{
|
|
1879
|
+
"name": "group-collapsed",
|
|
1880
|
+
"description": "Start every group collapsed (per page — resets when `items`/`page` change).",
|
|
1881
|
+
"values": []
|
|
1882
|
+
},
|
|
1883
|
+
{
|
|
1884
|
+
"name": "hide-header",
|
|
1885
|
+
"description": "Drop the column header row (list-style tables, e.g. grouped ledgers).",
|
|
1886
|
+
"values": []
|
|
1887
|
+
},
|
|
1888
|
+
{
|
|
1889
|
+
"name": "column-picker",
|
|
1890
|
+
"description": "Built-in \"Columns\" toggle — derives its options from `columns`/rows. Set `column-picker=\"false\"` to hide it.",
|
|
1891
|
+
"values": []
|
|
1892
|
+
},
|
|
1893
|
+
{
|
|
1894
|
+
"name": "variant",
|
|
1895
|
+
"description": "`plain` is a small table in one switch: no column picker and no \"No.\" column, whatever\n`column-picker` and `show-index` say. `default` leaves both to those props.",
|
|
1896
|
+
"values": [{ "name": "TableVariant" }]
|
|
1897
|
+
},
|
|
1898
|
+
{
|
|
1899
|
+
"name": "total",
|
|
1900
|
+
"description": "Total matching rows across all pages — renders \"{n} results\" in the toolbar. Unset = no count.",
|
|
1901
|
+
"values": []
|
|
1902
|
+
},
|
|
1903
|
+
{ "name": "selectable", "values": [] },
|
|
1904
|
+
{
|
|
1905
|
+
"name": "sortable",
|
|
1906
|
+
"description": "Make every column sortable (or set `sortable` per column in `columns`).",
|
|
1907
|
+
"values": []
|
|
1908
|
+
},
|
|
1909
|
+
{
|
|
1910
|
+
"name": "filterable",
|
|
1911
|
+
"description": "A Filter button: a condition builder over every column, and the applied conditions as breadcrumbs.",
|
|
1912
|
+
"values": []
|
|
1913
|
+
},
|
|
1914
|
+
{
|
|
1915
|
+
"name": "row-actions",
|
|
1916
|
+
"description": "Trailing \"...\" button per row; emits `baht-row-actions { row, index, id }`.",
|
|
1917
|
+
"values": []
|
|
1918
|
+
},
|
|
1919
|
+
{ "name": "page", "values": [] },
|
|
1920
|
+
{ "name": "total-pages", "values": [] },
|
|
1921
|
+
{
|
|
1922
|
+
"name": "always-paginate",
|
|
1923
|
+
"description": "Keep the footer with one page too, so a list always shows where the pages are.",
|
|
1924
|
+
"values": []
|
|
1925
|
+
},
|
|
1926
|
+
{
|
|
1927
|
+
"name": "cursor-mode",
|
|
1928
|
+
"description": "Switch the footer to Prev/Next (cursor-based API, no total count).",
|
|
1929
|
+
"values": []
|
|
1930
|
+
},
|
|
1931
|
+
{ "name": "has-next", "values": [] },
|
|
1932
|
+
{ "name": "has-prev", "values": [] },
|
|
1933
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1934
|
+
],
|
|
1935
|
+
"references": []
|
|
1936
|
+
},
|
|
1937
|
+
{
|
|
1938
|
+
"name": "baht-tabs",
|
|
1939
|
+
"description": "Tabs (APG tab pattern). The tab strip comes from `tabs`; the panels are your own children,\nmatched by `data-tab=\"<key>\"` — they get `role=\"tabpanel\"`, ids and `hidden` for you. A hidden\npanel also gets an inline `display: none !important`, so page CSS that gives panels a `display`\n(`.panel { display: flex }`) never shows two at once.\n\n <baht-tabs label=\"Ticket\">\n <section data-tab=\"details\">…</section>\n <section data-tab=\"history\">…</section>\n </baht-tabs>\n el.tabs = [{ key: 'details', label: 'Details' }, { key: 'history', label: 'History', badge: '3' }];\n el.addEventListener('baht-change', (e) => (location.hash = e.detail.value));\n\n`value` is the selected key (the first enabled tab when unset or unknown). Keyboard: ←/→\nmove between tabs (wrapping, skipping disabled), Home/End jump; with `activation=\"manual\"`\nthe arrows only move focus and Enter/Space selects. Only the selected tab is in the Tab order.\n---\n\n\n### **Events:**\n - **baht-change** - The user selected a tab. `detail: { value }`. Setting `value` does not fire it.\n- **name**\n\n### **Methods:**\n \n",
|
|
1940
|
+
"attributes": [
|
|
1941
|
+
{ "name": "value", "description": "Selected tab key.", "values": [] },
|
|
1942
|
+
{
|
|
1943
|
+
"name": "label",
|
|
1944
|
+
"description": "Accessible name of the tab list.",
|
|
1945
|
+
"values": []
|
|
1946
|
+
},
|
|
1947
|
+
{
|
|
1948
|
+
"name": "activation",
|
|
1949
|
+
"description": "`automatic` (default): arrows select. `manual`: arrows focus, Enter/Space selects.",
|
|
1950
|
+
"values": [{ "name": "automatic" }, { "name": "manual" }]
|
|
1951
|
+
},
|
|
1952
|
+
{
|
|
1953
|
+
"name": "variant",
|
|
1954
|
+
"description": "`line` (default): an underline strip. `pill`: rounded chips; the active fill is `--baht-tabs-pill-active`.",
|
|
1955
|
+
"values": [{ "name": "line" }, { "name": "pill" }]
|
|
1956
|
+
},
|
|
1957
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1958
|
+
],
|
|
1959
|
+
"references": []
|
|
1960
|
+
},
|
|
1961
|
+
{
|
|
1962
|
+
"name": "baht-tags",
|
|
1963
|
+
"description": "Creatable chip input: value is `string[]` (unique, trimmed, in entry\norder). Type text + Enter or comma to add a chip; Backspace on an empty\ninput removes the last chip; pasting \"a, b, c\" adds three at once.\n\nSuggestions come from `field.options` — the SAME list every other\noption-bearing field reads, already resolved by `<baht-form>` when the\ndescriptor uses `options_from` (spec 01 §1: dynamic options are merged\ninto `field.options` before the primitive ever sees them, so this\ncomponent needs no fetcher of its own). They filter as you type\n(case-insensitive, prefix matches first) and exclude tags already chosen.\nFree text becomes a chip unless `field.allow_new === false`, in which case\nonly a suggestion's `key` (matched case-insensitively) can become one.\n\n el.field = { type: 'tags', key: 'labels', options: [...], max_items: 5 };\n el.addEventListener('baht-input', (e) => (draft.labels = e.detail.value));\n\nARIA: APG editable combobox with list autocomplete, same pattern as\n<baht-typeahead> — the input is the combobox, the chips sit before it in\nthe same control, `aria-activedescendant` walks the listbox.\n---\n\n\n### **Events:**\n - **baht-input** - Field mode: the user edited the value.\n- **name**\n\n### **Methods:**\n \n- **flushTyped(): _void_** - Hand a pending typed edit to the host now (blur, disconnect, host reads). Idempotent.\n- **discardTyped(): _void_** - The host did not take the edit: forget the keystrokes and show `value` again. Without this\na refused edit stays on screen, since `value` never moves to say the text has landed.\n\n\n\n\n",
|
|
1964
|
+
"attributes": [
|
|
1965
|
+
{ "name": "disabled", "values": [] },
|
|
1966
|
+
{ "name": "readonly", "values": [] },
|
|
1967
|
+
{ "name": "required", "values": [] },
|
|
1968
|
+
{
|
|
1969
|
+
"name": "show-optional",
|
|
1970
|
+
"description": "Append the localized \"(optional)\" marker to the label when not required (set by <baht-form show-optional>).",
|
|
1971
|
+
"values": []
|
|
1972
|
+
},
|
|
1973
|
+
{
|
|
1974
|
+
"name": "debounce",
|
|
1975
|
+
"description": "Debounce for typed edits (ms); unset = BahtFieldBase.defaultDebounce.",
|
|
1976
|
+
"values": []
|
|
1977
|
+
},
|
|
1978
|
+
{ "name": "defer-hydration", "values": [] }
|
|
1979
|
+
],
|
|
1980
|
+
"references": []
|
|
1981
|
+
},
|
|
1982
|
+
{
|
|
1983
|
+
"name": "baht-text",
|
|
1984
|
+
"description": "Static text block (`type: \"label\"`): no value, no emits.\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
1985
|
+
"attributes": [{ "name": "defer-hydration", "values": [] }],
|
|
1986
|
+
"references": []
|
|
1987
|
+
},
|
|
1988
|
+
{
|
|
1989
|
+
"name": "baht-textarea",
|
|
1990
|
+
"description": "\n---\n\n\n### **Events:**\n - **baht-input** - Field mode: the user edited the value.\n- **name**\n\n### **Methods:**\n \n- **flushTyped(): _void_** - Hand a pending typed edit to the host now (blur, disconnect, host reads). Idempotent.\n- **discardTyped(): _void_** - The host did not take the edit: forget the keystrokes and show `value` again. Without this\na refused edit stays on screen, since `value` never moves to say the text has landed.\n\n\n\n\n",
|
|
1991
|
+
"attributes": [
|
|
1992
|
+
{ "name": "disabled", "values": [] },
|
|
1993
|
+
{ "name": "readonly", "values": [] },
|
|
1994
|
+
{ "name": "required", "values": [] },
|
|
1995
|
+
{
|
|
1996
|
+
"name": "show-optional",
|
|
1997
|
+
"description": "Append the localized \"(optional)\" marker to the label when not required (set by <baht-form show-optional>).",
|
|
1998
|
+
"values": []
|
|
1999
|
+
},
|
|
2000
|
+
{
|
|
2001
|
+
"name": "debounce",
|
|
2002
|
+
"description": "Debounce for typed edits (ms); unset = BahtFieldBase.defaultDebounce.",
|
|
2003
|
+
"values": []
|
|
2004
|
+
},
|
|
2005
|
+
{ "name": "defer-hydration", "values": [] }
|
|
2006
|
+
],
|
|
2007
|
+
"references": []
|
|
2008
|
+
},
|
|
2009
|
+
{
|
|
2010
|
+
"name": "baht-theme-toggle",
|
|
2011
|
+
"description": "Light / dark switch for the 20baht themes. Sets `data-baht-theme` on `<html>` (or on the\n`target` element), so every `--baht-*` token follows.\n\n <baht-theme-toggle></baht-theme-toggle>\n <baht-theme-toggle default=\"system\"></baht-theme-toggle> <!-- first visit follows the OS -->\n <baht-theme-toggle target=\"#preview\" storage-key=\"\"></baht-theme-toggle>\n\nStarting theme: the one saved in `localStorage[storage-key]`, else the theme already on the\ntarget, else `default`. Clicking flips it, saves it and fires `baht-theme-change`. Every\ntoggle watches its target's attribute, so several toggles (or the app's own settings page)\nstay in sync. To avoid a flash of the wrong theme on load, apply the saved theme before\npaint with an inline script (see the docs page).\n\nA11y: an APG toggle button — fixed localized name (\"Dark theme\"), `aria-pressed` = dark.\n---\n\n\n### **Events:**\n - **baht-theme-change** - The user switched theme. `detail: { theme: 'light' | 'dark' }`.\n- **name**\n\n### **Methods:**\n - **toggle(): _void_** - Flip light ↔ dark, save it and fire `baht-theme-change` (what a click does).\n\n",
|
|
2012
|
+
"attributes": [
|
|
2013
|
+
{
|
|
2014
|
+
"name": "theme",
|
|
2015
|
+
"description": "Current theme. Setting it applies it to the target (not saved, no event).",
|
|
2016
|
+
"values": [{ "name": "ThemeName" }]
|
|
2017
|
+
},
|
|
2018
|
+
{
|
|
2019
|
+
"name": "default",
|
|
2020
|
+
"description": "Theme when nothing is saved and the target has none: `light`, `dark`, or `system`.",
|
|
2021
|
+
"values": [{ "name": "ThemeName" }, { "name": "system" }]
|
|
2022
|
+
},
|
|
2023
|
+
{
|
|
2024
|
+
"name": "target",
|
|
2025
|
+
"description": "CSS selector of the element that carries `data-baht-theme`. Default: `<html>`.",
|
|
2026
|
+
"values": []
|
|
2027
|
+
},
|
|
2028
|
+
{
|
|
2029
|
+
"name": "storage-key",
|
|
2030
|
+
"description": "localStorage key for the user's choice; `\"\"` turns persistence off.",
|
|
2031
|
+
"values": []
|
|
2032
|
+
},
|
|
2033
|
+
{ "name": "defer-hydration", "values": [] }
|
|
2034
|
+
],
|
|
2035
|
+
"references": []
|
|
2036
|
+
},
|
|
2037
|
+
{
|
|
2038
|
+
"name": "baht-timeline",
|
|
2039
|
+
"description": "Vertical timeline (run history, audit log).\n\n el.items = [\n { title: 'Run started', time: '09:12', tone: 'muted' },\n { title: 'Webhook sent', time: '09:12' },\n { title: 'Failed', description: \"Couldn't reach the webhook.\", time: '09:13', tone: 'danger' },\n ];\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
2040
|
+
"attributes": [{ "name": "defer-hydration", "values": [] }],
|
|
2041
|
+
"references": []
|
|
2042
|
+
},
|
|
2043
|
+
{
|
|
2044
|
+
"name": "baht-toast",
|
|
2045
|
+
"description": "Toast host — put ONE <baht-toast> on the page and call show():\n\n const toast = document.querySelector('baht-toast');\n toast.show({ message: 'Saved.', tone: 'success' });\n\nCopy: short and dry (\"Saved.\", not \"Successfully saved your changes!\").\n---\n\n\n### **Events:**\n - **baht-dismiss** - A toast was dismissed.\n- **name**\n\n### **Methods:**\n \n",
|
|
2046
|
+
"attributes": [
|
|
2047
|
+
{
|
|
2048
|
+
"name": "duration",
|
|
2049
|
+
"description": "Default auto-dismiss (ms) when show() gets no duration.",
|
|
2050
|
+
"values": []
|
|
2051
|
+
},
|
|
2052
|
+
{ "name": "defer-hydration", "values": [] }
|
|
2053
|
+
],
|
|
2054
|
+
"references": []
|
|
2055
|
+
},
|
|
2056
|
+
{
|
|
2057
|
+
"name": "baht-toggle",
|
|
2058
|
+
"description": "\n---\n\n\n### **Events:**\n - **baht-input** - Field mode: the user edited the value.\n- **name**\n\n### **Methods:**\n \n- **flushTyped(): _void_** - Hand a pending typed edit to the host now (blur, disconnect, host reads). Idempotent.\n- **discardTyped(): _void_** - The host did not take the edit: forget the keystrokes and show `value` again. Without this\na refused edit stays on screen, since `value` never moves to say the text has landed.\n\n\n\n\n",
|
|
2059
|
+
"attributes": [
|
|
2060
|
+
{ "name": "disabled", "values": [] },
|
|
2061
|
+
{ "name": "readonly", "values": [] },
|
|
2062
|
+
{ "name": "required", "values": [] },
|
|
2063
|
+
{
|
|
2064
|
+
"name": "show-optional",
|
|
2065
|
+
"description": "Append the localized \"(optional)\" marker to the label when not required (set by <baht-form show-optional>).",
|
|
2066
|
+
"values": []
|
|
2067
|
+
},
|
|
2068
|
+
{
|
|
2069
|
+
"name": "debounce",
|
|
2070
|
+
"description": "Debounce for typed edits (ms); unset = BahtFieldBase.defaultDebounce.",
|
|
2071
|
+
"values": []
|
|
2072
|
+
},
|
|
2073
|
+
{ "name": "defer-hydration", "values": [] }
|
|
2074
|
+
],
|
|
2075
|
+
"references": []
|
|
2076
|
+
},
|
|
2077
|
+
{
|
|
2078
|
+
"name": "baht-tooltip",
|
|
2079
|
+
"description": "Hover/focus tooltip. Wraps its children; pure CSS show/hide (120ms fade). While shown it is\ndrawn in the top layer (`floatTip`), so a scrolling or clipping container cannot cut it off.\nEscape hides it without moving focus (WCAG 1.4.13); it re-arms on leave/blur.\n\n <baht-tooltip text=\"Posted as JSON when the trigger fires\">\n <baht-button variant=\"ghost\" label=\"?\"></baht-button>\n </baht-tooltip>\n---\n\n\n### **Events:**\n - **name**\n\n### **Methods:**\n \n",
|
|
2080
|
+
"attributes": [
|
|
2081
|
+
{ "name": "text", "values": [] },
|
|
2082
|
+
{
|
|
2083
|
+
"name": "position",
|
|
2084
|
+
"values": [
|
|
2085
|
+
{ "name": "top" },
|
|
2086
|
+
{ "name": "bottom" },
|
|
2087
|
+
{ "name": "left" },
|
|
2088
|
+
{ "name": "right" }
|
|
2089
|
+
]
|
|
2090
|
+
},
|
|
2091
|
+
{ "name": "defer-hydration", "values": [] }
|
|
2092
|
+
],
|
|
2093
|
+
"references": []
|
|
2094
|
+
},
|
|
2095
|
+
{
|
|
2096
|
+
"name": "baht-tree",
|
|
2097
|
+
"description": "Hierarchical tree (an org chart, folders, categories). `items` are the roots, each with\noptional `children`. Nodes with children start open unless `open: false`, or closed with\n`collapsed`. Click or Enter selects a row; the chevron opens and closes it. Keyboard\nfollows the APG tree: Up/Down, Home/End, Right opens then enters, Left closes then climbs.\n`selected` is controlled by the host, like `<baht-tabs value>`.\n\n el.items = [\n { id: 'co', label: 'Company', meta: 'Somchai', badge: '3', children: [\n { id: 'eng', label: 'Engineering' },\n ] },\n ];\n el.addEventListener('baht-select', (e) => open(e.detail.id));\n---\n\n\n### **Events:**\n - **baht-select** - A row was chosen.\n- **baht-toggle** - A node opened or closed.\n- **name**\n\n### **Methods:**\n - **toggle(id: _string_, open): _void_** - Opens or closes a node with children.\n\n",
|
|
2098
|
+
"attributes": [
|
|
2099
|
+
{
|
|
2100
|
+
"name": "selected",
|
|
2101
|
+
"description": "Id of the selected node; null for none.",
|
|
2102
|
+
"values": []
|
|
2103
|
+
},
|
|
2104
|
+
{
|
|
2105
|
+
"name": "collapsed",
|
|
2106
|
+
"description": "Start every node closed unless it says `open: true`.",
|
|
2107
|
+
"values": []
|
|
2108
|
+
},
|
|
2109
|
+
{
|
|
2110
|
+
"name": "label",
|
|
2111
|
+
"description": "Accessible name of the tree.",
|
|
2112
|
+
"values": []
|
|
2113
|
+
},
|
|
2114
|
+
{
|
|
2115
|
+
"name": "empty-message",
|
|
2116
|
+
"description": "Shown when there are no items.",
|
|
2117
|
+
"values": []
|
|
2118
|
+
},
|
|
2119
|
+
{ "name": "defer-hydration", "values": [] }
|
|
2120
|
+
],
|
|
2121
|
+
"references": []
|
|
2122
|
+
},
|
|
2123
|
+
{
|
|
2124
|
+
"name": "baht-typeahead",
|
|
2125
|
+
"description": "Text input with suggestions (autocomplete). The value IS the text — pick a\nsuggestion and the input shows its label; keep typing and the text stands\non its own (`free-text`, default) or is only a filter (`free-text=\"false\"`,\nblur then reverts to the last picked option).\n\nSuggestions come from a static `options` list (filtered here — labels that\nstart with the term rank first, then labels that contain it) or from an\nasync `fetcher(term)`. Typing is debounced (`debounce`, 150 ms) before the\nhost hears `baht-change` and before a fetcher runs.\n\n const el = document.createElement('baht-typeahead');\n el.options = [{ key: 'th', label: 'Thailand' }, { key: 'tw', label: 'Taiwan' }];\n el.addEventListener('baht-change', (e) => (draft.country = e.detail.value));\n el.addEventListener('baht-select', (e) => (draft.countryCode = e.detail.option.key));\n\nARIA: APG editable combobox with list autocomplete — the input is the\ncombobox, `aria-activedescendant` walks the listbox, Escape closes, Enter\npicks. Unlike <baht-reference-picker> the input is always editable and the\ntext itself is a valid value; unlike <baht-select> the list is a filter of\nwhat was typed, not a fixed menu.\n---\n\n\n### **Events:**\n - **baht-change** - The text or the picked option changed.\n- **baht-select** - An option was picked.\n- **name**\n\n### **Methods:**\n \n",
|
|
2126
|
+
"attributes": [
|
|
2127
|
+
{
|
|
2128
|
+
"name": "label",
|
|
2129
|
+
"description": "Accessible name (also the listbox name).",
|
|
2130
|
+
"values": []
|
|
2131
|
+
},
|
|
2132
|
+
{
|
|
2133
|
+
"name": "value",
|
|
2134
|
+
"description": "The text. Controlled: re-feed after `baht-change` (or don't — the input keeps what was typed).",
|
|
2135
|
+
"values": []
|
|
2136
|
+
},
|
|
2137
|
+
{ "name": "placeholder", "values": [] },
|
|
2138
|
+
{ "name": "disabled", "values": [] },
|
|
2139
|
+
{
|
|
2140
|
+
"name": "invalid",
|
|
2141
|
+
"description": "Marks the control invalid (styles + aria-invalid).",
|
|
2142
|
+
"values": []
|
|
2143
|
+
},
|
|
2144
|
+
{
|
|
2145
|
+
"name": "debounce",
|
|
2146
|
+
"description": "Quiet time (ms) before the host hears the text and suggestions are (re)computed.",
|
|
2147
|
+
"values": []
|
|
2148
|
+
},
|
|
2149
|
+
{
|
|
2150
|
+
"name": "min-chars",
|
|
2151
|
+
"description": "Characters typed before suggestions appear (0 = suggest on focus/arrow too).",
|
|
2152
|
+
"values": []
|
|
2153
|
+
},
|
|
2154
|
+
{
|
|
2155
|
+
"name": "max-items",
|
|
2156
|
+
"description": "Cap on suggestions shown.",
|
|
2157
|
+
"values": []
|
|
2158
|
+
},
|
|
2159
|
+
{
|
|
2160
|
+
"name": "free-text",
|
|
2161
|
+
"description": "false = the text must be a picked option; blur reverts otherwise.",
|
|
2162
|
+
"values": []
|
|
2163
|
+
},
|
|
2164
|
+
{
|
|
2165
|
+
"name": "autocomplete",
|
|
2166
|
+
"description": "HTML autocomplete token forwarded to the input ('off' keeps the browser's own list away).",
|
|
2167
|
+
"values": []
|
|
2168
|
+
},
|
|
2169
|
+
{ "name": "defer-hydration", "values": [] }
|
|
2170
|
+
],
|
|
2171
|
+
"references": []
|
|
2172
|
+
},
|
|
2173
|
+
{
|
|
2174
|
+
"name": "baht-upload",
|
|
2175
|
+
"description": "File upload against an HTTP endpoint. Picking (or dropping) a file sends it **immediately**\nas `multipart/form-data` to `url`; the endpoint answers with where it stored the file and\nthat URL becomes the value. Nothing waits for a form submit, and no host code is needed:\nthe whole contract is attributes.\n\n <baht-upload url=\"/api/uploads\" accept=\".pdf,image/*\" max-size=\"10485760\"></baht-upload>\n\nExpected response: `2xx` with JSON `{ \"url\": \"…\" }` (change the key with `response-key`,\ndotted paths allowed) or a plain-text URL body. Anything else is an upload error the\nuser can retry.\n\n el.addEventListener('baht-change', (e) => e.detail.value); // string | string[] | null\n\nAuth: set `headers` (property) and/or `with-credentials`. Progress: `baht-upload-progress`.\nValue is controlled the usual way — feed it back on `baht-change`, or pre-fill with the\nURLs already on record and the chips render from them.\n---\n\n\n### **Events:**\n - **baht-change** - The uploaded files changed.\n- **baht-upload-start** - A file started uploading.\n- **baht-upload-progress** - Upload progress.\n- **baht-upload-error** - An upload failed.\n- **name**\n\n### **Methods:**\n - **clear(): _void_** - Empty the value (does not delete anything on the server).\n\n",
|
|
2176
|
+
"attributes": [
|
|
2177
|
+
{
|
|
2178
|
+
"name": "url",
|
|
2179
|
+
"description": "Endpoint that receives the file and returns its stored URL. Required.",
|
|
2180
|
+
"values": []
|
|
2181
|
+
},
|
|
2182
|
+
{
|
|
2183
|
+
"name": "method",
|
|
2184
|
+
"description": "HTTP method for the upload request.",
|
|
2185
|
+
"values": []
|
|
2186
|
+
},
|
|
2187
|
+
{
|
|
2188
|
+
"name": "field-name",
|
|
2189
|
+
"description": "Form-data key the file is sent under.",
|
|
2190
|
+
"values": []
|
|
2191
|
+
},
|
|
2192
|
+
{
|
|
2193
|
+
"name": "response-key",
|
|
2194
|
+
"description": "Where the stored URL lives in a JSON response (dotted path). Empty = the body itself.",
|
|
2195
|
+
"values": []
|
|
2196
|
+
},
|
|
2197
|
+
{
|
|
2198
|
+
"name": "with-credentials",
|
|
2199
|
+
"description": "Send cookies on cross-origin requests.",
|
|
2200
|
+
"values": []
|
|
2201
|
+
},
|
|
2202
|
+
{ "name": "label", "description": "Visible label.", "values": [] },
|
|
2203
|
+
{
|
|
2204
|
+
"name": "hint",
|
|
2205
|
+
"description": "Helper text under the control. Defaults to the accept / size limits when set.",
|
|
2206
|
+
"values": []
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
"name": "accept",
|
|
2210
|
+
"description": "Native `accept` filter (`.pdf,image/*`).",
|
|
2211
|
+
"values": []
|
|
2212
|
+
},
|
|
2213
|
+
{
|
|
2214
|
+
"name": "multiple",
|
|
2215
|
+
"description": "Allow several files; the value becomes an array.",
|
|
2216
|
+
"values": []
|
|
2217
|
+
},
|
|
2218
|
+
{
|
|
2219
|
+
"name": "max-size",
|
|
2220
|
+
"description": "Reject files over this many bytes before sending.",
|
|
2221
|
+
"values": []
|
|
2222
|
+
},
|
|
2223
|
+
{ "name": "disabled", "values": [] },
|
|
2224
|
+
{ "name": "required", "values": [] },
|
|
2225
|
+
{
|
|
2226
|
+
"name": "error",
|
|
2227
|
+
"description": "Validation message to display (marks the control invalid).",
|
|
2228
|
+
"values": []
|
|
2229
|
+
},
|
|
2230
|
+
{ "name": "defer-hydration", "values": [] }
|
|
2231
|
+
],
|
|
2232
|
+
"references": []
|
|
2233
|
+
},
|
|
2234
|
+
{
|
|
2235
|
+
"name": "baht-wizard",
|
|
2236
|
+
"description": "Pages filled in order, checked as you go. The panels are your children, matched by\n`data-step=\"<key>\"`. `steps` may change while it runs: a tab per item ordered, for instance.\n\n <baht-wizard finish-label=\"Checkout\">\n <section data-step=\"needs\">…</section>\n <section data-step=\"options\">…</section>\n </baht-wizard>\n wizard.steps = [{ key: 'needs', label: 'Describe needs' }, { key: 'options', label: 'Choose options' }];\n wizard.validateStep = (key) => forms[key].validate().valid;\n\nNext checks the page you are leaving; Back does not. Finish checks every page in order and stops\non the first that fails.\n---\n\n\n### **Events:**\n - **baht-change** - The page changed. `detail: { value }`.\n- **baht-finish** - Every page passed.\n- **name**\n\n### **Methods:**\n \n",
|
|
2237
|
+
"attributes": [
|
|
2238
|
+
{
|
|
2239
|
+
"name": "value",
|
|
2240
|
+
"description": "Key of the open page; the first when unset or unknown.",
|
|
2241
|
+
"values": []
|
|
2242
|
+
},
|
|
2243
|
+
{
|
|
2244
|
+
"name": "variant",
|
|
2245
|
+
"description": "`chevron` shows a progress strip you read; `tabs` a strip you can click to go anywhere.",
|
|
2246
|
+
"values": [{ "name": "chevron" }, { "name": "tabs" }]
|
|
2247
|
+
},
|
|
2248
|
+
{ "name": "back-label", "values": [] },
|
|
2249
|
+
{ "name": "next-label", "values": [] },
|
|
2250
|
+
{ "name": "finish-label", "values": [] },
|
|
2251
|
+
{
|
|
2252
|
+
"name": "busy",
|
|
2253
|
+
"description": "Keeps the buttons from running twice while the host is working.",
|
|
2254
|
+
"values": []
|
|
2255
|
+
},
|
|
2256
|
+
{ "name": "defer-hydration", "values": [] }
|
|
2257
|
+
],
|
|
2258
|
+
"references": []
|
|
2259
|
+
}
|
|
2260
|
+
]
|
|
2261
|
+
}
|