@ni/spright-components 4.1.10 → 4.1.12

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.
@@ -5250,7 +5250,7 @@
5250
5250
  /**
5251
5251
  * Standard orientation values
5252
5252
  */
5253
- const Orientation = {
5253
+ const Orientation$1 = {
5254
5254
  horizontal: "horizontal",
5255
5255
  vertical: "vertical",
5256
5256
  };
@@ -11695,34 +11695,6 @@
11695
11695
  ], NumberField$1.prototype, "defaultSlottedNodes", void 0);
11696
11696
  applyMixins(NumberField$1, StartEnd, DelegatesARIATextbox);
11697
11697
 
11698
- /**
11699
- * The template for the {@link @microsoft/fast-foundation#RadioGroup} component.
11700
- * @public
11701
- */
11702
- const radioGroupTemplate = (context, definition) => html `
11703
- <template
11704
- role="radiogroup"
11705
- aria-disabled="${x => x.disabled}"
11706
- aria-readonly="${x => x.readOnly}"
11707
- @click="${(x, c) => x.clickHandler(c.event)}"
11708
- @keydown="${(x, c) => x.keydownHandler(c.event)}"
11709
- @focusout="${(x, c) => x.focusOutHandler(c.event)}"
11710
- >
11711
- <slot name="label"></slot>
11712
- <div
11713
- class="positioning-region ${x => x.orientation === Orientation.horizontal ? "horizontal" : "vertical"}"
11714
- part="positioning-region"
11715
- >
11716
- <slot
11717
- ${slotted({
11718
- property: "slottedRadioButtons",
11719
- filter: elements("[role=radio]"),
11720
- })}
11721
- ></slot>
11722
- </div>
11723
- </template>
11724
- `;
11725
-
11726
11698
  /**
11727
11699
  * An Radio Group Custom HTML Element.
11728
11700
  * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#radiogroup | ARIA radiogroup }.
@@ -11744,7 +11716,7 @@
11744
11716
  * @remarks
11745
11717
  * HTML Attribute: orientation
11746
11718
  */
