@f-ewald/components 1.34.0 → 1.36.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/custom-elements.json +339 -3
- package/dist/app-shell.d.ts +8 -0
- package/dist/app-shell.d.ts.map +1 -1
- package/dist/app-shell.js +51 -22
- package/dist/app-shell.js.map +1 -1
- package/dist/copy-link-button.js +2 -2
- package/dist/copy-link-button.js.map +1 -1
- package/dist/icons.d.ts +11 -1
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +11 -1
- package/dist/icons.js.map +1 -1
- package/dist/toast-notification.d.ts +30 -0
- package/dist/toast-notification.d.ts.map +1 -1
- package/dist/toast-notification.js +223 -10
- package/dist/toast-notification.js.map +1 -1
- package/docs/app-shell.md +7 -0
- package/docs/icons.md +6 -1
- package/docs/toast-notification.md +10 -0
- package/llms.txt +23 -3
- package/package.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -993,7 +993,7 @@
|
|
|
993
993
|
"declarations": [
|
|
994
994
|
{
|
|
995
995
|
"kind": "class",
|
|
996
|
-
"description": "The dashboard page shell: a slot-based CSS-grid backbone that arranges a\ntop bar, the main content, an optional right-hand detail column, an\noptional footer, and a sidebar. The top bar always spans the shell's full\nwidth, in every sidebar state.\n\nThe sidebar's visibility, width, and layout mode are three independent\nproperties:\n- `sidebar-open` (default closed) — whether it's shown at all.\n- `sidebar-width`: `\"full\"` (16rem, icons + labels, the default) or\n `\"icon\"` (3.5rem rail, icons only — drives the slotted `app-sidebar`'s\n own `collapsed` attribute).\n- `sidebar-mode`: `\"overlay\"` (the default) floats the sidebar above the\n shell's own content with a higher z-index, covering part of the top\n bar's corner and whatever content sits beneath it, without ever\n resizing or reflowing `main`/`footer`. `\"push\"` instead reserves a real\n grid column beside `main`/`footer` (which resize to make room) — the\n top bar still spans full width above it either way.\n\nBelow the shared 48rem breakpoint the sidebar always behaves as a\nfull-width, modal, scrim/Escape-dismissible drawer regardless of\n`sidebar-mode`/`sidebar-width` — those two properties only affect the\ndesktop presentation. Above 48rem, an `overlay`-mode sidebar is a\nnon-modal panel (no dimming scrim, no Escape-dismiss, since it reads as\nan ordinary always-interactive panel rather than a blocking dialog); a\n`push`-mode sidebar is even more clearly non-modal, since it never\ncovers anything.\n\nThe right-hand detail column is unaffected by any of the above: it still\nreserves an inline grid column on desktop and becomes a dismissible\noverlay (scrim/Escape) on mobile.\n\nWidths are tunable per instance via `--component-sidebar-width` (16rem),\n`--component-sidebar-rail-width` (3.5rem), and `--component-topbar-height`\n(3rem); the detail column reuses the 20rem/25rem panel widths. The main\ncontent area is white by default — override it with\n`--component-main-background`. Give the shell a height (e.g. `height:\n100vh`) so the sidebar and main can size and scroll.\n\nHovering or keyboard-focusing the toggle reveals a tooltip naming the\naction and its `[` shortcut — the shortcut is not shown as permanent\nchrome.",
|
|
996
|
+
"description": "The dashboard page shell: a slot-based CSS-grid backbone that arranges a\ntop bar, the main content, an optional right-hand detail column, an\noptional footer, and a sidebar. The top bar always spans the shell's full\nwidth, in every sidebar state.\n\nThe sidebar's visibility, width, and layout mode are three independent\nproperties:\n- `sidebar-open` (default closed) — whether it's shown at all.\n- `sidebar-width`: `\"full\"` (16rem, icons + labels, the default) or\n `\"icon\"` (3.5rem rail, icons only — drives the slotted `app-sidebar`'s\n own `collapsed` attribute).\n- `sidebar-mode`: `\"overlay\"` (the default) floats the sidebar above the\n shell's own content with a higher z-index, covering part of the top\n bar's corner and whatever content sits beneath it, without ever\n resizing or reflowing `main`/`footer`. `\"push\"` instead reserves a real\n grid column beside `main`/`footer` (which resize to make room) — the\n top bar still spans full width above it either way.\n\nBelow the shared 48rem breakpoint the sidebar always behaves as a\nfull-width, modal, scrim/Escape-dismissible drawer regardless of\n`sidebar-mode`/`sidebar-width` — those two properties only affect the\ndesktop presentation. Above 48rem, an `overlay`-mode sidebar is a\nnon-modal panel (no dimming scrim, no Escape-dismiss, since it reads as\nan ordinary always-interactive panel rather than a blocking dialog); a\n`push`-mode sidebar is even more clearly non-modal, since it never\ncovers anything.\n\nThe right-hand detail column is unaffected by any of the above: it still\nreserves an inline grid column on desktop and becomes a dismissible\noverlay (scrim/Escape) on mobile.\n\nWidths are tunable per instance via `--component-sidebar-width` (16rem),\n`--component-sidebar-rail-width` (3.5rem), and `--component-topbar-height`\n(3rem); the detail column reuses the 20rem/25rem panel widths. The main\ncontent area is white by default — override it with\n`--component-main-background`. Give the shell a height (e.g. `height:\n100vh`) so the sidebar and main can size and scroll.\n\nHovering or keyboard-focusing the toggle reveals a tooltip naming the\naction and its `[` shortcut — the shortcut is not shown as permanent\nchrome.\n\nConsumers with their own external top bar can set `no-topbar` to skip\nrendering the built-in topbar row and toggle button entirely (the grid\ndrops that row rather than leaving dead space). The `[`/Escape shortcuts\nstay fully active either way — drive `sidebar-open` from your own UI and\nlisten for `sidebar-toggle` to stay in sync with keyboard-driven changes.",
|
|
997
997
|
"name": "AppShell",
|
|
998
998
|
"slots": [
|
|
999
999
|
{
|
|
@@ -1072,6 +1072,17 @@
|
|
|
1072
1072
|
"description": "Detail width: `compact` (20rem) or `comfortable` (25rem).",
|
|
1073
1073
|
"attribute": "detail-width"
|
|
1074
1074
|
},
|
|
1075
|
+
{
|
|
1076
|
+
"kind": "field",
|
|
1077
|
+
"name": "noTopbar",
|
|
1078
|
+
"type": {
|
|
1079
|
+
"text": "boolean"
|
|
1080
|
+
},
|
|
1081
|
+
"default": "false",
|
|
1082
|
+
"description": "Skips rendering the built-in topbar row and its nav toggle entirely, for consumers with their own external top bar. The `[`/Escape shortcuts stay active regardless — this only affects what's rendered.",
|
|
1083
|
+
"attribute": "no-topbar",
|
|
1084
|
+
"reflects": true
|
|
1085
|
+
},
|
|
1075
1086
|
{
|
|
1076
1087
|
"kind": "field",
|
|
1077
1088
|
"name": "_mobile",
|
|
@@ -1266,6 +1277,15 @@
|
|
|
1266
1277
|
"default": "\"compact\"",
|
|
1267
1278
|
"description": "Detail width: `compact` (20rem) or `comfortable` (25rem).",
|
|
1268
1279
|
"fieldName": "detailWidth"
|
|
1280
|
+
},
|
|
1281
|
+
{
|
|
1282
|
+
"name": "no-topbar",
|
|
1283
|
+
"type": {
|
|
1284
|
+
"text": "boolean"
|
|
1285
|
+
},
|
|
1286
|
+
"default": "false",
|
|
1287
|
+
"description": "Skips rendering the built-in topbar row and its nav toggle entirely, for consumers with their own external top bar. The `[`/Escape shortcuts stay active regardless — this only affects what's rendered.",
|
|
1288
|
+
"fieldName": "noTopbar"
|
|
1269
1289
|
}
|
|
1270
1290
|
],
|
|
1271
1291
|
"superclass": {
|
|
@@ -8915,7 +8935,7 @@
|
|
|
8915
8935
|
"default": "16"
|
|
8916
8936
|
}
|
|
8917
8937
|
],
|
|
8918
|
-
"description": "
|
|
8938
|
+
"description": "Hyperlink-related actions or a linked/associated-item indicator."
|
|
8919
8939
|
},
|
|
8920
8940
|
{
|
|
8921
8941
|
"kind": "function",
|
|
@@ -9246,6 +9266,61 @@
|
|
|
9246
9266
|
}
|
|
9247
9267
|
],
|
|
9248
9268
|
"description": "\"Exit fullscreen\" actions; pair with iconArrowsPointingOut for entering fullscreen."
|
|
9269
|
+
},
|
|
9270
|
+
{
|
|
9271
|
+
"kind": "function",
|
|
9272
|
+
"name": "iconGlobeAmericas",
|
|
9273
|
+
"parameters": [
|
|
9274
|
+
{
|
|
9275
|
+
"name": "size",
|
|
9276
|
+
"default": "16"
|
|
9277
|
+
}
|
|
9278
|
+
],
|
|
9279
|
+
"description": "Terrain/outdoors content, or a Americas-centric globe/region selector."
|
|
9280
|
+
},
|
|
9281
|
+
{
|
|
9282
|
+
"kind": "function",
|
|
9283
|
+
"name": "iconGlobeAlt",
|
|
9284
|
+
"parameters": [
|
|
9285
|
+
{
|
|
9286
|
+
"name": "size",
|
|
9287
|
+
"default": "16"
|
|
9288
|
+
}
|
|
9289
|
+
],
|
|
9290
|
+
"description": "A generic globe/satellite-view toggle, or international/worldwide content."
|
|
9291
|
+
},
|
|
9292
|
+
{
|
|
9293
|
+
"kind": "function",
|
|
9294
|
+
"name": "iconSignal",
|
|
9295
|
+
"parameters": [
|
|
9296
|
+
{
|
|
9297
|
+
"name": "size",
|
|
9298
|
+
"default": "16"
|
|
9299
|
+
}
|
|
9300
|
+
],
|
|
9301
|
+
"description": "Live/real-time data, connectivity strength, or a traffic-conditions toggle."
|
|
9302
|
+
},
|
|
9303
|
+
{
|
|
9304
|
+
"kind": "function",
|
|
9305
|
+
"name": "iconClipboard",
|
|
9306
|
+
"parameters": [
|
|
9307
|
+
{
|
|
9308
|
+
"name": "size",
|
|
9309
|
+
"default": "18"
|
|
9310
|
+
}
|
|
9311
|
+
],
|
|
9312
|
+
"description": "Copy-to-clipboard actions, e.g. copy-link-button."
|
|
9313
|
+
},
|
|
9314
|
+
{
|
|
9315
|
+
"kind": "function",
|
|
9316
|
+
"name": "iconMagnifyingGlass",
|
|
9317
|
+
"parameters": [
|
|
9318
|
+
{
|
|
9319
|
+
"name": "size",
|
|
9320
|
+
"default": "16"
|
|
9321
|
+
}
|
|
9322
|
+
],
|
|
9323
|
+
"description": "Search inputs or search-triggering actions."
|
|
9249
9324
|
}
|
|
9250
9325
|
],
|
|
9251
9326
|
"exports": [
|
|
@@ -9728,6 +9803,46 @@
|
|
|
9728
9803
|
"name": "iconArrowsPointingIn",
|
|
9729
9804
|
"module": "src/icons.ts"
|
|
9730
9805
|
}
|
|
9806
|
+
},
|
|
9807
|
+
{
|
|
9808
|
+
"kind": "js",
|
|
9809
|
+
"name": "iconGlobeAmericas",
|
|
9810
|
+
"declaration": {
|
|
9811
|
+
"name": "iconGlobeAmericas",
|
|
9812
|
+
"module": "src/icons.ts"
|
|
9813
|
+
}
|
|
9814
|
+
},
|
|
9815
|
+
{
|
|
9816
|
+
"kind": "js",
|
|
9817
|
+
"name": "iconGlobeAlt",
|
|
9818
|
+
"declaration": {
|
|
9819
|
+
"name": "iconGlobeAlt",
|
|
9820
|
+
"module": "src/icons.ts"
|
|
9821
|
+
}
|
|
9822
|
+
},
|
|
9823
|
+
{
|
|
9824
|
+
"kind": "js",
|
|
9825
|
+
"name": "iconSignal",
|
|
9826
|
+
"declaration": {
|
|
9827
|
+
"name": "iconSignal",
|
|
9828
|
+
"module": "src/icons.ts"
|
|
9829
|
+
}
|
|
9830
|
+
},
|
|
9831
|
+
{
|
|
9832
|
+
"kind": "js",
|
|
9833
|
+
"name": "iconClipboard",
|
|
9834
|
+
"declaration": {
|
|
9835
|
+
"name": "iconClipboard",
|
|
9836
|
+
"module": "src/icons.ts"
|
|
9837
|
+
}
|
|
9838
|
+
},
|
|
9839
|
+
{
|
|
9840
|
+
"kind": "js",
|
|
9841
|
+
"name": "iconMagnifyingGlass",
|
|
9842
|
+
"declaration": {
|
|
9843
|
+
"name": "iconMagnifyingGlass",
|
|
9844
|
+
"module": "src/icons.ts"
|
|
9845
|
+
}
|
|
9731
9846
|
}
|
|
9732
9847
|
]
|
|
9733
9848
|
},
|
|
@@ -18862,7 +18977,7 @@
|
|
|
18862
18977
|
"declarations": [
|
|
18863
18978
|
{
|
|
18864
18979
|
"kind": "class",
|
|
18865
|
-
"description": "Fixed-position stack of dismissible notifications, anchored top-right\n(top-full-width on mobile). Every toast shares one fixed width so entries\nnever appear narrower or wider than one another. Not wired to any app state\nyet — callers add toasts imperatively via the `show()` method on a live\nelement reference,\ne.g. `document.querySelector('toast-notification')?.show('Offline', { variant: 'error' })`,\nor via the `notifySuccess`/`notifyError`/`notifyInfo` module-level helpers\nexported from this file. The first argument is the required bold headline; an\noptional `description` renders a smaller, non-bold second line. Each variant\nleads with a matching status icon (success → check, error → exclamation\ncircle, info → information circle, warning → exclamation triangle). Each toast\nauto-dismisses after `duration` ms and can also be dismissed via its ✕\nbutton. Appears/disappears instantly — no slide/fade transitions.\n\nEach variant's background reads a dedicated `--ui-toast-*-background` hook\n(`success`/`error`/`info`/`warning`), which defaults to the flat\n`--ui-success`/`--ui-danger`/`--ui-info`/`--ui-warning` tokens unchanged —\nso those stay the single source of truth for every other component. A\nconsumer can override just these toast-specific tokens with a\n`linear-gradient(...)` to opt every toast into a gradient look without\ntouching component markup — `gradientTokenValues` in `tokens.ts` ships\nexactly this, wired up via `data-theme=\"gradient\"` (see `tokens.css`'s\n\"Gradient theme\" section), the same mechanism `ui-button` uses.\n`--ui-toast-highlight` (a glossy top-edge box-shadow, layered onto the\nexisting elevation shadow) and `--ui-toast-text-shadow` (legibility\nagainst the gradient's lighter stop) round out the effect, mirroring\n`ui-button`'s `--ui-button-highlight`/`--ui-button-text-shadow`.",
|
|
18980
|
+
"description": "Fixed-position stack of dismissible notifications, anchored top-right\n(top-full-width on mobile). Every toast shares one fixed width so entries\nnever appear narrower or wider than one another. Not wired to any app state\nyet — callers add toasts imperatively via the `show()` method on a live\nelement reference,\ne.g. `document.querySelector('toast-notification')?.show('Offline', { variant: 'error' })`,\nor via the `notifySuccess`/`notifyError`/`notifyInfo` module-level helpers\nexported from this file. The first argument is the required bold headline; an\noptional `description` renders a smaller, non-bold second line. Each variant\nleads with a matching status icon (success → check, error → exclamation\ncircle, info → information circle, warning → exclamation triangle). Each toast\nauto-dismisses after `duration` ms and can also be dismissed via its ✕\nbutton. Appears/disappears instantly — no slide/fade transitions.\n\nA toast with `duration > 0` replaces its ✕ button with a countdown: a\nnumber of seconds remaining inside a ring that fills in clockwise over\n`duration`. Hovering or keyboard-focusing the toast swaps the countdown\nback for the ✕ and pauses the countdown (both the visual ring/number and\nthe underlying auto-dismiss timer) — the toast won't disappear while\nsomeone's reading it or has tabbed to its close button — resuming from\nwhere it left off once the pointer/focus leaves. A `duration: 0` toast has\nno countdown to show, so its ✕ is always visible, exactly as before.\n\nEach variant's background reads a dedicated `--ui-toast-*-background` hook\n(`success`/`error`/`info`/`warning`), which defaults to the flat\n`--ui-success`/`--ui-danger`/`--ui-info`/`--ui-warning` tokens unchanged —\nso those stay the single source of truth for every other component. A\nconsumer can override just these toast-specific tokens with a\n`linear-gradient(...)` to opt every toast into a gradient look without\ntouching component markup — `gradientTokenValues` in `tokens.ts` ships\nexactly this, wired up via `data-theme=\"gradient\"` (see `tokens.css`'s\n\"Gradient theme\" section), the same mechanism `ui-button` uses.\n`--ui-toast-highlight` (a glossy top-edge box-shadow, layered onto the\nexisting elevation shadow) and `--ui-toast-text-shadow` (legibility\nagainst the gradient's lighter stop) round out the effect, mirroring\n`ui-button`'s `--ui-button-highlight`/`--ui-button-text-shadow`.",
|
|
18866
18981
|
"name": "ToastNotification",
|
|
18867
18982
|
"members": [
|
|
18868
18983
|
{
|
|
@@ -18889,6 +19004,23 @@
|
|
|
18889
19004
|
"privacy": "private",
|
|
18890
19005
|
"default": "new Map<number, ReturnType<typeof setTimeout>>()"
|
|
18891
19006
|
},
|
|
19007
|
+
{
|
|
19008
|
+
"kind": "field",
|
|
19009
|
+
"name": "_interaction",
|
|
19010
|
+
"privacy": "private",
|
|
19011
|
+
"default": "new Map<number, { hovered: boolean; focusWithin: boolean }>()",
|
|
19012
|
+
"description": "Per-toast hover/focus tracking, so leaving one doesn't resume while the other still applies."
|
|
19013
|
+
},
|
|
19014
|
+
{
|
|
19015
|
+
"kind": "field",
|
|
19016
|
+
"name": "_tickTimer",
|
|
19017
|
+
"type": {
|
|
19018
|
+
"text": "ReturnType<typeof setInterval> | null"
|
|
19019
|
+
},
|
|
19020
|
+
"privacy": "private",
|
|
19021
|
+
"default": "null",
|
|
19022
|
+
"description": "Ticks while any toast has a running countdown, purely to refresh the displayed seconds."
|
|
19023
|
+
},
|
|
18892
19024
|
{
|
|
18893
19025
|
"kind": "method",
|
|
18894
19026
|
"name": "show",
|
|
@@ -18930,6 +19062,197 @@
|
|
|
18930
19062
|
],
|
|
18931
19063
|
"description": "Removes a toast immediately, cancelling its pending auto-dismiss timer if any."
|
|
18932
19064
|
},
|
|
19065
|
+
{
|
|
19066
|
+
"kind": "method",
|
|
19067
|
+
"name": "_scheduleTimer",
|
|
19068
|
+
"privacy": "private",
|
|
19069
|
+
"return": {
|
|
19070
|
+
"type": {
|
|
19071
|
+
"text": "void"
|
|
19072
|
+
}
|
|
19073
|
+
},
|
|
19074
|
+
"parameters": [
|
|
19075
|
+
{
|
|
19076
|
+
"name": "id",
|
|
19077
|
+
"type": {
|
|
19078
|
+
"text": "number"
|
|
19079
|
+
}
|
|
19080
|
+
},
|
|
19081
|
+
{
|
|
19082
|
+
"name": "ms",
|
|
19083
|
+
"type": {
|
|
19084
|
+
"text": "number"
|
|
19085
|
+
}
|
|
19086
|
+
}
|
|
19087
|
+
],
|
|
19088
|
+
"description": "Schedules (or reschedules) the real auto-dismiss timeout for a toast."
|
|
19089
|
+
},
|
|
19090
|
+
{
|
|
19091
|
+
"kind": "method",
|
|
19092
|
+
"name": "_pause",
|
|
19093
|
+
"privacy": "private",
|
|
19094
|
+
"return": {
|
|
19095
|
+
"type": {
|
|
19096
|
+
"text": "void"
|
|
19097
|
+
}
|
|
19098
|
+
},
|
|
19099
|
+
"parameters": [
|
|
19100
|
+
{
|
|
19101
|
+
"name": "id",
|
|
19102
|
+
"type": {
|
|
19103
|
+
"text": "number"
|
|
19104
|
+
}
|
|
19105
|
+
}
|
|
19106
|
+
],
|
|
19107
|
+
"description": "Freezes a toast's countdown at its current remaining time."
|
|
19108
|
+
},
|
|
19109
|
+
{
|
|
19110
|
+
"kind": "method",
|
|
19111
|
+
"name": "_resume",
|
|
19112
|
+
"privacy": "private",
|
|
19113
|
+
"return": {
|
|
19114
|
+
"type": {
|
|
19115
|
+
"text": "void"
|
|
19116
|
+
}
|
|
19117
|
+
},
|
|
19118
|
+
"parameters": [
|
|
19119
|
+
{
|
|
19120
|
+
"name": "id",
|
|
19121
|
+
"type": {
|
|
19122
|
+
"text": "number"
|
|
19123
|
+
}
|
|
19124
|
+
}
|
|
19125
|
+
],
|
|
19126
|
+
"description": "Resumes a paused toast's countdown for whatever time was remaining."
|
|
19127
|
+
},
|
|
19128
|
+
{
|
|
19129
|
+
"kind": "method",
|
|
19130
|
+
"name": "_syncTicking",
|
|
19131
|
+
"privacy": "private",
|
|
19132
|
+
"return": {
|
|
19133
|
+
"type": {
|
|
19134
|
+
"text": "void"
|
|
19135
|
+
}
|
|
19136
|
+
},
|
|
19137
|
+
"description": "Starts or stops the shared display-only tick, matching whether any countdown is actually running."
|
|
19138
|
+
},
|
|
19139
|
+
{
|
|
19140
|
+
"kind": "method",
|
|
19141
|
+
"name": "_interactionState",
|
|
19142
|
+
"privacy": "private",
|
|
19143
|
+
"return": {
|
|
19144
|
+
"type": {
|
|
19145
|
+
"text": "{ hovered: boolean; focusWithin: boolean }"
|
|
19146
|
+
}
|
|
19147
|
+
},
|
|
19148
|
+
"parameters": [
|
|
19149
|
+
{
|
|
19150
|
+
"name": "id",
|
|
19151
|
+
"type": {
|
|
19152
|
+
"text": "number"
|
|
19153
|
+
}
|
|
19154
|
+
}
|
|
19155
|
+
],
|
|
19156
|
+
"description": "Reads (creating if absent) a toast's hover/focus tracking record."
|
|
19157
|
+
},
|
|
19158
|
+
{
|
|
19159
|
+
"kind": "method",
|
|
19160
|
+
"name": "_onMouseEnter",
|
|
19161
|
+
"privacy": "private",
|
|
19162
|
+
"return": {
|
|
19163
|
+
"type": {
|
|
19164
|
+
"text": "void"
|
|
19165
|
+
}
|
|
19166
|
+
},
|
|
19167
|
+
"parameters": [
|
|
19168
|
+
{
|
|
19169
|
+
"name": "id",
|
|
19170
|
+
"type": {
|
|
19171
|
+
"text": "number"
|
|
19172
|
+
}
|
|
19173
|
+
}
|
|
19174
|
+
]
|
|
19175
|
+
},
|
|
19176
|
+
{
|
|
19177
|
+
"kind": "method",
|
|
19178
|
+
"name": "_onMouseLeave",
|
|
19179
|
+
"privacy": "private",
|
|
19180
|
+
"return": {
|
|
19181
|
+
"type": {
|
|
19182
|
+
"text": "void"
|
|
19183
|
+
}
|
|
19184
|
+
},
|
|
19185
|
+
"parameters": [
|
|
19186
|
+
{
|
|
19187
|
+
"name": "id",
|
|
19188
|
+
"type": {
|
|
19189
|
+
"text": "number"
|
|
19190
|
+
}
|
|
19191
|
+
}
|
|
19192
|
+
]
|
|
19193
|
+
},
|
|
19194
|
+
{
|
|
19195
|
+
"kind": "method",
|
|
19196
|
+
"name": "_onFocusIn",
|
|
19197
|
+
"privacy": "private",
|
|
19198
|
+
"return": {
|
|
19199
|
+
"type": {
|
|
19200
|
+
"text": "void"
|
|
19201
|
+
}
|
|
19202
|
+
},
|
|
19203
|
+
"parameters": [
|
|
19204
|
+
{
|
|
19205
|
+
"name": "id",
|
|
19206
|
+
"type": {
|
|
19207
|
+
"text": "number"
|
|
19208
|
+
}
|
|
19209
|
+
}
|
|
19210
|
+
]
|
|
19211
|
+
},
|
|
19212
|
+
{
|
|
19213
|
+
"kind": "method",
|
|
19214
|
+
"name": "_onFocusOut",
|
|
19215
|
+
"privacy": "private",
|
|
19216
|
+
"return": {
|
|
19217
|
+
"type": {
|
|
19218
|
+
"text": "void"
|
|
19219
|
+
}
|
|
19220
|
+
},
|
|
19221
|
+
"parameters": [
|
|
19222
|
+
{
|
|
19223
|
+
"name": "id",
|
|
19224
|
+
"type": {
|
|
19225
|
+
"text": "number"
|
|
19226
|
+
}
|
|
19227
|
+
},
|
|
19228
|
+
{
|
|
19229
|
+
"name": "event",
|
|
19230
|
+
"type": {
|
|
19231
|
+
"text": "FocusEvent"
|
|
19232
|
+
}
|
|
19233
|
+
}
|
|
19234
|
+
],
|
|
19235
|
+
"description": "Rechecks focus-within on a microtask, since focusout fires before the new focus target settles."
|
|
19236
|
+
},
|
|
19237
|
+
{
|
|
19238
|
+
"kind": "method",
|
|
19239
|
+
"name": "_secondsLeft",
|
|
19240
|
+
"privacy": "private",
|
|
19241
|
+
"return": {
|
|
19242
|
+
"type": {
|
|
19243
|
+
"text": "number"
|
|
19244
|
+
}
|
|
19245
|
+
},
|
|
19246
|
+
"parameters": [
|
|
19247
|
+
{
|
|
19248
|
+
"name": "t",
|
|
19249
|
+
"type": {
|
|
19250
|
+
"text": "Toast"
|
|
19251
|
+
}
|
|
19252
|
+
}
|
|
19253
|
+
],
|
|
19254
|
+
"description": "Whole seconds remaining until auto-dismiss, for the countdown number."
|
|
19255
|
+
},
|
|
18933
19256
|
{
|
|
18934
19257
|
"kind": "method",
|
|
18935
19258
|
"name": "_variantIcon",
|
|
@@ -18953,6 +19276,19 @@
|
|
|
18953
19276
|
"tagName": "toast-notification",
|
|
18954
19277
|
"customElement": true
|
|
18955
19278
|
},
|
|
19279
|
+
{
|
|
19280
|
+
"kind": "variable",
|
|
19281
|
+
"name": "id",
|
|
19282
|
+
"default": "this._nextId++"
|
|
19283
|
+
},
|
|
19284
|
+
{
|
|
19285
|
+
"kind": "variable",
|
|
19286
|
+
"name": "variant"
|
|
19287
|
+
},
|
|
19288
|
+
{
|
|
19289
|
+
"kind": "variable",
|
|
19290
|
+
"name": "duration"
|
|
19291
|
+
},
|
|
18956
19292
|
{
|
|
18957
19293
|
"kind": "function",
|
|
18958
19294
|
"name": "notifyError",
|
package/dist/app-shell.d.ts
CHANGED
|
@@ -48,6 +48,12 @@ export interface SidebarToggleDetail {
|
|
|
48
48
|
* action and its `[` shortcut — the shortcut is not shown as permanent
|
|
49
49
|
* chrome.
|
|
50
50
|
*
|
|
51
|
+
* Consumers with their own external top bar can set `no-topbar` to skip
|
|
52
|
+
* rendering the built-in topbar row and toggle button entirely (the grid
|
|
53
|
+
* drops that row rather than leaving dead space). The `[`/Escape shortcuts
|
|
54
|
+
* stay fully active either way — drive `sidebar-open` from your own UI and
|
|
55
|
+
* listen for `sidebar-toggle` to stay in sync with keyboard-driven changes.
|
|
56
|
+
*
|
|
51
57
|
* @element app-shell
|
|
52
58
|
* @slot - Main content area.
|
|
53
59
|
* @slot sidebar - Sidebar navigation (typically `app-sidebar`).
|
|
@@ -68,6 +74,8 @@ export declare class AppShell extends LitElement {
|
|
|
68
74
|
detailOpen: boolean;
|
|
69
75
|
/** Detail width: `compact` (20rem) or `comfortable` (25rem). */
|
|
70
76
|
detailWidth: "compact" | "comfortable";
|
|
77
|
+
/** Skips rendering the built-in topbar row and its nav toggle entirely, for consumers with their own external top bar. The `[`/Escape shortcuts stay active regardless — this only affects what's rendered. */
|
|
78
|
+
noTopbar: boolean;
|
|
71
79
|
/** Whether the viewport is at/below the 48rem breakpoint. */
|
|
72
80
|
private _mobile;
|
|
73
81
|
/** Whether the footer slot has assigned content. */
|
package/dist/app-shell.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-shell.d.ts","sourceRoot":"","sources":["../src/app-shell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"app-shell.d.ts","sourceRoot":"","sources":["../src/app-shell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAG1E,OAAO,eAAe,CAAC;AAGvB,gEAAgE;AAChE,MAAM,WAAW,mBAAmB;IAClC,uCAAuC;IACvC,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,qBACa,QAAS,SAAQ,UAAU;IACtC,0EAA0E;IACH,WAAW,UAAS;IAC3F,uGAAuG;IAC/C,WAAW,EAAE,SAAS,GAAG,MAAM,CAAa;IACpG,uGAAuG;IAC9C,YAAY,EAAE,MAAM,GAAG,MAAM,CAAU;IAChG,gFAAgF;IACV,UAAU,UAAS;IACzF,gEAAgE;IACvB,WAAW,EAAE,SAAS,GAAG,aAAa,CAAa;IAC5F,+MAA+M;IAC3I,QAAQ,UAAS;IAErF,6DAA6D;IACpD,OAAO,CAAC,OAAO,CAAS;IACjC,oDAAoD;IAC3C,OAAO,CAAC,UAAU,CAAS;IAEpC,OAAgB,MAAM,4BAmQpB;IAEF,OAAO,CAAC,WAAW,CAA+B;IAClD,OAAO,CAAC,cAAc,CAA4B;IAEzC,iBAAiB,IAAI,IAAI,CAMjC;IAEQ,oBAAoB,IAAI,IAAI,CAKpC;IAED,wEAAwE;IACxE,OAAO,CAAC,cAAc,CAEpB;IAEF,gFAAgF;IAChF,OAAO,CAAC,UAAU,CAsBhB;IAEF,wFAAwF;IACxF,OAAO,CAAC,iBAAiB;IAQzB,4CAA4C;IAC5C,OAAO,CAAC,cAAc;IActB,mFAAmF;IACnF,OAAO,CAAC,YAAY;IAKpB,uDAAuD;IACvD,OAAO,CAAC,QAAQ;IAKhB,4FAA4F;IAC5F,OAAO,CAAC,iBAAiB;IAQzB,UAAmB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CASxD;IAEQ,MAAM,yCA2Dd;IAED,gEAAgE;IAChE,OAAO,CAAC,mBAAmB;CAG5B;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
package/dist/app-shell.js
CHANGED
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { LitElement, css, html } from "lit";
|
|
7
|
+
import { LitElement, css, html, nothing } from "lit";
|
|
8
8
|
import { customElement, property, state } from "lit/decorators.js";
|
|
9
9
|
import { iconBars3 } from "./icons.js";
|
|
10
10
|
import "./kbd-hint.js";
|
|
@@ -52,6 +52,12 @@ import { tokens } from "./tokens.js";
|
|
|
52
52
|
* action and its `[` shortcut — the shortcut is not shown as permanent
|
|
53
53
|
* chrome.
|
|
54
54
|
*
|
|
55
|
+
* Consumers with their own external top bar can set `no-topbar` to skip
|
|
56
|
+
* rendering the built-in topbar row and toggle button entirely (the grid
|
|
57
|
+
* drops that row rather than leaving dead space). The `[`/Escape shortcuts
|
|
58
|
+
* stay fully active either way — drive `sidebar-open` from your own UI and
|
|
59
|
+
* listen for `sidebar-toggle` to stay in sync with keyboard-driven changes.
|
|
60
|
+
*
|
|
55
61
|
* @element app-shell
|
|
56
62
|
* @slot - Main content area.
|
|
57
63
|
* @slot sidebar - Sidebar navigation (typically `app-sidebar`).
|
|
@@ -74,6 +80,8 @@ let AppShell = class AppShell extends LitElement {
|
|
|
74
80
|
this.detailOpen = false;
|
|
75
81
|
/** Detail width: `compact` (20rem) or `comfortable` (25rem). */
|
|
76
82
|
this.detailWidth = "compact";
|
|
83
|
+
/** Skips rendering the built-in topbar row and its nav toggle entirely, for consumers with their own external top bar. The `[`/Escape shortcuts stay active regardless — this only affects what's rendered. */
|
|
84
|
+
this.noTopbar = false;
|
|
77
85
|
/** Whether the viewport is at/below the 48rem breakpoint. */
|
|
78
86
|
this._mobile = false;
|
|
79
87
|
/** Whether the footer slot has assigned content. */
|
|
@@ -131,6 +139,14 @@ let AppShell = class AppShell extends LitElement {
|
|
|
131
139
|
min-height: 0;
|
|
132
140
|
background: var(--ui-surface, #ffffff);
|
|
133
141
|
}
|
|
142
|
+
/* no-topbar drops the topbar row from the grid rather than rendering
|
|
143
|
+
an empty one — the header element itself is skipped in render(). */
|
|
144
|
+
:host([no-topbar]) .shell {
|
|
145
|
+
grid-template-rows: minmax(0, 1fr) auto;
|
|
146
|
+
grid-template-areas:
|
|
147
|
+
"sidebar main detail"
|
|
148
|
+
"sidebar footer footer";
|
|
149
|
+
}
|
|
134
150
|
:host([detail-open]) .shell {
|
|
135
151
|
--_detail-w: 20rem;
|
|
136
152
|
}
|
|
@@ -166,7 +182,7 @@ let AppShell = class AppShell extends LitElement {
|
|
|
166
182
|
border-right: 1px solid var(--ui-border, #e2e8f0);
|
|
167
183
|
background: var(--ui-surface, #ffffff);
|
|
168
184
|
transform: translateX(-100%);
|
|
169
|
-
transition: transform
|
|
185
|
+
transition: transform 150ms ease;
|
|
170
186
|
}
|
|
171
187
|
:host([sidebar-open]) .sidebar {
|
|
172
188
|
transform: translateX(0);
|
|
@@ -300,6 +316,12 @@ let AppShell = class AppShell extends LitElement {
|
|
|
300
316
|
"main detail"
|
|
301
317
|
"footer footer";
|
|
302
318
|
}
|
|
319
|
+
:host([no-topbar]) .shell {
|
|
320
|
+
grid-template-rows: minmax(0, 1fr) auto;
|
|
321
|
+
grid-template-areas:
|
|
322
|
+
"main detail"
|
|
323
|
+
"footer footer";
|
|
324
|
+
}
|
|
303
325
|
/* Mobile is always a full-screen, position:absolute overlay drawer,
|
|
304
326
|
regardless of sidebar-mode/sidebar-width — those two properties
|
|
305
327
|
only affect the desktop presentation. */
|
|
@@ -436,26 +458,30 @@ let AppShell = class AppShell extends LitElement {
|
|
|
436
458
|
>
|
|
437
459
|
<slot name="sidebar" @slotchange=${this._syncSidebarWidth}></slot>
|
|
438
460
|
</aside>
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
class="
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
461
|
+
${this.noTopbar
|
|
462
|
+
? nothing
|
|
463
|
+
: html `
|
|
464
|
+
<header class="topbar">
|
|
465
|
+
<div class="nav-group">
|
|
466
|
+
<button
|
|
467
|
+
class="nav-toggle"
|
|
468
|
+
type="button"
|
|
469
|
+
aria-label="Toggle navigation"
|
|
470
|
+
aria-keyshortcuts="["
|
|
471
|
+
aria-describedby="nav-tip"
|
|
472
|
+
aria-expanded=${String(this.sidebarOpen)}
|
|
473
|
+
@click=${this._toggleSidebar}
|
|
474
|
+
>
|
|
475
|
+
${iconBars3(18)}
|
|
476
|
+
</button>
|
|
477
|
+
<span class="nav-tip" id="nav-tip" role="tooltip">
|
|
478
|
+
<span>${this.sidebarOpen ? "Hide navigation" : "Show navigation"}</span>
|
|
479
|
+
<kbd-hint keys="["></kbd-hint>
|
|
480
|
+
</span>
|
|
481
|
+
</div>
|
|
482
|
+
<div class="topbar-content"><slot name="topbar"></slot></div>
|
|
483
|
+
</header>
|
|
484
|
+
`}
|
|
459
485
|
<main class="main"><slot></slot></main>
|
|
460
486
|
<aside
|
|
461
487
|
class="detail"
|
|
@@ -499,6 +525,9 @@ __decorate([
|
|
|
499
525
|
__decorate([
|
|
500
526
|
property({ attribute: "detail-width" })
|
|
501
527
|
], AppShell.prototype, "detailWidth", void 0);
|
|
528
|
+
__decorate([
|
|
529
|
+
property({ type: Boolean, reflect: true, attribute: "no-topbar" })
|
|
530
|
+
], AppShell.prototype, "noTopbar", void 0);
|
|
502
531
|
__decorate([
|
|
503
532
|
state()
|
|
504
533
|
], AppShell.prototype, "_mobile", void 0);
|