@f-ewald/components 1.12.0 → 1.14.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.
Files changed (62) hide show
  1. package/README.md +6 -0
  2. package/custom-elements.json +1376 -49
  3. package/dist/auto-scroll.d.ts +37 -0
  4. package/dist/auto-scroll.d.ts.map +1 -0
  5. package/dist/auto-scroll.js +100 -0
  6. package/dist/auto-scroll.js.map +1 -0
  7. package/dist/form-field.d.ts +39 -0
  8. package/dist/form-field.d.ts.map +1 -0
  9. package/dist/form-field.js +145 -0
  10. package/dist/form-field.js.map +1 -0
  11. package/dist/icons.d.ts +1 -0
  12. package/dist/icons.d.ts.map +1 -1
  13. package/dist/icons.js +1 -0
  14. package/dist/icons.js.map +1 -1
  15. package/dist/index.d.ts +6 -0
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +6 -0
  18. package/dist/index.js.map +1 -1
  19. package/dist/load-more.d.ts +33 -0
  20. package/dist/load-more.d.ts.map +1 -0
  21. package/dist/load-more.js +82 -0
  22. package/dist/load-more.js.map +1 -0
  23. package/dist/map-circle.d.ts +12 -9
  24. package/dist/map-circle.d.ts.map +1 -1
  25. package/dist/map-circle.js +26 -12
  26. package/dist/map-circle.js.map +1 -1
  27. package/dist/map-pin.d.ts +7 -5
  28. package/dist/map-pin.d.ts.map +1 -1
  29. package/dist/map-pin.js +14 -8
  30. package/dist/map-pin.js.map +1 -1
  31. package/dist/percent-bar-chart.d.ts +32 -3
  32. package/dist/percent-bar-chart.d.ts.map +1 -1
  33. package/dist/percent-bar-chart.js +101 -36
  34. package/dist/percent-bar-chart.js.map +1 -1
  35. package/dist/scroll-to-bottom.d.ts +41 -0
  36. package/dist/scroll-to-bottom.d.ts.map +1 -0
  37. package/dist/scroll-to-bottom.js +189 -0
  38. package/dist/scroll-to-bottom.js.map +1 -0
  39. package/dist/scroll-to-top.d.ts +41 -0
  40. package/dist/scroll-to-top.d.ts.map +1 -0
  41. package/dist/scroll-to-top.js +189 -0
  42. package/dist/scroll-to-top.js.map +1 -0
  43. package/dist/ui-checkbox.d.ts +49 -0
  44. package/dist/ui-checkbox.d.ts.map +1 -0
  45. package/dist/ui-checkbox.js +228 -0
  46. package/dist/ui-checkbox.js.map +1 -0
  47. package/dist/utils/scroll.d.ts +9 -0
  48. package/dist/utils/scroll.d.ts.map +1 -0
  49. package/dist/utils/scroll.js +30 -0
  50. package/dist/utils/scroll.js.map +1 -0
  51. package/docs/auto-scroll.md +52 -0
  52. package/docs/form-field.md +63 -0
  53. package/docs/layouts/form-page.md +8 -4
  54. package/docs/load-more.md +43 -0
  55. package/docs/map-circle.md +11 -9
  56. package/docs/map-pin.md +6 -5
  57. package/docs/percent-bar-chart.md +19 -5
  58. package/docs/scroll-to-bottom.md +68 -0
  59. package/docs/scroll-to-top.md +59 -0
  60. package/docs/ui-checkbox.md +58 -0
  61. package/llms.txt +199 -20
  62. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7,6 +7,8 @@ export { RomanNumeral } from "./roman-numeral.js";
7
7
  export { ConfirmDialog } from "./confirm-dialog.js";
8
8
  export { ContentDivider } from "./content-divider.js";
9
9
  export { ToastNotification, notifySuccess, notifyError, notifyInfo, } from "./toast-notification.js";
10
+ export { ScrollToBottom } from "./scroll-to-bottom.js";
11
+ export { ScrollToTop } from "./scroll-to-top.js";
10
12
  export { SlidePanel } from "./slide-panel.js";
11
13
  export { CopyLinkButton } from "./copy-link-button.js";
12
14
  export { RelativeTime } from "./relative-time.js";
@@ -28,7 +30,10 @@ export { StatMeter } from "./stat-meter.js";
28
30
  export { StatusPill } from "./status-pill.js";
29
31
  export { EditableText } from "./editable-text.js";
30
32
  export { LiveTimer } from "./live-timer.js";
33
+ export { LoadMore } from "./load-more.js";
31
34
  export { ChatMessage, } from "./chat-message.js";
35
+ export { UiCheckbox } from "./ui-checkbox.js";
36
+ export { FormField } from "./form-field.js";
32
37
  export { FormSelect } from "./form-select.js";
33
38
  export { MultiSelect, } from "./multi-select.js";
34
39
  export { DataTable } from "./data-table.js";
@@ -57,6 +62,7 @@ export { TextArea } from "./text-area.js";
57
62
  export { LinkCard } from "./link-card.js";
58
63
  export { CardGrid } from "./card-grid.js";
59
64
  export { MarkdownView } from "./markdown-view.js";
65
+ export { AutoScroll } from "./auto-scroll.js";
60
66
  export { formatDuration } from "./utils/duration.js";
61
67
  export { tokens, tokenValues, darkTokenValues } from "./tokens.js";
62
68
  export * from "./icons.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,UAAU,GAEX,MAAM,yBAAyB,CAAC;AACjC,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,wBAAw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alleryItemVariant } 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 { ContentDivider } from \"./content-divider.js\";\nexport {\n ToastNotification,\n notifySuccess,\n notifyError,\n notifyInfo,\n type ToastVariant,\n} from \"./toast-notification.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 { RadioCards, type RadioCardOption } from \"./radio-cards.js\";\nexport { RadioPills, type RadioPillOption } from \"./radio-pills.js\";\nexport { ButtonGroup, type ButtonGroupOption } from \"./button-group.js\";\nexport { UiButton, type ButtonVariant } from \"./ui-button.js\";\nexport { StatMeter } from \"./stat-meter.js\";\nexport { StatusPill, type StatusPillColor } from \"./status-pill.js\";\nexport { EditableText } from \"./editable-text.js\";\nexport { LiveTimer } from \"./live-timer.js\";\nexport {\n ChatMessage,\n type ChatMessageRole,\n type ChatMessageVariant,\n} from \"./chat-message.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 { DropdownButton, type DropdownOption } 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 } from \"./timeline-container.js\";\nexport { TimelineEntry } from \"./timeline-entry.js\";\nexport { CalendarEntry } from \"./calendar-entry.js\";\nexport { CalendarMonth } from \"./calendar-month.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 { formatDuration, type DurationFormat } from \"./utils/duration.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,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AO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAyB,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,WAAW,GAKZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAuB,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAuB,MAAM,qBAAqB,CAAC;AAC1E,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 { ContentDivider } from \"./content-divider.js\";\nexport {\n ToastNotification,\n notifySuccess,\n notifyError,\n notifyInfo,\n type ToastVariant,\n} from \"./toast-notification.js\";\nexport { ScrollToBottom } from \"./scroll-to-bottom.js\";\nexport { ScrollToTop } from \"./scroll-to-top.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 { RadioCards, type RadioCardOption } from \"./radio-cards.js\";\nexport { RadioPills, type RadioPillOption } from \"./radio-pills.js\";\nexport { ButtonGroup, type ButtonGroupOption } from \"./button-group.js\";\nexport { UiButton, type ButtonVariant } from \"./ui-button.js\";\nexport { StatMeter } from \"./stat-meter.js\";\nexport { StatusPill, type StatusPillColor } from \"./status-pill.js\";\nexport { EditableText } from \"./editable-text.js\";\nexport { LiveTimer } from \"./live-timer.js\";\nexport { LoadMore } from \"./load-more.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 { DropdownButton, type DropdownOption } 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 } from \"./timeline-container.js\";\nexport { TimelineEntry } from \"./timeline-entry.js\";\nexport { CalendarEntry } from \"./calendar-entry.js\";\nexport { CalendarMonth } from \"./calendar-month.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 { formatDuration, type DurationFormat } from \"./utils/duration.js\";\nexport { tokens, tokenValues, darkTokenValues } from \"./tokens.js\";\nexport * from \"./icons.js\";\n"]}