11747
- this.orientation = Orientation.horizontal;
11719
+ this.orientation = Orientation$1.horizontal;
11748
11720
  this.radioChangeHandler = (e) => {
11749
11721
  const changedRadio = e.target;
11750
11722
  if (changedRadio.checked) {
@@ -13596,19 +13568,19 @@
13596
13568
  */
13597
13569
  const ToolbarArrowKeyMap = Object.freeze({
13598
13570
  [ArrowKeys.ArrowUp]: {
13599
- [Orientation.vertical]: -1,
13571
+ [Orientation$1.vertical]: -1,
13600
13572
  },
13601
13573
  [ArrowKeys.ArrowDown]: {
13602
- [Orientation.vertical]: 1,
13574
+ [Orientation$1.vertical]: 1,
13603
13575
  },
13604
13576
  [ArrowKeys.ArrowLeft]: {
13605
- [Orientation.horizontal]: {
13577
+ [Orientation$1.horizontal]: {
13606
13578
  [Direction$1.ltr]: -1,
13607
13579
  [Direction$1.rtl]: 1,
13608
13580
  },
13609
13581
  },
13610
13582
  [ArrowKeys.ArrowRight]: {
13611
- [Orientation.horizontal]: {
13583
+ [Orientation$1.horizontal]: {
13612
13584
  [Direction$1.ltr]: 1,
13613
13585
  [Direction$1.rtl]: -1,
13614
13586
  },
@@ -13648,7 +13620,7 @@
13648
13620
  * @remarks
13649
13621
  * HTML Attribute: `orientation`
13650
13622
  */
13651
- this.orientation = Orientation.horizontal;
13623
+ this.orientation = Orientation$1.horizontal;
13652
13624
  }
13653
13625
  /**
13654
13626
  * The index of the currently focused element, clamped between 0 and the last element.
@@ -16417,6 +16389,14 @@
16417
16389
  const prefix = 'ni-nimble';
16418
16390
  const styleNameFromTokenName = (tokenName) => `${prefix}-${tokenName}`;
16419
16391
 
16392
+ /**
16393
+ * Standard orientation values
16394
+ */
16395
+ const Orientation = {
16396
+ horizontal: "horizontal",
16397
+ vertical: "vertical",
16398
+ };
16399
+
16420
16400
  /**
16421
16401
  * Returns the index of the last element in the array where predicate is true, and -1 otherwise.
16422
16402
  *
@@ -16494,7 +16474,7 @@
16494
16474
  return `${prefix}${uniqueIdCounter++}`;
16495
16475
  }
16496
16476
 
16497
- const template$M = html `<slot></slot>`;
16477
+ const template$N = html `<slot></slot>`;
16498
16478
 
16499
16479
  const styles$11 = css `
16500
16480
  ${display$1('contents')}
@@ -16612,7 +16592,7 @@
16612
16592
  const nimbleDesignSystemProvider = ThemeProvider.compose({
16613
16593
  baseName: 'theme-provider',
16614
16594
  styles: styles$11,
16615
- template: template$M
16595
+ template: template$N
16616
16596
  });
16617
16597
  DesignSystem.getOrCreate()
16618
16598
  .withPrefix('nimble')
@@ -16915,7 +16895,7 @@
16915
16895
  `;
16916
16896
 
16917
16897
  // prettier-ignore
16918
- const template$L = (_context, definition) => html `${
16898
+ const template$M = (_context, definition) => html `${
16919
16899
  /* top-container div is necessary because setting contenteditable directly on the native anchor instead
16920
16900
  leaves it focusable, unlike the behavior you get when the anchor is _within_ a contenteditable element.
16921
16901
  */ ''}<div
@@ -17018,7 +16998,7 @@
17018
16998
  const nimbleAnchor = Anchor.compose({
17019
16999
  baseName: 'anchor',
17020
17000
  baseClass: Anchor$1,
17021
- template: template$L,
17001
+ template: template$M,
17022
17002
  styles: styles$10,
17023
17003
  shadowOptions: {
17024
17004
  delegatesFocus: true
@@ -17436,7 +17416,7 @@
17436
17416
  }
17437
17417
  `;
17438
17418
 
17439
- const template$K = (context, definition) => html `
17419
+ const template$L = (context, definition) => html `
17440
17420
  <a
17441
17421
  class="control"
17442
17422
  part="control"
@@ -17518,7 +17498,7 @@
17518
17498
  ], AnchorButton.prototype, "disabled", void 0);
17519
17499
  const nimbleAnchorButton = AnchorButton.compose({
17520
17500
  baseName: 'anchor-button',
17521
- template: template$K,
17501
+ template: template$L,
17522
17502
  styles: styles$_,
17523
17503
  shadowOptions: {
17524
17504
  delegatesFocus: true
@@ -17610,7 +17590,7 @@
17610
17590
  }
17611
17591
  `;
17612
17592
 
17613
- const template$J = (context, definition) => html `
17593
+ const template$K = (context, definition) => html `
17614
17594
  <template
17615
17595
  role="menuitem"
17616
17596
  class="${x => (typeof x.startColumnCount === 'number'
@@ -17711,7 +17691,7 @@
17711
17691
  // FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
17712
17692
  const nimbleAnchorMenuItem = AnchorMenuItem.compose({
17713
17693
  baseName: 'anchor-menu-item',
17714
- template: template$J,
17694
+ template: template$K,
17715
17695
  styles: styles$Z,
17716
17696
  shadowOptions: {
17717
17697
  delegatesFocus: true
@@ -17838,7 +17818,7 @@
17838
17818
  }
17839
17819
  `;
17840
17820
 
17841
- const template$I = (context, definition) => html `
17821
+ const template$J = (context, definition) => html `
17842
17822
  <template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
17843
17823
  <a
17844
17824
  download="${x => x.download}"
@@ -17890,7 +17870,7 @@
17890
17870
  // FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
17891
17871
  const nimbleAnchorTab = AnchorTab.compose({
17892
17872
  baseName: 'anchor-tab',
17893
- template: template$I,
17873
+ template: template$J,
17894
17874
  styles: styles$Y,
17895
17875
  shadowOptions: {
17896
17876
  delegatesFocus: true
@@ -17919,7 +17899,7 @@
17919
17899
  }
17920
17900
  `;
17921
17901
 
17922
- const template$H = (context, definition) => html `
17902
+ const template$I = (context, definition) => html `
17923
17903
  ${startSlotTemplate(context, definition)}
17924
17904
  <div ${ref('tablist')} class="tablist" part="tablist" role="tablist">
17925
17905
  <slot name="anchortab" ${slotted('tabs')}></slot>
@@ -18125,7 +18105,7 @@
18125
18105
  applyMixins(AnchorTabs, StartEnd);
18126
18106
  const nimbleAnchorTabs = AnchorTabs.compose({
18127
18107
  baseName: 'anchor-tabs',
18128
- template: template$H,
18108
+ template: template$I,
18129
18109
  styles: styles$X,
18130
18110
  shadowOptions: {
18131
18111
  delegatesFocus: false
@@ -18247,7 +18227,7 @@
18247
18227
  }
18248
18228
  `;
18249
18229
 
18250
- const template$G = (context, definition) => html `
18230
+ const template$H = (context, definition) => html `
18251
18231
  <template
18252
18232
  role="treeitem"
18253
18233
  slot="${x => (x.isNestedItem() ? 'item' : null)}"
@@ -18384,7 +18364,7 @@
18384
18364
  // FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
18385
18365
  const nimbleAnchorTreeItem = AnchorTreeItem.compose({
18386
18366
  baseName: 'anchor-tree-item',
18387
- template: template$G,
18367
+ template: template$H,
18388
18368
  styles: styles$W,
18389
18369
  shadowOptions: {
18390
18370
  delegatesFocus: true
@@ -18633,7 +18613,7 @@
18633
18613
  ${buttonAppearanceVariantStyles}
18634
18614
  `;
18635
18615
 
18636
- const template$F = (context, definition) => html `
18616
+ const template$G = (context, definition) => html `
18637
18617
  <button
18638
18618
  class="control"
18639
18619
  part="control"
@@ -18724,7 +18704,7 @@
18724
18704
  const nimbleButton = Button.compose({
18725
18705
  baseName: 'button',
18726
18706
  baseClass: Button$1,
18727
- template: template$F,
18707
+ template: template$G,
18728
18708
  styles: styles$T,
18729
18709
  shadowOptions: {
18730
18710
  delegatesFocus: true
@@ -19532,7 +19512,7 @@
19532
19512
  };
19533
19513
 
19534
19514
  // Avoiding any whitespace in the template because this is an inline element
19535
- const template$E = html `<div
19515
+ const template$F = html `<div
19536
19516
  class="icon"
19537
19517
  aria-hidden="true"
19538
19518
  :innerHTML=${x => x.icon.data}
@@ -19591,7 +19571,7 @@
19591
19571
  const registerIcon = (baseName, iconClass) => {
19592
19572
  const composedIcon = iconClass.compose({
19593
19573
  baseName,
19594
- template: template$E,
19574
+ template: template$F,
19595
19575
  styles: styles$S
19596
19576
  });
19597
19577
  DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
@@ -19710,7 +19690,7 @@
19710
19690
  }).withDefault(coreLabelDefaults.loadingLabel);
19711
19691
 
19712
19692
  // prettier-ignore
19713
- const template$D = html `
19693
+ const template$E = html `
19714
19694
  <${themeProviderTag} theme="${Theme.color}">
19715
19695
  <div class="container"
19716
19696
  role="status"
@@ -19828,7 +19808,7 @@
19828
19808
  applyMixins(Banner, ARIAGlobalStatesAndProperties);
19829
19809
  const nimbleBanner = Banner.compose({
19830
19810
  baseName: 'banner',
19831
- template: template$D,
19811
+ template: template$E,
19832
19812
  styles: styles$U
19833
19813
  });
19834
19814
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBanner());
@@ -19995,7 +19975,7 @@ so this becomes the fallback color for the slot */ ''}
19995
19975
  }
19996
19976
  `;
19997
19977
 
19998
- const template$C = html `
19978
+ const template$D = html `
19999
19979
  <section aria-labelledby="title-slot">
20000
19980
  <span id="title-slot"><slot name="title"></slot></span>
20001
19981
  <slot></slot>
@@ -20010,7 +19990,7 @@ so this becomes the fallback color for the slot */ ''}
20010
19990
  const nimbleCard = Card.compose({
20011
19991
  baseName: 'card',
20012
19992
  baseClass: Card$1,
20013
- template: template$C,
19993
+ template: template$D,
20014
19994
  styles: styles$P
20015
19995
  });
20016
19996
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCard());
@@ -20288,7 +20268,7 @@ so this becomes the fallback color for the slot */ ''}
20288
20268
  }
20289
20269
  `;
20290
20270
 
20291
- const template$B = (_context, definition) => html `
20271
+ const template$C = (_context, definition) => html `
20292
20272
  <template
20293
20273
  role="checkbox"
20294
20274
  aria-checked="${x => x.checked}"
@@ -20337,7 +20317,7 @@ so this becomes the fallback color for the slot */ ''}
20337
20317
  const nimbleCheckbox = Checkbox.compose({
20338
20318
  baseName: 'checkbox',
20339
20319
  baseClass: Checkbox$1,
20340
- template: template$B,
20320
+ template: template$C,
20341
20321
  styles: styles$N,
20342
20322
  checkedIndicator: check16X16.data,
20343
20323
  indeterminateIndicator: minus16X16.data
@@ -20395,7 +20375,7 @@ so this becomes the fallback color for the slot */ ''}
20395
20375
 
20396
20376
  /* eslint-disable @typescript-eslint/indent */
20397
20377
  // prettier-ignore
20398
- const template$A = (context, definition) => html `
20378
+ const template$B = (context, definition) => html `
20399
20379
  <div
20400
20380
  role="button"
20401
20381
  part="control"
@@ -20491,7 +20471,7 @@ so this becomes the fallback color for the slot */ ''}
20491
20471
  applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
20492
20472
  const nimbleToggleButton = ToggleButton.compose({
20493
20473
  baseName: 'toggle-button',
20494
- template: template$A,
20474
+ template: template$B,
20495
20475
  styles: styles$M,
20496
20476
  shadowOptions: {
20497
20477
  delegatesFocus: true
@@ -20982,7 +20962,7 @@ so this becomes the fallback color for the slot */ ''}
20982
20962
 
20983
20963
  /* eslint-disable @typescript-eslint/indent */
20984
20964
  // prettier-ignore
20985
- const template$z = (context, definition) => html `
20965
+ const template$A = (context, definition) => html `
20986
20966
  <template
20987
20967
  aria-disabled="${x => x.ariaDisabled}"
20988
20968
  autocomplete="${x => x.autocomplete}"
@@ -21737,7 +21717,7 @@ so this becomes the fallback color for the slot */ ''}
21737
21717
  const nimbleCombobox = Combobox.compose({
21738
21718
  baseName: 'combobox',
21739
21719
  baseClass: FormAssociatedCombobox,
21740
- template: template$z,
21720
+ template: template$A,
21741
21721
  styles: styles$J,
21742
21722
  shadowOptions: {
21743
21723
  delegatesFocus: true
@@ -21875,7 +21855,7 @@ so this becomes the fallback color for the slot */ ''}
21875
21855
  }
21876
21856
  `;
21877
21857
 
21878
- const template$y = html `
21858
+ const template$z = html `
21879
21859
  <template>
21880
21860
  <dialog
21881
21861
  ${ref('dialogElement')}
@@ -22023,7 +22003,7 @@ so this becomes the fallback color for the slot */ ''}
22023
22003
  applyMixins(Dialog, ARIAGlobalStatesAndProperties);
22024
22004
  const nimbleDialog = Dialog.compose({
22025
22005
  baseName: 'dialog',
22026
- template: template$y,
22006
+ template: template$z,
22027
22007
  styles: styles$I,
22028
22008
  baseClass: Dialog
22029
22009
  });
@@ -22172,7 +22152,7 @@ so this becomes the fallback color for the slot */ ''}
22172
22152
  }
22173
22153
  `;
22174
22154
 
22175
- const template$x = html `
22155
+ const template$y = html `
22176
22156
  <dialog
22177
22157
  ${ref('dialog')}
22178
22158
  aria-label="${x => x.ariaLabel}"
@@ -22315,7 +22295,7 @@ so this becomes the fallback color for the slot */ ''}
22315
22295
  applyMixins(Drawer, ARIAGlobalStatesAndProperties);
22316
22296
  const nimbleDrawer = Drawer.compose({
22317
22297
  baseName: 'drawer',
22318
- template: template$x,
22298
+ template: template$y,
22319
22299
  styles: styles$H
22320
22300
  });
22321
22301
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
@@ -25017,7 +24997,7 @@ so this becomes the fallback color for the slot */ ''}
25017
24997
  * @public
25018
24998
  */
25019
24999
  // prettier-ignore
25020
- const template$w = (context, definition) => html `
25000
+ const template$x = (context, definition) => html `
25021
25001
  <template
25022
25002
  aria-checked="${x => x.ariaChecked}"
25023
25003
  aria-disabled="${x => x.ariaDisabled}"
@@ -25130,7 +25110,7 @@ so this becomes the fallback color for the slot */ ''}
25130
25110
  const nimbleListOption = ListOption.compose({
25131
25111
  baseName: 'list-option',
25132
25112
  baseClass: ListboxOption,
25133
- template: template$w,
25113
+ template: template$x,
25134
25114
  styles: styles$F
25135
25115
  });
25136
25116
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListOption());
@@ -25199,7 +25179,7 @@ so this becomes the fallback color for the slot */ ''}
25199
25179
  return n instanceof ListOption;
25200
25180
  };
25201
25181
  // prettier-ignore
25202
- const template$v = html `
25182
+ const template$w = html `
25203
25183
  <template
25204
25184
  role="group"
25205
25185
  aria-label="${x => x.labelContent}"
@@ -25341,7 +25321,7 @@ so this becomes the fallback color for the slot */ ''}
25341
25321
  const nimbleListOptionGroup = ListOptionGroup.compose({
25342
25322
  baseName: 'list-option-group',
25343
25323
  baseClass: FoundationElement,
25344
- template: template$v,
25324
+ template: template$w,
25345
25325
  styles: styles$E
25346
25326
  });
25347
25327
  DesignSystem.getOrCreate()
@@ -25357,7 +25337,7 @@ so this becomes the fallback color for the slot */ ''}
25357
25337
  attr()
25358
25338
  ], Mapping$1.prototype, "key", void 0);
