@momentum-design/components 0.122.4 → 0.122.6
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/browser/index.js +3 -3
- package/dist/browser/index.js.map +2 -2
- package/dist/components/popover/popover.component.d.ts +7 -0
- package/dist/components/popover/popover.component.js +13 -0
- package/dist/components/popover/popover.constants.d.ts +1 -0
- package/dist/components/popover/popover.constants.js +1 -0
- package/dist/components/tablist/tablist.types.d.ts +5 -4
- package/dist/custom-elements.json +132 -0
- package/dist/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -323,6 +323,13 @@ declare class Popover extends Popover_base {
|
|
|
323
323
|
* Useful for scenarios where both a popover and a tooltip are linked to the same trigger element.
|
|
324
324
|
*/
|
|
325
325
|
keepConnectedTooltipOpen: boolean;
|
|
326
|
+
/**
|
|
327
|
+
* Whether to update the position of the Popover on every animation frame if required.
|
|
328
|
+
* While optimized for performance, it should be used sparingly and with caution.
|
|
329
|
+
*
|
|
330
|
+
* @default false
|
|
331
|
+
*/
|
|
332
|
+
animationFrame: boolean;
|
|
326
333
|
arrowElement: HTMLElement | null;
|
|
327
334
|
/** @internal */
|
|
328
335
|
private hoverTimer;
|
|
@@ -337,6 +337,13 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
337
337
|
* Useful for scenarios where both a popover and a tooltip are linked to the same trigger element.
|
|
338
338
|
*/
|
|
339
339
|
this.keepConnectedTooltipOpen = DEFAULTS.KEEP_CONNECTED_TOOLTIP_OPEN;
|
|
340
|
+
/**
|
|
341
|
+
* Whether to update the position of the Popover on every animation frame if required.
|
|
342
|
+
* While optimized for performance, it should be used sparingly and with caution.
|
|
343
|
+
*
|
|
344
|
+
* @default false
|
|
345
|
+
*/
|
|
346
|
+
this.animationFrame = DEFAULTS.ANIMATION_FRAME;
|
|
340
347
|
this.arrowElement = null;
|
|
341
348
|
/** @internal */
|
|
342
349
|
this.hoverTimer = null;
|
|
@@ -661,6 +668,8 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
661
668
|
if (this.trigger.includes('mouseenter')) {
|
|
662
669
|
this.utils.setupHoverBridge(placement);
|
|
663
670
|
}
|
|
671
|
+
}, {
|
|
672
|
+
animationFrame: this.animationFrame,
|
|
664
673
|
});
|
|
665
674
|
};
|
|
666
675
|
this.utils = new PopoverUtils(this);
|
|
@@ -1057,4 +1066,8 @@ __decorate([
|
|
|
1057
1066
|
property({ type: Boolean, reflect: true, attribute: 'keep-connected-tooltip-open' }),
|
|
1058
1067
|
__metadata("design:type", Boolean)
|
|
1059
1068
|
], Popover.prototype, "keepConnectedTooltipOpen", void 0);
|
|
1069
|
+
__decorate([
|
|
1070
|
+
property({ type: Boolean, reflect: true, attribute: 'animation-frame' }),
|
|
1071
|
+
__metadata("design:type", Boolean)
|
|
1072
|
+
], Popover.prototype, "animationFrame", void 0);
|
|
1060
1073
|
export default Popover;
|
|
@@ -56,5 +56,6 @@ declare const DEFAULTS: {
|
|
|
56
56
|
readonly PROPAGATE_EVENT_ON_ESCAPE: false;
|
|
57
57
|
readonly KEEP_CONNECTED_TOOLTIP_OPEN: false;
|
|
58
58
|
readonly IS_BACKDROP_INVISIBLE: true;
|
|
59
|
+
readonly ANIMATION_FRAME: false;
|
|
59
60
|
};
|
|
60
61
|
export { TAG_NAME, POPOVER_PLACEMENT, COLOR, STRATEGY, TRIGGER, DEFAULTS };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { TypedCustomEvent, ValueOf } from '../../utils/types';
|
|
2
2
|
import type TabList from './tablist.component';
|
|
3
3
|
import { ARROW_BUTTON_DIRECTION } from './tablist.constants';
|
|
4
|
+
type TablistChangeEvent = TypedCustomEvent<TabList, {
|
|
5
|
+
tabId: string;
|
|
6
|
+
}>;
|
|
4
7
|
interface Events {
|
|
5
|
-
onChangeEvent:
|
|
6
|
-
tabId: string;
|
|
7
|
-
}>;
|
|
8
|
+
onChangeEvent: TablistChangeEvent;
|
|
8
9
|
}
|
|
9
10
|
type ArrowButtonDirectionType = ValueOf<typeof ARROW_BUTTON_DIRECTION>;
|
|
10
|
-
export { ArrowButtonDirectionType, Events };
|
|
11
|
+
export type { ArrowButtonDirectionType, Events, TablistChangeEvent };
|
|
@@ -12834,6 +12834,21 @@
|
|
|
12834
12834
|
"module": "components/popover/popover.component.js"
|
|
12835
12835
|
}
|
|
12836
12836
|
},
|
|
12837
|
+
{
|
|
12838
|
+
"kind": "field",
|
|
12839
|
+
"name": "animationFrame",
|
|
12840
|
+
"type": {
|
|
12841
|
+
"text": "boolean"
|
|
12842
|
+
},
|
|
12843
|
+
"description": "Whether to update the position of the Popover on every animation frame if required.\nWhile optimized for performance, it should be used sparingly and with caution.",
|
|
12844
|
+
"default": "false",
|
|
12845
|
+
"attribute": "animation-frame",
|
|
12846
|
+
"reflects": true,
|
|
12847
|
+
"inheritedFrom": {
|
|
12848
|
+
"name": "Popover",
|
|
12849
|
+
"module": "components/popover/popover.component.js"
|
|
12850
|
+
}
|
|
12851
|
+
},
|
|
12837
12852
|
{
|
|
12838
12853
|
"kind": "field",
|
|
12839
12854
|
"name": "arrowElement",
|
|
@@ -13604,6 +13619,19 @@
|
|
|
13604
13619
|
"name": "Popover",
|
|
13605
13620
|
"module": "src/components/popover/popover.component.ts"
|
|
13606
13621
|
}
|
|
13622
|
+
},
|
|
13623
|
+
{
|
|
13624
|
+
"name": "animation-frame",
|
|
13625
|
+
"type": {
|
|
13626
|
+
"text": "boolean"
|
|
13627
|
+
},
|
|
13628
|
+
"description": "Whether to update the position of the Popover on every animation frame if required.\nWhile optimized for performance, it should be used sparingly and with caution.",
|
|
13629
|
+
"default": "false",
|
|
13630
|
+
"fieldName": "animationFrame",
|
|
13631
|
+
"inheritedFrom": {
|
|
13632
|
+
"name": "Popover",
|
|
13633
|
+
"module": "src/components/popover/popover.component.ts"
|
|
13634
|
+
}
|
|
13607
13635
|
}
|
|
13608
13636
|
],
|
|
13609
13637
|
"superclass": {
|
|
@@ -27965,6 +27993,21 @@
|
|
|
27965
27993
|
"module": "components/popover/popover.component.js"
|
|
27966
27994
|
}
|
|
27967
27995
|
},
|
|
27996
|
+
{
|
|
27997
|
+
"kind": "field",
|
|
27998
|
+
"name": "animationFrame",
|
|
27999
|
+
"type": {
|
|
28000
|
+
"text": "boolean"
|
|
28001
|
+
},
|
|
28002
|
+
"description": "Whether to update the position of the Popover on every animation frame if required.\nWhile optimized for performance, it should be used sparingly and with caution.",
|
|
28003
|
+
"default": "false",
|
|
28004
|
+
"attribute": "animation-frame",
|
|
28005
|
+
"reflects": true,
|
|
28006
|
+
"inheritedFrom": {
|
|
28007
|
+
"name": "Popover",
|
|
28008
|
+
"module": "components/popover/popover.component.js"
|
|
28009
|
+
}
|
|
28010
|
+
},
|
|
27968
28011
|
{
|
|
27969
28012
|
"kind": "field",
|
|
27970
28013
|
"name": "arrowElement",
|
|
@@ -28693,6 +28736,19 @@
|
|
|
28693
28736
|
"name": "Popover",
|
|
28694
28737
|
"module": "src/components/popover/popover.component.ts"
|
|
28695
28738
|
}
|
|
28739
|
+
},
|
|
28740
|
+
{
|
|
28741
|
+
"name": "animation-frame",
|
|
28742
|
+
"type": {
|
|
28743
|
+
"text": "boolean"
|
|
28744
|
+
},
|
|
28745
|
+
"description": "Whether to update the position of the Popover on every animation frame if required.\nWhile optimized for performance, it should be used sparingly and with caution.",
|
|
28746
|
+
"default": "false",
|
|
28747
|
+
"fieldName": "animationFrame",
|
|
28748
|
+
"inheritedFrom": {
|
|
28749
|
+
"name": "Popover",
|
|
28750
|
+
"module": "src/components/popover/popover.component.ts"
|
|
28751
|
+
}
|
|
28696
28752
|
}
|
|
28697
28753
|
],
|
|
28698
28754
|
"superclass": {
|
|
@@ -33267,6 +33323,17 @@
|
|
|
33267
33323
|
"attribute": "keep-connected-tooltip-open",
|
|
33268
33324
|
"reflects": true
|
|
33269
33325
|
},
|
|
33326
|
+
{
|
|
33327
|
+
"kind": "field",
|
|
33328
|
+
"name": "animationFrame",
|
|
33329
|
+
"type": {
|
|
33330
|
+
"text": "boolean"
|
|
33331
|
+
},
|
|
33332
|
+
"description": "Whether to update the position of the Popover on every animation frame if required.\nWhile optimized for performance, it should be used sparingly and with caution.",
|
|
33333
|
+
"default": "false",
|
|
33334
|
+
"attribute": "animation-frame",
|
|
33335
|
+
"reflects": true
|
|
33336
|
+
},
|
|
33270
33337
|
{
|
|
33271
33338
|
"kind": "field",
|
|
33272
33339
|
"name": "arrowElement",
|
|
@@ -34295,6 +34362,15 @@
|
|
|
34295
34362
|
"description": "Controls the visibility of a connected tooltip when this popover is open.\n- If set to `true`, the tooltip remains open alongside the popover.\n- If set to `false`, the tooltip will be closed when the popover opens.\nUseful for scenarios where both a popover and a tooltip are linked to the same trigger element.",
|
|
34296
34363
|
"fieldName": "keepConnectedTooltipOpen"
|
|
34297
34364
|
},
|
|
34365
|
+
{
|
|
34366
|
+
"name": "animation-frame",
|
|
34367
|
+
"type": {
|
|
34368
|
+
"text": "boolean"
|
|
34369
|
+
},
|
|
34370
|
+
"description": "Whether to update the position of the Popover on every animation frame if required.\nWhile optimized for performance, it should be used sparingly and with caution.",
|
|
34371
|
+
"default": "false",
|
|
34372
|
+
"fieldName": "animationFrame"
|
|
34373
|
+
},
|
|
34298
34374
|
{
|
|
34299
34375
|
"name": "should-focus-trap-wrap",
|
|
34300
34376
|
"type": {
|
|
@@ -49489,6 +49565,21 @@
|
|
|
49489
49565
|
"module": "components/popover/popover.component.js"
|
|
49490
49566
|
}
|
|
49491
49567
|
},
|
|
49568
|
+
{
|
|
49569
|
+
"kind": "field",
|
|
49570
|
+
"name": "animationFrame",
|
|
49571
|
+
"type": {
|
|
49572
|
+
"text": "boolean"
|
|
49573
|
+
},
|
|
49574
|
+
"description": "Whether to update the position of the Popover on every animation frame if required.\nWhile optimized for performance, it should be used sparingly and with caution.",
|
|
49575
|
+
"default": "false",
|
|
49576
|
+
"attribute": "animation-frame",
|
|
49577
|
+
"reflects": true,
|
|
49578
|
+
"inheritedFrom": {
|
|
49579
|
+
"name": "Popover",
|
|
49580
|
+
"module": "components/popover/popover.component.js"
|
|
49581
|
+
}
|
|
49582
|
+
},
|
|
49492
49583
|
{
|
|
49493
49584
|
"kind": "field",
|
|
49494
49585
|
"name": "arrowElement",
|
|
@@ -50267,6 +50358,19 @@
|
|
|
50267
50358
|
"name": "Popover",
|
|
50268
50359
|
"module": "src/components/popover/popover.component.ts"
|
|
50269
50360
|
}
|
|
50361
|
+
},
|
|
50362
|
+
{
|
|
50363
|
+
"name": "animation-frame",
|
|
50364
|
+
"type": {
|
|
50365
|
+
"text": "boolean"
|
|
50366
|
+
},
|
|
50367
|
+
"description": "Whether to update the position of the Popover on every animation frame if required.\nWhile optimized for performance, it should be used sparingly and with caution.",
|
|
50368
|
+
"default": "false",
|
|
50369
|
+
"fieldName": "animationFrame",
|
|
50370
|
+
"inheritedFrom": {
|
|
50371
|
+
"name": "Popover",
|
|
50372
|
+
"module": "src/components/popover/popover.component.ts"
|
|
50373
|
+
}
|
|
50270
50374
|
}
|
|
50271
50375
|
],
|
|
50272
50376
|
"superclass": {
|
|
@@ -51560,6 +51664,21 @@
|
|
|
51560
51664
|
"module": "components/popover/popover.component.js"
|
|
51561
51665
|
}
|
|
51562
51666
|
},
|
|
51667
|
+
{
|
|
51668
|
+
"kind": "field",
|
|
51669
|
+
"name": "animationFrame",
|
|
51670
|
+
"type": {
|
|
51671
|
+
"text": "boolean"
|
|
51672
|
+
},
|
|
51673
|
+
"description": "Whether to update the position of the Popover on every animation frame if required.\nWhile optimized for performance, it should be used sparingly and with caution.",
|
|
51674
|
+
"default": "false",
|
|
51675
|
+
"attribute": "animation-frame",
|
|
51676
|
+
"reflects": true,
|
|
51677
|
+
"inheritedFrom": {
|
|
51678
|
+
"name": "Popover",
|
|
51679
|
+
"module": "components/popover/popover.component.js"
|
|
51680
|
+
}
|
|
51681
|
+
},
|
|
51563
51682
|
{
|
|
51564
51683
|
"kind": "field",
|
|
51565
51684
|
"name": "arrowElement",
|
|
@@ -52339,6 +52458,19 @@
|
|
|
52339
52458
|
"name": "Popover",
|
|
52340
52459
|
"module": "src/components/popover/popover.component.ts"
|
|
52341
52460
|
}
|
|
52461
|
+
},
|
|
52462
|
+
{
|
|
52463
|
+
"name": "animation-frame",
|
|
52464
|
+
"type": {
|
|
52465
|
+
"text": "boolean"
|
|
52466
|
+
},
|
|
52467
|
+
"description": "Whether to update the position of the Popover on every animation frame if required.\nWhile optimized for performance, it should be used sparingly and with caution.",
|
|
52468
|
+
"default": "false",
|
|
52469
|
+
"fieldName": "animationFrame",
|
|
52470
|
+
"inheritedFrom": {
|
|
52471
|
+
"name": "Popover",
|
|
52472
|
+
"module": "src/components/popover/popover.component.ts"
|
|
52473
|
+
}
|
|
52342
52474
|
}
|
|
52343
52475
|
],
|
|
52344
52476
|
"superclass": {
|
package/dist/index.d.ts
CHANGED
|
@@ -101,6 +101,7 @@ import type { TextareaInputEvent, TextareaChangeEvent, TextareaFocusEvent, Texta
|
|
|
101
101
|
import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES } from './components/button/button.constants';
|
|
102
102
|
import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
|
|
103
103
|
import { inMemoryCache, webAPIAssetsCache } from './utils/assets-cache';
|
|
104
|
+
import type { TablistChangeEvent } from './components/tablist/tablist.types';
|
|
104
105
|
export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, ControlTypeProvider, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Searchpopover, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, };
|
|
105
|
-
export type { BadgeType, ButtonColor, ButtonVariant, IconButtonSize, MenuPopoverActionEvent, MenuPopoverChangeEvent, MenuSectionChangeEvent, PillButtonSize, PopoverPlacement, SkeletonVariant, SelectChangeEvent, SelectInputEvent, SpinnerSize, SpinnerVariant, SliderChangeEvent, TextType, TypewriterType, InputInputEvent, InputChangeEvent, InputFocusEvent, InputBlurEvent, InputClearEvent, VirtualizedListScrollEvent, TextareaInputEvent, TextareaChangeEvent, TextareaFocusEvent, TextareaBlurEvent, TextareaLimitExceededEvent, };
|
|
106
|
+
export type { BadgeType, ButtonColor, ButtonVariant, IconButtonSize, MenuPopoverActionEvent, MenuPopoverChangeEvent, MenuSectionChangeEvent, PillButtonSize, PopoverPlacement, SkeletonVariant, SelectChangeEvent, SelectInputEvent, SpinnerSize, SpinnerVariant, SliderChangeEvent, TextType, TypewriterType, InputInputEvent, InputChangeEvent, InputFocusEvent, InputBlurEvent, InputClearEvent, VirtualizedListScrollEvent, TablistChangeEvent, TextareaInputEvent, TextareaChangeEvent, TextareaFocusEvent, TextareaBlurEvent, TextareaLimitExceededEvent, };
|
|
106
107
|
export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIAssetsCache, };
|