@@ -0,0 +1,33 @@
1
+ import { LitElement } from "lit";
2
+ import "./ui-button.js";
3
+ /**
4
+ * Click-to-load button for either end of a list. Fully property-driven: the
5
+ * consumer sets `loading` while a fetch is in flight and `exhausted` once
6
+ * there's nothing left to load; this component never fetches or manages
7
+ * state itself.
8
+ *
9
+ * @element load-more
10
+ * @fires load-more - The button was clicked while not `loading`/`exhausted`;
11
+ * detail: `{ direction }`.
12
+ */
13
+ export declare class LoadMore extends LitElement {
14
+ #private;
15
+ static styles: import("lit").CSSResult[];
16
+ /** Which end of a list this instance loads more content for. */
17
+ direction: "top" | "bottom";
18
+ /** Consumer-managed busy flag, forwarded to the internal `ui-button`'s `busy`. */
19
+ loading: boolean;
20
+ /** Terminal "no more content" state: disables the button and swaps its label. */
21
+ exhausted: boolean;
22
+ /** Button text in the normal (loadable) state. */
23
+ label: string;
24
+ /** Button text shown once `exhausted` is true. */
25
+ exhaustedLabel: string;
26
+ render(): import("lit-html").TemplateResult<1>;
27
+ }
28
+ declare global {
29
+ interface HTMLElementTagNameMap {
30
+ "load-more": LoadMore;
31
+ }
32
+ }
33
+ //# sourceMappingURL=load-more.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-more.d.ts","sourceRoot":"","sources":["../src/load-more.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,gBAAgB,CAAC;AAGxB;;;;;;;;;GASG;AACH,qBACa,QAAS,SAAQ,UAAU;;IACtC,OAAgB,MAAM,4BAQpB;IAEF,gEAAgE;IACpD,SAAS,EAAE,KAAK,GAAG,QAAQ,CAAY;IACnD,kFAAkF;IACrD,OAAO,UAAS;IAC7C,iFAAiF;IACpD,SAAS,UAAS;IAC/C,kDAAkD;IACtC,KAAK,SAAe;IAChC,kDAAkD;IACN,cAAc,SAAqB;IAStE,MAAM,yCAYd;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
@@ -0,0 +1,82 @@
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 } from "lit";
8
+ import { customElement, property } from "lit/decorators.js";
9
+ import "./ui-button.js";
10
+ import { tokens } from "./tokens.js";
11
+ /**
12
+ * Click-to-load button for either end of a list. Fully property-driven: the
13
+ * consumer sets `loading` while a fetch is in flight and `exhausted` once
14
+ * there's nothing left to load; this component never fetches or manages
15
+ * state itself.
16
+ *
17
+ * @element load-more
18
+ * @fires load-more - The button was clicked while not `loading`/`exhausted`;
19
+ * detail: `{ direction }`.
20
+ */
21
+ let LoadMore = class LoadMore extends LitElement {
22
+ constructor() {
23
+ super(...arguments);
24
+ /** Which end of a list this instance loads more content for. */
25
+ this.direction = "bottom";
26
+ /** Consumer-managed busy flag, forwarded to the internal `ui-button`'s `busy`. */
27
+ this.loading = false;
28
+ /** Terminal "no more content" state: disables the button and swaps its label. */
29
+ this.exhausted = false;
30
+ /** Button text in the normal (loadable) state. */
31
+ this.label = "Load more";
32
+ /** Button text shown once `exhausted` is true. */
33
+ this.exhaustedLabel = "No more results";
34
+ }
35
+ static { this.styles = [
36
+ tokens,
37
+ css `
38
+ :host {
39
+ display: block;
40
+ text-align: center;
41
+ }
42
+ `,
43
+ ]; }
44
+ #onClick() {
45
+ if (this.loading || this.exhausted)
46
+ return;
47
+ this.dispatchEvent(new CustomEvent("load-more", { detail: { direction: this.direction }, bubbles: true, composed: true }));
48
+ }
49
+ render() {
50
+ return html `
51
+ <ui-button
52
+ type="button"
53
+ variant="secondary"
54
+ ?busy=${this.loading}
55
+ ?disabled=${this.exhausted}
56
+ @click=${() => this.#onClick()}
57
+ >
58
+ ${this.exhausted ? this.exhaustedLabel : this.label}
59
+ </ui-button>
60
+ `;
61
+ }
62
+ };
63
+ __decorate([
64
+ property()
65
+ ], LoadMore.prototype, "direction", void 0);
66
+ __decorate([
67
+ property({ type: Boolean })
68
+ ], LoadMore.prototype, "loading", void 0);
69
+ __decorate([
70
+ property({ type: Boolean })
71
+ ], LoadMore.prototype, "exhausted", void 0);
72
+ __decorate([
73
+ property()
74
+ ], LoadMore.prototype, "label", void 0);
75
+ __decorate([
76
+ property({ attribute: "exhausted-label" })
77
+ ], LoadMore.prototype, "exhaustedLabel", void 0);
78
+ LoadMore = __decorate([
79
+ customElement("load-more")
80
+ ], LoadMore);
81
+ export { LoadMore };
82
+ //# sourceMappingURL=load-more.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-more.js","sourceRoot":"","sources":["../src/load-more.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;;;;GASG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,UAAU;IAAjC;;QAWL,gEAAgE;QACpD,cAAS,GAAqB,QAAQ,CAAC;QACnD,kFAAkF;QACrD,YAAO,GAAG,KAAK,CAAC;QAC7C,iFAAiF;QACpD,cAAS,GAAG,KAAK,CAAC;QAC/C,kDAAkD;QACtC,UAAK,GAAG,WAAW,CAAC;QAChC,kDAAkD;QACN,mBAAc,GAAG,iBAAiB,CAAC;IAsBjF,CAAC;aAzCiB,WAAM,GAAG;QACvB,MAAM;QACN,GAAG,CAAA;;;;;KAKF;KACF,AARqB,CAQpB;IAaF,QAAQ;QACN,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS;YAAE,OAAO;QAC3C,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CACvG,CAAC;IACJ,CAAC;IAEQ,MAAM;QACb,OAAO,IAAI,CAAA;;;;gBAIC,IAAI,CAAC,OAAO;oBACR,IAAI,CAAC,SAAS;iBACjB,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE;;UAE5B,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK;;KAEtD,CAAC;IACJ,CAAC;CACF,CAAA;AA9Ba;IAAX,QAAQ,EAAE;2CAAwC;AAEtB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCAAiB;AAEhB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2CAAmB;AAEnC;IAAX,QAAQ,EAAE;uCAAqB;AAEY;IAA3C,QAAQ,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;gDAAoC;AApBpE,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CA0CpB","sourcesContent":["import { LitElement, css, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport \"./ui-button.js\";\nimport { tokens } from \"./tokens.js\";\n\n/**\n * Click-to-load button for either end of a list. Fully property-driven: the\n * consumer sets `loading` while a fetch is in flight and `exhausted` once\n * there's nothing left to load; this component never fetches or manages\n * state itself.\n *\n * @element load-more\n * @fires load-more - The button was clicked while not `loading`/`exhausted`;\n * detail: `{ direction }`.\n */\n@customElement(\"load-more\")\nexport class LoadMore extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: block;\n text-align: center;\n }\n `,\n ];\n\n /** Which end of a list this instance loads more content for. */\n @property() direction: \"top\" | \"bottom\" = \"bottom\";\n /** Consumer-managed busy flag, forwarded to the internal `ui-button`'s `busy`. */\n @property({ type: Boolean }) loading = false;\n /** Terminal \"no more content\" state: disables the button and swaps its label. */\n @property({ type: Boolean }) exhausted = false;\n /** Button text in the normal (loadable) state. */\n @property() label = \"Load more\";\n /** Button text shown once `exhausted` is true. */\n @property({ attribute: \"exhausted-label\" }) exhaustedLabel = \"No more results\";\n\n #onClick(): void {\n if (this.loading || this.exhausted) return;\n this.dispatchEvent(\n new CustomEvent(\"load-more\", { detail: { direction: this.direction }, bubbles: true, composed: true }),\n );\n }\n\n override render() {\n return html`\n <ui-button\n type=\"button\"\n variant=\"secondary\"\n ?busy=${this.loading}\n ?disabled=${this.exhausted}\n @click=${() => this.#onClick()}\n >\n ${this.exhausted ? this.exhaustedLabel : this.label}\n </ui-button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"load-more\": LoadMore;\n }\n}\n"]}
@@ -1,13 +1,14 @@
1
1
  import { LitElement } from "lit";