25359
25339
 
25360
- const template$u = html `<template slot="mapping"></template>`;
25340
+ const template$v = html `<template slot="mapping"></template>`;
25361
25341
 
25362
25342
  const styles$D = css `
25363
25343
  ${display$1('none')}
@@ -25375,7 +25355,7 @@ so this becomes the fallback color for the slot */ ''}
25375
25355
  ], MappingEmpty.prototype, "text", void 0);
25376
25356
  const emptyMapping = MappingEmpty.compose({
25377
25357
  baseName: 'mapping-empty',
25378
- template: template$u,
25358
+ template: template$v,
25379
25359
  styles: styles$D
25380
25360
  });
25381
25361
  DesignSystem.getOrCreate().withPrefix('nimble').register(emptyMapping());
@@ -25446,7 +25426,7 @@ so this becomes the fallback color for the slot */ ''}
25446
25426
  ], MappingIcon.prototype, "resolvedIcon", void 0);
25447
25427
  const iconMapping = MappingIcon.compose({
25448
25428
  baseName: 'mapping-icon',
25449
- template: template$u,
25429
+ template: template$v,
25450
25430
  styles: styles$D
25451
25431
  });
25452
25432
  DesignSystem.getOrCreate().withPrefix('nimble').register(iconMapping());
@@ -25470,7 +25450,7 @@ so this becomes the fallback color for the slot */ ''}
25470
25450
  ], MappingSpinner.prototype, "textHidden", void 0);
25471
25451
  const spinnerMapping = MappingSpinner.compose({
25472
25452
  baseName: 'mapping-spinner',
25473
- template: template$u,
25453
+ template: template$v,
25474
25454
  styles: styles$D
25475
25455
  });
25476
25456
  DesignSystem.getOrCreate().withPrefix('nimble').register(spinnerMapping());
@@ -25487,7 +25467,7 @@ so this becomes the fallback color for the slot */ ''}
25487
25467
  ], MappingText.prototype, "text", void 0);
25488
25468
  const textMapping = MappingText.compose({
25489
25469
  baseName: 'mapping-text',
25490
- template: template$u,
25470
+ template: template$v,
25491
25471
  styles: styles$D
25492
25472
  });
25493
25473
  DesignSystem.getOrCreate().withPrefix('nimble').register(textMapping());
@@ -25793,7 +25773,7 @@ so this becomes the fallback color for the slot */ ''}
25793
25773
 
25794
25774
  /* eslint-disable @typescript-eslint/indent */
25795
25775
  // prettier-ignore
25796
- const template$t = () => html `
25776
+ const template$u = () => html `
25797
25777
  <template
25798
25778
  slot="${x => {
25799
25779
  if (x.slot) {
@@ -25882,7 +25862,7 @@ so this becomes the fallback color for the slot */ ''}
25882
25862
  const nimbleMenu = Menu.compose({
25883
25863
  baseName: 'menu',
25884
25864
  baseClass: Menu$1,
25885
- template: template$t,
25865
+ template: template$u,
25886
25866
  styles: styles$C
25887
25867
  });
25888
25868
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
@@ -25919,7 +25899,7 @@ so this becomes the fallback color for the slot */ ''}
25919
25899
  `;
