@genesislcap/foundation-ui 14.283.2 → 14.284.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.
@@ -272,6 +272,15 @@ export declare const baseComponents: {
272
272
  shadowOptions: ShadowRootInit;
273
273
  }, typeof import("./snackbar").Snackbar>;
274
274
  foundationStackingIcons: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition>) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof import("./stacking-icons").StackingIcons>;
275
+ foundationStatusPill: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
276
+ baseName: string;
277
+ styles: import("@microsoft/fast-element").ElementStyles;
278
+ template: import("@microsoft/fast-element").ViewTemplate<import("./status-pill").StatusPill, any>;
279
+ }>) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
280
+ baseName: string;
281
+ styles: import("@microsoft/fast-element").ElementStyles;
282
+ template: import("@microsoft/fast-element").ViewTemplate<import("./status-pill").StatusPill, any>;
283
+ }, typeof import("./status-pill").StatusPill>;
275
284
  foundationStepper: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
276
285
  baseName: string;
277
286
  template: import("@microsoft/fast-element").ViewTemplate<import("./stepper").Stepper, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"base-components.d.ts","sourceRoot":"","sources":["../../src/base-components.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAiF5D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAiFJ,SAAS,WAAW,GAAG,EAAE;CAe/C,CAAC"}
1
+ {"version":3,"file":"base-components.d.ts","sourceRoot":"","sources":["../../src/base-components.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAkF5D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAkFJ,SAAS,WAAW,GAAG,EAAE;CAe/C,CAAC"}
@@ -75,6 +75,7 @@ export * from './slider';
75
75
  export * from './slider-label';
76
76
  export * from './snackbar';
77
77
  export * from './stacking-icons';
78
+ export * from './status-pill';
78
79
  export * from './stepper';
79
80
  export * from './stepper-tab';
80
81
  export * from './stepper-tab-panel';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEvF,OAAO,EAAE,cAAc,EAAE,uBAAuB,E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aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,SAAS,IAAI,qBAAqB,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './status-pill';
2
+ export * from './status-pill.styles';
3
+ export * from './status-pill.template';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/status-pill/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,140 @@
1
+ import { FoundationElement } from '@microsoft/fast-foundation';
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare const formatTimeForCountDown: (totalMilliseconds: number) => string;
6
+ /**
7
+ * @tagname %%prefix%%-status-pill
8
+ */
9
+ export declare class StatusPill extends FoundationElement {
10
+ /**
11
+ * @attr background-color - a valid hex, rgb or rgba color for the background fill color of the pill
12
+ * @example
13
+ * Status pill with a red background
14
+ * ```html
15
+ * <rapid-status-pill background-color='red'>
16
+ * </rapid-status-pill>
17
+ * ```
18
+ */
19
+ backgroundColor: string;
20
+ /**
21
+ * @attr icon-name - a string for the icon. Valid values are from the free set of font awesome icons which can be found here https://fontawesome.com/search?ic=free
22
+ * @example
23
+ * Status pill with a house icon
24
+ * ```html
25
+ * <rapid-status-pill icon-name='house'>
26
+ * </rapid-status-pill>
27
+ * ```
28
+ */
29
+ iconName: string;
30
+ /**
31
+ * @attr icon-src - the src for an image. This can be used if the icon you want an icon that is not included in the free set of font awesome icons. Note, only svgs are recommended
32
+ * @example
33
+ * Status pill with an image
34
+ * ```html
35
+ * <rapid-status-pill icon-src='public/custom-svg.svg'>
36
+ * </rapid-status-pill>
37
+ * ```
38
+ */
39
+ iconSrc: string;
40
+ /**
41
+ * @attr icon-initial - use this attribute if you want to show a single letter at the start of the pill, pass a string. Note, it will only use the first character of a string
42
+ * @example
43
+ * Status pill with an initial
44
+ * ```html
45
+ * <rapid-status-pill icon-initial='S'>
46
+ * </rapid-status-pill>
47
+ * ```
48
+ */
49
+ iconInitial: string;
50
+ /**
51
+ * @attr icon-initial - sets a circular background on an icon
52
+ * @example
53
+ * Status pill with a background color on the initial
54
+ * ```html
55
+ * <rapid-status-pill icon-initial='S'>
56
+ * </rapid-status-pill>
57
+ * ```
58
+ */
59
+ iconInitialBackgroundColor: string;
60
+ /**
61
+ * @attr icon-size - sets the size of the icon. Defaults to 'sm'. Can be one of any valid fa icon size, "2xs" | "xs" | "sm" | "lg" | "xl" | "2xl" | "1x" | "2x" | "3x" | "4x" | "5x" | "6x" | "7x" | "8x" | "9x" | "10x"
62
+ * @example
63
+ * Status pill with large set
64
+ * ```html
65
+ * <rapid-status-pill size='lg'>
66
+ * </rapid-status-pill>
67
+ * ```
68
+ */
69
+ iconSize: string;
70
+ /**
71
+ * @attr large - a valid hex, rgb or rgba color for the color applied to text and icon.
72
+ * @example
73
+ * Status pill with text color
74
+ * ```html
75
+ * <rapid-status-pill text-color='grey'>
76
+ * </rapid-status-pill>
77
+ * ```
78
+ */
79
+ textColor: string;
80
+ /**
81
+ * @attr text - a string for the text shown at the end of the pill
82
+ * @example
83
+ * Status pill with text
84
+ * ```html
85
+ * <rapid-status-pill text='Processed'>
86
+ * </rapid-status-pill>
87
+ * ```
88
+ */
89
+ text: string;
90
+ /**
91
+ * @attr date-countdown - a date or timestamp that the pill will count down to
92
+ * @example
93
+ * Status pill with date-countdown
94
+ * ```html
95
+ * <rapid-status-pill date-countdown='1750955880385'>
96
+ * </rapid-status-pill>
97
+ * ```
98
+ */
99
+ dateCountdown: number;
100
+ /**
101
+ * @attr date-countdown-completed-message - the string that will be shown when the countdown is complete
102
+ * @example
103
+ * Status pill with countdown completed message
104
+ * ```html
105
+ * <rapid-status-pill date-countdown-completed-message='Market Closed'>
106
+ * </rapid-status-pill>
107
+ * ```
108
+ */
109
+ dateCountdownCompletedMessage: string;
110
+ /**
111
+ * @internal
112
+ */
113
+ countdown: string;
114
+ private dateInterval;
115
+ /**
116
+ * @internal
117
+ */
118
+ dateCountdownChanged(oldValue: any, newValue: any): void;
119
+ disconnectedCallback(): void;
120
+ private setUpDateCountdown;
121
+ private updateCountdown;
122
+ private clearCountdownTimer;
123
+ }
124
+ /**
125
+ * The Foundation Status Pill
126
+ *
127
+ * @public
128
+ * @remarks
129
+ * HTML Element: \<foundation-status-pill\>
130
+ */
131
+ export declare const foundationStatusPill: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
132
+ baseName: string;
133
+ styles: import("@microsoft/fast-element").ElementStyles;
134
+ template: import("@microsoft/fast-element").ViewTemplate<StatusPill, any>;
135
+ }>) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
136
+ baseName: string;
137
+ styles: import("@microsoft/fast-element").ElementStyles;
138
+ template: import("@microsoft/fast-element").ViewTemplate<StatusPill, any>;
139
+ }, typeof StatusPill>;
140
+ //# sourceMappingURL=status-pill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status-pill.d.ts","sourceRoot":"","sources":["../../../src/status-pill/status-pill.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAU/D;;GAEG;AACH,eAAO,MAAM,sBAAsB,sBAAuB,MAAM,KAAG,MAmBlE,CAAC;AAEF;;GAEG;AACH,qBAAa,UAAW,SAAQ,iBAAiB;IAC/C;;;;;;;;OAQG;IACsC,eAAe,EAAE,MAAM,CAAC;IAEjE;;;;;;;;OAQG;IAC+B,QAAQ,EAAE,MAAM,CAAC;IAEnD;;;;;;;;OAQG;IAC8B,OAAO,EAAE,MAAM,CAAC;IAEjD;;;;;;;;OAQG;IACkC,WAAW,EAAE,MAAM,CAAC;IAEzD;;;;;;;;OAQG;IACmD,0BAA0B,EAAE,MAAM,CAAC;IAEzF;;;;;;;;OAQG;IAC+B,QAAQ,EAAE,MAAM,CAAQ;IAE1D;;;;;;;;OAQG;IACgC,SAAS,EAAE,MAAM,CAAC;IAErD;;;;;;;;OAQG;IACG,IAAI,EAAE,MAAM,CAAC;IAEnB;;;;;;;;OAQG;IACoC,aAAa,EAAE,MAAM,CAAC;IAE7D;;;;;;;;OAQG;IACsD,6BAA6B,EAAE,MAAM,CAClF;IAEZ;;OAEG;IACS,SAAS,EAAE,MAAM,CAAC;IAE9B,OAAO,CAAC,YAAY,CAAC;IAErB;;OAEG;IACH,oBAAoB,CAAC,QAAQ,KAAA,EAAE,QAAQ,KAAA;IAWvC,oBAAoB;IAKpB,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,mBAAmB;CAO5B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;qBAI/B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const statusPillStyles: import("@microsoft/fast-element").ElementStyles;
2
+ //# sourceMappingURL=status-pill.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status-pill.styles.d.ts","sourceRoot":"","sources":["../../../src/status-pill/status-pill.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,iDAkC5B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { StatusPill } from './status-pill';
2
+ export declare const foundationStatusPillTemplate: import("@microsoft/fast-element").ViewTemplate<StatusPill, any>;
3
+ //# sourceMappingURL=status-pill.template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status-pill.template.d.ts","sourceRoot":"","sources":["../../../src/status-pill/status-pill.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AA4ChD,eAAO,MAAM,4BAA4B,iEAExC,CAAC"}
@@ -63,6 +63,7 @@ import { foundationSlider } from './slider';
63
63
  import { foundationSliderLabel } from './slider-label';
