@genesislcap/foundation-ui 14.489.0 → 14.489.1-alpha-519bcd2.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 +960 -555
- 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 +58 -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 +63 -0
- package/dist/esm/pill/pill.styles.js +75 -0
- package/dist/esm/pill/pill.template.js +38 -0
- package/dist/foundation-ui.api.json +588 -1
- package/dist/foundation-ui.d.ts +75 -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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"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
* @fires remove - Fired when the remove control is activated.
|
|
8
|
+
* @fires pill-click - Fired when the pill body (excluding the remove control) is activated.
|
|
9
|
+
*/
|
|
10
|
+
export declare class Pill extends FoundationElement {
|
|
11
|
+
/**
|
|
12
|
+
* @attr label - the name of the thing this pill represents, e.g. a filter field name
|
|
13
|
+
* @example
|
|
14
|
+
* ```html
|
|
15
|
+
* <rapid-pill label="Cpty Desk"></rapid-pill>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
label: string;
|
|
19
|
+
/**
|
|
20
|
+
* @attr value - the current value shown alongside the label, e.g. "Cpty Desk: EQUITIES"
|
|
21
|
+
* @example
|
|
22
|
+
* ```html
|
|
23
|
+
* <rapid-pill label="Cpty Desk" value="EQUITIES"></rapid-pill>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
value: string;
|
|
27
|
+
/**
|
|
28
|
+
* @attr removable - whether the "x" remove control is shown
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
31
|
+
removable: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* @attr disabled - disables both the pill body and the remove control
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
disabled: boolean;
|
|
37
|
+
handleBodyClick(): void;
|
|
38
|
+
handleRemoveClick(event: Event): void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The Foundation Pill
|
|
42
|
+
*
|
|
43
|
+
* @public
|
|
44
|
+
* @remarks
|
|
45
|
+
* HTML Element: \<foundation-pill\>
|
|
46
|
+
*/
|
|
47
|
+
export declare const foundationPill: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
|
|
48
|
+
baseName: string;
|
|
49
|
+
template: import("@microsoft/fast-element").ViewTemplate<Pill, any>;
|
|
50
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
51
|
+
shadowOptions: ShadowRootInit;
|
|
52
|
+
}>) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
53
|
+
baseName: string;
|
|
54
|
+
template: import("@microsoft/fast-element").ViewTemplate<Pill, any>;
|
|
55
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
56
|
+
shadowOptions: ShadowRootInit;
|
|
57
|
+
}, typeof Pill>;
|
|
58
|
+
//# 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;;;;;GAKG;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,EAAE,KAAK,GAAG,IAAI;CAOtC;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,iDAyEtB,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;AA0CnC,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';
|
|
@@ -149,6 +150,15 @@ export declare const ActionsMenu: React.ForwardRefExoticComponent<
|
|
|
149
150
|
>;
|
|
150
151
|
export type ActionsMenuRef = ActionsMenuWC;
|
|
151
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
|
+
|
|
152
162
|
export declare const AiCriteriaSearch: React.ForwardRefExoticComponent<
|
|
153
163
|
React.PropsWithChildren<
|
|
154
164
|
Omit<PublicOf<AiCriteriaSearchWC>, 'children' | 'style'> &
|
|
@@ -160,15 +170,6 @@ export declare const AiCriteriaSearch: React.ForwardRefExoticComponent<
|
|
|
160
170
|
>;
|
|
161
171
|
export type AiCriteriaSearchRef = AiCriteriaSearchWC;
|
|
162
172
|
|
|
163
|
-
export declare const Accordion: React.ForwardRefExoticComponent<
|
|
164
|
-
React.PropsWithChildren<
|
|
165
|
-
Omit<PublicOf<AccordionWC>, 'children' | 'style'> &
|
|
166
|
-
HTMLWCProps & {
|
|
167
|
-
}
|
|
168
|
-
> & React.RefAttributes<AccordionWC>
|
|
169
|
-
>;
|
|
170
|
-
export type AccordionRef = AccordionWC;
|
|
171
|
-
|
|
172
173
|
export declare const AiIndicator: React.ForwardRefExoticComponent<
|
|
173
174
|
React.PropsWithChildren<
|
|
174
175
|
Omit<PublicOf<AiIndicatorWC>, '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,63 @@
|
|
|
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
|
+
* @fires remove - Fired when the remove control is activated.
|
|
13
|
+
* @fires pill-click - Fired when the pill body (excluding the remove control) is activated.
|
|
14
|
+
*/
|
|
15
|
+
export class Pill extends FoundationElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
/**
|
|
19
|
+
* @attr removable - whether the "x" remove control is shown
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
this.removable = true;
|
|
23
|
+
/**
|
|
24
|
+
* @attr disabled - disables both the pill body and the remove control
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
this.disabled = false;
|
|
28
|
+
}
|
|
29
|
+
handleBodyClick() {
|
|
30
|
+
if (this.disabled) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
this.$emit('pill-click');
|
|
34
|
+
}
|
|
35
|
+
handleRemoveClick(event) {
|
|
36
|
+
event.stopPropagation();
|
|
37
|
+
if (this.disabled) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
this.$emit('remove');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
__decorate([
|
|
44
|
+
attr
|
|
45
|
+
], Pill.prototype, "label", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
attr
|
|
48
|
+
], Pill.prototype, "value", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
attr({ mode: 'boolean' })
|
|
51
|
+
], Pill.prototype, "removable", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
attr({ mode: 'boolean' })
|
|
54
|
+
], Pill.prototype, "disabled", void 0);
|
|
55
|
+
/**
|
|
56
|
+
* The Foundation Pill
|
|
57
|
+
*
|
|
58
|
+
* @public
|
|
59
|
+
* @remarks
|
|
60
|
+
* HTML Element: \<foundation-pill\>
|
|
61
|
+
*/
|
|
62
|
+
export const foundationPill = Pill.compose(Object.assign({ baseName: 'pill', template,
|
|
63
|
+
styles, shadowOptions: foundationPillShadowOptions }, defaultPillConfig));
|
|
@@ -0,0 +1,75 @@
|
|
|
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-label {
|
|
46
|
+
font-weight: 600;
|
|
47
|
+
white-space: nowrap;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.pill-value {
|
|
51
|
+
white-space: nowrap;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.pill-remove {
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
width: 16px;
|
|
59
|
+
height: 16px;
|
|
60
|
+
border: none;
|
|
61
|
+
border-radius: 50%;
|
|
62
|
+
background: transparent;
|
|
63
|
+
color: inherit;
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
padding: 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.pill-remove:hover {
|
|
69
|
+
background: var(--pill-fill-hover);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.pill-remove:disabled {
|
|
73
|
+
cursor: not-allowed;
|
|
74
|
+
}
|
|
75
|
+
`;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { html, when } from '@microsoft/fast-element';
|
|
2
|
+
import { getPrefix } from '../utils';
|
|
3
|
+
const getPrefixedPillTemplate = (prefix) => html `
|
|
4
|
+
<div class="pill" part="pill" ?disabled=${(x) => x.disabled}>
|
|
5
|
+
<button
|
|
6
|
+
class="pill-body"
|
|
7
|
+
part="pill-body"
|
|
8
|
+
type="button"
|
|
9
|
+
data-test-id="pill-body"
|
|
10
|
+
?disabled=${(x) => x.disabled}
|
|
11
|
+
@click=${(x) => x.handleBodyClick()}
|
|
12
|
+
>
|
|
13
|
+
<span class="pill-label" part="pill-label" data-test-id="pill-label">${(x) => x.label}</span>
|
|
14
|
+
${when((x) => x.value, html `
|
|
15
|
+
<span class="pill-value" part="pill-value" data-test-id="pill-value">
|
|
16
|
+
: ${(x) => x.value}
|
|
17
|
+
</span>
|
|
18
|
+
`)}
|
|
19
|
+
<slot></slot>
|
|
20
|
+
</button>
|
|
21
|
+
${when((x) => x.removable, html `
|
|
22
|
+
<button
|
|
23
|
+
class="pill-remove"
|
|
24
|
+
part="pill-remove"
|
|
25
|
+
type="button"
|
|
26
|
+
data-test-id="pill-remove"
|
|
27
|
+
aria-label="Remove ${(x) => x.label}"
|
|
28
|
+
?disabled=${(x) => x.disabled}
|
|
29
|
+
@click=${(x, c) => x.handleRemoveClick(c.event)}
|
|
30
|
+
>
|
|
31
|
+
<${prefix}-icon name="xmark" size="2xs"></${prefix}-icon>
|
|
32
|
+
</button>
|
|
33
|
+
`)}
|
|
34
|
+
</div>
|
|
35
|
+
`;
|
|
36
|
+
export const foundationPillTemplate = html `
|
|
37
|
+
${(x) => getPrefixedPillTemplate(getPrefix(x))}
|
|
38
|
+
`;
|