25920
25900
 
25921
25901
  // prettier-ignore
25922
- const template$s = html `
25902
+ const template$t = html `
25923
25903
  <template
25924
25904
  ?open="${x => x.open}"
25925
25905
  @focusout="${(x, c) => x.focusoutHandler(c.event)}"
@@ -26169,7 +26149,7 @@ so this becomes the fallback color for the slot */ ''}
26169
26149
  ], MenuButton.prototype, "slottedMenus", void 0);
26170
26150
  const nimbleMenuButton = MenuButton.compose({
26171
26151
  baseName: 'menu-button',
26172
- template: template$s,
26152
+ template: template$t,
26173
26153
  styles: styles$B,
26174
26154
  shadowOptions: {
26175
26155
  delegatesFocus: true
@@ -26665,10 +26645,12 @@ so this becomes the fallback color for the slot */ ''}
26665
26645
 
26666
26646
  const styles$x = css `
26667
26647
  ${display$1('inline-block')}
26648
+ ${styles$K}
26668
26649
 
26669
26650
  .positioning-region {
26670
26651
  display: flex;
26671
26652
  gap: ${standardPadding};
26653
+ position: relative;
26672
26654
  }
26673
26655
 
26674
26656
  :host([orientation='vertical']) .positioning-region {
@@ -26679,6 +26661,13 @@ so this becomes the fallback color for the slot */ ''}
26679
26661
  flex-direction: row;
26680
26662
  }
26681
26663
 
26664
+ .label-container {
26665
+ display: flex;
26666
+ height: ${controlLabelFontLineHeight};
26667
+ gap: ${smallPadding};
26668
+ margin-bottom: ${smallPadding};
26669
+ }
26670
+
26682
26671
  slot[name='label'] {
26683
26672
  font: ${controlLabelFont};
26684
26673
  color: ${controlLabelFontColor};
@@ -26687,17 +26676,64 @@ so this becomes the fallback color for the slot */ ''}
26687
26676
  :host([disabled]) slot[name='label'] {
26688
26677
  color: ${controlLabelDisabledFontColor};
26689
26678
  }
26679
+
26680
+ .error-icon {
26681
+ margin-left: auto;
26682
+ margin-right: ${smallPadding};
26683
+ }
26684
+ `;
26685
+
26686
+ /* eslint-disable @typescript-eslint/indent */
26687
+ const template$s = html `
26688
+ <template
26689
+ role="radiogroup"
26690
+ aria-disabled="${x => x.disabled}"
26691
+ aria-readonly="${x => x.readOnly}"
26692
+ @click="${(x, c) => x.clickHandler(c.event)}"
26693
+ @keydown="${(x, c) => x.keydownHandler(c.event)}"
26694
+ @focusout="${(x, c) => x.focusOutHandler(c.event)}"
26695
+ >
26696
+ <div class="label-container">
26697
+ <slot name="label"></slot>
26698
+ <${iconExclamationMarkTag}
26699
+ severity="error"
26700
+ class="error-icon"
26701
+ ></${iconExclamationMarkTag}>
26702
+ </div>
26703
+ <div
26704
+ class="positioning-region ${x => (x.orientation === Orientation.horizontal ? 'horizontal' : 'vertical')}"
26705
+ part="positioning-region"
26706
+ >
26707
+ <slot
26708
+ ${slotted({
26709
+ property: 'slottedRadioButtons',
26710
+ filter: elements('[role=radio]')
26711
+ })}
26712
+ ></slot>
26713
+ ${errorTextTemplate}
26714
+ </div>
26715
+ </template>
26690
26716
  `;
26691
26717
 
26692
26718
  /**
26693
26719
  * A nimble-styled grouping element for radio buttons
26694
26720
  */
26695
26721
  class RadioGroup extends RadioGroup$1 {
26722
+ constructor() {
26723
+ super(...arguments);
26724
+ this.errorVisible = false;
26725
+ }
26696
26726
  }
26727
+ __decorate$1([
26728
+ attr({ attribute: 'error-text' })
26729
+ ], RadioGroup.prototype, "errorText", void 0);
26730
+ __decorate$1([
26731
+ attr({ attribute: 'error-visible', mode: 'boolean' })
26732
+ ], RadioGroup.prototype, "errorVisible", void 0);
26697
26733
  const nimbleRadioGroup = RadioGroup.compose({
26698
26734
  baseName: 'radio-group',
26699
26735
  baseClass: RadioGroup$1,
26700
- template: radioGroupTemplate,
26736
+ template: template$s,
26701
26737
  styles: styles$x,
26702
26738
  shadowOptions: {
26703
26739
  delegatesFocus: true
@@ -40852,6 +40888,123 @@ so this becomes the fallback color for the slot */ ''}
40852
40888
  return plugin;
40853
40889
  }
40854
40890
 
40891
+ // see: https://github.com/mesqueeb/is-what/blob/88d6e4ca92fb2baab6003c54e02eedf4e729e5ab/src/index.ts
40892
+ function getType(value) {
40893
+ return Object.prototype.toString.call(value).slice(8, -1);
40894
+ }
40895
+ function isPlainObject(value) {
40896
+ if (getType(value) !== 'Object') {
40897
+ return false;
40898
+ }
40899
+ return value.constructor === Object && Object.getPrototypeOf(value) === Object.prototype;
40900
+ }
40901
+
40902
+ function mergeDeep(target, source) {
40903
+ const output = { ...target };
40904
+ if (isPlainObject(target) && isPlainObject(source)) {
40905
+ Object.keys(source).forEach(key => {
40906
+ if (isPlainObject(source[key]) && isPlainObject(target[key])) {
40907
+ output[key] = mergeDeep(target[key], source[key]);
40908
+ }
40909
+ else {
40910
+ output[key] = source[key];
40911
+ }
40912
+ });
40913
+ }
40914
+ return output;
40915
+ }
40916
+
40917
+ /**
40918
+ * The Mark class is used to create custom mark extensions.
40919
+ * @see https://tiptap.dev/api/extensions#create-a-new-extension
40920
+ */
40921
+ class Mark {
40922
+ constructor(config = {}) {
40923
+ this.type = 'mark';
40924
+ this.name = 'mark';
40925
+ this.parent = null;
40926
+ this.child = null;
40927
+ this.config = {
40928
+ name: this.name,
40929
+ defaultOptions: {},
40930
+ };
40931
+ this.config = {
40932
+ ...this.config,
40933
+ ...config,
40934
+ };
40935
+ this.name = this.config.name;
40936
+ if (config.defaultOptions && Object.keys(config.defaultOptions).length > 0) {
40937
+ console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`);
40938
+ }
40939
+ // TODO: remove `addOptions` fallback
40940
+ this.options = this.config.defaultOptions;
40941
+ if (this.config.addOptions) {
40942
+ this.options = callOrReturn(getExtensionField(this, 'addOptions', {
40943
+ name: this.name,
40944
+ }));
40945
+ }
40946
+ this.storage = callOrReturn(getExtensionField(this, 'addStorage', {
40947
+ name: this.name,
40948
+ options: this.options,
40949
+ })) || {};
40950
+ }
40951
+ static create(config = {}) {
40952
+ return new Mark(config);
40953
+ }
40954
+ configure(options = {}) {
40955
+ // return a new instance so we can use the same extension
40956
+ // with different calls of `configure`
40957
+ const extension = this.extend({
40958
+ ...this.config,
40959
+ addOptions: () => {
40960
+ return mergeDeep(this.options, options);
40961
+ },
40962
+ });
40963
+ // Always preserve the current name
40964
+ extension.name = this.name;
40965
+ // Set the parent to be our parent
40966
+ extension.parent = this.parent;
40967
+ return extension;
40968
+ }
40969
+ extend(extendedConfig = {}) {
40970
+ const extension = new Mark(extendedConfig);
40971
+ extension.parent = this;
40972
+ this.child = extension;
40973
+ extension.name = extendedConfig.name ? extendedConfig.name : extension.parent.name;
40974
+ if (extendedConfig.defaultOptions && Object.keys(extendedConfig.defaultOptions).length > 0) {
40975
+ console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${extension.name}".`);
40976
+ }
40977
+ extension.options = callOrReturn(getExtensionField(extension, 'addOptions', {
40978
+ name: extension.name,
40979
+ }));
40980
+ extension.storage = callOrReturn(getExtensionField(extension, 'addStorage', {
40981
+ name: extension.name,
40982
+ options: extension.options,
40983
+ }));
40984
+ return extension;
40985
+ }
40986
+ static handleExit({ editor, mark }) {
40987
+ const { tr } = editor.state;
40988
+ const currentPos = editor.state.selection.$from;
40989
+ const isAtEnd = currentPos.pos === currentPos.end();
40990
+ if (isAtEnd) {
40991
+ const currentMarks = currentPos.marks();
40992
+ const isInMark = !!currentMarks.find(m => (m === null || m === void 0 ? void 0 : m.type.name) === mark.name);
40993
+ if (!isInMark) {
40994
+ return false;
40995
+ }
40996
+ const removeMark = currentMarks.find(m => (m === null || m === void 0 ? void 0 : m.type.name) === mark.name);
40997
+ if (removeMark) {
40998
+ tr.removeStoredMark(removeMark);
40999
+ }
41000
+ tr.insertText(' ', currentPos.pos);
41001
+ editor.view.dispatch(tr);
41002
+ return true;
41003
+ }
41004
+ return false;
41005
+ }
41006
+ }
41007
+
40855
41008
  function isNumber$2(value) {
40856
41009
  return typeof value === 'number';
40857
41010
  }
@@ -41311,32 +41464,6 @@ so this becomes the fallback color for the slot */ ''}
41311
41464
  }