64
64
  import { foundationSnackbar } from './snackbar';
65
65
  import { foundationStackingIcons } from './stacking-icons';
66
+ import { foundationStatusPill } from './status-pill';
66
67
  import { foundationStepper } from './stepper';
67
68
  import { foundationStepperTab } from './stepper-tab';
68
69
  import { foundationStepperTabPanel } from './stepper-tab-panel';
@@ -143,6 +144,7 @@ export const baseComponents = {
143
144
  foundationSliderLabel,
144
145
  foundationSnackbar,
145
146
  foundationStackingIcons,
147
+ foundationStatusPill,
146
148
  foundationStepper,
147
149
  foundationStepperTab,
148
150
  foundationStepperTabPanel,
package/dist/esm/index.js CHANGED
@@ -75,6 +75,7 @@ export * from './slider';
75
75
  export * from './slider-label';
76
76
  export * from './snackbar';
77
77
  export * from './stacking-icons';
78
+ export * from './status-pill';
78
79
  export * from './stepper';
79
80
  export * from './stepper-tab';
80
81
  export * from './stepper-tab-panel';
@@ -0,0 +1,3 @@
1
+ export * from './status-pill';
2
+ export * from './status-pill.styles';
3
+ export * from './status-pill.template';
@@ -0,0 +1,151 @@
1
+ import { __decorate } from "tslib";
2
+ import { attr, observable } from '@microsoft/fast-element';
3
+ import { FoundationElement } from '@microsoft/fast-foundation';
4
+ import { logger } from '../utils';
5
+ import { statusPillStyles as styles } from './status-pill.styles';
6
+ import { foundationStatusPillTemplate as template } from './status-pill.template';
7
+ const ONE_SECOND_IN_MILIS = 1000;
8
+ const SECONDS_IN_DAY = 86400;
9
+ const SECONDS_IN_HOUR = 3600;
10
+ const SECONDS_IN_MINUTE = 60;
11
+ /**
12
+ * @internal
13
+ */
14
+ export const formatTimeForCountDown = (totalMilliseconds) => {
15
+ let totalSeconds = totalMilliseconds / ONE_SECOND_IN_MILIS;
16
+ const days = Math.floor(totalSeconds / SECONDS_IN_DAY);
17
+ totalSeconds %= SECONDS_IN_DAY;
18
+ const hours = Math.floor(totalSeconds / SECONDS_IN_HOUR);
19
+ totalSeconds %= SECONDS_IN_HOUR;
20
+ const minutes = Math.floor(totalSeconds / SECONDS_IN_MINUTE);
21
+ const seconds = totalSeconds % SECONDS_IN_MINUTE;
22
+ const parts = [];
23
+ if (days)
24
+ parts.push(`${days}d`);
25
+ if (hours)
26
+ parts.push(`${hours}h`);
27
+ if (minutes)
28
+ parts.push(`${minutes}m`);
29
+ if (seconds)
30
+ parts.push(`${seconds}s`);
31
+ return parts.length ? parts.join(' ') : '0s';
32
+ };
33
+ /**
34
+ * @tagname %%prefix%%-status-pill
35
+ */
36
+ export class StatusPill extends FoundationElement {
37
+ constructor() {
38
+ super(...arguments);
39
+ /**
40
+ * @attr icon-size - sets the size of the icon. Defaults to 'sm'. Can be one of any valid fa icon size, "2xs" | "xs" | "sm" | "lg" | "xl" | "2xl" | "1x" | "2x" | "3x" | "4x" | "5x" | "6x" | "7x" | "8x" | "9x" | "10x"
41
+ * @example
42
+ * Status pill with large set
43
+ * ```html
44
+ * <rapid-status-pill size='lg'>
45
+ * </rapid-status-pill>
46
+ * ```
47
+ */
48
+ this.iconSize = 'sm';
49
+ /**
50
+ * @attr date-countdown-completed-message - the string that will be shown when the countdown is complete
51
+ * @example
52
+ * Status pill with countdown completed message
53
+ * ```html
54
+ * <rapid-status-pill date-countdown-completed-message='Market Closed'>
55
+ * </rapid-status-pill>
56
+ * ```
57
+ */
58
+ this.dateCountdownCompletedMessage = `Expired`;
59
+ }
60
+ /**
61
+ * @internal
62
+ */
63
+ dateCountdownChanged(oldValue, newValue) {
64
+ if (oldValue !== newValue) {
65
+ if (!newValue) {
66
+ this.clearCountdownTimer();
67
+ return;
68
+ }
69
+ this.setUpDateCountdown(newValue);
70
+ }
71
+ }
72
+ disconnectedCallback() {
73
+ this.clearCountdownTimer();
74
+ super.disconnectedCallback();
75
+ }
76
+ setUpDateCountdown(dateCountdown) {
77
+ this.clearCountdownTimer();
78
+ if (!isNaN(parseInt(dateCountdown))) {
79
+ dateCountdown = parseInt(dateCountdown);
80
+ const baseDate = new Date(dateCountdown);
81
+ this.updateCountdown(baseDate);
82
+ this.dateInterval = setInterval(() => this.updateCountdown(baseDate), ONE_SECOND_IN_MILIS);
83
+ }
84
+ else {
85
+ logger.warn('invalid date-countdown value passed. Must be a number');
86
+ }
87
+ }
88
+ updateCountdown(targetDate) {
89
+ const now = new Date().getTime();
90
+ const diff = Math.floor(targetDate.getTime() - now);
91
+ if (diff <= 0) {
92
+ this.countdown = this.dateCountdownCompletedMessage;
93
+ clearInterval(this.dateInterval);
94
+ }
95
+ else {
96
+ this.countdown = formatTimeForCountDown(diff);
97
+ }
98
+ }
99
+ clearCountdownTimer() {
100
+ if (this.dateInterval) {
101
+ clearInterval(this.dateInterval);
102
+ this.dateInterval = null;
103
+ this.countdown = null;
104
+ }
105
+ }
106
+ }
107
+ __decorate([
108
+ attr({ attribute: 'background-color' })
109
+ ], StatusPill.prototype, "backgroundColor", void 0);
110
+ __decorate([
111
+ attr({ attribute: 'icon-name' })
112
+ ], StatusPill.prototype, "iconName", void 0);
113
+ __decorate([
114
+ attr({ attribute: 'icon-src' })
115
+ ], StatusPill.prototype, "iconSrc", void 0);
116
+ __decorate([
117
+ attr({ attribute: 'icon-initial' })
118
+ ], StatusPill.prototype, "iconInitial", void 0);
119
+ __decorate([
120
+ attr({ attribute: 'icon-initial-background-color' })
121
+ ], StatusPill.prototype, "iconInitialBackgroundColor", void 0);
122
+ __decorate([
123
+ attr({ attribute: 'icon-size' })
124
+ ], StatusPill.prototype, "iconSize", void 0);
125
+ __decorate([
126
+ attr({ attribute: 'text-color' })
127
+ ], StatusPill.prototype, "textColor", void 0);
128
+ __decorate([
129
+ attr
130
+ ], StatusPill.prototype, "text", void 0);
131
+ __decorate([
132
+ attr({ attribute: 'date-countdown' })
133
+ ], StatusPill.prototype, "dateCountdown", void 0);
134
+ __decorate([
135
+ attr({ attribute: 'date-countdown-completed-message' })
136
+ ], StatusPill.prototype, "dateCountdownCompletedMessage", void 0);
137
+ __decorate([
138
+ observable
139
+ ], StatusPill.prototype, "countdown", void 0);
140
+ /**
141
+ * The Foundation Status Pill
142
+ *
143
+ * @public
144
+ * @remarks
145
+ * HTML Element: \<foundation-status-pill\>
146
+ */
147
+ export const foundationStatusPill = StatusPill.compose({
148
+ baseName: 'status-pill',
149
+ styles,
150
+ template,
151
+ });
@@ -0,0 +1,36 @@
1
+ import { css } from '@microsoft/fast-element';
2
+ export const statusPillStyles = css `
3
+ .status-pill {
4
+ font-size: 12px;
5
+ display: inline-flex;
6
+ align-items: center;
7
+ gap: 5px;
8
+ border-radius: 10px;
9
+ height: 20px;
10
+ background: grey;
11
+ color: var(--neutral-foreground-rest);
12
+ padding: 2px 8px;
13
+ line-height: 1;
14
+ }
15
+
16
+ .status-pill.lg {
17
+ height: 32px;
18
+ border-radius: 16px;
19
+ padding: 2px 12px;
20
+ }
21
+
22
+ .status-pill-initial {
23
+ height: 14px;
24
+ width: 14px;
25
+ border-radius: 7px;
26
+ font-weight: bold;
27
+ font-size: 12px;
28
+ display: flex;
29
+ justify-content: center;
30
+ align-items: center;
31
+ }
32
+
33
+ .status-pill-image {
34
+ height: 14px;
35
+ }
36
+ `;
@@ -0,0 +1,33 @@
1
+ import { html, when } from '@microsoft/fast-element';
2
+ import { getPrefix } from '../utils';
3
+ const getPrefixedStatusPillTemplate = (prefix) => html `
4
+ <div
5
+ data-test-id="status-pill"
6
+ part="status-pill"
7
+ class="status-pill"
8
+ style="color: ${(x) => x.textColor || ''}; background: ${(x) => x.backgroundColor || ''};"
9
+ >
10
+ ${when((x) => x.iconName, html `
11
+ <${prefix}-icon name="${(x) => x.iconName}" size="${(x) => x.iconSize}"></${prefix}-icon>
12
+ `)}
13
+ ${when((x) => x.iconSrc, html `
14
+ <img alt="${(x) => x.iconSrc}" class="status-pill-image" src="${(x) => x.iconSrc}" />
15
+ `)}
16
+ ${when((x) => x.iconInitial, html `
17
+ <div
18
+ data-test-id="status-pill-initial"
19
+ class="status-pill-initial"
20
+ style="color:${(x) => x.textColor}; background-color: ${(x) => x.iconInitialBackgroundColor}"
21
+ >
22
+ ${(x) => x.iconInitial.substring(0, 1)}
23
+ </div>
24
+ `)}
25
+ <span data-test-id="status-pill-text">${(x) => x.text}</span>
26
+ ${when((x) => x.countdown, html `
27
+ <span data-test-id="status-pill-countdown">${(x) => x.countdown}</span>
28
+ `)}
29
+ </div>
30
+ `;
31
+ export const foundationStatusPillTemplate = html `
32
+ ${(x) => getPrefixedStatusPillTemplate(getPrefix(x))}
33
+ `;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-ui",
3
3
  "description": "Genesis Foundation UI",
4
- "version": "14.283.2",
4
+ "version": "14.284.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -83,13 +83,13 @@
83
83
  }
