@momentum-design/components 0.129.23 → 0.129.25

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.
@@ -39,7 +39,7 @@ declare class ScreenreaderAnnouncer extends Component {
39
39
  *
40
40
  * @default ''
41
41
  */
42
- announcement: string;
42
+ announcement?: string;
43
43
  /**
44
44
  * The id of the element in the light dom, to which announcement elements will be appended.
45
45
  *
@@ -223,7 +223,7 @@ class ScreenreaderAnnouncer extends Component {
223
223
  setupDebouncedAnnounce() {
224
224
  // create single debounced function that will read latest this.announcement when executed
225
225
  this.debouncedAnnounce = debounce(() => {
226
- if (this.announcement.length > 0) {
226
+ if (this.announcement && this.announcement.length > 0) {
227
227
  this.announce(this.announcement, this.delay, this.timeout, this.dataAriaLive);
228
228
  this.announcement = '';
229
229
  }
@@ -254,7 +254,7 @@ class ScreenreaderAnnouncer extends Component {
254
254
  // Reinitiate debounced function if debounceTime changed
255
255
  this.setupDebouncedAnnounce();
256
256
  }
257
- if (changedProperties.has('announcement') && this.announcement.length > 0) {
257
+ if (changedProperties.has('announcement') && this.announcement && this.announcement.length > 0) {
258
258
  (_a = this.debouncedAnnounce) === null || _a === void 0 ? void 0 : _a.call(this);
259
259
  }
260
260
  }
@@ -2,8 +2,9 @@ import type { OverrideEventTarget, TypedCustomEvent, ValueOf } from '../../utils
2
2
  import type Toggle from './toggle.component';
3
3
  import { TOGGLE_SIZE } from './toggle.constants';
4
4
  type ToggleSize = ValueOf<typeof TOGGLE_SIZE>;
5
+ type ToggleOnChangeEvent = TypedCustomEvent<Toggle>;
5
6
  interface Events {
6
- onChangeEvent: TypedCustomEvent<Toggle>;
7
+ onChangeEvent: ToggleOnChangeEvent;
7
8
  onFocusEvent: OverrideEventTarget<FocusEvent, Toggle>;
8
9
  }
9
- export type { ToggleSize, Events };
10
+ export type { ToggleSize, Events, ToggleOnChangeEvent };
@@ -153,8 +153,8 @@
153
153
  "attribute": "disabled",
154
154
  "reflects": true,
155
155
  "inheritedFrom": {
156
- "name": "DisabledMixin",
157
- "module": "utils/mixins/DisabledMixin.js"
156
+ "name": "AccordionButton",
157
+ "module": "components/accordionbutton/accordionbutton.component.js"
158
158
  }
159
159
  },
160
160
  {
@@ -412,8 +412,8 @@
412
412
  "default": "undefined",
413
413
  "fieldName": "disabled",
414
414
  "inheritedFrom": {
415
- "name": "DisabledMixin",
416
- "module": "src/utils/mixins/DisabledMixin.ts"
415
+ "name": "AccordionButton",
416
+ "module": "src/components/accordionbutton/accordionbutton.component.ts"
417
417
  }
418
418
  },
419
419
  {
@@ -38690,7 +38690,7 @@
38690
38690
  "kind": "field",
38691
38691
  "name": "announcement",
38692
38692
  "type": {
38693
- "text": "string"
38693
+ "text": "string | undefined"
38694
38694
  },
38695
38695
  "default": "''",
38696
38696
  "description": "The announcement attribute is a string that is used to announce messages to the screen reader.\nThe announcement is made when the announcement attribute is set to a non-empty string.",
@@ -38775,7 +38775,7 @@
38775
38775
  {
38776
38776
  "name": "announcement",
38777
38777
  "type": {
38778
- "text": "string"
38778
+ "text": "string | undefined"
38779
38779
  },
38780
38780
  "default": "''",
38781
38781
  "description": "The announcement attribute is a string that is used to announce messages to the screen reader.\nThe announcement is made when the announcement attribute is set to a non-empty string.",
package/dist/index.d.ts CHANGED
@@ -104,6 +104,7 @@ import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES }
104
104
  import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
105
105
  import { inMemoryCache, webAPIAssetsCache } from './utils/assets-cache';
106
106
  import type { TablistChangeEvent } from './components/tablist/tablist.types';
107
+ import type { ToggleOnChangeEvent } from './components/toggle/toggle.types';
107
108
  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, ResponsiveSettingsProvider, 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, };
108
- export type { BadgeType, ChipColorType, 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, };
109
+ export type { BadgeType, ChipColorType, 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, ToggleOnChangeEvent, };
109
110
  export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIAssetsCache, };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@momentum-design/components",
3
3
  "packageManager": "yarn@3.2.4",
4
- "version": "0.129.23",
4
+ "version": "0.129.25",
5
5
  "engines": {
6
6
  "node": ">=20.0.0",
7
7
  "npm": ">=8.0.0"