41312
41465
  }
41313
41466
 
41314
- // see: https://github.com/mesqueeb/is-what/blob/88d6e4ca92fb2baab6003c54e02eedf4e729e5ab/src/index.ts
41315
- function getType(value) {
41316
- return Object.prototype.toString.call(value).slice(8, -1);
41317
- }
41318
- function isPlainObject(value) {
41319
- if (getType(value) !== 'Object') {
41320
- return false;
41321
- }
41322
- return value.constructor === Object && Object.getPrototypeOf(value) === Object.prototype;
41323
- }
41324
-
41325
- function mergeDeep(target, source) {
41326
- const output = { ...target };
41327
- if (isPlainObject(target) && isPlainObject(source)) {
41328
- Object.keys(source).forEach(key => {
41329
- if (isPlainObject(source[key]) && isPlainObject(target[key])) {
41330
- output[key] = mergeDeep(target[key], source[key]);
41331
- }
41332
- else {
41333
- output[key] = source[key];
41334
- }
41335
- });
41336
- }
41337
- return output;
41338
- }
41339
-
41340
41467
  /**
41341
41468
  * The Extension class is the base class for all extensions.
41342
41469
  * @see https://tiptap.dev/api/extensions#create-a-new-extension
@@ -43427,6 +43554,27 @@ so this becomes the fallback color for the slot */ ''}
43427
43554
  },