84
84
  },
85
85
  "devDependencies": {
86
- "@genesislcap/foundation-testing": "14.283.2",
87
- "@genesislcap/genx": "14.283.2",
88
- "@genesislcap/rollup-builder": "14.283.2",
89
- "@genesislcap/ts-builder": "14.283.2",
90
- "@genesislcap/uvu-playwright-builder": "14.283.2",
91
- "@genesislcap/vite-builder": "14.283.2",
92
- "@genesislcap/webpack-builder": "14.283.2",
86
+ "@genesislcap/foundation-testing": "14.284.0",
87
+ "@genesislcap/genx": "14.284.0",
88
+ "@genesislcap/rollup-builder": "14.284.0",
89
+ "@genesislcap/ts-builder": "14.284.0",
90
+ "@genesislcap/uvu-playwright-builder": "14.284.0",
91
+ "@genesislcap/vite-builder": "14.284.0",
92
+ "@genesislcap/webpack-builder": "14.284.0",
93
93
  "copyfiles": "^2.4.1",
94
94
  "rimraf": "^5.0.0",
95
95
  "rxjs": "^7.5.4"
@@ -100,15 +100,15 @@
100
100
  "@fortawesome/free-regular-svg-icons": "^6.2.1",
101
101
  "@fortawesome/free-solid-svg-icons": "^6.2.1",
102
102
  "@genesiscommunitysuccess/analyzer-import-alias-plugin": "^5.0.3",
103
- "@genesislcap/expression-builder": "14.283.2",
104
- "@genesislcap/foundation-comms": "14.283.2",
105
- "@genesislcap/foundation-criteria": "14.283.2",
106
- "@genesislcap/foundation-errors": "14.283.2",
107
- "@genesislcap/foundation-events": "14.283.2",
108
- "@genesislcap/foundation-logger": "14.283.2",
109
- "@genesislcap/foundation-notifications": "14.283.2",
110
- "@genesislcap/foundation-user": "14.283.2",
111
- "@genesislcap/foundation-utils": "14.283.2",
103
+ "@genesislcap/expression-builder": "14.284.0",
104
+ "@genesislcap/foundation-comms": "14.284.0",
105
+ "@genesislcap/foundation-criteria": "14.284.0",
106
+ "@genesislcap/foundation-errors": "14.284.0",
107
+ "@genesislcap/foundation-events": "14.284.0",
108
+ "@genesislcap/foundation-logger": "14.284.0",
109
+ "@genesislcap/foundation-notifications": "14.284.0",
110
+ "@genesislcap/foundation-user": "14.284.0",
111
+ "@genesislcap/foundation-utils": "14.284.0",
112
112
  "@microsoft/fast-colors": "5.3.1",
113
113
  "@microsoft/fast-components": "2.30.6",
114
114
  "@microsoft/fast-element": "1.14.0",
@@ -130,5 +130,5 @@
130
130
  "access": "public"
131
131
  },
132
132
  "customElements": "dist/custom-elements.json",
133
- "gitHead": "357e8a019efe0dfebe684827d6e844a4a8b249d7"
133
+ "gitHead": "a2b9ad74ad30820f7d9e2cbd1f88c8d89e182828"
134
134
  }