2
2
  /**
3
- * A plain circular map marker: a light-to-dark gradient fill with a white
4
- * outer ring, no point/tail (unlike `<map-pin>`) — for markers that don't
5
- * need to visually "point" at their exact coordinate. Purely a visual
6
- * primitive — it has no `mapbox-gl` (or any mapping library) dependency;
7
- * the consumer positions it, e.g. via `new mapboxgl.Marker({ element: el })`.
8
- * It can also replace the former `<map-point>` dense-layer primitive: use
9
- * `size="14" ring-width="3"`, leave the slot empty, and rasterize one marker
10
- * per color for use as a map `icon-image`.
3
+ * A plain circular map marker: a radial-gradient fill with a soft highlight
4
+ * and a translucent white outer ring, no point/tail (unlike `<map-pin>`) —
5
+ * for markers that don't need to visually "point" at their exact
6
+ * coordinate. Purely a visual primitive — it has no `mapbox-gl` (or any
7
+ * mapping library) dependency; the consumer positions it, e.g. via
8
+ * `new mapboxgl.Marker({ element: el })`. It can also replace the former
9
+ * `<map-point>` dense-layer primitive: use `size="14" ring-width="3"`, leave
10
+ * the slot empty, and rasterize one marker per color for use as a map
11
+ * `icon-image`.
11
12
  *
12
13
  * @element map-circle
13
14
  * @slot - Optional badge content shown centered on the circle — a rank
@@ -15,12 +16,14 @@ import { LitElement } from "lit";
15
16
  */