43428
43555
  });
43429
43556
 
43557
+ const Drop = Extension.create({
43558
+ name: 'drop',
43559
+ addProseMirrorPlugins() {
43560
+ return [
43561
+ new Plugin({
43562
+ key: new PluginKey('tiptapDrop'),
43563
+ props: {
43564
+ handleDrop: (_, e, slice, moved) => {
43565
+ this.editor.emit('drop', {
43566
+ editor: this.editor,
43567
+ event: e,
43568
+ slice,
43569
+ moved,
43570
+ });
43571
+ },
43572
+ },
43573
+ }),
43574
+ ];
43575
+ },
43576
+ });
43577
+
43430
43578
  const Editable = Extension.create({
43431
43579
  name: 'editable',
43432
43580
  addProseMirrorPlugins() {
@@ -43591,6 +43739,26 @@ so this becomes the fallback color for the slot */ ''}
43591
43739
  },
43592
43740
  });
43593
43741
 
43742
+ const Paste = Extension.create({
43743
+ name: 'paste',
43744
+ addProseMirrorPlugins() {
43745
+ return [
43746
+ new Plugin({
43747
+ key: new PluginKey('tiptapPaste'),
43748
+ props: {
43749
+ handlePaste: (_view, e, slice) => {
43750
+ this.editor.emit('paste', {
43751
+ editor: this.editor,
43752
+ event: e,
43753
+ slice,
43754
+ });
43755
+ },
43756
+ },
43757
+ }),
43758
+ ];
43759
+ },
43760
+ });
43761
+
43594
43762
  const Tabindex = Extension.create({
43595
43763
  name: 'tabindex',
43596
43764
  addProseMirrorPlugins() {
@@ -43781,28 +43949,6 @@ so this becomes the fallback color for the slot */ ''}
43781
43949
  }
43782
43950
  }
43783
43951
 
