@f-ewald/components 1.31.0 → 1.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/custom-elements.json +181 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/progress-bar.d.ts +31 -0
- package/dist/progress-bar.d.ts.map +1 -0
- package/dist/progress-bar.js +128 -0
- package/dist/progress-bar.js.map +1 -0
- package/dist/radio-cards.d.ts +32 -9
- package/dist/radio-cards.d.ts.map +1 -1
- package/dist/radio-cards.js +84 -14
- package/dist/radio-cards.js.map +1 -1
- package/docs/progress-bar.md +51 -0
- package/docs/radio-cards.md +26 -9
- package/llms.txt +43 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -100,6 +100,7 @@ import "@f-ewald/components/roman-numeral.js";
|
|
|
100
100
|
| `<photo-gallery>` | [API reference](https://f-ewald.github.io/components/docs/photo-gallery.html) |
|
|
101
101
|
| `<popover-panel>` | [API reference](https://f-ewald.github.io/components/docs/popover-panel.html) |
|
|
102
102
|
| `<price-history-chart>` | [API reference](https://f-ewald.github.io/components/docs/price-history-chart.html) |
|
|
103
|
+
| `<progress-bar>` | [API reference](https://f-ewald.github.io/components/docs/progress-bar.html) |
|
|
103
104
|
| `<radio-cards>` | [API reference](https://f-ewald.github.io/components/docs/radio-cards.html) |
|
|
104
105
|
| `<radio-pills>` | [API reference](https://f-ewald.github.io/components/docs/radio-pills.html) |
|
|
105
106
|
| `<range-slider>` | [API reference](https://f-ewald.github.io/components/docs/range-slider.html) |
|
package/custom-elements.json
CHANGED
|
@@ -10074,6 +10074,14 @@
|
|
|
10074
10074
|
"module": "./stat-meter.js"
|
|
10075
10075
|
}
|
|
10076
10076
|
},
|
|
10077
|
+
{
|
|
10078
|
+
"kind": "js",
|
|
10079
|
+
"name": "ProgressBar",
|
|
10080
|
+
"declaration": {
|
|
10081
|
+
"name": "ProgressBar",
|
|
10082
|
+
"module": "./progress-bar.js"
|
|
10083
|
+
}
|
|
10084
|
+
},
|
|
10077
10085
|
{
|
|
10078
10086
|
"kind": "js",
|
|
10079
10087
|
"name": "StatusBanner",
|
|
@@ -15830,13 +15838,147 @@
|
|
|
15830
15838
|
}
|
|
15831
15839
|
]
|
|
15832
15840
|
},
|
|
15841
|
+
{
|
|
15842
|
+
"kind": "javascript-module",
|
|
15843
|
+
"path": "src/progress-bar.ts",
|
|
15844
|
+
"declarations": [
|
|
15845
|
+
{
|
|
15846
|
+
"kind": "class",
|
|
15847
|
+
"description": "A determinate horizontal progress indicator — a page-level \"step 3 of 14\"\nbar. `stat-meter` is the closest existing thing but is an inline\nCPU-gauge-style meter with a leading label and a computed percent value;\n`progress-bar` instead takes a raw `value`/`max` pair and renders an\noptional plain-text `label` to the right of the bar rather than a percent\ninside it.",
|
|
15848
|
+
"name": "ProgressBar",
|
|
15849
|
+
"members": [
|
|
15850
|
+
{
|
|
15851
|
+
"kind": "field",
|
|
15852
|
+
"name": "value",
|
|
15853
|
+
"type": {
|
|
15854
|
+
"text": "number"
|
|
15855
|
+
},
|
|
15856
|
+
"default": "0",
|
|
15857
|
+
"description": "Current progress. Clamped into [0, max].",
|
|
15858
|
+
"attribute": "value"
|
|
15859
|
+
},
|
|
15860
|
+
{
|
|
15861
|
+
"kind": "field",
|
|
15862
|
+
"name": "max",
|
|
15863
|
+
"type": {
|
|
15864
|
+
"text": "number"
|
|
15865
|
+
},
|
|
15866
|
+
"default": "100",
|
|
15867
|
+
"description": "Value representing a full bar.",
|
|
15868
|
+
"attribute": "max"
|
|
15869
|
+
},
|
|
15870
|
+
{
|
|
15871
|
+
"kind": "field",
|
|
15872
|
+
"name": "label",
|
|
15873
|
+
"type": {
|
|
15874
|
+
"text": "string"
|
|
15875
|
+
},
|
|
15876
|
+
"default": "\"\"",
|
|
15877
|
+
"description": "Optional text rendered to the right of the bar (e.g. \"Question 3 out of 14\").",
|
|
15878
|
+
"attribute": "label"
|
|
15879
|
+
},
|
|
15880
|
+
{
|
|
15881
|
+
"kind": "field",
|
|
15882
|
+
"name": "color",
|
|
15883
|
+
"type": {
|
|
15884
|
+
"text": "string"
|
|
15885
|
+
},
|
|
15886
|
+
"default": "\"\"",
|
|
15887
|
+
"description": "Fill color; defaults to the themed accent.",
|
|
15888
|
+
"attribute": "color"
|
|
15889
|
+
},
|
|
15890
|
+
{
|
|
15891
|
+
"kind": "field",
|
|
15892
|
+
"name": "trackColor",
|
|
15893
|
+
"type": {
|
|
15894
|
+
"text": "string"
|
|
15895
|
+
},
|
|
15896
|
+
"default": "\"\"",
|
|
15897
|
+
"description": "Track color behind the fill.",
|
|
15898
|
+
"attribute": "track-color"
|
|
15899
|
+
}
|
|
15900
|
+
],
|
|
15901
|
+
"attributes": [
|
|
15902
|
+
{
|
|
15903
|
+
"name": "value",
|
|
15904
|
+
"type": {
|
|
15905
|
+
"text": "number"
|
|
15906
|
+
},
|
|
15907
|
+
"default": "0",
|
|
15908
|
+
"description": "Current progress. Clamped into [0, max].",
|
|
15909
|
+
"fieldName": "value"
|
|
15910
|
+
},
|
|
15911
|
+
{
|
|
15912
|
+
"name": "max",
|
|
15913
|
+
"type": {
|
|
15914
|
+
"text": "number"
|
|
15915
|
+
},
|
|
15916
|
+
"default": "100",
|
|
15917
|
+
"description": "Value representing a full bar.",
|
|
15918
|
+
"fieldName": "max"
|
|
15919
|
+
},
|
|
15920
|
+
{
|
|
15921
|
+
"name": "label",
|
|
15922
|
+
"type": {
|
|
15923
|
+
"text": "string"
|
|
15924
|
+
},
|
|
15925
|
+
"default": "\"\"",
|
|
15926
|
+
"description": "Optional text rendered to the right of the bar (e.g. \"Question 3 out of 14\").",
|
|
15927
|
+
"fieldName": "label"
|
|
15928
|
+
},
|
|
15929
|
+
{
|
|
15930
|
+
"name": "color",
|
|
15931
|
+
"type": {
|
|
15932
|
+
"text": "string"
|
|
15933
|
+
},
|
|
15934
|
+
"default": "\"\"",
|
|
15935
|
+
"description": "Fill color; defaults to the themed accent.",
|
|
15936
|
+
"fieldName": "color"
|
|
15937
|
+
},
|
|
15938
|
+
{
|
|
15939
|
+
"name": "track-color",
|
|
15940
|
+
"type": {
|
|
15941
|
+
"text": "string"
|
|
15942
|
+
},
|
|
15943
|
+
"default": "\"\"",
|
|
15944
|
+
"description": "Track color behind the fill.",
|
|
15945
|
+
"fieldName": "trackColor"
|
|
15946
|
+
}
|
|
15947
|
+
],
|
|
15948
|
+
"superclass": {
|
|
15949
|
+
"name": "LitElement",
|
|
15950
|
+
"package": "lit"
|
|
15951
|
+
},
|
|
15952
|
+
"tagName": "progress-bar",
|
|
15953
|
+
"customElement": true
|
|
15954
|
+
}
|
|
15955
|
+
],
|
|
15956
|
+
"exports": [
|
|
15957
|
+
{
|
|
15958
|
+
"kind": "js",
|
|
15959
|
+
"name": "ProgressBar",
|
|
15960
|
+
"declaration": {
|
|
15961
|
+
"name": "ProgressBar",
|
|
15962
|
+
"module": "src/progress-bar.ts"
|
|
15963
|
+
}
|
|
15964
|
+
},
|
|
15965
|
+
{
|
|
15966
|
+
"kind": "custom-element-definition",
|
|
15967
|
+
"name": "progress-bar",
|
|
15968
|
+
"declaration": {
|
|
15969
|
+
"name": "ProgressBar",
|
|
15970
|
+
"module": "src/progress-bar.ts"
|
|
15971
|
+
}
|
|
15972
|
+
}
|
|
15973
|
+
]
|
|
15974
|
+
},
|
|
15833
15975
|
{
|
|
15834
15976
|
"kind": "javascript-module",
|
|
15835
15977
|
"path": "src/radio-cards.ts",
|
|
15836
15978
|
"declarations": [
|
|
15837
15979
|
{
|
|
15838
15980
|
"kind": "class",
|
|
15839
|
-
"description": "Single-select group of full-width cards, each with a label and optional\ndescription — for a handful of meaningfully different choices where the\ndescription matters. For many short, same-shaped options (a color swatch,\na basemap style), use `radio-pills` instead. Wraps native radio inputs for\nkeyboard/a11y and fires `change` rather than relying on form submission.\n\
|
|
15981
|
+
"description": "Single-select group of full-width cards, each with a label and optional\ndescription — for a handful of meaningfully different choices where the\ndescription matters. For many short, same-shaped options (a color swatch,\na basemap style), use `radio-pills` instead. Wraps native radio inputs for\nkeyboard/a11y and fires `change` rather than relying on form submission.\n\nAn unchecked card is treated as `ui-button`'s secondary variant: it reads\nthe same `--ui-button-secondary-background`/`-hover` and\n`-border`/`-hover` tokens, so a gradient theme applies to a card exactly\nlike it does to any button. The selected card's border/radio dot instead\nread `--ui-button-accent` (a solid stand-in, since `border-color`/\n`accent-color` can't render a gradient), and its background reads the\nshared `--ui-button-secondary-surface-muted` plus `--ui-button-highlight`,\nso a gradient theme tints it consistently with `button-group`/\n`pagination-nav`'s equivalents. That shared value is tuned for small\ncontrols, so a card — with far more area — blends it 45% toward\n`--ui-surface` rather than taking a second token: the tint stays the same\nhue and gradient, just lighter on light themes (and correspondingly\ndeeper on dark ones) than on a button.\n\n`layout` controls how cards flow (\"mixed\" wraps with per-option\n`fullWidth` rows, \"vertical\" stacks one per row, \"horizontal\" stays\nside-by-side at every width). `hideInput` visually hides the radio dot via\nthe same `sr-only` clip pattern as `ui-checkbox` — the native input stays\nin the DOM for keyboard/a11y, and the card's own border/tint carries the\nselected state instead.",
|
|
15840
15982
|
"name": "RadioCards",
|
|
15841
15983
|
"members": [
|
|
15842
15984
|
{
|
|
@@ -15868,6 +16010,26 @@
|
|
|
15868
16010
|
"description": "Disables every native radio in the group.",
|
|
15869
16011
|
"attribute": "disabled"
|
|
15870
16012
|
},
|
|
16013
|
+
{
|
|
16014
|
+
"kind": "field",
|
|
16015
|
+
"name": "layout",
|
|
16016
|
+
"type": {
|
|
16017
|
+
"text": "\"vertical\" | \"horizontal\" | \"mixed\""
|
|
16018
|
+
},
|
|
16019
|
+
"default": "\"mixed\"",
|
|
16020
|
+
"description": "How the cards flow.\n- \"mixed\" (default): cards wrap onto as many rows as fit; options marked\n `fullWidth` take a row of their own.\n- \"vertical\": one full-width card per row, never side by side.\n- \"horizontal\": every card on one row, equal widths, no wrapping.",
|
|
16021
|
+
"attribute": "layout"
|
|
16022
|
+
},
|
|
16023
|
+
{
|
|
16024
|
+
"kind": "field",
|
|
16025
|
+
"name": "hideInput",
|
|
16026
|
+
"type": {
|
|
16027
|
+
"text": "boolean"
|
|
16028
|
+
},
|
|
16029
|
+
"default": "false",
|
|
16030
|
+
"description": "Visually hides the radio dot; the card's own border/tint carries the selected state.",
|
|
16031
|
+
"attribute": "hide-input"
|
|
16032
|
+
},
|
|
15871
16033
|
{
|
|
15872
16034
|
"kind": "field",
|
|
15873
16035
|
"name": "#name",
|
|
@@ -15916,6 +16078,24 @@
|
|
|
15916
16078
|
"default": "false",
|
|
15917
16079
|
"description": "Disables every native radio in the group.",
|
|
15918
16080
|
"fieldName": "disabled"
|
|
16081
|
+
},
|
|
16082
|
+
{
|
|
16083
|
+
"name": "layout",
|
|
16084
|
+
"type": {
|
|
16085
|
+
"text": "\"vertical\" | \"horizontal\" | \"mixed\""
|
|
16086
|
+
},
|
|
16087
|
+
"default": "\"mixed\"",
|
|
16088
|
+
"description": "How the cards flow.\n- \"mixed\" (default): cards wrap onto as many rows as fit; options marked\n `fullWidth` take a row of their own.\n- \"vertical\": one full-width card per row, never side by side.\n- \"horizontal\": every card on one row, equal widths, no wrapping.",
|
|
16089
|
+
"fieldName": "layout"
|
|
16090
|
+
},
|
|
16091
|
+
{
|
|
16092
|
+
"name": "hide-input",
|
|
16093
|
+
"type": {
|
|
16094
|
+
"text": "boolean"
|
|
16095
|
+
},
|
|
16096
|
+
"default": "false",
|
|
16097
|
+
"description": "Visually hides the radio dot; the card's own border/tint carries the selected state.",
|
|
16098
|
+
"fieldName": "hideInput"
|
|
15919
16099
|
}
|
|
15920
16100
|
],
|
|
15921
16101
|
"superclass": {
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export { RangeSlider } from "./range-slider.js";
|
|
|
32
32
|
export { ButtonGroup, type ButtonGroupOption } from "./button-group.js";
|
|
33
33
|
export { UiButton, type ButtonVariant } from "./ui-button.js";
|
|
34
34
|
export { StatMeter } from "./stat-meter.js";
|
|
35
|
+
export { ProgressBar } from "./progress-bar.js";
|
|
35
36
|
export { StatusBanner, type StatusBannerVariant } from "./status-banner.js";
|
|
36
37
|
export { UiAdmonition, type AdmonitionVariant } from "./ui-admonition.js";
|
|
37
38
|
export { StatusPill, type StatusPillColor } from "./status-pill.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,GACnC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,UAAU,EACV,aAAa,EACb,KAAK,YAAY,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,KAAK,sB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AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,KAAK,iBAAiB,GACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,KAAK,cAAc,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,eAAe,EACf,WAAW,EACX,eAAe,EACf,UAAU,EACV,YAAY,EACZ,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,QAAQ,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnE,cAAc,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -32,6 +32,7 @@ export { RangeSlider } from "./range-slider.js";
|
|
|
32
32
|
export { ButtonGroup } from "./button-group.js";
|
|
33
33
|
export { UiButton } from "./ui-button.js";
|
|
34
34
|
export { StatMeter } from "./stat-meter.js";
|
|
35
|
+
export { ProgressBar } from "./progress-bar.js";
|
|
35
36
|
export { StatusBanner } from "./status-banner.js";
|
|
36
37
|
export { UiAdmonition } from "./ui-admonition.js";
|
|
37
38
|
export { StatusPill } from "./status-pill.js";
|
package/dist/index.js.map
CHANGED
|
@@ -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AAC;AACnE,cAAc,YAAY,CAAC","sourcesContent":["export { AnimateConfetti } from \"./animate-confetti.js\";\nexport { GalleryItem } from \"./gallery-item.js\";\nexport { GalleryItemVariant } from \"./gallery-item-variant.js\";\nexport {\n PhotoGallery,\n type PhotoGalleryChangeReason,\n type PhotoGalleryObjectFit,\n type PhotoGallerySlideChangeDetail,\n} from \"./photo-gallery.js\";\nexport { RevealButton } from \"./reveal-button.js\";\nexport { RomanNumeral } from \"./roman-numeral.js\";\nexport { ConfirmDialog } from \"./confirm-dialog.js\";\nexport { ModalDialog, type ModalDialogSize } from \"./modal-dialog.js\";\nexport { ContentDivider } from \"./content-divider.js\";\nexport {\n ToastNotification,\n notifySuccess,\n notifyError,\n notifyInfo,\n notifyWarning,\n type ToastVariant,\n} from \"./toast-notification.js\";\nexport { ScrollToBottom } from \"./scroll-to-bottom.js\";\nexport {\n ScrollDots,\n type DotSelectDetail,\n type ScrollDotItem,\n type ScrollDotsItem,\n} from \"./scroll-dots.js\";\nexport { ScrollToTop } from \"./scroll-to-top.js\";\nexport { FullscreenButton, type FullscreenChangeDetail } from \"./fullscreen-button.js\";\nexport { SlidePanel } from \"./slide-panel.js\";\nexport { CopyLinkButton } from \"./copy-link-button.js\";\nexport { RelativeTime } from \"./relative-time.js\";\nexport { DistanceValue } from \"./distance-value.js\";\nexport { PriceHistoryChart, type PricePoint } from \"./price-history-chart.js\";\nexport { DistributionChart, type DistributionValue } from \"./distribution-chart.js\";\nexport { PercentBarChart, type PercentBarGroup } from \"./percent-bar-chart.js\";\nexport { WeightBarChart, type WeightBarItem } from \"./weight-bar-chart.js\";\nexport {\n AddressAutocomplete,\n type AddressSuggestion,\n} from \"./address-autocomplete.js\";\nexport {\n AutocompleteInput,\n type AutocompleteOption,\n} from \"./autocomplete-input.js\";\nexport { UserAvatar } from \"./user-avatar.js\";\nexport { MapPin } from \"./map-pin.js\";\nexport { MapCircle } from \"./map-circle.js\";\nexport { MapboxMap } from \"./mapbox-map.js\";\nexport { RadioCards, type RadioCardOption } from \"./radio-cards.js\";\nexport { RadioPills, type RadioPillOption } from \"./radio-pills.js\";\nexport { RangeSlider } from \"./range-slider.js\";\nexport { ButtonGroup, type ButtonGroupOption } from \"./button-group.js\";\nexport { UiButton, type ButtonVariant } from \"./ui-button.js\";\nexport { StatMeter } from \"./stat-meter.js\";\nexport { StatusBanner, type StatusBannerVariant } from \"./status-banner.js\";\nexport { UiAdmonition, type AdmonitionVariant } from \"./ui-admonition.js\";\nexport { StatusPill, type StatusPillColor } from \"./status-pill.js\";\nexport { EditableText } from \"./editable-text.js\";\nexport { LiveTimer } from \"./live-timer.js\";\nexport { CountdownTimer } from \"./countdown-timer.js\";\nexport { LoadMore } from \"./load-more.js\";\nexport { LoadingSpinner } from \"./loading-spinner.js\";\nexport { LoadingDots } from \"./loading-dots.js\";\nexport {\n ChatMessage,\n type ChatMessageRole,\n type ChatMessageVariant,\n} from \"./chat-message.js\";\nexport { UiCheckbox } from \"./ui-checkbox.js\";\nexport { FormField } from \"./form-field.js\";\nexport { FormSelect, type SelectOption } from \"./form-select.js\";\nexport {\n MultiSelect,\n type MultiSelectOption,\n type MultiSelectVariant,\n} from \"./multi-select.js\";\nexport { DataTable, type DataTableColumn } from \"./data-table.js\";\nexport { TileGrid } from \"./tile-grid.js\";\nexport { TreeView, type TreeNode } from \"./tree-view.js\";\nexport { PopoverPanel } from \"./popover-panel.js\";\nexport {\n DropdownButton,\n type DropdownButtonVariant,\n type DropdownOption,\n} from \"./dropdown-button.js\";\nexport { IconButton } from \"./icon-button.js\";\nexport { KbdHint, type KbdPlatform } from \"./kbd-hint.js\";\nexport { FrameBox } from \"./frame-box.js\";\nexport { AppShell, type SidebarToggleDetail } from \"./app-shell.js\";\nexport { AppSidebar } from \"./app-sidebar.js\";\nexport { ActionBar } from \"./action-bar.js\";\nexport { PageHeader } from \"./page-header.js\";\nexport { PaginationNav, type PageChangeDetail } from \"./pagination-nav.js\";\nexport { FormActions } from \"./form-actions.js\";\nexport { TimelineContainer, type TimelineLayout } from \"./timeline-container.js\";\nexport { TimelineEntry } from \"./timeline-entry.js\";\nexport { CalendarDay } from \"./calendar-day.js\";\nexport { CalendarEntry } from \"./calendar-entry.js\";\nexport { CalendarMonth } from \"./calendar-month.js\";\nexport { CalendarWeek } from \"./calendar-week.js\";\nexport { CalendarYear } from \"./calendar-year.js\";\nexport {\n KanbanBoard,\n type KanbanCardData,\n type KanbanColumnData,\n type KanbanCardMoveDetail,\n type KanbanCardOpenDetail,\n} from \"./kanban-board.js\";\nexport { KanbanColumn } from \"./kanban-column.js\";\nexport { KanbanCard } from \"./kanban-card.js\";\nexport { TextArea } from \"./text-area.js\";\nexport { LinkCard, type LinkCardStatus } from \"./link-card.js\";\nexport { CardGrid } from \"./card-grid.js\";\nexport { MarkdownView } from \"./markdown-view.js\";\nexport { AutoScroll } from \"./auto-scroll.js\";\nexport { SplitHero } from \"./split-hero.js\";\nexport { TabBar, type TabChangeDetail } from \"./tab-bar.js\";\nexport { TabItem } from \"./tab-item.js\";\nexport { MarkdownEditor } from \"./markdown-editor.js\";\nexport {\n parseFrontMatter,\n formatFrontMatterValue,\n type FrontMatterResult,\n} from \"./utils/front-matter.js\";\nexport {\n formatDuration,\n formatClockDuration,\n type DurationFormat,\n} from \"./utils/duration.js\";\nexport { AudioPlayer } from \"./audio-player.js\";\nexport { VideoPlayer } from \"./video-player.js\";\nexport { CommentComposer } from \"./comment-composer.js\";\nexport { CronSchedule } from \"./cron-schedule.js\";\nexport {\n CRON_ALIASES,\n CRON_FIELD_BOUNDS,\n CRON_FIELD_LABELS,\n CRON_FIELD_NAMES,\n MONTH_ABBREVIATIONS,\n MONTH_NAMES,\n WEEKDAY_ABBREVIATIONS,\n WEEKDAY_NAMES,\n describeCron,\n detectFrequency,\n expandField,\n fieldFromValues,\n formatCron,\n isEveryValue,\n parseCron,\n type CronExpression,\n type CronField,\n type CronFieldName,\n type CronFrequency,\n type CronTerm,\n} from \"./utils/cron.js\";\nexport { tokens, tokenValues, darkTokenValues } from \"./tokens.js\";\nexport * from \"./icons.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EACL,YAAY,GAIb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAwB,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,UAAU,EACV,aAAa,GAEd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EACL,UAAU,GAIX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAA+B,MAAM,wBAAwB,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAmB,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAA0B,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,eAAe,EAAwB,MAAM,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V,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnE,cAAc,YAAY,CAAC","sourcesContent":["export { AnimateConfetti } from \"./animate-confetti.js\";\nexport { GalleryItem } from \"./gallery-item.js\";\nexport { GalleryItemVariant } from \"./gallery-item-variant.js\";\nexport {\n PhotoGallery,\n type PhotoGalleryChangeReason,\n type PhotoGalleryObjectFit,\n type PhotoGallerySlideChangeDetail,\n} from \"./photo-gallery.js\";\nexport { RevealButton } from \"./reveal-button.js\";\nexport { RomanNumeral } from \"./roman-numeral.js\";\nexport { ConfirmDialog } from \"./confirm-dialog.js\";\nexport { ModalDialog, type ModalDialogSize } from \"./modal-dialog.js\";\nexport { ContentDivider } from \"./content-divider.js\";\nexport {\n ToastNotification,\n notifySuccess,\n notifyError,\n notifyInfo,\n notifyWarning,\n type ToastVariant,\n} from \"./toast-notification.js\";\nexport { ScrollToBottom } from \"./scroll-to-bottom.js\";\nexport {\n ScrollDots,\n type DotSelectDetail,\n type ScrollDotItem,\n type ScrollDotsItem,\n} from \"./scroll-dots.js\";\nexport { ScrollToTop } from \"./scroll-to-top.js\";\nexport { FullscreenButton, type FullscreenChangeDetail } from \"./fullscreen-button.js\";\nexport { SlidePanel } from \"./slide-panel.js\";\nexport { CopyLinkButton } from \"./copy-link-button.js\";\nexport { RelativeTime } from \"./relative-time.js\";\nexport { DistanceValue } from \"./distance-value.js\";\nexport { PriceHistoryChart, type PricePoint } from \"./price-history-chart.js\";\nexport { DistributionChart, type DistributionValue } from \"./distribution-chart.js\";\nexport { PercentBarChart, type PercentBarGroup } from \"./percent-bar-chart.js\";\nexport { WeightBarChart, type WeightBarItem } from \"./weight-bar-chart.js\";\nexport {\n AddressAutocomplete,\n type AddressSuggestion,\n} from \"./address-autocomplete.js\";\nexport {\n AutocompleteInput,\n type AutocompleteOption,\n} from \"./autocomplete-input.js\";\nexport { UserAvatar } from \"./user-avatar.js\";\nexport { MapPin } from \"./map-pin.js\";\nexport { MapCircle } from \"./map-circle.js\";\nexport { MapboxMap } from \"./mapbox-map.js\";\nexport { RadioCards, type RadioCardOption } from \"./radio-cards.js\";\nexport { RadioPills, type RadioPillOption } from \"./radio-pills.js\";\nexport { RangeSlider } from \"./range-slider.js\";\nexport { ButtonGroup, type ButtonGroupOption } from \"./button-group.js\";\nexport { UiButton, type ButtonVariant } from \"./ui-button.js\";\nexport { StatMeter } from \"./stat-meter.js\";\nexport { ProgressBar } from \"./progress-bar.js\";\nexport { StatusBanner, type StatusBannerVariant } from \"./status-banner.js\";\nexport { UiAdmonition, type AdmonitionVariant } from \"./ui-admonition.js\";\nexport { StatusPill, type StatusPillColor } from \"./status-pill.js\";\nexport { EditableText } from \"./editable-text.js\";\nexport { LiveTimer } from \"./live-timer.js\";\nexport { CountdownTimer } from \"./countdown-timer.js\";\nexport { LoadMore } from \"./load-more.js\";\nexport { LoadingSpinner } from \"./loading-spinner.js\";\nexport { LoadingDots } from \"./loading-dots.js\";\nexport {\n ChatMessage,\n type ChatMessageRole,\n type ChatMessageVariant,\n} from \"./chat-message.js\";\nexport { UiCheckbox } from \"./ui-checkbox.js\";\nexport { FormField } from \"./form-field.js\";\nexport { FormSelect, type SelectOption } from \"./form-select.js\";\nexport {\n MultiSelect,\n type MultiSelectOption,\n type MultiSelectVariant,\n} from \"./multi-select.js\";\nexport { DataTable, type DataTableColumn } from \"./data-table.js\";\nexport { TileGrid } from \"./tile-grid.js\";\nexport { TreeView, type TreeNode } from \"./tree-view.js\";\nexport { PopoverPanel } from \"./popover-panel.js\";\nexport {\n DropdownButton,\n type DropdownButtonVariant,\n type DropdownOption,\n} from \"./dropdown-button.js\";\nexport { IconButton } from \"./icon-button.js\";\nexport { KbdHint, type KbdPlatform } from \"./kbd-hint.js\";\nexport { FrameBox } from \"./frame-box.js\";\nexport { AppShell, type SidebarToggleDetail } from \"./app-shell.js\";\nexport { AppSidebar } from \"./app-sidebar.js\";\nexport { ActionBar } from \"./action-bar.js\";\nexport { PageHeader } from \"./page-header.js\";\nexport { PaginationNav, type PageChangeDetail } from \"./pagination-nav.js\";\nexport { FormActions } from \"./form-actions.js\";\nexport { TimelineContainer, type TimelineLayout } from \"./timeline-container.js\";\nexport { TimelineEntry } from \"./timeline-entry.js\";\nexport { CalendarDay } from \"./calendar-day.js\";\nexport { CalendarEntry } from \"./calendar-entry.js\";\nexport { CalendarMonth } from \"./calendar-month.js\";\nexport { CalendarWeek } from \"./calendar-week.js\";\nexport { CalendarYear } from \"./calendar-year.js\";\nexport {\n KanbanBoard,\n type KanbanCardData,\n type KanbanColumnData,\n type KanbanCardMoveDetail,\n type KanbanCardOpenDetail,\n} from \"./kanban-board.js\";\nexport { KanbanColumn } from \"./kanban-column.js\";\nexport { KanbanCard } from \"./kanban-card.js\";\nexport { TextArea } from \"./text-area.js\";\nexport { LinkCard, type LinkCardStatus } from \"./link-card.js\";\nexport { CardGrid } from \"./card-grid.js\";\nexport { MarkdownView } from \"./markdown-view.js\";\nexport { AutoScroll } from \"./auto-scroll.js\";\nexport { SplitHero } from \"./split-hero.js\";\nexport { TabBar, type TabChangeDetail } from \"./tab-bar.js\";\nexport { TabItem } from \"./tab-item.js\";\nexport { MarkdownEditor } from \"./markdown-editor.js\";\nexport {\n parseFrontMatter,\n formatFrontMatterValue,\n type FrontMatterResult,\n} from \"./utils/front-matter.js\";\nexport {\n formatDuration,\n formatClockDuration,\n type DurationFormat,\n} from \"./utils/duration.js\";\nexport { AudioPlayer } from \"./audio-player.js\";\nexport { VideoPlayer } from \"./video-player.js\";\nexport { CommentComposer } from \"./comment-composer.js\";\nexport { CronSchedule } from \"./cron-schedule.js\";\nexport {\n CRON_ALIASES,\n CRON_FIELD_BOUNDS,\n CRON_FIELD_LABELS,\n CRON_FIELD_NAMES,\n MONTH_ABBREVIATIONS,\n MONTH_NAMES,\n WEEKDAY_ABBREVIATIONS,\n WEEKDAY_NAMES,\n describeCron,\n detectFrequency,\n expandField,\n fieldFromValues,\n formatCron,\n isEveryValue,\n parseCron,\n type CronExpression,\n type CronField,\n type CronFieldName,\n type CronFrequency,\n type CronTerm,\n} from \"./utils/cron.js\";\nexport { tokens, tokenValues, darkTokenValues } from \"./tokens.js\";\nexport * from \"./icons.js\";\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* A determinate horizontal progress indicator — a page-level "step 3 of 14"
|
|
4
|
+
* bar. `stat-meter` is the closest existing thing but is an inline
|
|
5
|
+
* CPU-gauge-style meter with a leading label and a computed percent value;
|
|
6
|
+
* `progress-bar` instead takes a raw `value`/`max` pair and renders an
|
|
7
|
+
* optional plain-text `label` to the right of the bar rather than a percent
|
|
8
|
+
* inside it.
|
|
9
|
+
*
|
|
10
|
+
* @element progress-bar
|
|
11
|
+
*/
|
|
12
|
+
export declare class ProgressBar extends LitElement {
|
|
13
|
+
static styles: import("lit").CSSResult[];
|
|
14
|
+
/** Current progress. Clamped into [0, max]. */
|
|
15
|
+
value: number;
|
|
16
|
+
/** Value representing a full bar. */
|
|
17
|
+
max: number;
|
|
18
|
+
/** Optional text rendered to the right of the bar (e.g. "Question 3 out of 14"). */
|
|
19
|
+
label: string;
|
|
20
|
+
/** Fill color; defaults to the themed accent. */
|
|
21
|
+
color: string;
|
|
22
|
+
/** Track color behind the fill. */
|
|
23
|
+
trackColor: string;
|
|
24
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
25
|
+
}
|
|
26
|
+
declare global {
|
|
27
|
+
interface HTMLElementTagNameMap {
|
|
28
|
+
"progress-bar": ProgressBar;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=progress-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-bar.d.ts","sourceRoot":"","sources":["../src/progress-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAIrD;;;;;;;;;GASG;AACH,qBACa,WAAY,SAAQ,UAAU;IACzC,OAAgB,MAAM,4BAoDpB;IAEF,+CAA+C;IACnB,KAAK,SAAK;IACtC,qCAAqC;IACT,GAAG,SAAO;IACtC,oFAAoF;IACxE,KAAK,SAAM;IACvB,iDAAiD;IACrC,KAAK,SAAM;IACvB,mCAAmC;IACK,UAAU,SAAM;IAE/C,MAAM,yCAoBd;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, css, html, nothing } from "lit";
|
|
8
|
+
import { customElement, property } from "lit/decorators.js";
|
|
9
|
+
import { tokens } from "./tokens.js";
|
|
10
|
+
/**
|
|
11
|
+
* A determinate horizontal progress indicator — a page-level "step 3 of 14"
|
|
12
|
+
* bar. `stat-meter` is the closest existing thing but is an inline
|
|
13
|
+
* CPU-gauge-style meter with a leading label and a computed percent value;
|
|
14
|
+
* `progress-bar` instead takes a raw `value`/`max` pair and renders an
|
|
15
|
+
* optional plain-text `label` to the right of the bar rather than a percent
|
|
16
|
+
* inside it.
|
|
17
|
+
*
|
|
18
|
+
* @element progress-bar
|
|
19
|
+
*/
|
|
20
|
+
let ProgressBar = class ProgressBar extends LitElement {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments);
|
|
23
|
+
/** Current progress. Clamped into [0, max]. */
|
|
24
|
+
this.value = 0;
|
|
25
|
+
/** Value representing a full bar. */
|
|
26
|
+
this.max = 100;
|
|
27
|
+
/** Optional text rendered to the right of the bar (e.g. "Question 3 out of 14"). */
|
|
28
|
+
this.label = "";
|
|
29
|
+
/** Fill color; defaults to the themed accent. */
|
|
30
|
+
this.color = "";
|
|
31
|
+
/** Track color behind the fill. */
|
|
32
|
+
this.trackColor = "";
|
|
33
|
+
}
|
|
34
|
+
static { this.styles = [
|
|
35
|
+
tokens,
|
|
36
|
+
css `
|
|
37
|
+
:host {
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
gap: 0.5rem;
|
|
41
|
+
font-family: var(
|
|
42
|
+
--ui-font,
|
|
43
|
+
ui-sans-serif,
|
|
44
|
+
system-ui,
|
|
45
|
+
sans-serif,
|
|
46
|
+
"Apple Color Emoji",
|
|
47
|
+
"Segoe UI Emoji",
|
|
48
|
+
"Segoe UI Symbol",
|
|
49
|
+
"Noto Color Emoji"
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
.track {
|
|
53
|
+
flex: 1 1 auto;
|
|
54
|
+
display: block;
|
|
55
|
+
height: 0.5rem;
|
|
56
|
+
border-radius: var(--ui-radius-sm, 0.25rem);
|
|
57
|
+
background: var(--track-color, var(--ui-surface-muted, #f8fafc));
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
}
|
|
60
|
+
.fill {
|
|
61
|
+
display: block;
|
|
62
|
+
height: 100%;
|
|
63
|
+
background: var(--fill-color, var(--ui-button-accent, var(--ui-primary, #4f46e5)));
|
|
64
|
+
transition: width 200ms ease;
|
|
65
|
+
}
|
|
66
|
+
.label {
|
|
67
|
+
flex: 0 0 auto;
|
|
68
|
+
font-size: var(--ui-font-size-sm, 0.75rem);
|
|
69
|
+
color: var(--ui-text-muted, #64748b);
|
|
70
|
+
white-space: nowrap;
|
|
71
|
+
}
|
|
72
|
+
@media (prefers-reduced-motion: reduce) {
|
|
73
|
+
.fill {
|
|
74
|
+
transition: none;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
@media (forced-colors: active) {
|
|
78
|
+
.track {
|
|
79
|
+
border: 1px solid CanvasText;
|
|
80
|
+
}
|
|
81
|
+
.fill {
|
|
82
|
+
background: Highlight;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
`,
|
|
86
|
+
]; }
|
|
87
|
+
render() {
|
|
88
|
+
const max = Math.max(0, this.max);
|
|
89
|
+
const clamped = Math.min(max, Math.max(0, this.value));
|
|
90
|
+
const pct = max === 0 ? 0 : (clamped / max) * 100;
|
|
91
|
+
const fillStyle = this.color ? `width: ${pct}%; --fill-color: ${this.color}` : `width: ${pct}%`;
|
|
92
|
+
const trackStyle = this.trackColor ? `--track-color: ${this.trackColor}` : "";
|
|
93
|
+
return html `
|
|
94
|
+
<span
|
|
95
|
+
class="track"
|
|
96
|
+
style=${trackStyle}
|
|
97
|
+
role="progressbar"
|
|
98
|
+
aria-valuenow=${clamped}
|
|
99
|
+
aria-valuemin="0"
|
|
100
|
+
aria-valuemax=${max}
|
|
101
|
+
aria-label=${this.label || nothing}
|
|
102
|
+
>
|
|
103
|
+
<span class="fill" style=${fillStyle}></span>
|
|
104
|
+
</span>
|
|
105
|
+
${this.label ? html `<span class="label">${this.label}</span>` : nothing}
|
|
106
|
+
`;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
__decorate([
|
|
110
|
+
property({ type: Number })
|
|
111
|
+
], ProgressBar.prototype, "value", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
property({ type: Number })
|
|
114
|
+
], ProgressBar.prototype, "max", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
property()
|
|
117
|
+
], ProgressBar.prototype, "label", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
property()
|
|
120
|
+
], ProgressBar.prototype, "color", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
property({ attribute: "track-color" })
|
|
123
|
+
], ProgressBar.prototype, "trackColor", void 0);
|
|
124
|
+
ProgressBar = __decorate([
|
|
125
|
+
customElement("progress-bar")
|
|
126
|
+
], ProgressBar);
|
|
127
|
+
export { ProgressBar };
|
|
128
|
+
//# sourceMappingURL=progress-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-bar.js","sourceRoot":"","sources":["../src/progress-bar.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;;;;GASG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QAuDL,+CAA+C;QACnB,UAAK,GAAG,CAAC,CAAC;QACtC,qCAAqC;QACT,QAAG,GAAG,GAAG,CAAC;QACtC,oFAAoF;QACxE,UAAK,GAAG,EAAE,CAAC;QACvB,iDAAiD;QACrC,UAAK,GAAG,EAAE,CAAC;QACvB,mCAAmC;QACK,eAAU,GAAG,EAAE,CAAC;IAuB1D,CAAC;aAtFiB,WAAM,GAAG;QACvB,MAAM;QACN,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiDF;KACF,AApDqB,CAoDpB;IAaO,MAAM;QACb,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAClC,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACvD,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;QAClD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,GAAG,oBAAoB,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,UAAU,GAAG,GAAG,CAAC;QAChG,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,kBAAkB,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9E,OAAO,IAAI,CAAA;;;gBAGC,UAAU;;wBAEF,OAAO;;wBAEP,GAAG;qBACN,IAAI,CAAC,KAAK,IAAI,OAAO;;mCAEP,SAAS;;QAEpC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA,uBAAuB,IAAI,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO;KACxE,CAAC;IACJ,CAAC;CACF,CAAA;AA/B6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAAW;AAEV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCAAW;AAE1B;IAAX,QAAQ,EAAE;0CAAY;AAEX;IAAX,QAAQ,EAAE;0CAAY;AAEiB;IAAvC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;+CAAiB;AAhE7C,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAuFvB","sourcesContent":["import { LitElement, css, html, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { tokens } from \"./tokens.js\";\n\n/**\n * A determinate horizontal progress indicator — a page-level \"step 3 of 14\"\n * bar. `stat-meter` is the closest existing thing but is an inline\n * CPU-gauge-style meter with a leading label and a computed percent value;\n * `progress-bar` instead takes a raw `value`/`max` pair and renders an\n * optional plain-text `label` to the right of the bar rather than a percent\n * inside it.\n *\n * @element progress-bar\n */\n@customElement(\"progress-bar\")\nexport class ProgressBar extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n }\n .track {\n flex: 1 1 auto;\n display: block;\n height: 0.5rem;\n border-radius: var(--ui-radius-sm, 0.25rem);\n background: var(--track-color, var(--ui-surface-muted, #f8fafc));\n overflow: hidden;\n }\n .fill {\n display: block;\n height: 100%;\n background: var(--fill-color, var(--ui-button-accent, var(--ui-primary, #4f46e5)));\n transition: width 200ms ease;\n }\n .label {\n flex: 0 0 auto;\n font-size: var(--ui-font-size-sm, 0.75rem);\n color: var(--ui-text-muted, #64748b);\n white-space: nowrap;\n }\n @media (prefers-reduced-motion: reduce) {\n .fill {\n transition: none;\n }\n }\n @media (forced-colors: active) {\n .track {\n border: 1px solid CanvasText;\n }\n .fill {\n background: Highlight;\n }\n }\n `,\n ];\n\n /** Current progress. Clamped into [0, max]. */\n @property({ type: Number }) value = 0;\n /** Value representing a full bar. */\n @property({ type: Number }) max = 100;\n /** Optional text rendered to the right of the bar (e.g. \"Question 3 out of 14\"). */\n @property() label = \"\";\n /** Fill color; defaults to the themed accent. */\n @property() color = \"\";\n /** Track color behind the fill. */\n @property({ attribute: \"track-color\" }) trackColor = \"\";\n\n override render() {\n const max = Math.max(0, this.max);\n const clamped = Math.min(max, Math.max(0, this.value));\n const pct = max === 0 ? 0 : (clamped / max) * 100;\n const fillStyle = this.color ? `width: ${pct}%; --fill-color: ${this.color}` : `width: ${pct}%`;\n const trackStyle = this.trackColor ? `--track-color: ${this.trackColor}` : \"\";\n return html`\n <span\n class=\"track\"\n style=${trackStyle}\n role=\"progressbar\"\n aria-valuenow=${clamped}\n aria-valuemin=\"0\"\n aria-valuemax=${max}\n aria-label=${this.label || nothing}\n >\n <span class=\"fill\" style=${fillStyle}></span>\n </span>\n ${this.label ? html`<span class=\"label\">${this.label}</span>` : nothing}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"progress-bar\": ProgressBar;\n }\n}\n"]}
|
package/dist/radio-cards.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export interface RadioCardOption {
|
|
|
3
3
|
value: string;
|
|
4
4
|
label: string;
|
|
5
5
|
description?: string;
|
|
6
|
+
/** In `layout="mixed"`, forces this card onto its own full-width row. */
|
|
7
|
+
fullWidth?: boolean;
|
|
6
8
|
}
|
|
7
9
|
/**
|
|
8
10
|
* Single-select group of full-width cards, each with a label and optional
|
|
@@ -11,15 +13,26 @@ export interface RadioCardOption {
|
|
|
11
13
|
* a basemap style), use `radio-pills` instead. Wraps native radio inputs for
|
|
12
14
|
* keyboard/a11y and fires `change` rather than relying on form submission.
|
|
13
15
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
16
|
+
* An unchecked card is treated as `ui-button`'s secondary variant: it reads
|
|
17
|
+
* the same `--ui-button-secondary-background`/`-hover` and
|
|
18
|
+
* `-border`/`-hover` tokens, so a gradient theme applies to a card exactly
|
|
19
|
+
* like it does to any button. The selected card's border/radio dot instead
|
|
20
|
+
* read `--ui-button-accent` (a solid stand-in, since `border-color`/
|
|
21
|
+
* `accent-color` can't render a gradient), and its background reads the
|
|
22
|
+
* shared `--ui-button-secondary-surface-muted` plus `--ui-button-highlight`,
|
|
23
|
+
* so a gradient theme tints it consistently with `button-group`/
|
|
24
|
+
* `pagination-nav`'s equivalents. That shared value is tuned for small
|
|
25
|
+
* controls, so a card — with far more area — blends it 45% toward
|
|
26
|
+
* `--ui-surface` rather than taking a second token: the tint stays the same
|
|
27
|
+
* hue and gradient, just lighter on light themes (and correspondingly
|
|
28
|
+
* deeper on dark ones) than on a button.
|
|
29
|
+
*
|
|
30
|
+
* `layout` controls how cards flow ("mixed" wraps with per-option
|
|
31
|
+
* `fullWidth` rows, "vertical" stacks one per row, "horizontal" stays
|
|
32
|
+
* side-by-side at every width). `hideInput` visually hides the radio dot via
|
|
33
|
+
* the same `sr-only` clip pattern as `ui-checkbox` — the native input stays
|
|
34
|
+
* in the DOM for keyboard/a11y, and the card's own border/tint carries the
|
|
35
|
+
* selected state instead.
|
|
23
36
|
*
|
|
24
37
|
* @element radio-cards
|
|
25
38
|
* @fires change - A card was selected; detail: { value }.
|
|
@@ -33,6 +46,16 @@ export declare class RadioCards extends LitElement {
|
|
|
33
46
|
value: string;
|
|
34
47
|
/** Disables every native radio in the group. */
|
|
35
48
|
disabled: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* How the cards flow.
|
|
51
|
+
* - "mixed" (default): cards wrap onto as many rows as fit; options marked
|
|
52
|
+
* `fullWidth` take a row of their own.
|
|
53
|
+
* - "vertical": one full-width card per row, never side by side.
|
|
54
|
+
* - "horizontal": every card on one row, equal widths, no wrapping.
|
|
55
|
+
*/
|
|
56
|
+
layout: "vertical" | "horizontal" | "mixed";
|
|
57
|
+
/** Visually hides the radio dot; the card's own border/tint carries the selected state. */
|
|
58
|
+
hideInput: boolean;
|
|
36
59
|
private _onChange;
|
|
37
60
|
render(): import("lit-html").TemplateResult<1>;
|
|
38
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-cards.d.ts","sourceRoot":"","sources":["../src/radio-cards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"radio-cards.d.ts","sourceRoot":"","sources":["../src/radio-cards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAMrD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBACa,UAAW,SAAQ,UAAU;;IACxC,OAAgB,MAAM,4BA4IpB;IAEF,wCAAwC;IACR,OAAO,EAAE,eAAe,EAAE,CAAM;IAChE,gCAAgC;IACpB,KAAK,SAAM;IACvB,gDAAgD;IACnB,QAAQ,UAAS;IAC9C;;;;;;OAMG;IACS,MAAM,EAAE,UAAU,GAAG,YAAY,GAAG,OAAO,CAAW;IAClE,2FAA2F;IACrC,SAAS,UAAS;IAIxE,OAAO,CAAC,SAAS;IAMR,MAAM,yCAyBd;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
package/dist/radio-cards.js
CHANGED
|
@@ -6,6 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { LitElement, css, html, nothing } from "lit";
|
|
8
8
|
import { customElement, property } from "lit/decorators.js";
|
|
9
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
9
10
|
import { repeat } from "lit/directives/repeat.js";
|
|
10
11
|
import { tokens } from "./tokens.js";
|
|
11
12
|
let instanceCount = 0;
|
|
@@ -16,15 +17,26 @@ let instanceCount = 0;
|
|
|
16
17
|
* a basemap style), use `radio-pills` instead. Wraps native radio inputs for
|
|
17
18
|
* keyboard/a11y and fires `change` rather than relying on form submission.
|
|
18
19
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
20
|
+
* An unchecked card is treated as `ui-button`'s secondary variant: it reads
|
|
21
|
+
* the same `--ui-button-secondary-background`/`-hover` and
|
|
22
|
+
* `-border`/`-hover` tokens, so a gradient theme applies to a card exactly
|
|
23
|
+
* like it does to any button. The selected card's border/radio dot instead
|
|
24
|
+
* read `--ui-button-accent` (a solid stand-in, since `border-color`/
|
|
25
|
+
* `accent-color` can't render a gradient), and its background reads the
|
|
26
|
+
* shared `--ui-button-secondary-surface-muted` plus `--ui-button-highlight`,
|
|
27
|
+
* so a gradient theme tints it consistently with `button-group`/
|
|
28
|
+
* `pagination-nav`'s equivalents. That shared value is tuned for small
|
|
29
|
+
* controls, so a card — with far more area — blends it 45% toward
|
|
30
|
+
* `--ui-surface` rather than taking a second token: the tint stays the same
|
|
31
|
+
* hue and gradient, just lighter on light themes (and correspondingly
|
|
32
|
+
* deeper on dark ones) than on a button.
|
|
33
|
+
*
|
|
34
|
+
* `layout` controls how cards flow ("mixed" wraps with per-option
|
|
35
|
+
* `fullWidth` rows, "vertical" stacks one per row, "horizontal" stays
|
|
36
|
+
* side-by-side at every width). `hideInput` visually hides the radio dot via
|
|
37
|
+
* the same `sr-only` clip pattern as `ui-checkbox` — the native input stays
|
|
38
|
+
* in the DOM for keyboard/a11y, and the card's own border/tint carries the
|
|
39
|
+
* selected state instead.
|
|
28
40
|
*
|
|
29
41
|
* @element radio-cards
|
|
30
42
|
* @fires change - A card was selected; detail: { value }.
|
|
@@ -38,6 +50,16 @@ let RadioCards = class RadioCards extends LitElement {
|
|
|
38
50
|
this.value = "";
|
|
39
51
|
/** Disables every native radio in the group. */
|
|
40
52
|
this.disabled = false;
|
|
53
|
+
/**
|
|
54
|
+
* How the cards flow.
|
|
55
|
+
* - "mixed" (default): cards wrap onto as many rows as fit; options marked
|
|
56
|
+
* `fullWidth` take a row of their own.
|
|
57
|
+
* - "vertical": one full-width card per row, never side by side.
|
|
58
|
+
* - "horizontal": every card on one row, equal widths, no wrapping.
|
|
59
|
+
*/
|
|
60
|
+
this.layout = "mixed";
|
|
61
|
+
/** Visually hides the radio dot; the card's own border/tint carries the selected state. */
|
|
62
|
+
this.hideInput = false;
|
|
41
63
|
this.#name = `radio-cards-${++instanceCount}`;
|
|
42
64
|
}
|
|
43
65
|
static { this.styles = [
|
|
@@ -49,14 +71,36 @@ let RadioCards = class RadioCards extends LitElement {
|
|
|
49
71
|
.options {
|
|
50
72
|
display: flex;
|
|
51
73
|
gap: 0.5rem;
|
|
74
|
+
}
|
|
75
|
+
.options.mixed {
|
|
52
76
|
flex-wrap: wrap;
|
|
53
77
|
}
|
|
54
|
-
.card {
|
|
78
|
+
.options.mixed .card {
|
|
55
79
|
flex: 1 1 11.25rem;
|
|
80
|
+
}
|
|
81
|
+
.options.mixed .card.full {
|
|
82
|
+
flex: 1 0 100%;
|
|
83
|
+
}
|
|
84
|
+
.options.vertical {
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
}
|
|
87
|
+
.options.vertical .card {
|
|
88
|
+
flex: 0 0 auto;
|
|
89
|
+
}
|
|
90
|
+
.options.horizontal {
|
|
91
|
+
flex-wrap: nowrap;
|
|
92
|
+
}
|
|
93
|
+
.options.horizontal .card {
|
|
94
|
+
flex: 1 1 0;
|
|
95
|
+
min-width: 0;
|
|
96
|
+
}
|
|
97
|
+
.card {
|
|
56
98
|
display: flex;
|
|
57
99
|
align-items: flex-start;
|
|
58
100
|
gap: 0.5rem;
|
|
59
|
-
|
|
101
|
+
box-sizing: border-box;
|
|
102
|
+
background: var(--ui-button-secondary-background, none);
|
|
103
|
+
border: 1px solid var(--ui-button-secondary-border, var(--ui-border, #e2e8f0));
|
|
60
104
|
border-radius: var(--ui-radius-sm, 0.25rem);
|
|
61
105
|
padding: 0.5rem 0.75rem;
|
|
62
106
|
cursor: pointer;
|
|
@@ -72,6 +116,13 @@ let RadioCards = class RadioCards extends LitElement {
|
|
|
72
116
|
);
|
|
73
117
|
font-size: var(--ui-font-size-sm, 0.75rem);
|
|
74
118
|
}
|
|
119
|
+
/* Unchecked cards are treated as ui-button's secondary variant (same
|
|
120
|
+
resting/hover gradient tokens), so a gradient theme applies here the
|
|
121
|
+
same way it does to every button — a card is not a special case. */
|
|
122
|
+
.card:hover:not(:has(input:disabled)):not(:has(input:checked)) {
|
|
123
|
+
background: var(--ui-button-secondary-background-hover, none);
|
|
124
|
+
border-color: var(--ui-button-secondary-border-hover, var(--ui-text-muted, #64748b));
|
|
125
|
+
}
|
|
75
126
|
/* Same single muted-surface variable as button-group/pagination-nav,
|
|
76
127
|
but blended toward the card's own surface: that value is tuned for a
|
|
77
128
|
small control, and across a card's much larger area it reads too
|
|
@@ -120,6 +171,18 @@ let RadioCards = class RadioCards extends LitElement {
|
|
|
120
171
|
.card:has(input:disabled) input {
|
|
121
172
|
cursor: not-allowed;
|
|
122
173
|
}
|
|
174
|
+
.card input.sr-only {
|
|
175
|
+
position: absolute;
|
|
176
|
+
width: 1px;
|
|
177
|
+
height: 1px;
|
|
178
|
+
margin: -1px;
|
|
179
|
+
padding: 0;
|
|
180
|
+
overflow: hidden;
|
|
181
|
+
clip: rect(0 0 0 0);
|
|
182
|
+
clip-path: inset(50%);
|
|
183
|
+
white-space: nowrap;
|
|
184
|
+
border: 0;
|
|
185
|
+
}
|
|
123
186
|
@media (forced-colors: active) {
|
|
124
187
|
.card:has(input:focus-visible) {
|
|
125
188
|
outline: 2px solid CanvasText;
|
|
@@ -149,13 +212,14 @@ let RadioCards = class RadioCards extends LitElement {
|
|
|
149
212
|
}
|
|
150
213
|
render() {
|
|
151
214
|
return html `
|
|
152
|
-
<div class="options">
|
|
215
|
+
<div class="options ${this.layout}">
|
|
153
216
|
${repeat(this.options, (opt) => opt.value, (opt) => html `
|
|
154
|
-
<label class
|
|
217
|
+
<label class=${classMap({ card: true, full: this.layout === "mixed" && !!opt.fullWidth })}>
|
|
155
218
|
<input
|
|
156
219
|
type="radio"
|
|
220
|
+
class=${classMap({ "sr-only": this.hideInput })}
|
|
157
221
|
name=${this.#name}
|
|
158
|
-
|
|
222
|
+
.checked=${this.value === opt.value}
|
|
159
223
|
?disabled=${this.disabled}
|
|
160
224
|
@change=${() => this._onChange(opt.value)}
|
|
161
225
|
/>
|
|
@@ -178,6 +242,12 @@ __decorate([
|
|
|
178
242
|
__decorate([
|
|
179
243
|
property({ type: Boolean })
|
|
180
244
|
], RadioCards.prototype, "disabled", void 0);
|
|
245
|
+
__decorate([
|
|
246
|
+
property()
|
|
247
|
+
], RadioCards.prototype, "layout", void 0);
|
|
248
|
+
__decorate([
|
|
249
|
+
property({ type: Boolean, attribute: "hide-input" })
|
|
250
|
+
], RadioCards.prototype, "hideInput", void 0);
|
|
181
251
|
RadioCards = __decorate([
|
|
182
252
|
customElement("radio-cards")
|
|
183
253
|
], RadioCards);
|
package/dist/radio-cards.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-cards.js","sourceRoot":"","sources":["../src/radio-cards.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAQrC,IAAI,aAAa,GAAG,CAAC,CAAC;AAEtB;;;;;;;;;;;;;;;;;;;GAmBG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QAsGL,wCAAwC;QACR,YAAO,GAAsB,EAAE,CAAC;QAChE,gCAAgC;QACpB,UAAK,GAAG,EAAE,CAAC;QACvB,gDAAgD;QACnB,aAAQ,GAAG,KAAK,CAAC;QAErC,UAAK,GAAG,eAAe,EAAE,aAAa,EAAE,CAAC;IAiCpD,CAAC;aA7IiB,WAAM,GAAG;QACvB,MAAM;QACN,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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Element, property } from \"lit/decorators.js\";\nimport { repeat } from \"lit/directives/repeat.js\";\nimport { tokens } from \"./tokens.js\";\n\nexport interface RadioCardOption {\n value: string;\n label: string;\n description?: string;\n}\n\nlet instanceCount = 0;\n\n/**\n * Single-select group of full-width cards, each with a label and optional\n * description — for a handful of meaningfully different choices where the\n * description matters. For many short, same-shaped options (a color swatch,\n * a basemap style), use `radio-pills` instead. Wraps native radio inputs for\n * keyboard/a11y and fires `change` rather than relying on form submission.\n *\n * The selected card's border/radio dot read `--ui-button-accent` (a solid\n * stand-in, since `border-color`/`accent-color` can't render a gradient),\n * and its background reads the shared `--ui-button-secondary-surface-muted`\n * plus `--ui-button-highlight`, so a gradient theme tints it consistently\n * with `button-group`/`pagination-nav`'s equivalents. That shared value is\n * tuned for small controls, so a card — with far more area — blends it 45%\n * toward `--ui-surface` rather than taking a second token: the tint stays\n * the same hue and gradient, just lighter on light themes (and\n * correspondingly deeper on dark ones) than on a button.\n *\n * @element radio-cards\n * @fires change - A card was selected; detail: { value }.\n */\n@customElement(\"radio-cards\")\nexport class RadioCards extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: block;\n }\n .options {\n display: flex;\n gap: 0.5rem;\n flex-wrap: wrap;\n }\n .card {\n flex: 1 1 11.25rem;\n display: flex;\n align-items: flex-start;\n gap: 0.5rem;\n border: 1px solid var(--ui-border, #e2e8f0);\n border-radius: var(--ui-radius-sm, 0.25rem);\n padding: 0.5rem 0.75rem;\n cursor: pointer;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n font-size: var(--ui-font-size-sm, 0.75rem);\n }\n /* Same single muted-surface variable as button-group/pagination-nav,\n but blended toward the card's own surface: that value is tuned for a\n small control, and across a card's much larger area it reads too\n heavy. Mixing with --ui-surface (rather than plain white) keeps the\n adjustment theme-correct — it lightens on light themes and deepens\n on dark ones. Written with the background shorthand (not\n background-image) so it stays valid whether the variable resolves to\n a gradient or a flat color. */\n .card:has(input:checked) {\n border-color: var(--ui-button-accent, var(--ui-primary, #4f46e5));\n background:\n linear-gradient(\n color-mix(in srgb, var(--ui-surface, #ffffff) 45%, transparent),\n color-mix(in srgb, var(--ui-surface, #ffffff) 45%, transparent)\n ),\n var(--ui-button-secondary-surface-muted, var(--ui-surface-muted, #f8fafc));\n box-shadow: var(--ui-button-highlight, 0 0 0 0 transparent);\n }\n .card input {\n width: 1rem;\n height: 1rem;\n margin-top: 0.25rem;\n accent-color: var(--ui-button-accent, var(--ui-primary, #4f46e5));\n cursor: pointer;\n }\n .card-label {\n font-weight: var(--ui-font-weight-semibold, 600);\n color: var(--ui-text, #0f172a);\n }\n .card-description {\n display: block;\n color: var(--ui-text-muted, #64748b);\n font-weight: var(--ui-font-weight-regular, 400);\n }\n .card:has(input:focus-visible) {\n outline: none;\n box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));\n }\n .card:has(input:checked):has(input:focus-visible) {\n box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35)), var(--ui-button-highlight, 0 0 0 0 transparent);\n }\n .card:has(input:disabled) {\n cursor: not-allowed;\n opacity: 0.6;\n }\n .card:has(input:disabled) input {\n cursor: not-allowed;\n }\n @media (forced-colors: active) {\n .card:has(input:focus-visible) {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n .card:has(input:checked) {\n border-color: Highlight;\n }\n .card:has(input:disabled) {\n color: GrayText;\n opacity: 1;\n }\n .card:has(input:disabled) .card-label,\n .card:has(input:disabled) .card-description {\n color: GrayText;\n }\n }\n `,\n ];\n\n /** Options to render, one card each. */\n @property({ attribute: false }) options: RadioCardOption[] = [];\n /** Currently selected value. */\n @property() value = \"\";\n /** Disables every native radio in the group. */\n @property({ type: Boolean }) disabled = false;\n\n readonly #name = `radio-cards-${++instanceCount}`;\n\n private _onChange(value: string) {\n if (this.disabled) return;\n this.value = value;\n this.dispatchEvent(new CustomEvent(\"change\", { detail: { value }, bubbles: true, composed: true }));\n }\n\n override render() {\n return html`\n <div class=\"options\">\n ${repeat(\n this.options,\n (opt) => opt.value,\n (opt) => html`\n <label class=\"card\">\n <input\n type=\"radio\"\n name=${this.#name}\n ?checked=${this.value === opt.value}\n ?disabled=${this.disabled}\n @change=${() => this._onChange(opt.value)}\n />\n <span>\n <span class=\"card-label\">${opt.label}</span>\n ${opt.description ? html`<span class=\"card-description\">${opt.description}</span>` : nothing}\n </span>\n </label>\n `,\n )}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"radio-cards\": RadioCards;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"radio-cards.js","sourceRoot":"","sources":["../src/radio-cards.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAUrC,IAAI,aAAa,GAAG,CAAC,CAAC;AAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QA+IL,wCAAwC;QACR,YAAO,GAAsB,EAAE,CAAC;QAChE,gCAAgC;QACpB,UAAK,GAAG,EAAE,CAAC;QACvB,gDAAgD;QACnB,aAAQ,GAAG,KAAK,CAAC;QAC9C;;;;;;WAMG;QACS,WAAM,GAAwC,OAAO,CAAC;QAClE,2FAA2F;QACrC,cAAS,GAAG,KAAK,CAAC;QAE/D,UAAK,GAAG,e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AAW,CAAC,CAAC,CAAC,IAAI,CAAA,kCAAkC,GAAG,CAAC,WAAW,SAAS,CAAC,CAAC,CAAC,OAAO;;;WAGjG,CACF;;KAEJ,CAAC;IACJ,CAAC;CACF,CAAA;AAlDiC;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;2CAAiC;AAEpD;IAAX,QAAQ,EAAE;yCAAY;AAEM;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CAAkB;AAQlC;IAAX,QAAQ,EAAE;0CAAuD;AAEZ;IAArD,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;6CAAmB;AA9J7D,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAkMtB","sourcesContent":["import { LitElement, css, html, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { repeat } from \"lit/directives/repeat.js\";\nimport { tokens } from \"./tokens.js\";\n\nexport interface RadioCardOption {\n value: string;\n label: string;\n description?: string;\n /** In `layout=\"mixed\"`, forces this card onto its own full-width row. */\n fullWidth?: boolean;\n}\n\nlet instanceCount = 0;\n\n/**\n * Single-select group of full-width cards, each with a label and optional\n * description — for a handful of meaningfully different choices where the\n * description matters. For many short, same-shaped options (a color swatch,\n * a basemap style), use `radio-pills` instead. Wraps native radio inputs for\n * keyboard/a11y and fires `change` rather than relying on form submission.\n *\n * An unchecked card is treated as `ui-button`'s secondary variant: it reads\n * the same `--ui-button-secondary-background`/`-hover` and\n * `-border`/`-hover` tokens, so a gradient theme applies to a card exactly\n * like it does to any button. The selected card's border/radio dot instead\n * read `--ui-button-accent` (a solid stand-in, since `border-color`/\n * `accent-color` can't render a gradient), and its background reads the\n * shared `--ui-button-secondary-surface-muted` plus `--ui-button-highlight`,\n * so a gradient theme tints it consistently with `button-group`/\n * `pagination-nav`'s equivalents. That shared value is tuned for small\n * controls, so a card — with far more area — blends it 45% toward\n * `--ui-surface` rather than taking a second token: the tint stays the same\n * hue and gradient, just lighter on light themes (and correspondingly\n * deeper on dark ones) than on a button.\n *\n * `layout` controls how cards flow (\"mixed\" wraps with per-option\n * `fullWidth` rows, \"vertical\" stacks one per row, \"horizontal\" stays\n * side-by-side at every width). `hideInput` visually hides the radio dot via\n * the same `sr-only` clip pattern as `ui-checkbox` — the native input stays\n * in the DOM for keyboard/a11y, and the card's own border/tint carries the\n * selected state instead.\n *\n * @element radio-cards\n * @fires change - A card was selected; detail: { value }.\n */\n@customElement(\"radio-cards\")\nexport class RadioCards extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: block;\n }\n .options {\n display: flex;\n gap: 0.5rem;\n }\n .options.mixed {\n flex-wrap: wrap;\n }\n .options.mixed .card {\n flex: 1 1 11.25rem;\n }\n .options.mixed .card.full {\n flex: 1 0 100%;\n }\n .options.vertical {\n flex-direction: column;\n }\n .options.vertical .card {\n flex: 0 0 auto;\n }\n .options.horizontal {\n flex-wrap: nowrap;\n }\n .options.horizontal .card {\n flex: 1 1 0;\n min-width: 0;\n }\n .card {\n display: flex;\n align-items: flex-start;\n gap: 0.5rem;\n box-sizing: border-box;\n background: var(--ui-button-secondary-background, none);\n border: 1px solid var(--ui-button-secondary-border, var(--ui-border, #e2e8f0));\n border-radius: var(--ui-radius-sm, 0.25rem);\n padding: 0.5rem 0.75rem;\n cursor: pointer;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n font-size: var(--ui-font-size-sm, 0.75rem);\n }\n /* Unchecked cards are treated as ui-button's secondary variant (same\n resting/hover gradient tokens), so a gradient theme applies here the\n same way it does to every button — a card is not a special case. */\n .card:hover:not(:has(input:disabled)):not(:has(input:checked)) {\n background: var(--ui-button-secondary-background-hover, none);\n border-color: var(--ui-button-secondary-border-hover, var(--ui-text-muted, #64748b));\n }\n /* Same single muted-surface variable as button-group/pagination-nav,\n but blended toward the card's own surface: that value is tuned for a\n small control, and across a card's much larger area it reads too\n heavy. Mixing with --ui-surface (rather than plain white) keeps the\n adjustment theme-correct — it lightens on light themes and deepens\n on dark ones. Written with the background shorthand (not\n background-image) so it stays valid whether the variable resolves to\n a gradient or a flat color. */\n .card:has(input:checked) {\n border-color: var(--ui-button-accent, var(--ui-primary, #4f46e5));\n background:\n linear-gradient(\n color-mix(in srgb, var(--ui-surface, #ffffff) 45%, transparent),\n color-mix(in srgb, var(--ui-surface, #ffffff) 45%, transparent)\n ),\n var(--ui-button-secondary-surface-muted, var(--ui-surface-muted, #f8fafc));\n box-shadow: var(--ui-button-highlight, 0 0 0 0 transparent);\n }\n .card input {\n width: 1rem;\n height: 1rem;\n margin-top: 0.25rem;\n accent-color: var(--ui-button-accent, var(--ui-primary, #4f46e5));\n cursor: pointer;\n }\n .card-label {\n font-weight: var(--ui-font-weight-semibold, 600);\n color: var(--ui-text, #0f172a);\n }\n .card-description {\n display: block;\n color: var(--ui-text-muted, #64748b);\n font-weight: var(--ui-font-weight-regular, 400);\n }\n .card:has(input:focus-visible) {\n outline: none;\n box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));\n }\n .card:has(input:checked):has(input:focus-visible) {\n box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35)), var(--ui-button-highlight, 0 0 0 0 transparent);\n }\n .card:has(input:disabled) {\n cursor: not-allowed;\n opacity: 0.6;\n }\n .card:has(input:disabled) input {\n cursor: not-allowed;\n }\n .card input.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n }\n @media (forced-colors: active) {\n .card:has(input:focus-visible) {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n .card:has(input:checked) {\n border-color: Highlight;\n }\n .card:has(input:disabled) {\n color: GrayText;\n opacity: 1;\n }\n .card:has(input:disabled) .card-label,\n .card:has(input:disabled) .card-description {\n color: GrayText;\n }\n }\n `,\n ];\n\n /** Options to render, one card each. */\n @property({ attribute: false }) options: RadioCardOption[] = [];\n /** Currently selected value. */\n @property() value = \"\";\n /** Disables every native radio in the group. */\n @property({ type: Boolean }) disabled = false;\n /**\n * How the cards flow.\n * - \"mixed\" (default): cards wrap onto as many rows as fit; options marked\n * `fullWidth` take a row of their own.\n * - \"vertical\": one full-width card per row, never side by side.\n * - \"horizontal\": every card on one row, equal widths, no wrapping.\n */\n @property() layout: \"vertical\" | \"horizontal\" | \"mixed\" = \"mixed\";\n /** Visually hides the radio dot; the card's own border/tint carries the selected state. */\n @property({ type: Boolean, attribute: \"hide-input\" }) hideInput = false;\n\n readonly #name = `radio-cards-${++instanceCount}`;\n\n private _onChange(value: string) {\n if (this.disabled) return;\n this.value = value;\n this.dispatchEvent(new CustomEvent(\"change\", { detail: { value }, bubbles: true, composed: true }));\n }\n\n override render() {\n return html`\n <div class=\"options ${this.layout}\">\n ${repeat(\n this.options,\n (opt) => opt.value,\n (opt) => html`\n <label class=${classMap({ card: true, full: this.layout === \"mixed\" && !!opt.fullWidth })}>\n <input\n type=\"radio\"\n class=${classMap({ \"sr-only\": this.hideInput })}\n name=${this.#name}\n .checked=${this.value === opt.value}\n ?disabled=${this.disabled}\n @change=${() => this._onChange(opt.value)}\n />\n <span>\n <span class=\"card-label\">${opt.label}</span>\n ${opt.description ? html`<span class=\"card-description\">${opt.description}</span>` : nothing}\n </span>\n </label>\n `,\n )}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"radio-cards\": RadioCards;\n }\n}\n"]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# `<progress-bar>`
|
|
2
|
+
|
|
3
|
+
A determinate horizontal progress indicator — a page-level "step 3 of 14"
|
|
4
|
+
bar. `stat-meter` is the closest existing thing but is an inline
|
|
5
|
+
CPU-gauge-style meter with a leading label and a computed percent value;
|
|
6
|
+
`progress-bar` instead takes a raw `value`/`max` pair and renders an
|
|
7
|
+
optional plain-text `label` to the right of the bar rather than a percent
|
|
8
|
+
inside it.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```js
|
|
13
|
+
import "@f-ewald/components/progress-bar.js";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<progress-bar value="3" max="14" label="Question 3 out of 14"></progress-bar>
|
|
20
|
+
<progress-bar value="7" max="10" color="#dc2626" track-color="#fecaca"></progress-bar>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Attributes / properties
|
|
24
|
+
|
|
25
|
+
| Property | Attribute | Type | Default | Description |
|
|
26
|
+
| --- | --- | --- | --- | --- |
|
|
27
|
+
| `value` | `value` | `number` | `0` | Current progress. Clamped into [0, max]. |
|
|
28
|
+
| `max` | `max` | `number` | `100` | Value representing a full bar. |
|
|
29
|
+
| `label` | `label` | `string` | `""` | Optional text rendered to the right of the bar (e.g. "Question 3 out of 14"). |
|
|
30
|
+
| `color` | `color` | `string` | `""` | Fill color; defaults to the themed accent. |
|
|
31
|
+
| `trackColor` | `track-color` | `string` | `""` | Track color behind the fill. |
|
|
32
|
+
|
|
33
|
+
## Events
|
|
34
|
+
|
|
35
|
+
_None._
|
|
36
|
+
|
|
37
|
+
## Slots
|
|
38
|
+
|
|
39
|
+
_None._
|
|
40
|
+
|
|
41
|
+
## CSS custom properties
|
|
42
|
+
|
|
43
|
+
| Custom property |
|
|
44
|
+
| --- |
|
|
45
|
+
| `--ui-button-accent` |
|
|
46
|
+
| `--ui-font` |
|
|
47
|
+
| `--ui-font-size-sm` |
|
|
48
|
+
| `--ui-primary` |
|
|
49
|
+
| `--ui-radius-sm` |
|
|
50
|
+
| `--ui-surface-muted` |
|
|
51
|
+
| `--ui-text-muted` |
|
package/docs/radio-cards.md
CHANGED
|
@@ -6,15 +6,26 @@ description matters. For many short, same-shaped options (a color swatch,
|
|
|
6
6
|
a basemap style), use `radio-pills` instead. Wraps native radio inputs for
|
|
7
7
|
keyboard/a11y and fires `change` rather than relying on form submission.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
An unchecked card is treated as `ui-button`'s secondary variant: it reads
|
|
10
|
+
the same `--ui-button-secondary-background`/`-hover` and
|
|
11
|
+
`-border`/`-hover` tokens, so a gradient theme applies to a card exactly
|
|
12
|
+
like it does to any button. The selected card's border/radio dot instead
|
|
13
|
+
read `--ui-button-accent` (a solid stand-in, since `border-color`/
|
|
14
|
+
`accent-color` can't render a gradient), and its background reads the
|
|
15
|
+
shared `--ui-button-secondary-surface-muted` plus `--ui-button-highlight`,
|
|
16
|
+
so a gradient theme tints it consistently with `button-group`/
|
|
17
|
+
`pagination-nav`'s equivalents. That shared value is tuned for small
|
|
18
|
+
controls, so a card — with far more area — blends it 45% toward
|
|
19
|
+
`--ui-surface` rather than taking a second token: the tint stays the same
|
|
20
|
+
hue and gradient, just lighter on light themes (and correspondingly
|
|
21
|
+
deeper on dark ones) than on a button.
|
|
22
|
+
|
|
23
|
+
`layout` controls how cards flow ("mixed" wraps with per-option
|
|
24
|
+
`fullWidth` rows, "vertical" stacks one per row, "horizontal" stays
|
|
25
|
+
side-by-side at every width). `hideInput` visually hides the radio dot via
|
|
26
|
+
the same `sr-only` clip pattern as `ui-checkbox` — the native input stays
|
|
27
|
+
in the DOM for keyboard/a11y, and the card's own border/tint carries the
|
|
28
|
+
selected state instead.
|
|
18
29
|
|
|
19
30
|
## Install
|
|
20
31
|
|
|
@@ -44,6 +55,8 @@ import "@f-ewald/components/radio-cards.js";
|
|
|
44
55
|
| `options` | _(JS property only)_ | `RadioCardOption[]` | `[]` | Options to render, one card each. |
|
|
45
56
|
| `value` | `value` | `string` | `""` | Currently selected value. |
|
|
46
57
|
| `disabled` | `disabled` | `boolean` | `false` | Disables every native radio in the group. |
|
|
58
|
+
| `layout` | `layout` | `"vertical" | "horizontal" | "mixed"` | `"mixed"` | How the cards flow. - "mixed" (default): cards wrap onto as many rows as fit; options marked `fullWidth` take a row of their own. - "vertical": one full-width card per row, never side by side. - "horizontal": every card on one row, equal widths, no wrapping. |
|
|
59
|
+
| `hideInput` | `hide-input` | `boolean` | `false` | Visually hides the radio dot; the card's own border/tint carries the selected state. |
|
|
47
60
|
|
|
48
61
|
## Events
|
|
49
62
|
|
|
@@ -62,6 +75,10 @@ _None._
|
|
|
62
75
|
| `--ui-border` |
|
|
63
76
|
| `--ui-button-accent` |
|
|
64
77
|
| `--ui-button-highlight` |
|
|
78
|
+
| `--ui-button-secondary-background` |
|
|
79
|
+
| `--ui-button-secondary-background-hover` |
|
|
80
|
+
| `--ui-button-secondary-border` |
|
|
81
|
+
| `--ui-button-secondary-border-hover` |
|
|
65
82
|
| `--ui-button-secondary-surface-muted` |
|
|
66
83
|
| `--ui-focus-ring` |
|
|
67
84
|
| `--ui-font` |
|
package/llms.txt
CHANGED
|
@@ -1799,6 +1799,27 @@ Example:
|
|
|
1799
1799
|
</script>
|
|
1800
1800
|
```
|
|
1801
1801
|
|
|
1802
|
+
## <progress-bar>
|
|
1803
|
+
|
|
1804
|
+
A determinate horizontal progress indicator — a page-level "step 3 of 14"
|
|
1805
|
+
bar. `stat-meter` is the closest existing thing but is an inline
|
|
1806
|
+
CPU-gauge-style meter with a leading label and a computed percent value;
|
|
1807
|
+
`progress-bar` instead takes a raw `value`/`max` pair and renders an
|
|
1808
|
+
optional plain-text `label` to the right of the bar rather than a percent
|
|
1809
|
+
inside it.
|
|
1810
|
+
|
|
1811
|
+
Import: `import "@f-ewald/components/progress-bar.js";`
|
|
1812
|
+
|
|
1813
|
+
Properties: `value` (attribute `value`) : number, default 0; `max` (attribute `max`) : number, default 100; `label` (attribute `label`) : string, default ""; `color` (attribute `color`) : string, default ""; `trackColor` (attribute `track-color`) : string, default ""
|
|
1814
|
+
Events: none
|
|
1815
|
+
CSS custom properties: `--ui-button-accent`, `--ui-font`, `--ui-font-size-sm`, `--ui-primary`, `--ui-radius-sm`, `--ui-surface-muted`, `--ui-text-muted`
|
|
1816
|
+
|
|
1817
|
+
Example:
|
|
1818
|
+
```html
|
|
1819
|
+
<progress-bar value="3" max="14" label="Question 3 out of 14"></progress-bar>
|
|
1820
|
+
<progress-bar value="7" max="10" color="#dc2626" track-color="#fecaca"></progress-bar>
|
|
1821
|
+
```
|
|
1822
|
+
|
|
1802
1823
|
## <radio-cards>
|
|
1803
1824
|
|
|
1804
1825
|
Single-select group of full-width cards, each with a label and optional
|
|
@@ -1807,21 +1828,32 @@ description matters. For many short, same-shaped options (a color swatch,
|
|
|
1807
1828
|
a basemap style), use `radio-pills` instead. Wraps native radio inputs for
|
|
1808
1829
|
keyboard/a11y and fires `change` rather than relying on form submission.
|
|
1809
1830
|
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1831
|
+
An unchecked card is treated as `ui-button`'s secondary variant: it reads
|
|
1832
|
+
the same `--ui-button-secondary-background`/`-hover` and
|
|
1833
|
+
`-border`/`-hover` tokens, so a gradient theme applies to a card exactly
|
|
1834
|
+
like it does to any button. The selected card's border/radio dot instead
|
|
1835
|
+
read `--ui-button-accent` (a solid stand-in, since `border-color`/
|
|
1836
|
+
`accent-color` can't render a gradient), and its background reads the
|
|
1837
|
+
shared `--ui-button-secondary-surface-muted` plus `--ui-button-highlight`,
|
|
1838
|
+
so a gradient theme tints it consistently with `button-group`/
|
|
1839
|
+
`pagination-nav`'s equivalents. That shared value is tuned for small
|
|
1840
|
+
controls, so a card — with far more area — blends it 45% toward
|
|
1841
|
+
`--ui-surface` rather than taking a second token: the tint stays the same
|
|
1842
|
+
hue and gradient, just lighter on light themes (and correspondingly
|
|
1843
|
+
deeper on dark ones) than on a button.
|
|
1844
|
+
|
|
1845
|
+
`layout` controls how cards flow ("mixed" wraps with per-option
|
|
1846
|
+
`fullWidth` rows, "vertical" stacks one per row, "horizontal" stays
|
|
1847
|
+
side-by-side at every width). `hideInput` visually hides the radio dot via
|
|
1848
|
+
the same `sr-only` clip pattern as `ui-checkbox` — the native input stays
|
|
1849
|
+
in the DOM for keyboard/a11y, and the card's own border/tint carries the
|
|
1850
|
+
selected state instead.
|
|
1819
1851
|
|
|
1820
1852
|
Import: `import "@f-ewald/components/radio-cards.js";`
|
|
1821
1853
|
|
|
1822
|
-
Properties: `options` (JS property only) : RadioCardOption[], default []; `value` (attribute `value`) : string, default ""; `disabled` (attribute `disabled`) : boolean, default false
|
|
1854
|
+
Properties: `options` (JS property only) : RadioCardOption[], default []; `value` (attribute `value`) : string, default ""; `disabled` (attribute `disabled`) : boolean, default false; `layout` (attribute `layout`) : "vertical" | "horizontal" | "mixed", default "mixed"; `hideInput` (attribute `hide-input`) : boolean, default false
|
|
1823
1855
|
Events: `change`
|
|
1824
|
-
CSS custom properties: `--ui-border`, `--ui-button-accent`, `--ui-button-highlight`, `--ui-button-secondary-surface-muted`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-regular`, `--ui-font-weight-semibold`, `--ui-primary`, `--ui-radius-sm`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
1856
|
+
CSS custom properties: `--ui-border`, `--ui-button-accent`, `--ui-button-highlight`, `--ui-button-secondary-background`, `--ui-button-secondary-background-hover`, `--ui-button-secondary-border`, `--ui-button-secondary-border-hover`, `--ui-button-secondary-surface-muted`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-regular`, `--ui-font-weight-semibold`, `--ui-primary`, `--ui-radius-sm`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
1825
1857
|
|
|
1826
1858
|
Example:
|
|
1827
1859
|
```html
|