16
17
  export declare class MapCircle extends LitElement {
17
18
  static styles: import("lit").CSSResult[];
18
- /** Fill color; the gradient's light (top) and dark (bottom) stops are derived from this. */
19
+ /** Fill color; the gradient's light (highlight) and dark (edge) stops are derived from this. */
19
20
  color: string;
20
21
  /** Diameter, in CSS pixels. */
21
22
  size: number;
22
23
  /** White outer ring thickness, in the same viewBox units as `size` (scales with it). */
23
24
  ringWidth: number;
25
+ /** Outer ring opacity, 0-1 (Apple Maps-style rings are translucent, not solid white). */
26
+ ringOpacity: number;
24
27
  /** Scales and glows the circle — a generic emphasis state (e.g. hover, selection). */
25
28
  highlighted: boolean;
26
29
  private readonly _gradId;
@@ -1 +1 @@
1
- {"version":3,"file":"map-circle.d.ts","sourceRoot":"","sources":["../src/map-circle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAO5C;;;;;;;;;;;;;GAaG;AACH,qBACa,SAAU,SAAQ,UAAU;IACvC,OAAgB,MAAM,4BA4CpB;IAEF,4FAA4F;IAChF,KAAK,SAAa;IAC9B,+BAA+B;IACH,IAAI,SAAM;IACtC,wFAAwF;IACnC,SAAS,SAAK;IACnE,sFAAsF;IAC1C,WAAW,UAAS;IAEhE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA4C;IAE3D,MAAM,yCAwBd;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
1
+ {"version":3,"file":"map-circle.d.ts","sourceRoot":"","sources":["../src/map-circle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAO5C;;;;;;;;;;;;;;GAcG;AACH,qBACa,SAAU,SAAQ,UAAU;IACvC,OAAgB,MAAM,4BA6CpB;IAEF,gGAAgG;IACpF,KAAK,SAAa;IAC9B,+BAA+B;IACH,IAAI,SAAM;IACtC,wFAAwF;IACnC,SAAS,SAAK;IACnE,yFAAyF;IAClC,WAAW,SAAO;IACzE,sFAAsF;IAC1C,WAAW,UAAS;IAEhE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA4C;IAE3D,MAAM,yCA+Bd;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
@@ -10,14 +10,15 @@ import { tokens } from "./tokens.js";
10
10
  import { mixHex } from "./utils/color.js";
11
11
  let gradientIdCounter = 0;
12
12
  /**
13
- * A plain circular map marker: a light-to-dark gradient fill with a white
14
- * outer ring, no point/tail (unlike `<map-pin>`) — for markers that don't
15
- * need to visually "point" at their exact coordinate. Purely a visual
16
- * primitive — it has no `mapbox-gl` (or any mapping library) dependency;
17
- * the consumer positions it, e.g. via `new mapboxgl.Marker({ element: el })`.
18
- * It can also replace the former `<map-point>` dense-layer primitive: use
19
- * `size="14" ring-width="3"`, leave the slot empty, and rasterize one marker
20
- * per color for use as a map `icon-image`.
13
+ * A plain circular map marker: a radial-gradient fill with a soft highlight
14
+ * and a translucent white outer ring, no point/tail (unlike `<map-pin>`) —
15
+ * for markers that don't need to visually "point" at their exact
16
+ * coordinate. Purely a visual primitive — it has no `mapbox-gl` (or any
17
+ * mapping library) dependency; the consumer positions it, e.g. via
18
+ * `new mapboxgl.Marker({ element: el })`. It can also replace the former
19
+ * `<map-point>` dense-layer primitive: use `size="14" ring-width="3"`, leave
20
+ * the slot empty, and rasterize one marker per color for use as a map
21
+ * `icon-image`.
21
22
  *
22
23
  * @element map-circle
23
24
  * @slot - Optional badge content shown centered on the circle — a rank
@@ -26,12 +27,14 @@ let gradientIdCounter = 0;
26
27
  let MapCircle = class MapCircle extends LitElement {
27
28
  constructor() {
28
29
  super(...arguments);
29
- /** Fill color; the gradient's light (top) and dark (bottom) stops are derived from this. */
30
+ /** Fill color; the gradient's light (highlight) and dark (edge) stops are derived from this. */
30
31
  this.color = "#4f46e5";
31
32
  /** Diameter, in CSS pixels. */
32
33
  this.size = 18;
33
34
  /** White outer ring thickness, in the same viewBox units as `size` (scales with it). */
34
35
  this.ringWidth = 4;
36
+ /** Outer ring opacity, 0-1 (Apple Maps-style rings are translucent, not solid white). */
37
+ this.ringOpacity = 0.6;
35
38
  /** Scales and glows the circle — a generic emphasis state (e.g. hover, selection). */
36
39
  this.highlighted = false;
37
40
  this._gradId = `map-circle-grad-${gradientIdCounter++}`;
@@ -46,6 +49,7 @@ let MapCircle = class MapCircle extends LitElement {
46
49
  }
47
50
  svg {
48
51
  display: block;
52
+ filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.25));
49
53
  transition: transform 120ms ease, filter 120ms ease;
50
54
  }
51
55
  :host([highlighted]) svg {
@@ -94,12 +98,19 @@ let MapCircle = class MapCircle extends LitElement {
94
98
  xmlns="http://www.w3.org/2000/svg"
95
99
  >
96
100
  <defs>
97
- <linearGradient id=${this._gradId} x1="0" y1="0" x2="0" y2="1">
101
+ <radialGradient id=${this._gradId} cx="35%" cy="30%" r="75%">
98
102
  <stop offset="0%" stop-color=${light} />
99
103
  <stop offset="100%" stop-color=${dark} />
100
- </linearGradient>
104
+ </radialGradient>
101
105
  </defs>
102
- <circle cx="16" cy="16" r="13" fill="url(#${this._gradId})" stroke="#ffffff" stroke-width=${this.ringWidth} />
106
+ <circle
107
+ cx="16"
108
+ cy="16"
109
+ r="13"
110
+ fill="url(#${this._gradId})"
111
+ stroke="rgb(255 255 255 / ${this.ringOpacity})"
112
+ stroke-width=${this.ringWidth}
113
+ />
103
114
  </svg>
104
115
  <div class="content" style="font-size:${Math.round(this.size * 0.4)}px">
105
116
  <slot></slot>
@@ -116,6 +127,9 @@ __decorate([
116
127
  __decorate([
117
128
  property({ type: Number, attribute: "ring-width" })
118
129
  ], MapCircle.prototype, "ringWidth", void 0);
130
+ __decorate([
131
+ property({ type: Number, attribute: "ring-opacity" })
132
+ ], MapCircle.prototype, "ringOpacity", void 0);
119
133
  __decorate([
120
134
  property({ type: Boolean, reflect: true })
121
135
  ], MapCircle.prototype, "highlighted", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"map-circle.js","sourceRoot":"","sources":["../src/map-circle.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,IAAI,iBAAiB,GAAG,CAAC,CAAC;AAE1B;;;;;;;;;;;;;GAaG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAAlC;;QA+CL,4FAA4F;QAChF,UAAK,GAAG,SAAS,CAAC;QAC9B,+BAA+B;QACH,SAAI,GAAG,EAAE,CAAC;QACtC,wFAAwF;QACnC,cAAS,GAAG,CAAC,CAAC;QACnE,sFAAsF;QAC1C,gBAAW,GAAG,KAAK,CAAC;QAE/C,YAAO,GAAG,mBAAmB,iBAAiB,EAAE,EAAE,CAAC;IA2BtE,CAAC;aAlFiB,WAAM,GAAG;QACvB,MAAM;QACN,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAyCF;KACF,AA5CqB,CA4CpB;IAaO,MAAM;QACb,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;QAChD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAA;;;gBAGC,IAAI,CAAC,IAAI;iBACR,IAAI,CAAC,IAAI;;;;;;+BAMK,IAAI,CAAC,OAAO;2CACA,KAAK;6CACH,IAAI;;;oDAGG,IAAI,CAAC,OAAO,oCAAoC,IAAI,CAAC,SAAS;;8CAEpE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;;;KAGpE,CAAC;IACJ,CAAC;CACF,CAAA;AAnCa;IAAX,QAAQ,EAAE;wCAAmB;AAEF;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCAAW;AAEe;IAApD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;4CAAe;AAEvB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAqB;AAtDrD,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAmFrB","sourcesContent":["import { LitElement, css, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { tokens } from \"./tokens.js\";\nimport { mixHex } from \"./utils/color.js\";\n\nlet gradientIdCounter = 0;\n\n/**\n * A plain circular map marker: a light-to-dark gradient fill with a white\n * outer ring, no point/tail (unlike `<map-pin>`) for markers that don't\n * need to visually \"point\" at their exact coordinate. Purely a visual\n * primitive — it has no `mapbox-gl` (or any mapping library) dependency;\n * the consumer positions it, e.g. via `new mapboxgl.Marker({ element: el })`.\n * It can also replace the former `<map-point>` dense-layer primitive: use\n * `size=\"14\" ring-width=\"3\"`, leave the slot empty, and rasterize one marker\n * per color for use as a map `icon-image`.\n *\n * @element map-circle\n * @slot - Optional badge content shown centered on the circle — a rank\n * number, an emoji, a small icon.\n */\n@customElement(\"map-circle\")\nexport class MapCircle extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: inline-block;\n position: relative;\n line-height: 0;\n }\n svg {\n display: block;\n transition: transform 120ms ease, filter 120ms ease;\n }\n :host([highlighted]) svg {\n transform: scale(1.12);\n filter: brightness(1.08) drop-shadow(0 0 5px rgb(0 0 0 / 0.35));\n }\n .content {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n color: #fff;\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-weight: var(--ui-font-weight-bold, 700);\n line-height: var(--ui-line-height-glyph, 1);\n text-shadow: 0 1px 2px rgb(0 0 0 / 0.35);\n pointer-events: none;\n white-space: nowrap;\n }\n @media (prefers-reduced-motion: reduce) {\n svg {\n transition: none;\n }\n }\n `,\n ];\n\n /** Fill color; the gradient's light (top) and dark (bottom) stops are derived from this. */\n @property() color = \"#4f46e5\";\n /** Diameter, in CSS pixels. */\n @property({ type: Number }) size = 18;\n /** White outer ring thickness, in the same viewBox units as `size` (scales with it). */\n @property({ type: Number, attribute: \"ring-width\" }) ringWidth = 4;\n /** Scales and glows the circle — a generic emphasis state (e.g. hover, selection). */\n @property({ type: Boolean, reflect: true }) highlighted = false;\n\n private readonly _gradId = `map-circle-grad-${gradientIdCounter++}`;\n\n override render() {\n const light = mixHex(this.color, \"#ffffff\", 30);\n const dark = mixHex(this.color, \"#000000\", 30);\n return html`\n <svg\n aria-hidden=\"true\"\n width=${this.size}\n height=${this.size}\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <defs>\n <linearGradient id=${this._gradId} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0%\" stop-color=${light} />\n <stop offset=\"100%\" stop-color=${dark} />\n </linearGradient>\n </defs>\n <circle cx=\"16\" cy=\"16\" r=\"13\" fill=\"url(#${this._gradId})\" stroke=\"#ffffff\" stroke-width=${this.ringWidth} />\n </svg>\n <div class=\"content\" style=\"font-size:${Math.round(this.size * 0.4)}px\">\n <slot></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"map-circle\": MapCircle;\n }\n}\n"]}
1
+ {"version":3,"file":"map-circle.js","sourceRoot":"","sources":["../src/map-circle.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,IAAI,iBAAiB,GAAG,CAAC,CAAC;AAE1B;;;;;;;;;;;;;;GAcG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAAlC;;QAgDL,gGAAgG;QACpF,UAAK,GAAG,SAAS,CAAC;QAC9B,+BAA+B;QACH,SAAI,GAAG,EAAE,CAAC;QACtC,wFAAwF;QACnC,cAAS,GAAG,CAAC,CAAC;QACnE,yFAAyF;QAClC,gBAAW,GAAG,GAAG,CAAC;QACzE,sFAAsF;QAC1C,gBAAW,GAAG,KAAK,CAAC;QAE/C,YAAO,GAAG,mBAAmB,iBAAiB,EAAE,EAAE,CAAC;IAkCtE,CAAC;aA5FiB,WAAM,GAAG;QACvB,MAAM;QACN,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0CF;KACF,AA7CqB,CA6CpB;IAeO,MAAM;QACb,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;QAChD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAA;;;gBAGC,IAAI,CAAC,IAAI;iBACR,IAAI,CAAC,IAAI;;;;;;+BAMK,IAAI,CAAC,OAAO;2CACA,KAAK;6CACH,IAAI;;;;;;;uBAO1B,IAAI,CAAC,OAAO;sCACG,IAAI,CAAC,WAAW;yBAC7B,IAAI,CAAC,SAAS;;;8CAGO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;;;KAGpE,CAAC;IACJ,CAAC;CACF,CAAA;AA5Ca;IAAX,QAAQ,EAAE;wCAAmB;AAEF;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCAAW;AAEe;IAApD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;4CAAe;AAEZ;IAAtD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;8CAAmB;AAE7B;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAqB;AAzDrD,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA6FrB","sourcesContent":["import { LitElement, css, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { tokens } from \"./tokens.js\";\nimport { mixHex } from \"./utils/color.js\";\n\nlet gradientIdCounter = 0;\n\n/**\n * A plain circular map marker: a radial-gradient fill with a soft highlight\n * and a translucent white outer ring, no point/tail (unlike `<map-pin>`) —\n * for markers that don't need to visually \"point\" at their exact\n * coordinate. Purely a visual primitive — it has no `mapbox-gl` (or any\n * mapping library) dependency; the consumer positions it, e.g. via\n * `new mapboxgl.Marker({ element: el })`. It can also replace the former\n * `<map-point>` dense-layer primitive: use `size=\"14\" ring-width=\"3\"`, leave\n * the slot empty, and rasterize one marker per color for use as a map\n * `icon-image`.\n *\n * @element map-circle\n * @slot - Optional badge content shown centered on the circle — a rank\n * number, an emoji, a small icon.\n */\n@customElement(\"map-circle\")\nexport class MapCircle extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: inline-block;\n position: relative;\n line-height: 0;\n }\n svg {\n display: block;\n filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.25));\n transition: transform 120ms ease, filter 120ms ease;\n }\n :host([highlighted]) svg {\n transform: scale(1.12);\n filter: brightness(1.08) drop-shadow(0 0 5px rgb(0 0 0 / 0.35));\n }\n .content {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n color: #fff;\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-weight: var(--ui-font-weight-bold, 700);\n line-height: var(--ui-line-height-glyph, 1);\n text-shadow: 0 1px 2px rgb(0 0 0 / 0.35);\n pointer-events: none;\n white-space: nowrap;\n }\n @media (prefers-reduced-motion: reduce) {\n svg {\n transition: none;\n }\n }\n `,\n ];\n\n /** Fill color; the gradient's light (highlight) and dark (edge) stops are derived from this. */\n @property() color = \"#4f46e5\";\n /** Diameter, in CSS pixels. */\n @property({ type: Number }) size = 18;\n /** White outer ring thickness, in the same viewBox units as `size` (scales with it). */\n @property({ type: Number, attribute: \"ring-width\" }) ringWidth = 4;\n /** Outer ring opacity, 0-1 (Apple Maps-style rings are translucent, not solid white). */\n @property({ type: Number, attribute: \"ring-opacity\" }) ringOpacity = 0.6;\n /** Scales and glows the circle — a generic emphasis state (e.g. hover, selection). */\n @property({ type: Boolean, reflect: true }) highlighted = false;\n\n private readonly _gradId = `map-circle-grad-${gradientIdCounter++}`;\n\n override render() {\n const light = mixHex(this.color, \"#ffffff\", 30);\n const dark = mixHex(this.color, \"#000000\", 30);\n return html`\n <svg\n aria-hidden=\"true\"\n width=${this.size}\n height=${this.size}\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <defs>\n <radialGradient id=${this._gradId} cx=\"35%\" cy=\"30%\" r=\"75%\">\n <stop offset=\"0%\" stop-color=${light} />\n <stop offset=\"100%\" stop-color=${dark} />\n </radialGradient>\n </defs>\n <circle\n cx=\"16\"\n cy=\"16\"\n r=\"13\"\n fill=\"url(#${this._gradId})\"\n stroke=\"rgb(255 255 255 / ${this.ringOpacity})\"\n stroke-width=${this.ringWidth}\n />\n </svg>\n <div class=\"content\" style=\"font-size:${Math.round(this.size * 0.4)}px\">\n <slot></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"map-circle\": MapCircle;\n }\n}\n"]}
package/dist/map-pin.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { LitElement } from "lit";
2
2
  /**
3
- * A circular "Apple Maps"-style map pin: a light-to-dark gradient fill with
4
- * a slight point at the bottom. Purely a visual primitive — it has no
5
- * `mapbox-gl` (or any mapping library) dependency; the consumer positions
6
- * it, e.g. via `new mapboxgl.Marker({ element: pinEl })`.
3
+ * A circular "Apple Maps"-style map pin: a radial-gradient fill with a soft
4
+ * highlight and a slight point at the bottom. Purely a visual primitive —
5
+ * it has no `mapbox-gl` (or any mapping library) dependency; the consumer
6
+ * positions it, e.g. via `new mapboxgl.Marker({ element: pinEl })`.
7
7
  *
8
8
  * @element map-pin
9
9
  * @slot - Badge content shown centered on the pin's circular head — a rank
@@ -11,10 +11,12 @@ import { LitElement } from "lit";
11
11
  */
12
12
  export declare class MapPin extends LitElement {
13
13
  static styles: import("lit").CSSResult[];
14
- /** Fill color; the gradient's light (top) and dark (bottom) stops are derived from this. */
14
+ /** Fill color; the gradient's light (highlight) and dark (edge) stops are derived from this. */
15
15
  color: string;
16
16
  /** Diameter of the circular head, in CSS pixels. */
17
17
  size: number;
18
+ /** Outer ring opacity, 0-1 (Apple Maps-style rings are translucent, not solid white). */
19
+ ringOpacity: number;
18
20
  /** Scales and glows the pin — a generic emphasis state (e.g. hover, selection). */
19
21
  highlighted: boolean;
20
22
  private readonly _gradId;
@@ -1 +1 @@
1
- {"version":3,"file":"map-pin.d.ts","sourceRoot":"","sources":["../src/map-pin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAO5C;;;;;;;;;GASG;AACH,qBACa,MAAO,SAAQ,UAAU;IACpC,OAAgB,MAAM,4BA+CpB;IAEF,4FAA4F;IAChF,KAAK,SAAa;IAC9B,oDAAoD;IACxB,IAAI,SAAM;IACtC,mFAAmF;IACvC,WAAW,UAAS;IAEhE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyC;IAExD,MAAM,yCA8Bd;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,MAAM,CAAC;KACnB;CACF"}
1
+ {"version":3,"file":"map-pin.d.ts","sourceRoot":"","sources":["../src/map-pin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAO5C;;;;;;;;;GASG;AACH,qBACa,MAAO,SAAQ,UAAU;IACpC,OAAgB,MAAM,4BAgDpB;IAEF,gGAAgG;IACpF,KAAK,SAAa;IAC9B,oDAAoD;IACxB,IAAI,SAAM;IACtC,yFAAyF;IAClC,WAAW,SAAO;IACzE,mFAAmF;IACvC,WAAW,UAAS;IAEhE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyC;IAExD,MAAM,yCA8Bd;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,MAAM,CAAC;KACnB;CACF"}
package/dist/map-pin.js CHANGED
@@ -10,10 +10,10 @@ import { tokens } from "./tokens.js";
10
10
  import { mixHex } from "./utils/color.js";
11
11
  let gradientIdCounter = 0;
12
12
  /**
13
- * A circular "Apple Maps"-style map pin: a light-to-dark gradient fill with
14
- * a slight point at the bottom. Purely a visual primitive — it has no
15
- * `mapbox-gl` (or any mapping library) dependency; the consumer positions
16
- * it, e.g. via `new mapboxgl.Marker({ element: pinEl })`.
13
+ * A circular "Apple Maps"-style map pin: a radial-gradient fill with a soft
14
+ * highlight and a slight point at the bottom. Purely a visual primitive —
15
+ * it has no `mapbox-gl` (or any mapping library) dependency; the consumer
16
+ * positions it, e.g. via `new mapboxgl.Marker({ element: pinEl })`.
17
17
  *
18
18
  * @element map-pin
19
19
  * @slot - Badge content shown centered on the pin's circular head — a rank
@@ -22,10 +22,12 @@ let gradientIdCounter = 0;
22
22
  let MapPin = class MapPin extends LitElement {
23
23
  constructor() {
24
24
  super(...arguments);
25
- /** Fill color; the gradient's light (top) and dark (bottom) stops are derived from this. */
25
+ /** Fill color; the gradient's light (highlight) and dark (edge) stops are derived from this. */
26
26
  this.color = "#4f46e5";
27
27
  /** Diameter of the circular head, in CSS pixels. */
28
28
  this.size = 32;
29
+ /** Outer ring opacity, 0-1 (Apple Maps-style rings are translucent, not solid white). */
30
+ this.ringOpacity = 0.6;
29
31
  /** Scales and glows the pin — a generic emphasis state (e.g. hover, selection). */
30
32
  this.highlighted = false;
31
33
  this._gradId = `map-pin-grad-${gradientIdCounter++}`;
@@ -40,6 +42,7 @@ let MapPin = class MapPin extends LitElement {
40
42
  }
41
43
  svg {
42
44
  display: block;
45
+ filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.25));
43
46
  transition: transform 120ms ease, filter 120ms ease;
44
47
  }
45
48
  :host([highlighted]) svg {
@@ -92,15 +95,15 @@ let MapPin = class MapPin extends LitElement {
92
95
  xmlns="http://www.w3.org/2000/svg"
93
96
  >
94
97
  <defs>
95
- <linearGradient id=${this._gradId} x1="0" y1="0" x2="0" y2="1">
98
+ <radialGradient id=${this._gradId} gradientUnits="userSpaceOnUse" cx="12" cy="9" r="18">
96
99
  <stop offset="0%" stop-color=${light} />
97
100
  <stop offset="100%" stop-color=${dark} />
98
- </linearGradient>
101
+ </radialGradient>
99
102
  </defs>
100
103
  <path
101
104
  d="M16 30 C10 24 4 19.5 4 13 A12 12 0 1 1 28 13 C28 19.5 22 24 16 30 Z"
102
105
  fill="url(#${this._gradId})"
103
- stroke="#ffffff"
106
+ stroke="rgb(255 255 255 / ${this.ringOpacity})"
104
107
  stroke-width="1.5"
105
108
  />
106
109
  </svg>
@@ -116,6 +119,9 @@ __decorate([
116
119
  __decorate([
117
120
  property({ type: Number })
118
121
  ], MapPin.prototype, "size", void 0);
122
+ __decorate([
123
+ property({ type: Number, attribute: "ring-opacity" })
124
+ ], MapPin.prototype, "ringOpacity", void 0);
119
125
  __decorate([
120
126
  property({ type: Boolean, reflect: true })
121
127
  ], MapPin.prototype, "highlighted", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"map-pin.js","sourceRoot":"","sources":["../src/map-pin.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,IAAI,iBAAiB,GAAG,CAAC,CAAC;AAE1B;;;;;;;;;GASG;AAEI,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,UAAU;IAA/B;;QAkDL,4FAA4F;QAChF,UAAK,GAAG,SAAS,CAAC;QAC9B,oDAAoD;QACxB,SAAI,GAAG,EAAE,CAAC;QACtC,mFAAmF;QACvC,gBAAW,GAAG,KAAK,CAAC;QAE/C,YAAO,GAAG,gBAAgB,iBAAiB,EAAE,EAAE,CAAC;IAiCnE,CAAC;aAzFiB,WAAM,GAAG;QACvB,MAAM;QACN,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4CF;KACF,AA/CqB,CA+CpB;IAWO,MAAM;QACb,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;QAChD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;QAC/C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;QACjD,OAAO,IAAI,CAAA;;;gBAGC,IAAI,CAAC,IAAI;iBACR,MAAM;;;;;;+BAMQ,IAAI,CAAC,OAAO;2CACA,KAAK;6CACH,IAAI;;;;;uBAK1B,IAAI,CAAC,OAAO;;;;;8CAKW,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;;;KAGpE,CAAC;IACJ,CAAC;CACF,CAAA;AAvCa;IAAX,QAAQ,EAAE;qCAAmB;AAEF;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oCAAW;AAEM;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAAqB;AAvDrD,MAAM;IADlB,aAAa,CAAC,SAAS,CAAC;GACZ,MAAM,CA0FlB","sourcesContent":["import { LitElement, css, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { tokens } from \"./tokens.js\";\nimport { mixHex } from \"./utils/color.js\";\n\nlet gradientIdCounter = 0;\n\n/**\n * A circular \"Apple Maps\"-style map pin: a light-to-dark gradient fill with\n * a slight point at the bottom. Purely a visual primitive it has no\n * `mapbox-gl` (or any mapping library) dependency; the consumer positions\n * it, e.g. via `new mapboxgl.Marker({ element: pinEl })`.\n *\n * @element map-pin\n * @slot - Badge content shown centered on the pin's circular head — a rank\n * number, an emoji, a small icon.\n */\n@customElement(\"map-pin\")\nexport class MapPin extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: inline-block;\n position: relative;\n line-height: 0;\n }\n svg {\n display: block;\n transition: transform 120ms ease, filter 120ms ease;\n }\n :host([highlighted]) svg {\n transform: scale(1.12);\n filter: brightness(1.08) drop-shadow(0 0 5px rgb(0 0 0 / 0.35));\n }\n .content {\n position: absolute;\n /* The path's circular head is centered at viewBox y=13 of 34 total\n (13/34 ≈ 38%) — not the pin's full bounding box, which is pulled\n down by the point below the circle. */\n top: 38%;\n left: 50%;\n transform: translate(-50%, -50%);\n color: #fff;\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-weight: var(--ui-font-weight-bold, 700);\n line-height: var(--ui-line-height-glyph, 1);\n text-shadow: 0 1px 2px rgb(0 0 0 / 0.35);\n pointer-events: none;\n white-space: nowrap;\n }\n @media (prefers-reduced-motion: reduce) {\n svg {\n transition: none;\n }\n }\n `,\n ];\n\n /** Fill color; the gradient's light (top) and dark (bottom) stops are derived from this. */\n @property() color = \"#4f46e5\";\n /** Diameter of the circular head, in CSS pixels. */\n @property({ type: Number }) size = 32;\n /** Scales and glows the pin — a generic emphasis state (e.g. hover, selection). */\n @property({ type: Boolean, reflect: true }) highlighted = false;\n\n private readonly _gradId = `map-pin-grad-${gradientIdCounter++}`;\n\n override render() {\n const light = mixHex(this.color, \"#ffffff\", 30);\n const dark = mixHex(this.color, \"#000000\", 30);\n const height = Math.round(this.size * (34 / 32));\n return html`\n <svg\n aria-hidden=\"true\"\n width=${this.size}\n height=${height}\n viewBox=\"0 0 32 34\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <defs>\n <linearGradient id=${this._gradId} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0%\" stop-color=${light} />\n <stop offset=\"100%\" stop-color=${dark} />\n </linearGradient>\n </defs>\n <path\n d=\"M16 30 C10 24 4 19.5 4 13 A12 12 0 1 1 28 13 C28 19.5 22 24 16 30 Z\"\n fill=\"url(#${this._gradId})\"\n stroke=\"#ffffff\"\n stroke-width=\"1.5\"\n />\n </svg>\n <div class=\"content\" style=\"font-size:${Math.round(this.size * 0.4)}px\">\n <slot></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"map-pin\": MapPin;\n }\n}\n"]}
1
+ {"version":3,"file":"map-pin.js","sourceRoot":"","sources":["../src/map-pin.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,IAAI,iBAAiB,GAAG,CAAC,CAAC;AAE1B;;;;;;;;;GASG;AAEI,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,UAAU;IAA/B;;QAmDL,gGAAgG;QACpF,UAAK,GAAG,SAAS,CAAC;QAC9B,oDAAoD;QACxB,SAAI,GAAG,EAAE,CAAC;QACtC,yFAAyF;QAClC,gBAAW,GAAG,GAAG,CAAC;QACzE,mFAAmF;QACvC,gBAAW,GAAG,KAAK,CAAC;QAE/C,YAAO,GAAG,gBAAgB,iBAAiB,EAAE,EAAE,CAAC;IAiCnE,CAAC;aA5FiB,WAAM,GAAG;QACvB,MAAM;QACN,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6CF;KACF,AAhDqB,CAgDpB;IAaO,MAAM;QACb,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;QAChD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;QAC/C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;QACjD,OAAO,IAAI,CAAA;;;gBAGC,IAAI,CAAC,IAAI;iBACR,MAAM;;;;;;+BAMQ,IAAI,CAAC,OAAO;2CACA,KAAK;6CACH,IAAI;;;;;uBAK1B,IAAI,CAAC,OAAO;sCACG,IAAI,CAAC,WAAW;;;;8CAIR,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;;;KAGpE,CAAC;IACJ,CAAC;CACF,CAAA;AAzCa;IAAX,QAAQ,EAAE;qCAAmB;AAEF;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oCAAW;AAEiB;IAAtD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;2CAAmB;AAE7B;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAAqB;AA1DrD,MAAM;IADlB,aAAa,CAAC,SAAS,CAAC;GACZ,MAAM,CA6FlB","sourcesContent":["import { LitElement, css, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { tokens } from \"./tokens.js\";\nimport { mixHex } from \"./utils/color.js\";\n\nlet gradientIdCounter = 0;\n\n/**\n * A circular \"Apple Maps\"-style map pin: a radial-gradient fill with a soft\n * highlight and a slight point at the bottom. Purely a visual primitive —\n * it has no `mapbox-gl` (or any mapping library) dependency; the consumer\n * positions it, e.g. via `new mapboxgl.Marker({ element: pinEl })`.\n *\n * @element map-pin\n * @slot - Badge content shown centered on the pin's circular head — a rank\n * number, an emoji, a small icon.\n */\n@customElement(\"map-pin\")\nexport class MapPin extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: inline-block;\n position: relative;\n line-height: 0;\n }\n svg {\n display: block;\n filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.25));\n transition: transform 120ms ease, filter 120ms ease;\n }\n :host([highlighted]) svg {\n transform: scale(1.12);\n filter: brightness(1.08) drop-shadow(0 0 5px rgb(0 0 0 / 0.35));\n }\n .content {\n position: absolute;\n /* The path's circular head is centered at viewBox y=13 of 34 total\n (13/34 ≈ 38%) — not the pin's full bounding box, which is pulled\n down by the point below the circle. */\n top: 38%;\n left: 50%;\n transform: translate(-50%, -50%);\n color: #fff;\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-weight: var(--ui-font-weight-bold, 700);\n line-height: var(--ui-line-height-glyph, 1);\n text-shadow: 0 1px 2px rgb(0 0 0 / 0.35);\n pointer-events: none;\n white-space: nowrap;\n }\n @media (prefers-reduced-motion: reduce) {\n svg {\n transition: none;\n }\n }\n `,\n ];\n\n /** Fill color; the gradient's light (highlight) and dark (edge) stops are derived from this. */\n @property() color = \"#4f46e5\";\n /** Diameter of the circular head, in CSS pixels. */\n @property({ type: Number }) size = 32;\n /** Outer ring opacity, 0-1 (Apple Maps-style rings are translucent, not solid white). */\n @property({ type: Number, attribute: \"ring-opacity\" }) ringOpacity = 0.6;\n /** Scales and glows the pin — a generic emphasis state (e.g. hover, selection). */\n @property({ type: Boolean, reflect: true }) highlighted = false;\n\n private readonly _gradId = `map-pin-grad-${gradientIdCounter++}`;\n\n override render() {\n const light = mixHex(this.color, \"#ffffff\", 30);\n const dark = mixHex(this.color, \"#000000\", 30);\n const height = Math.round(this.size * (34 / 32));\n return html`\n <svg\n aria-hidden=\"true\"\n width=${this.size}\n height=${height}\n viewBox=\"0 0 32 34\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <defs>\n <radialGradient id=${this._gradId} gradientUnits=\"userSpaceOnUse\" cx=\"12\" cy=\"9\" r=\"18\">\n <stop offset=\"0%\" stop-color=${light} />\n <stop offset=\"100%\" stop-color=${dark} />\n </radialGradient>\n </defs>\n <path\n d=\"M16 30 C10 24 4 19.5 4 13 A12 12 0 1 1 28 13 C28 19.5 22 24 16 30 Z\"\n fill=\"url(#${this._gradId})\"\n stroke=\"rgb(255 255 255 / ${this.ringOpacity})\"\n stroke-width=\"1.5\"\n />\n </svg>\n <div class=\"content\" style=\"font-size:${Math.round(this.size * 0.4)}px\">\n <slot></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"map-pin\": MapPin;\n }\n}\n"]}
@@ -2,12 +2,26 @@ import { LitElement } from "lit";
2
2
  export interface PercentBarGroup {
3
3
  key: string;
4
4
  label: string;
5
- pct: number;
5
+ /**
6
+ * The row's value. In `mode="percent"` (default) this is a 0-100
7
+ * percentage, scaled against a fixed domain. In `mode="value"` this is an
8
+ * arbitrary raw number, scaled against `max` (or the largest `value`
9
+ * across `groups` when `max` is unset).
10
+ */
11
+ value: number;
6
12
  color: string;
7
13
  }
14
+ /** Whether `PercentBarGroup.value` is a 0-100 percentage or an arbitrary raw number. */
15
+ export type PercentBarMode = "percent" | "value";
16
+ /** Bars grow rightward as stacked rows, or upward as side-by-side columns. */
17
+ export type PercentBarOrientation = "horizontal" | "vertical";
8
18
  /**
9
- * Horizontal bar chart for labeled percentage rows, using D3's linear scale.
10
- * Each group gets its own labeled row; bars are proportional to percentage of 100.
19
+ * Bar chart for labeled rows, using D3's linear scale. Horizontal (default)
20
+ * renders stacked rows with bars growing rightward; `orientation="vertical"`
21
+ * renders side-by-side columns growing upward instead. `mode="percent"`
22
+ * (default) scales `value` against a fixed 0-100 domain and labels it with a
23
+ * `%` suffix; `mode="value"` scales it against `max` (or the largest `value`
24
+ * present) and formats it with `valueFormat`.
11
25
  *
12
26
  * @element percent-bar-chart
13
27
  */
@@ -15,13 +29,28 @@ export declare class PercentBarChart extends LitElement {
15
29
  static styles: import("lit").CSSResult[];
16
30
  /** Rows to render, one per group. */
17
31
  groups: PercentBarGroup[];
32
+ /** Whether `value` is a 0-100 percentage (fixed domain) or an arbitrary number (domain from data/`max`). */
33
+ mode: PercentBarMode;
34
+ /** Bar direction: stacked rows growing rightward, or columns growing upward. */
35
+ orientation: PercentBarOrientation;
36
+ /** Explicit domain max for `mode="value"`; auto-computed from `groups` when unset. Ignored in `mode="percent"`. */
37
+ max?: number;
38
+ /** Formats a row's value for its label in `mode="value"`. Defaults to locale-formatted number. */
39
+ valueFormat: (value: number) => string;
18
40
  private _width;
19
41
  private _ro;
20
42
  private readonly _gradIdBase;
21
43
  /** Per-row gradient id, unique across instances and rows. */
22
44
  private _gradId;
45
+ /** The row's value formatted for display, per the current `mode`. */
46
+ private _labelFor;
47
+ /** The scale domain's upper bound for the current `mode`. */
48
+ private _domainMax;
23
49
  firstUpdated(): void;
24
50
  disconnectedCallback(): void;
51
+ private _renderGradients;
52
+ private _renderHorizontal;
53
+ private _renderVertical;
25
54
  render(): import("lit-html").TemplateResult<1>;
26
55
  }
27
56
  declare global {
@@ -1 +1 @@
1
- {"version":3,"file":"percent-bar-chart.d.ts","sourceRoot":"","sources":["../src/percent-bar-chart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AAMjD,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AASD;;;;;GAKG;AACH,qBACa,eAAgB,SAAQ,UAAU;IAC7C,OAAgB,MAAM,4BA+BpB;IAEF,qCAAqC;IACL,MAAM,EAAE,eAAe,EAAE,CAAM;IACtD,OAAO,CAAC,MAAM,CAAK;IAE5B,OAAO,CAAC,GAAG,CAA+B;IAC1C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA6C;IAEzE,6DAA6D;IAC7D,OAAO,CAAC,OAAO;IAIN,YAAY,SAMpB;IAEQ,oBAAoB,SAI5B;IAEQ,MAAM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