43784
- const DropPlugin = (onDrop) => {
43785
- return new Plugin({
43786
- key: new PluginKey('tiptapDrop'),
43787
- props: {
43788
- handleDrop: (_, e, slice, moved) => {
43789
- onDrop(e, slice, moved);
43790
- },
43791
- },
43792
- });
43793
- };
43794
-
43795
- const PastePlugin = (onPaste) => {
43796
- return new Plugin({
43797
- key: new PluginKey('tiptapPaste'),
43798
- props: {
43799
- handlePaste: (_view, e, slice) => {
43800
- onPaste(e, slice);
43801
- },
43802
- },
43803
- });
43804
- };
43805
-
43806
43952
  const style = `.ProseMirror {
43807
43953
  position: relative;
43808
43954
  }
@@ -43948,12 +44094,8 @@ img.ProseMirror-separator {
43948
44094
  this.on('focus', this.options.onFocus);
43949
44095
  this.on('blur', this.options.onBlur);
43950
44096
  this.on('destroy', this.options.onDestroy);
43951
- if (this.options.onPaste) {
43952
- this.registerPlugin(PastePlugin(this.options.onPaste));
43953
- }
43954
- if (this.options.onDrop) {
43955
- this.registerPlugin(DropPlugin(this.options.onDrop));
43956
- }
44097
+ this.on('drop', ({ event, slice, moved }) => this.options.onDrop(event, slice, moved));
44098
+ this.on('paste', ({ event, slice }) => this.options.onPaste(event, slice));
43957
44099
  window.setTimeout(() => {
43958
44100
  if (this.isDestroyed) {
43959
44101
  return;
@@ -44085,6 +44227,8 @@ img.ProseMirror-separator {
44085
44227
  FocusEvents,
44086
44228
  Keymap,
44087
44229
  Tabindex,
44230
+ Drop,
44231
+ Paste,
44088
44232
  ].filter(ext => {
44089
44233
  if (typeof this.options.enableCoreExtensions === 'object') {
44090
44234
  return this.options.enableCoreExtensions[ext.name] !== false;
@@ -44434,97 +44578,6 @@ img.ProseMirror-separator {
44434
44578
  });
44435
44579
  }
44436
44580
 
44437
- /**
44438
- * The Mark class is used to create custom mark extensions.
44439
- * @see https://tiptap.dev/api/extensions#create-a-new-extension
44440
- */
44441
- class Mark {
44442
- constructor(config = {}) {
44443
- this.type = 'mark';
44444
- this.name = 'mark';
44445
- this.parent = null;
44446
- this.child = null;
44447
- this.config = {
44448
- name: this.name,
44449
- defaultOptions: {},
44450
- };
44451
- this.config = {
44452
- ...this.config,
44453
- ...config,
44454
- };
44455
- this.name = this.config.name;
44456
- if (config.defaultOptions && Object.keys(config.defaultOptions).length > 0) {
44457
- console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`);
44458
- }
44459
- // TODO: remove `addOptions` fallback
44460
- this.options = this.config.defaultOptions;
44461
- if (this.config.addOptions) {
44462
- this.options = callOrReturn(getExtensionField(this, 'addOptions', {
44463
- name: this.name,
44464
- }));
44465
- }
44466
- this.storage = callOrReturn(getExtensionField(this, 'addStorage', {
44467
- name: this.name,
44468
- options: this.options,
44469
- })) || {};
44470
- }
44471
- static create(config = {}) {
44472
- return new Mark(config);
44473
- }
44474
- configure(options = {}) {
44475
- // return a new instance so we can use the same extension
44476
- // with different calls of `configure`
44477
- const extension = this.extend({
44478
- ...this.config,
44479
- addOptions: () => {
44480
- return mergeDeep(this.options, options);
44481
- },
44482
- });
44483
- // Always preserve the current name
44484
- extension.name = this.name;
44485
- // Set the parent to be our parent
44486
- extension.parent = this.parent;
44487
- return extension;
44488
- }
44489
- extend(extendedConfig = {}) {
44490
- const extension = new Mark(extendedConfig);
44491
- extension.parent = this;
44492
- this.child = extension;
44493
- extension.name = extendedConfig.name ? extendedConfig.name : extension.parent.name;
44494
- if (extendedConfig.defaultOptions && Object.keys(extendedConfig.defaultOptions).length > 0) {
44495
- console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${extension.name}".`);
44496
- }
44497
- extension.options = callOrReturn(getExtensionField(extension, 'addOptions', {
44498
- name: extension.name,
44499
- }));
44500
- extension.storage = callOrReturn(getExtensionField(extension, 'addStorage', {
44501
- name: extension.name,
44502
- options: extension.options,
44503
- }));
44504
- return extension;
44505
- }
44506
- static handleExit({ editor, mark }) {
44507
- const { tr } = editor.state;
44508
- const currentPos = editor.state.selection.$from;
44509
- const isAtEnd = currentPos.pos === currentPos.end();
44510
- if (isAtEnd) {
44511
- const currentMarks = currentPos.marks();
44512
- const isInMark = !!currentMarks.find(m => (m === null || m === void 0 ? void 0 : m.type.name) === mark.name);
44513
- if (!isInMark) {
44514
- return false;
44515
- }
44516
- const removeMark = currentMarks.find(m => (m === null || m === void 0 ? void 0 : m.type.name) === mark.name);
44517
- if (removeMark) {
44518
- tr.removeStoredMark(removeMark);
44519
- }
44520
- tr.insertText(' ', currentPos.pos);
44521
- editor.view.dispatch(tr);
44522
- return true;
44523
- }
44524
- return false;
44525
- }
44526
- }
44527
-
44528
44581
  /**
44529
44582
  * The Node class is used to create custom node extensions.
44530
44583
  * @see https://tiptap.dev/api/extensions#create-a-new-extension
@@ -55426,7 +55479,7 @@ img.ProseMirror-separator {
55426
55479
  * This extension allows you to create list items.
55427
55480
  * @see https://www.tiptap.dev/api/nodes/list-item
55428
55481
  */
