@descope/flow-components 3.27.0 → 3.27.2
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/fm/222.js +1 -1
- package/dist/fm/222.js.map +1 -1
- package/dist/fm/734.js +1 -1
- package/dist/fm/734.js.map +1 -1
- package/dist/fm/761.js +1 -1
- package/dist/fm/761.js.map +1 -1
- package/dist/fm/985.js +1 -1
- package/dist/fm/985.js.map +1 -1
- package/dist/fm/@mf-types/compiled-types/Button/Button.d.ts +1 -0
- package/dist/fm/__federation_expose_componentClasses.js +1 -1
- package/dist/fm/__federation_expose_componentClasses.js.map +1 -1
- package/dist/fm/__federation_expose_components.js +1 -1
- package/dist/fm/__federation_expose_theme.js +1 -1
- package/dist/fm/__federation_expose_theme.js.map +1 -1
- package/dist/fm/flowComponents.js +1 -1
- package/dist/fm/flowComponents.js.map +1 -1
- package/dist/fm/main.js +1 -1
- package/dist/fm/main.js.map +1 -1
- package/dist/fm/mf-manifest.json +1 -1
- package/dist/fm/mf-stats.json +1 -1
- package/dist/index.cjs.js +20 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +9 -2
- package/dist/types/Button/Button.d.ts +1 -0
- package/package.json +2 -2
package/dist/fm/mf-manifest.json
CHANGED
package/dist/fm/mf-stats.json
CHANGED
package/dist/index.cjs.js
CHANGED
|
@@ -83604,7 +83604,7 @@ function requireIndex_cjs () {
|
|
|
83604
83604
|
padding: 0;
|
|
83605
83605
|
}
|
|
83606
83606
|
`,
|
|
83607
|
-
excludeAttrsSync: ['tabindex', 'class', 'style'],
|
|
83607
|
+
excludeAttrsSync: ['tabindex', 'class', 'style', 'role'],
|
|
83608
83608
|
componentName: componentName$1u,
|
|
83609
83609
|
}),
|
|
83610
83610
|
);
|
|
@@ -90177,6 +90177,10 @@ function requireIndex_cjs () {
|
|
|
90177
90177
|
center: { [vars$V.textAlign]: 'center' },
|
|
90178
90178
|
},
|
|
90179
90179
|
|
|
90180
|
+
displayVariant: {
|
|
90181
|
+
buttons: { [vars$V.hostMinWidth]: '100px' },
|
|
90182
|
+
},
|
|
90183
|
+
|
|
90180
90184
|
_fullWidth: {
|
|
90181
90185
|
[vars$V.hostWidth]: '100%',
|
|
90182
90186
|
},
|
|
@@ -92149,6 +92153,10 @@ function requireIndex_cjs () {
|
|
|
92149
92153
|
this,
|
|
92150
92154
|
);
|
|
92151
92155
|
|
|
92156
|
+
// vaadin links the target via aria-describedby to its sr-label, which lives in our shadow root,
|
|
92157
|
+
// so a slotted target would reference an ID from another DOM tree.
|
|
92158
|
+
this.tooltip.ariaTarget = this.anchored;
|
|
92159
|
+
|
|
92152
92160
|
this.defaultSlot.addEventListener('slotchange', () =>
|
|
92153
92161
|
this.#setTooltipTarget(),
|
|
92154
92162
|
);
|
|
@@ -102265,6 +102273,7 @@ descope-enriched-text {
|
|
|
102265
102273
|
tabindex="-1"
|
|
102266
102274
|
slot="input"
|
|
102267
102275
|
role="textbox"
|
|
102276
|
+
aria-label="passcode"
|
|
102268
102277
|
><slot></slot></${componentName$F}>
|
|
102269
102278
|
`;
|
|
102270
102279
|
|
|
@@ -105222,7 +105231,7 @@ descope-enriched-text {
|
|
|
105222
105231
|
</div>
|
|
105223
105232
|
<div class="description"></div>
|
|
105224
105233
|
<div class="button-wrapper">
|
|
105225
|
-
<input type="file" tabindex="-1" aria-
|
|
105234
|
+
<input type="file" tabindex="-1" aria-hidden="true"/>
|
|
105226
105235
|
<descope-button id="button"></descope-button>
|
|
105227
105236
|
</div>
|
|
105228
105237
|
</div>
|
|
@@ -114169,12 +114178,19 @@ const Tooltip = React__default.default.forwardRef(({ text, hideDelay = 0, hoverD
|
|
|
114169
114178
|
|
|
114170
114179
|
const Button = React__default.default.forwardRef(({
|
|
114171
114180
|
// Button props
|
|
114172
|
-
children, startIcon, startIconDark, startIconColorText, color = 'primary', size = 'md', variant = 'contained', 'data-name': dataName,
|
|
114181
|
+
children, startIcon, startIconDark, startIconColorText, color = 'primary', size = 'md', variant = 'contained', 'data-name': dataName, ariaLabel,
|
|
114173
114182
|
// Tooltip props
|
|
114174
114183
|
hasTooltip, tooltipText, tooltipPosition, tooltipHoverDelay, tooltipHideDelay, tooltipOpened, tooltipReadOnly, ...props }, ref) => {
|
|
114175
114184
|
const isSquare = React.useMemo(() => !!(startIcon && !children), [startIcon, children]);
|
|
114185
|
+
const tooltipLabel = tooltipText?.trim();
|
|
114186
|
+
const fallbackLabel = isSquare &&
|
|
114187
|
+
hasTooltip &&
|
|
114188
|
+
tooltipLabel &&
|
|
114189
|
+
!/[*_`~[\]<>#\\]/.test(tooltipLabel)
|
|
114190
|
+
? tooltipLabel
|
|
114191
|
+
: undefined;
|
|
114176
114192
|
return (React__default.default.createElement(Tooltip, { text: hasTooltip ? tooltipText : undefined, position: tooltipPosition, hoverDelay: tooltipHoverDelay, hideDelay: tooltipHideDelay, opened: tooltipOpened, readonly: tooltipReadOnly },
|
|
114177
|
-
React__default.default.createElement("descope-button", { ...props, size: size, variant: variant, mode: color, ref: ref, square: isSquare, "data-name": dataName },
|
|
114193
|
+
React__default.default.createElement("descope-button", { ...props, size: size, variant: variant, mode: color, ref: ref, square: isSquare, "data-name": dataName, "aria-label": ariaLabel || props['aria-label'] || fallbackLabel },
|
|
114178
114194
|
startIcon != null && (React__default.default.createElement(Icon, { "data-name": `${dataName}-icon`, icon: startIcon, "src-dark": startIconDark, noColor: startIconColorText })),
|
|
114179
114195
|
children)));
|
|
114180
114196
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -196,6 +196,7 @@ declare const Button: React.ForwardRefExoticComponent<Omit<React.ClassAttributes
|
|
|
196
196
|
startIconColorText?: boolean;
|
|
197
197
|
'full-width'?: boolean;
|
|
198
198
|
'data-name'?: string;
|
|
199
|
+
ariaLabel?: string;
|
|
199
200
|
} & ITooltip, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
200
201
|
|
|
201
202
|
type Props$R = {
|
package/dist/index.esm.js
CHANGED
|
@@ -167,12 +167,19 @@ const Tooltip = React.forwardRef(({ text, hideDelay = 0, hoverDelay = 0, childre
|
|
|
167
167
|
|
|
168
168
|
const Button = React.forwardRef(({
|
|
169
169
|
// Button props
|
|
170
|
-
children, startIcon, startIconDark, startIconColorText, color = 'primary', size = 'md', variant = 'contained', 'data-name': dataName,
|
|
170
|
+
children, startIcon, startIconDark, startIconColorText, color = 'primary', size = 'md', variant = 'contained', 'data-name': dataName, ariaLabel,
|
|
171
171
|
// Tooltip props
|
|
172
172
|
hasTooltip, tooltipText, tooltipPosition, tooltipHoverDelay, tooltipHideDelay, tooltipOpened, tooltipReadOnly, ...props }, ref) => {
|
|
173
173
|
const isSquare = useMemo(() => !!(startIcon && !children), [startIcon, children]);
|
|
174
|
+
const tooltipLabel = tooltipText?.trim();
|
|
175
|
+
const fallbackLabel = isSquare &&
|
|
176
|
+
hasTooltip &&
|
|
177
|
+
tooltipLabel &&
|
|
178
|
+
!/[*_`~[\]<>#\\]/.test(tooltipLabel)
|
|
179
|
+
? tooltipLabel
|
|
180
|
+
: undefined;
|
|
174
181
|
return (React.createElement(Tooltip, { text: hasTooltip ? tooltipText : undefined, position: tooltipPosition, hoverDelay: tooltipHoverDelay, hideDelay: tooltipHideDelay, opened: tooltipOpened, readonly: tooltipReadOnly },
|
|
175
|
-
React.createElement("descope-button", { ...props, size: size, variant: variant, mode: color, ref: ref, square: isSquare, "data-name": dataName },
|
|
182
|
+
React.createElement("descope-button", { ...props, size: size, variant: variant, mode: color, ref: ref, square: isSquare, "data-name": dataName, "aria-label": ariaLabel || props['aria-label'] || fallbackLabel },
|
|
176
183
|
startIcon != null && (React.createElement(Icon, { "data-name": `${dataName}-icon`, icon: startIcon, "src-dark": startIconDark, noColor: startIconColorText })),
|
|
177
184
|
children)));
|
|
178
185
|
});
|
|
@@ -22,5 +22,6 @@ declare const Button: React.ForwardRefExoticComponent<Omit<React.ClassAttributes
|
|
|
22
22
|
startIconColorText?: boolean;
|
|
23
23
|
'full-width'?: boolean;
|
|
24
24
|
'data-name'?: string;
|
|
25
|
+
ariaLabel?: string;
|
|
25
26
|
} & ITooltip, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
26
27
|
export default Button;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descope/flow-components",
|
|
3
|
-
"version": "3.27.
|
|
3
|
+
"version": "3.27.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"webpack-subresource-integrity": "5.2.0-rc.1"
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
|
-
"@descope/web-components-ui": "3.27.
|
|
101
|
+
"@descope/web-components-ui": "3.27.2"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
104
|
"react": ">= 18"
|