@genesislcap/foundation-ui 14.500.0 → 14.501.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +1020 -608
- package/dist/dts/base-components.d.ts +11 -0
- package/dist/dts/base-components.d.ts.map +1 -1
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/pill/index.d.ts +4 -0
- package/dist/dts/pill/index.d.ts.map +1 -0
- package/dist/dts/pill/pill.d.ts +61 -0
- package/dist/dts/pill/pill.d.ts.map +1 -0
- package/dist/dts/pill/pill.styles.d.ts +2 -0
- package/dist/dts/pill/pill.styles.d.ts.map +1 -0
- package/dist/dts/pill/pill.template.d.ts +3 -0
- package/dist/dts/pill/pill.template.d.ts.map +1 -0
- package/dist/dts/react.d.ts +21 -9
- package/dist/esm/base-components.js +2 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/pill/index.js +3 -0
- package/dist/esm/pill/pill.js +66 -0
- package/dist/esm/pill/pill.styles.js +80 -0
- package/dist/esm/pill/pill.template.js +44 -0
- package/dist/foundation-ui.api.json +588 -1
- package/dist/foundation-ui.d.ts +78 -0
- package/dist/react.cjs +30 -6
- package/dist/react.mjs +28 -5
- package/package.json +19 -19
|
@@ -210,6 +210,17 @@ export declare const baseComponents: {
|
|
|
210
210
|
}, typeof import("./multiselect").Multiselect>;
|
|
211
211
|
foundationNumberField: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").NumberFieldOptions>) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").NumberFieldOptions, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
|
|
212
212
|
foundationOptgroup: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition>) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof import("./optgroup").Optgroup>;
|
|
213
|
+
foundationPill: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
|
|
214
|
+
baseName: string;
|
|
215
|
+
template: import("@microsoft/fast-element").ViewTemplate<import("./pill").Pill, any>;
|
|
216
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
217
|
+
shadowOptions: ShadowRootInit;
|
|
218
|
+
}>) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
219
|
+
baseName: string;
|
|
220
|
+
template: import("@microsoft/fast-element").ViewTemplate<import("./pill").Pill, any>;
|
|
221
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
222
|
+
shadowOptions: ShadowRootInit;
|
|
223
|
+
}, typeof import("./pill").Pill>;
|
|
213
224
|
foundationPopper: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
|
|
214
225
|
baseName: string;
|
|
215
226
|
styles: import("@microsoft/fast-element").ElementStyles;
|
|
@@ -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;
|
|
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;AAwF5D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
export declare const foundationPillShadowOptions: ShadowRootInit;
|
|
3
|
+
export declare const defaultPillConfig: {};
|
|
4
|
+
/**
|
|
5
|
+
* @tagname %%prefix%%-pill
|
|
6
|
+
*
|
|
7
|
+
* @slot - Additional phrasing (inline, non-interactive) content rendered after the label/value,
|
|
8
|
+
* inside the pill body button. Do not slot interactive or block-level elements (e.g. `<button>`,
|
|
9
|
+
* `<a>`, `<div>`) here, as the body is itself a `<button>`.
|
|
10
|
+
* @fires remove - Fired when the remove control is activated.
|
|
11
|
+
* @fires pill-click - Fired when the pill body (excluding the remove control) is activated.
|
|
12
|
+
*/
|
|
13
|
+
export declare class Pill extends FoundationElement {
|
|
14
|
+
/**
|
|
15
|
+
* @attr label - the name of the thing this pill represents, e.g. a filter field name
|
|
16
|
+
* @example
|
|
17
|
+
* ```html
|
|
18
|
+
* <rapid-pill label="Cpty Desk"></rapid-pill>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
label: string;
|
|
22
|
+
/**
|
|
23
|
+
* @attr value - the current value shown alongside the label, e.g. "Cpty Desk: EQUITIES"
|
|
24
|
+
* @example
|
|
25
|
+
* ```html
|
|
26
|
+
* <rapid-pill label="Cpty Desk" value="EQUITIES"></rapid-pill>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
value: string;
|
|
30
|
+
/**
|
|
31
|
+
* @attr removable - whether the "x" remove control is shown
|
|
32
|
+
* @default true
|
|
33
|
+
*/
|
|
34
|
+
removable: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* @attr disabled - disables both the pill body and the remove control
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
disabled: boolean;
|
|
40
|
+
handleBodyClick(): void;
|
|
41
|
+
handleRemoveClick(event?: Event): void;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The Foundation Pill
|
|
45
|
+
*
|
|
46
|
+
* @public
|
|
47
|
+
* @remarks
|
|
48
|
+
* HTML Element: \<foundation-pill\>
|
|
49
|
+
*/
|
|
50
|
+
export declare const foundationPill: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
|
|
51
|
+
baseName: string;
|
|
52
|
+
template: import("@microsoft/fast-element").ViewTemplate<Pill, any>;
|
|
53
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
54
|
+
shadowOptions: ShadowRootInit;
|
|
55
|
+
}>) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
56
|
+
baseName: string;
|
|
57
|
+
template: import("@microsoft/fast-element").ViewTemplate<Pill, any>;
|
|
58
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
59
|
+
shadowOptions: ShadowRootInit;
|
|
60
|
+
}, typeof Pill>;
|
|
61
|
+
//# sourceMappingURL=pill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pill.d.ts","sourceRoot":"","sources":["../../../src/pill/pill.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAK/D,eAAO,MAAM,2BAA2B,EAAE,cAA0B,CAAC;AAErE,eAAO,MAAM,iBAAiB,IAAK,CAAC;AAEpC;;;;;;;;GAQG;AACH,qBAAa,IAAK,SAAQ,iBAAiB;IACzC;;;;;;OAMG;IACG,KAAK,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACG,KAAK,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACwB,SAAS,EAAE,OAAO,CAAQ;IAErD;;;OAGG;IACwB,QAAQ,EAAE,OAAO,CAAS;IAErD,eAAe,IAAI,IAAI;IAOvB,iBAAiB,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI;CAOvC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;eAMzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pill.styles.d.ts","sourceRoot":"","sources":["../../../src/pill/pill.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,iDA8EtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pill.template.d.ts","sourceRoot":"","sources":["../../../src/pill/pill.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAiDnC,eAAO,MAAM,sBAAsB,2DAElC,CAAC"}
|
package/dist/dts/react.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ import type { NumberField as NumberFieldWC } from './number-field/number-field';
|
|
|
62
62
|
import type { Optgroup as OptgroupWC } from './optgroup/optgroup';
|
|
63
63
|
import type { MultiselectDatasource as MultiselectDatasourceWC } from './options-datasource/multiselect-datasource';
|
|
64
64
|
import type { OptionsDatasource as OptionsDatasourceWC } from './options-datasource/options-datasource';
|
|
65
|
+
import type { Pill as PillWC } from './pill/pill';
|
|
65
66
|
import type { Popper as PopperWC } from './popper/popper';
|
|
66
67
|
import type { ProgressRing as ProgressRingWC } from './progress-ring/progress-ring';
|
|
67
68
|
import type { Progress as ProgressWC } from './progress/progress';
|
|
@@ -131,15 +132,6 @@ interface HTMLWCProps extends React.AriaAttributes {
|
|
|
131
132
|
onInput?(e: Event): void;
|
|
132
133
|
}
|
|
133
134
|
|
|
134
|
-
export declare const Accordion: React.ForwardRefExoticComponent<
|
|
135
|
-
React.PropsWithChildren<
|
|
136
|
-
Omit<PublicOf<AccordionWC>, 'children' | 'style'> &
|
|
137
|
-
HTMLWCProps & {
|
|
138
|
-
}
|
|
139
|
-
> & React.RefAttributes<AccordionWC>
|
|
140
|
-
>;
|
|
141
|
-
export type AccordionRef = AccordionWC;
|
|
142
|
-
|
|
143
135
|
export declare const AccordionItem: React.ForwardRefExoticComponent<
|
|
144
136
|
React.PropsWithChildren<
|
|
145
137
|
Omit<PublicOf<AccordionItemWC>, 'children' | 'style'> &
|
|
@@ -158,6 +150,15 @@ export declare const ActionsMenu: React.ForwardRefExoticComponent<
|
|
|
158
150
|
>;
|
|
159
151
|
export type ActionsMenuRef = ActionsMenuWC;
|
|
160
152
|
|
|
153
|
+
export declare const Accordion: React.ForwardRefExoticComponent<
|
|
154
|
+
React.PropsWithChildren<
|
|
155
|
+
Omit<PublicOf<AccordionWC>, 'children' | 'style'> &
|
|
156
|
+
HTMLWCProps & {
|
|
157
|
+
}
|
|
158
|
+
> & React.RefAttributes<AccordionWC>
|
|
159
|
+
>;
|
|
160
|
+
export type AccordionRef = AccordionWC;
|
|
161
|
+
|
|
161
162
|
export declare const AiCriteriaSearch: React.ForwardRefExoticComponent<
|
|
162
163
|
React.PropsWithChildren<
|
|
163
164
|
Omit<PublicOf<AiCriteriaSearchWC>, 'children' | 'style'> &
|
|
@@ -698,6 +699,17 @@ export declare const OptionsDatasource: React.ForwardRefExoticComponent<
|
|
|
698
699
|
>;
|
|
699
700
|
export type OptionsDatasourceRef = OptionsDatasourceWC;
|
|
700
701
|
|
|
702
|
+
export declare const Pill: React.ForwardRefExoticComponent<
|
|
703
|
+
React.PropsWithChildren<
|
|
704
|
+
Omit<PublicOf<PillWC>, 'children' | 'style'> &
|
|
705
|
+
HTMLWCProps & {
|
|
706
|
+
onRemove?: (event: CustomEvent<unknown>) => void;
|
|
707
|
+
onPillClick?: (event: CustomEvent<unknown>) => void;
|
|
708
|
+
}
|
|
709
|
+
> & React.RefAttributes<PillWC>
|
|
710
|
+
>;
|
|
711
|
+
export type PillRef = PillWC;
|
|
712
|
+
|
|
701
713
|
export declare const Popper: React.ForwardRefExoticComponent<
|
|
702
714
|
React.PropsWithChildren<
|
|
703
715
|
Omit<PublicOf<PopperWC>, 'children' | 'style'> &
|
|
@@ -51,6 +51,7 @@ import { foundationMultiselect } from './multiselect';
|
|
|
51
51
|
import { foundationNumberField } from './number-field';
|
|
52
52
|
import { foundationOptgroup } from './optgroup';
|
|
53
53
|
import { foundationSystemHealthOverlay } from './overlays';
|
|
54
|
+
import { foundationPill } from './pill';
|
|
54
55
|
import { foundationPopper } from './popper';
|
|
55
56
|
import { foundationProgress } from './progress';
|
|
56
57
|
import { foundationProgressRing } from './progress-ring';
|
|
@@ -135,6 +136,7 @@ export const baseComponents = {
|
|
|
135
136
|
foundationMultiselect,
|
|
136
137
|
foundationNumberField,
|
|
137
138
|
foundationOptgroup,
|
|
139
|
+
foundationPill,
|
|
138
140
|
foundationPopper,
|
|
139
141
|
foundationProgress,
|
|
140
142
|
foundationProgressRing,
|
package/dist/esm/index.js
CHANGED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr } from '@microsoft/fast-element';
|
|
3
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
4
|
+
import { pillStyles as styles } from './pill.styles';
|
|
5
|
+
import { foundationPillTemplate as template } from './pill.template';
|
|
6
|
+
// explicitly declaring for extensibility
|
|
7
|
+
export const foundationPillShadowOptions = undefined;
|
|
8
|
+
export const defaultPillConfig = {};
|
|
9
|
+
/**
|
|
10
|
+
* @tagname %%prefix%%-pill
|
|
11
|
+
*
|
|
12
|
+
* @slot - Additional phrasing (inline, non-interactive) content rendered after the label/value,
|
|
13
|
+
* inside the pill body button. Do not slot interactive or block-level elements (e.g. `<button>`,
|
|
14
|
+
* `<a>`, `<div>`) here, as the body is itself a `<button>`.
|
|
15
|
+
* @fires remove - Fired when the remove control is activated.
|
|
16
|
+
* @fires pill-click - Fired when the pill body (excluding the remove control) is activated.
|
|
17
|
+
*/
|
|
18
|
+
export class Pill extends FoundationElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
/**
|
|
22
|
+
* @attr removable - whether the "x" remove control is shown
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
this.removable = true;
|
|
26
|
+
/**
|
|
27
|
+
* @attr disabled - disables both the pill body and the remove control
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
this.disabled = false;
|
|
31
|
+
}
|
|
32
|
+
handleBodyClick() {
|
|
33
|
+
if (this.disabled) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
this.$emit('pill-click');
|
|
37
|
+
}
|
|
38
|
+
handleRemoveClick(event) {
|
|
39
|
+
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
40
|
+
if (this.disabled) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
this.$emit('remove');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
__decorate([
|
|
47
|
+
attr
|
|
48
|
+
], Pill.prototype, "label", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
attr
|
|
51
|
+
], Pill.prototype, "value", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
attr({ mode: 'boolean' })
|
|
54
|
+
], Pill.prototype, "removable", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
attr({ mode: 'boolean' })
|
|
57
|
+
], Pill.prototype, "disabled", void 0);
|
|
58
|
+
/**
|
|
59
|
+
* The Foundation Pill
|
|
60
|
+
*
|
|
61
|
+
* @public
|
|
62
|
+
* @remarks
|
|
63
|
+
* HTML Element: \<foundation-pill\>
|
|
64
|
+
*/
|
|
65
|
+
export const foundationPill = Pill.compose(Object.assign({ baseName: 'pill', template,
|
|
66
|
+
styles, shadowOptions: foundationPillShadowOptions }, defaultPillConfig));
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { css } from '@microsoft/fast-element';
|
|
2
|
+
export const pillStyles = css `
|
|
3
|
+
:host {
|
|
4
|
+
--pill-fill: var(--neutral-fill-rest, #e5e5e5);
|
|
5
|
+
--pill-fill-hover: var(--neutral-fill-hover, #d9d9d9);
|
|
6
|
+
--pill-foreground: var(--neutral-foreground-rest, #1a1a1a);
|
|
7
|
+
--pill-border-radius: 12px;
|
|
8
|
+
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.pill {
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 4px;
|
|
16
|
+
height: 24px;
|
|
17
|
+
padding: 0 4px 0 10px;
|
|
18
|
+
border-radius: var(--pill-border-radius);
|
|
19
|
+
background: var(--pill-fill);
|
|
20
|
+
color: var(--pill-foreground);
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
line-height: 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.pill[disabled] {
|
|
26
|
+
opacity: 50%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.pill-body {
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 4px;
|
|
33
|
+
border: none;
|
|
34
|
+
background: transparent;
|
|
35
|
+
color: inherit;
|
|
36
|
+
font: inherit;
|
|
37
|
+
padding: 0;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.pill-body:disabled {
|
|
42
|
+
cursor: not-allowed;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.pill-body:hover:not(:disabled) {
|
|
46
|
+
background: var(--pill-fill-hover);
|
|
47
|
+
border-radius: var(--pill-border-radius);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.pill-label {
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
white-space: nowrap;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.pill-value {
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.pill-remove {
|
|
60
|
+
display: inline-flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
width: 16px;
|
|
64
|
+
height: 16px;
|
|
65
|
+
border: none;
|
|
66
|
+
border-radius: 50%;
|
|
67
|
+
background: transparent;
|
|
68
|
+
color: inherit;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
padding: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.pill-remove:disabled {
|
|
74
|
+
cursor: not-allowed;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.pill-remove:hover:not(:disabled) {
|
|
78
|
+
background: var(--pill-fill-hover);
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { html, when } from '@microsoft/fast-element';
|
|
2
|
+
import { getPrefix } from '../utils';
|
|
3
|
+
const getRemoveAriaLabel = (x) => {
|
|
4
|
+
const parts = [x.label, x.value].filter(Boolean).join(': ');
|
|
5
|
+
return parts ? `Remove ${parts}` : 'Remove';
|
|
6
|
+
};
|
|
7
|
+
const getPrefixedPillTemplate = (prefix) => html `
|
|
8
|
+
<div class="pill" part="pill" ?disabled=${(x) => x.disabled}>
|
|
9
|
+
<button
|
|
10
|
+
class="pill-body"
|
|
11
|
+
part="pill-body"
|
|
12
|
+
type="button"
|
|
13
|
+
data-test-id="pill-body"
|
|
14
|
+
?disabled=${(x) => x.disabled}
|
|
15
|
+
@click=${(x) => x.handleBodyClick()}
|
|
16
|
+
>
|
|
17
|
+
<span class="pill-label" part="pill-label" data-test-id="pill-label">
|
|
18
|
+
${(x) => x.label}${(x) => (x.value ? ':' : '')}
|
|
19
|
+
</span>
|
|
20
|
+
${when((x) => x.value, html `
|
|
21
|
+
<span class="pill-value" part="pill-value" data-test-id="pill-value">
|
|
22
|
+
${(x) => x.value}
|
|
23
|
+
</span>
|
|
24
|
+
`)}
|
|
25
|
+
<slot></slot>
|
|
26
|
+
</button>
|
|
27
|
+
${when((x) => x.removable, html `
|
|
28
|
+
<button
|
|
29
|
+
class="pill-remove"
|
|
30
|
+
part="pill-remove"
|
|
31
|
+
type="button"
|
|
32
|
+
data-test-id="pill-remove"
|
|
33
|
+
aria-label="${(x) => getRemoveAriaLabel(x)}"
|
|
34
|
+
?disabled=${(x) => x.disabled}
|
|
35
|
+
@click=${(x, c) => x.handleRemoveClick(c.event)}
|
|
36
|
+
>
|
|
37
|
+
<${prefix}-icon name="xmark" size="2xs"></${prefix}-icon>
|
|
38
|
+
</button>
|
|
39
|
+
`)}
|
|
40
|
+
</div>
|
|
41
|
+
`;
|
|
42
|
+
export const foundationPillTemplate = html `
|
|
43
|
+
${(x) => getPrefixedPillTemplate(getPrefix(x))}
|
|
44
|
+
`;
|