55429
- const ListItem$2 = Node$1.create({
55482
+ const ListItem = Node$1.create({
55430
55483
  name: 'listItem',
55431
55484
  addOptions() {
55432
55485
  return {
@@ -55461,7 +55514,7 @@ img.ProseMirror-separator {
55461
55514
  * for the `textColor` and `backgroundColor` extensions.
55462
55515
  * @see https://www.tiptap.dev/api/marks/text-style
55463
55516
  */
55464
- const TextStyle$1 = Mark.create({
55517
+ const TextStyle = Mark.create({
55465
55518
  name: 'textStyle',
55466
55519
  priority: 101,
55467
55520
  addOptions() {
@@ -55536,7 +55589,7 @@ img.ProseMirror-separator {
55536
55589
  return {
55537
55590
  toggleBulletList: () => ({ commands, chain }) => {
55538
55591
  if (this.options.keepAttributes) {
55539
- return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItem$2.name, this.editor.getAttributes(TextStyle$1.name)).run();
55592
+ return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItem.name, this.editor.getAttributes(TextStyle.name)).run();
55540
55593
  }
55541
55594
  return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks);
55542
55595
  },
@@ -55558,7 +55611,7 @@ img.ProseMirror-separator {
55558
55611
  type: this.type,
55559
55612
  keepMarks: this.options.keepMarks,
55560
55613
  keepAttributes: this.options.keepAttributes,
55561
- getAttributes: () => { return this.editor.getAttributes(TextStyle$1.name); },
55614
+ getAttributes: () => { return this.editor.getAttributes(TextStyle.name); },
55562
55615
  editor: this.editor,
55563
55616
  });
55564
55617
  }
@@ -58416,40 +58469,6 @@ img.ProseMirror-separator {
58416
58469
  },
58417
58470
  });
58418
58471
 
58419
- /**
58420
- * This extension allows you to create list items.
58421
- * @see https://www.tiptap.dev/api/nodes/list-item
58422
- */
58423
- const ListItem$1 = Node$1.create({
58424
- name: 'listItem',
58425
- addOptions() {
58426
- return {
58427
- HTMLAttributes: {},
58428
- bulletListTypeName: 'bulletList',
58429
- orderedListTypeName: 'orderedList',
58430
- };
58431
- },
58432
- content: 'paragraph block*',
58433
- defining: true,
58434
- parseHTML() {
58435
- return [
58436
- {
58437
- tag: 'li',
58438
- },
58439
- ];
58440
- },
58441
- renderHTML({ HTMLAttributes }) {
58442
- return ['li', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
58443
- },
58444
- addKeyboardShortcuts() {
58445
- return {
58446
- Enter: () => this.editor.commands.splitListItem(this.name),
58447
- Tab: () => this.editor.commands.sinkListItem(this.name),
58448
- 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),
58449
- };
58450
- },
58451
- });
58452
-
58453
58472
  function findSuggestionMatch(config) {
58454
58473
  var _a;
58455
58474
  const { char, allowSpaces, allowedPrefixes, startOfLine, $position, } = config;
@@ -58855,84 +58874,6 @@ img.ProseMirror-separator {
58855
58874
  },
58856
58875
  });
58857
58876
 
58858
- /**
58859
- * This extension allows you to create list items.
58860
- * @see https://www.tiptap.dev/api/nodes/list-item
58861
- */
58862
- const ListItem = Node$1.create({
58863
- name: 'listItem',
58864
- addOptions() {
58865
- return {
58866
- HTMLAttributes: {},
58867
- bulletListTypeName: 'bulletList',
58868
- orderedListTypeName: 'orderedList',
58869
- };
58870
- },
58871
- content: 'paragraph block*',
58872
- defining: true,
58873
- parseHTML() {
58874
- return [
58875
- {
58876
- tag: 'li',
58877
- },
58878
- ];
58879
- },
58880
- renderHTML({ HTMLAttributes }) {
58881
- return ['li', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
58882
- },
58883
- addKeyboardShortcuts() {
58884
- return {
58885
- Enter: () => this.editor.commands.splitListItem(this.name),
58886
- Tab: () => this.editor.commands.sinkListItem(this.name),
58887
- 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),
58888
- };
58889
- },
58890
- });
58891
-
58892
- /**
58893
- * This extension allows you to create text styles. It is required by default
58894
- * for the `textColor` and `backgroundColor` extensions.
58895
- * @see https://www.tiptap.dev/api/marks/text-style
58896
- */
58897
- const TextStyle = Mark.create({
58898
- name: 'textStyle',
58899
- priority: 101,
58900
- addOptions() {
58901
- return {
58902
- HTMLAttributes: {},
58903
- };
58904
- },
58905
- parseHTML() {
58906
- return [
58907
- {
58908
- tag: 'span',
58909
- getAttrs: element => {
58910
- const hasStyles = element.hasAttribute('style');
58911
- if (!hasStyles) {
58912
- return false;
58913
- }
58914
- return {};
58915
- },
58916
- },
58917
- ];
58918
- },
58919
- renderHTML({ HTMLAttributes }) {
58920
- return ['span', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
58921
- },
58922
- addCommands() {
58923
- return {
58924
- removeEmptyTextStyle: () => ({ state, commands }) => {
58925
- const attributes = getMarkAttributes(state, this.type);
58926
- const hasStyles = Object.entries(attributes).some(([, value]) => !!value);
58927
- if (hasStyles) {
58928
- return true;
58929
- }
58930
- return commands.unsetMark(this.name);
58931
- },
58932
- };
58933
- },
58934
- });
58935
-
58936
58877
  /**
58937
58878
  * Matches an ordered list to a 1. on input (or any number followed by a dot).
58938
58879
  */
@@ -59163,7 +59104,7 @@ img.ProseMirror-separator {
59163
59104
  Text,
59164
59105
  BulletList,
59165
59106
  OrderedList,
59166
- ListItem$1,
59107
+ ListItem,
59167
59108
  Bold,
59168
59109
  Italic,
59169
59110
  History,