@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
package/dist/foundation-ui.d.ts
CHANGED
|
@@ -734,6 +734,17 @@ export declare const baseComponents: {
|
|
|
734
734
|
}, Multiselect>;
|
|
735
735
|
foundationNumberField: (overrideDefinition?: OverrideFoundationElementDefinition<NumberFieldOptions>) => FoundationElementRegistry<NumberFieldOptions, Constructable<FoundationElement>>;
|
|
736
736
|
foundationOptgroup: (overrideDefinition?: OverrideFoundationElementDefinition<FoundationElementDefinition>) => FoundationElementRegistry<FoundationElementDefinition, Optgroup>;
|
|
737
|
+
foundationPill: (overrideDefinition?: OverrideFoundationElementDefinition< {
|
|
738
|
+
baseName: string;
|
|
739
|
+
template: ViewTemplate<Pill, any>;
|
|
740
|
+
styles: ElementStyles;
|
|
741
|
+
shadowOptions: ShadowRootInit;
|
|
742
|
+
}>) => FoundationElementRegistry< {
|
|
743
|
+
baseName: string;
|
|
744
|
+
template: ViewTemplate<Pill, any>;
|
|
745
|
+
styles: ElementStyles;
|
|
746
|
+
shadowOptions: ShadowRootInit;
|
|
747
|
+
}, Pill>;
|
|
737
748
|
foundationPopper: (overrideDefinition?: OverrideFoundationElementDefinition< {
|
|
738
749
|
baseName: string;
|
|
739
750
|
styles: ElementStyles;
|
|
@@ -2194,6 +2205,8 @@ export declare const defaultNumberFieldConfig: {
|
|
|
2194
2205
|
stepUpGlyph: string;
|
|
2195
2206
|
};
|
|
2196
2207
|
|
|
2208
|
+
export declare const defaultPillConfig: {};
|
|
2209
|
+
|
|
2197
2210
|
/**
|
|
2198
2211
|
* @beta
|
|
2199
2212
|
*/
|
|
@@ -4108,6 +4121,29 @@ export declare const foundationOptgroupStyles: (_context: ElementDefinitionConte
|
|
|
4108
4121
|
|
|
4109
4122
|
export declare const foundationOptgroupTemplate: (_context: ElementDefinitionContext, _definition: FoundationElementDefinition) => ViewTemplate<Optgroup, any>;
|
|
4110
4123
|
|
|
4124
|
+
/**
|
|
4125
|
+
* The Foundation Pill
|
|
4126
|
+
*
|
|
4127
|
+
* @public
|
|
4128
|
+
* @remarks
|
|
4129
|
+
* HTML Element: \<foundation-pill\>
|
|
4130
|
+
*/
|
|
4131
|
+
export declare const foundationPill: (overrideDefinition?: OverrideFoundationElementDefinition< {
|
|
4132
|
+
baseName: string;
|
|
4133
|
+
template: ViewTemplate<Pill, any>;
|
|
4134
|
+
styles: ElementStyles;
|
|
4135
|
+
shadowOptions: ShadowRootInit;
|
|
4136
|
+
}>) => FoundationElementRegistry< {
|
|
4137
|
+
baseName: string;
|
|
4138
|
+
template: ViewTemplate<Pill, any>;
|
|
4139
|
+
styles: ElementStyles;
|
|
4140
|
+
shadowOptions: ShadowRootInit;
|
|
4141
|
+
}, typeof Pill>;
|
|
4142
|
+
|
|
4143
|
+
export declare const foundationPillShadowOptions: ShadowRootInit;
|
|
4144
|
+
|
|
4145
|
+
export declare const foundationPillTemplate: ViewTemplate<Pill, any>;
|
|
4146
|
+
|
|
4111
4147
|
/**
|
|
4112
4148
|
* The Foundation Popper
|
|
4113
4149
|
*
|
|
@@ -5924,6 +5960,48 @@ export declare function parseDatePickerValue(dateString: string, displayFormat:
|
|
|
5924
5960
|
*/
|
|
5925
5961
|
export declare function pathJoin(parts: string[], separator?: string, allowTrailingSeparator?: boolean): string;
|
|
5926
5962
|
|
|
5963
|
+
/**
|
|
5964
|
+
* @tagname %%prefix%%-pill
|
|
5965
|
+
*
|
|
5966
|
+
* @slot - Additional phrasing (inline, non-interactive) content rendered after the label/value,
|
|
5967
|
+
* inside the pill body button. Do not slot interactive or block-level elements (e.g. `<button>`,
|
|
5968
|
+
* `<a>`, `<div>`) here, as the body is itself a `<button>`.
|
|
5969
|
+
* @fires remove - Fired when the remove control is activated.
|
|
5970
|
+
* @fires pill-click - Fired when the pill body (excluding the remove control) is activated.
|
|
5971
|
+
*/
|
|
5972
|
+
export declare class Pill extends FoundationElement {
|
|
5973
|
+
/**
|
|
5974
|
+
* @attr label - the name of the thing this pill represents, e.g. a filter field name
|
|
5975
|
+
* @example
|
|
5976
|
+
* ```html
|
|
5977
|
+
* <rapid-pill label="Cpty Desk"></rapid-pill>
|
|
5978
|
+
* ```
|
|
5979
|
+
*/
|
|
5980
|
+
label: string;
|
|
5981
|
+
/**
|
|
5982
|
+
* @attr value - the current value shown alongside the label, e.g. "Cpty Desk: EQUITIES"
|
|
5983
|
+
* @example
|
|
5984
|
+
* ```html
|
|
5985
|
+
* <rapid-pill label="Cpty Desk" value="EQUITIES"></rapid-pill>
|
|
5986
|
+
* ```
|
|
5987
|
+
*/
|
|
5988
|
+
value: string;
|
|
5989
|
+
/**
|
|
5990
|
+
* @attr removable - whether the "x" remove control is shown
|
|
5991
|
+
* @default true
|
|
5992
|
+
*/
|
|
5993
|
+
removable: boolean;
|
|
5994
|
+
/**
|
|
5995
|
+
* @attr disabled - disables both the pill body and the remove control
|
|
5996
|
+
* @default false
|
|
5997
|
+
*/
|
|
5998
|
+
disabled: boolean;
|
|
5999
|
+
handleBodyClick(): void;
|
|
6000
|
+
handleRemoveClick(event?: Event): void;
|
|
6001
|
+
}
|
|
6002
|
+
|
|
6003
|
+
export declare const pillStyles: ElementStyles;
|
|
6004
|
+
|
|
5927
6005
|
export declare const plusIcon: () => string;
|
|
5928
6006
|
|
|
5929
6007
|
/**
|
package/dist/react.cjs
CHANGED
|
@@ -64,6 +64,7 @@ const { NumberField: NumberFieldWC } = require('./esm/number-field/number-field.
|
|
|
64
64
|
const { Optgroup: OptgroupWC } = require('./esm/optgroup/optgroup.js');
|
|
65
65
|
const { MultiselectDatasource: MultiselectDatasourceWC } = require('./esm/options-datasource/multiselect-datasource.js');
|
|
66
66
|
const { OptionsDatasource: OptionsDatasourceWC } = require('./esm/options-datasource/options-datasource.js');
|
|
67
|
+
const { Pill: PillWC } = require('./esm/pill/pill.js');
|
|
67
68
|
const { Popper: PopperWC } = require('./esm/popper/popper.js');
|
|
68
69
|
const { ProgressRing: ProgressRingWC } = require('./esm/progress-ring/progress-ring.js');
|
|
69
70
|
const { Progress: ProgressWC } = require('./esm/progress/progress.js');
|
|
@@ -111,11 +112,6 @@ function _mergeRefs(...refs) {
|
|
|
111
112
|
};
|
|
112
113
|
}
|
|
113
114
|
|
|
114
|
-
const Accordion = React.forwardRef(function Accordion(props, ref) {
|
|
115
|
-
const { children, ...rest } = props;
|
|
116
|
-
return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
|
|
117
|
-
});
|
|
118
|
-
|
|
119
115
|
const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
|
|
120
116
|
const { children, ...rest } = props;
|
|
121
117
|
return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
|
|
@@ -126,6 +122,11 @@ const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
|
|
|
126
122
|
return React.createElement(customElements.getName(ActionsMenuWC) ?? '%%prefix%%-actions-menu', { ...rest, ref }, children);
|
|
127
123
|
});
|
|
128
124
|
|
|
125
|
+
const Accordion = React.forwardRef(function Accordion(props, ref) {
|
|
126
|
+
const { children, ...rest } = props;
|
|
127
|
+
return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
|
|
128
|
+
});
|
|
129
|
+
|
|
129
130
|
const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref) {
|
|
130
131
|
const { onCriteriaChanged, onValidationErrors, children, ...rest } = props;
|
|
131
132
|
const _innerRef = React.useRef(null);
|
|
@@ -766,6 +767,28 @@ const OptionsDatasource = React.forwardRef(function OptionsDatasource(props, ref
|
|
|
766
767
|
return React.createElement(customElements.getName(OptionsDatasourceWC) ?? 'options-datasource', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
767
768
|
});
|
|
768
769
|
|
|
770
|
+
const Pill = React.forwardRef(function Pill(props, ref) {
|
|
771
|
+
const { onRemove, onPillClick, children, ...rest } = props;
|
|
772
|
+
const _innerRef = React.useRef(null);
|
|
773
|
+
const _onRemoveRef = React.useRef(onRemove);
|
|
774
|
+
_onRemoveRef.current = onRemove;
|
|
775
|
+
const _onPillClickRef = React.useRef(onPillClick);
|
|
776
|
+
_onPillClickRef.current = onPillClick;
|
|
777
|
+
React.useLayoutEffect(() => {
|
|
778
|
+
const el = _innerRef.current;
|
|
779
|
+
if (!el) return;
|
|
780
|
+
const _onRemoveFn = (e) => _onRemoveRef.current?.(e);
|
|
781
|
+
el.addEventListener('remove', _onRemoveFn);
|
|
782
|
+
const _onPillClickFn = (e) => _onPillClickRef.current?.(e);
|
|
783
|
+
el.addEventListener('pill-click', _onPillClickFn);
|
|
784
|
+
return () => {
|
|
785
|
+
el.removeEventListener('remove', _onRemoveFn);
|
|
786
|
+
el.removeEventListener('pill-click', _onPillClickFn);
|
|
787
|
+
};
|
|
788
|
+
}, []);
|
|
789
|
+
return React.createElement(customElements.getName(PillWC) ?? '%%prefix%%-pill', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
790
|
+
});
|
|
791
|
+
|
|
769
792
|
const Popper = React.forwardRef(function Popper(props, ref) {
|
|
770
793
|
const { children, ...rest } = props;
|
|
771
794
|
return React.createElement(customElements.getName(PopperWC) ?? '%%prefix%%-popper', { ...rest, ref }, children);
|
|
@@ -1102,9 +1125,9 @@ const WeeklyRecurrence = React.forwardRef(function WeeklyRecurrence(props, ref)
|
|
|
1102
1125
|
});
|
|
1103
1126
|
|
|
1104
1127
|
module.exports = {
|
|
1105
|
-
Accordion,
|
|
1106
1128
|
AccordionItem,
|
|
1107
1129
|
ActionsMenu,
|
|
1130
|
+
Accordion,
|
|
1108
1131
|
AiCriteriaSearch,
|
|
1109
1132
|
AiIndicator,
|
|
1110
1133
|
Anchor,
|
|
@@ -1160,6 +1183,7 @@ module.exports = {
|
|
|
1160
1183
|
Optgroup,
|
|
1161
1184
|
MultiselectDatasource,
|
|
1162
1185
|
OptionsDatasource,
|
|
1186
|
+
Pill,
|
|
1163
1187
|
Popper,
|
|
1164
1188
|
Progress,
|
|
1165
1189
|
ProgressRing,
|
package/dist/react.mjs
CHANGED
|
@@ -62,6 +62,7 @@ import { NumberField as NumberFieldWC } from './esm/number-field/number-field.js
|
|
|
62
62
|
import { Optgroup as OptgroupWC } from './esm/optgroup/optgroup.js';
|
|
63
63
|
import { MultiselectDatasource as MultiselectDatasourceWC } from './esm/options-datasource/multiselect-datasource.js';
|
|
64
64
|
import { OptionsDatasource as OptionsDatasourceWC } from './esm/options-datasource/options-datasource.js';
|
|
65
|
+
import { Pill as PillWC } from './esm/pill/pill.js';
|
|
65
66
|
import { Popper as PopperWC } from './esm/popper/popper.js';
|
|
66
67
|
import { ProgressRing as ProgressRingWC } from './esm/progress-ring/progress-ring.js';
|
|
67
68
|
import { Progress as ProgressWC } from './esm/progress/progress.js';
|
|
@@ -109,11 +110,6 @@ function _mergeRefs(...refs) {
|
|
|
109
110
|
};
|
|
110
111
|
}
|
|
111
112
|
|
|
112
|
-
export const Accordion = React.forwardRef(function Accordion(props, ref) {
|
|
113
|
-
const { children, ...rest } = props;
|
|
114
|
-
return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
|
|
115
|
-
});
|
|
116
|
-
|
|
117
113
|
export const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
|
|
118
114
|
const { children, ...rest } = props;
|
|
119
115
|
return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
|
|
@@ -124,6 +120,11 @@ export const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
|
|
|
124
120
|
return React.createElement(customElements.getName(ActionsMenuWC) ?? '%%prefix%%-actions-menu', { ...rest, ref }, children);
|
|
125
121
|
});
|
|
126
122
|
|
|
123
|
+
export const Accordion = React.forwardRef(function Accordion(props, ref) {
|
|
124
|
+
const { children, ...rest } = props;
|
|
125
|
+
return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
|
|
126
|
+
});
|
|
127
|
+
|
|
127
128
|
export const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref) {
|
|
128
129
|
const { onCriteriaChanged, onValidationErrors, children, ...rest } = props;
|
|
129
130
|
const _innerRef = React.useRef(null);
|
|
@@ -764,6 +765,28 @@ export const OptionsDatasource = React.forwardRef(function OptionsDatasource(pro
|
|
|
764
765
|
return React.createElement(customElements.getName(OptionsDatasourceWC) ?? 'options-datasource', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
765
766
|
});
|
|
766
767
|
|
|
768
|
+
export const Pill = React.forwardRef(function Pill(props, ref) {
|
|
769
|
+
const { onRemove, onPillClick, children, ...rest } = props;
|
|
770
|
+
const _innerRef = React.useRef(null);
|
|
771
|
+
const _onRemoveRef = React.useRef(onRemove);
|
|
772
|
+
_onRemoveRef.current = onRemove;
|
|
773
|
+
const _onPillClickRef = React.useRef(onPillClick);
|
|
774
|
+
_onPillClickRef.current = onPillClick;
|
|
775
|
+
React.useLayoutEffect(() => {
|
|
776
|
+
const el = _innerRef.current;
|
|
777
|
+
if (!el) return;
|
|
778
|
+
const _onRemoveFn = (e) => _onRemoveRef.current?.(e);
|
|
779
|
+
el.addEventListener('remove', _onRemoveFn);
|
|
780
|
+
const _onPillClickFn = (e) => _onPillClickRef.current?.(e);
|
|
781
|
+
el.addEventListener('pill-click', _onPillClickFn);
|
|
782
|
+
return () => {
|
|
783
|
+
el.removeEventListener('remove', _onRemoveFn);
|
|
784
|
+
el.removeEventListener('pill-click', _onPillClickFn);
|
|
785
|
+
};
|
|
786
|
+
}, []);
|
|
787
|
+
return React.createElement(customElements.getName(PillWC) ?? '%%prefix%%-pill', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
788
|
+
});
|
|
789
|
+
|
|
767
790
|
export const Popper = React.forwardRef(function Popper(props, ref) {
|
|
768
791
|
const { children, ...rest } = props;
|
|
769
792
|
return React.createElement(customElements.getName(PopperWC) ?? '%%prefix%%-popper', { ...rest, ref }, children);
|
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.
|
|
4
|
+
"version": "14.501.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -85,13 +85,13 @@
|
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@genesislcap/foundation-testing": "14.
|
|
89
|
-
"@genesislcap/genx": "14.
|
|
90
|
-
"@genesislcap/rollup-builder": "14.
|
|
91
|
-
"@genesislcap/ts-builder": "14.
|
|
92
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
93
|
-
"@genesislcap/vite-builder": "14.
|
|
94
|
-
"@genesislcap/webpack-builder": "14.
|
|
88
|
+
"@genesislcap/foundation-testing": "14.501.0",
|
|
89
|
+
"@genesislcap/genx": "14.501.0",
|
|
90
|
+
"@genesislcap/rollup-builder": "14.501.0",
|
|
91
|
+
"@genesislcap/ts-builder": "14.501.0",
|
|
92
|
+
"@genesislcap/uvu-playwright-builder": "14.501.0",
|
|
93
|
+
"@genesislcap/vite-builder": "14.501.0",
|
|
94
|
+
"@genesislcap/webpack-builder": "14.501.0",
|
|
95
95
|
"copyfiles": "^2.4.1"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
@@ -100,16 +100,16 @@
|
|
|
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.
|
|
104
|
-
"@genesislcap/foundation-ai": "14.
|
|
105
|
-
"@genesislcap/foundation-comms": "14.
|
|
106
|
-
"@genesislcap/foundation-criteria": "14.
|
|
107
|
-
"@genesislcap/foundation-errors": "14.
|
|
108
|
-
"@genesislcap/foundation-events": "14.
|
|
109
|
-
"@genesislcap/foundation-logger": "14.
|
|
110
|
-
"@genesislcap/foundation-notifications": "14.
|
|
111
|
-
"@genesislcap/foundation-user": "14.
|
|
112
|
-
"@genesislcap/foundation-utils": "14.
|
|
103
|
+
"@genesislcap/expression-builder": "14.501.0",
|
|
104
|
+
"@genesislcap/foundation-ai": "14.501.0",
|
|
105
|
+
"@genesislcap/foundation-comms": "14.501.0",
|
|
106
|
+
"@genesislcap/foundation-criteria": "14.501.0",
|
|
107
|
+
"@genesislcap/foundation-errors": "14.501.0",
|
|
108
|
+
"@genesislcap/foundation-events": "14.501.0",
|
|
109
|
+
"@genesislcap/foundation-logger": "14.501.0",
|
|
110
|
+
"@genesislcap/foundation-notifications": "14.501.0",
|
|
111
|
+
"@genesislcap/foundation-user": "14.501.0",
|
|
112
|
+
"@genesislcap/foundation-utils": "14.501.0",
|
|
113
113
|
"@microsoft/fast-colors": "5.3.1",
|
|
114
114
|
"@microsoft/fast-components": "2.30.6",
|
|
115
115
|
"@microsoft/fast-element": "1.14.0",
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"require": "./dist/react.cjs"
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "4fccf90855cbd10b0289566a75a95120a2be4384"
|
|
146
146
|
}
|