@ni/nimble-components 24.1.10 → 24.1.11

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.
@@ -1204,7 +1204,7 @@ const vl=fi.create(aa(ia)).withDefault((t=>`0px 2px 4px ${_s(jd(t,cs,cs,cs),.16)
1204
1204
  Ud(Or,(t=>Gd(t)),(t=>_s(Gd(t),.3)),"Noto Serif","400","25px","32px","Noto Serif Fallback"),Ud(Tr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),"Noto Serif","400","29.100000381469727px","40px","Noto Serif Fallback"),Ud(Fr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),"Source Sans Pro","400","25px","32px","Source Sans Pro Fallback")
1205
1205
  const[yl,wl,xl,Cl,kl,Sl,$l,Ml]=Ud(Nr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),"Source Sans Pro","400","22px","28px","Source Sans Pro Fallback")
1206
1206
  Ud(Pr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),"Source Sans Pro","400","19px","24px","Source Sans Pro Fallback")
1207
- const[_l,El,Il,Dl,Al,Tl,Ol,Rl]=Ud(Lr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),"Source Sans Pro","300","16px","20px","Source Sans Pro Fallback"),[Fl,Nl,Pl,Ll,zl,Vl,Hl,Bl]=Ud(zr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),"Source Sans Pro","300","12.800000190734863px","16px","Source Sans Pro Fallback"),[ql,Ul,jl,Wl,Zl,Gl,Kl,Jl]=Ud(Vr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),ys,ws,Cs,Ss,Ta),[Xl,Yl,Ql,tc,ec,nc,ic,oc]=Ud(Hr,(t=>jd(t,us,us,_s(rs,.6))),(t=>_s(Gd(t),.3)),ys,ws,Cs,Ss,Ta),[sc,rc,ac,lc,cc,dc,hc,uc]=Ud(Br,(t=>jd(t,gs,vs,vs)),(t=>_s(Gd(t),.3)),ys,ws,Cs,Ss,Ta),[pc,fc,mc,gc,vc,bc,yc,wc]=Ud(qr,(t=>jd(t,us,us,vs)),(t=>_s(Gd(t),.3)),ys,ws,Cs,Ss,Ta),[xc,Cc,kc,Sc,$c,Mc,_c,Ec]=Ud(Ur,(t=>_s(Gd(t),.6)),(t=>_s(Gd(t),.3)),"Source Sans Pro","400","14px","18px","Source Sans Pro Fallback"),[Ic,Dc,Ac,Tc,Oc,Rc,Fc,Nc]=Ud(jr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),bs,"400",xs,ks,Oa),[Pc,Lc,zc,Vc,Hc,Bc,qc,Uc]=Ud(Wr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),"Source Sans Pro","600","14px","18px","Source Sans Pro Fallback")
1207
+ const[_l,El,Il,Dl,Al,Tl,Ol,Rl]=Ud(Lr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),"Source Sans Pro","300","16px","20px","Source Sans Pro Fallback"),[Fl,Nl,Pl,Ll,zl,Vl,Hl,Bl]=Ud(zr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),"Source Sans Pro","300","12.800000190734863px","16px","Source Sans Pro Fallback"),[ql,Ul,jl,Wl,Zl,Gl,Kl,Jl]=Ud(Vr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),ys,ws,Cs,Ss,Ta),[Xl,Yl,Ql,tc,ec,nc,ic,oc]=Ud(Hr,(t=>jd(t,us,us,_s(rs,.6))),(t=>_s(Gd(t),.3)),ys,ws,Cs,Ss,Ta),[sc,rc,ac,lc,cc,dc,hc,uc]=Ud(Br,(t=>jd(t,gs,vs,vs)),(t=>_s(Gd(t),.3)),ys,ws,Cs,Ss,Ta),[pc,fc,mc,gc,vc,bc,yc,wc]=Ud(qr,(t=>jd(t,us,us,_s(rs,.6))),(t=>_s(Gd(t),.3)),ys,ws,Cs,Ss,Ta),[xc,Cc,kc,Sc,$c,Mc,_c,Ec]=Ud(Ur,(t=>_s(Gd(t),.6)),(t=>_s(Gd(t),.3)),"Source Sans Pro","400","14px","18px","Source Sans Pro Fallback"),[Ic,Dc,Ac,Tc,Oc,Rc,Fc,Nc]=Ud(jr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),bs,"400",xs,ks,Oa),[Pc,Lc,zc,Vc,Hc,Bc,qc,Uc]=Ud(Wr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),"Source Sans Pro","600","14px","18px","Source Sans Pro Fallback")
1208
1208
  Ud(Zr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),"Source Sans Pro","400","16px","16px","Source Sans Pro Fallback"),Ud(Gr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),"Source Sans Pro","600","16px","16px","Source Sans Pro Fallback")
1209
1209
  const[jc,Wc,Zc,Gc,Kc,Jc,Xc,Yc]=Ud(Kr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),"Source Sans Pro","600","11px","16px","Source Sans Pro Fallback"),[Qc,td,ed,nd,id,od,sd,rd]=Ud(Jr,(t=>_s(Gd(t),.6)),(t=>_s(Gd(t),.3)),"Source Sans Pro","600","11px","16px","Source Sans Pro Fallback"),[ad,ld,cd,dd,hd,ud,pd,fd]=Ud(Xr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),"Source Sans Pro","600","12.800000190734863px","16px","Source Sans Pro Fallback"),[md,gd,vd,bd,yd,wd,xd,Cd]=Ud(Yr,(t=>Gd(t)),(t=>_s(Gd(t),.3)),"Source Sans Pro","400","11px",$s,"Source Sans Pro Fallback"),[kd,Sd,$d,Md,_d,Ed,Id,Dd]=Ud(ta,(t=>Wd(t)),(t=>_s(Wd(t),.3)),"Source Sans Pro","400","11px",$s,"Source Sans Pro Fallback"),[Ad,Td,Od,Rd,Fd,Nd,Pd,Ld]=Ud(Rr,(t=>_s(Gd(t),.6)),(t=>_s(Gd(t),.3)),"Source Sans Pro","600","12.800000190734863px",$s,"Source Sans Pro Fallback")
1210
1210
  Ud(ra,(t=>jd(t,ms,vs,vs)),(t=>_s(Gd(t),.3)),bs,"600",xs,ks,Oa)
@@ -1217,92 +1217,80 @@ return[l,fi.create(aa(`${d}-font-color`)).withDefault((t=>e(t))),fi.create(aa(`$
1217
1217
  case Ts.dark:return n
1218
1218
  case Ts.color:return i
1219
1219
  default:return e}}function Wd(t){return jd(t,es,"#ff4646",rs)}function Zd(t){return jd(t,ds,is,rs)}function Gd(t){return jd(t,ds,is,rs)}function Kd(t){return jd(t,us,vs,rs)}function Jd(t){return jd(t,ds,is,rs)}const Xd=xt`
1220
- ${Oo("inline")}
1220
+ @layer base, hover, focusVisible, active, disabled;
1221
1221
 
1222
- :host {
1223
- box-sizing: border-box;
1224
- font: ${ql};
1225
- }
1226
-
1227
- .top-container {
1228
- display: contents;
1229
- }
1230
-
1231
- [part='start'] {
1232
- display: none;
1233
- }
1234
-
1235
- .control {
1236
- color: ${Ul};
1237
- text-decoration: underline;
1238
- }
1239
-
1240
- .control${No} {
1241
- display: inline;
1242
- outline: none;
1243
- box-shadow: inset 0px -1px ${Ul};
1244
- }
1245
-
1246
- .control:active {
1247
- color: ${Yl};
1248
- text-decoration: underline;
1249
- }
1222
+ @layer base {
1223
+ ${Oo("inline")}
1250
1224
 
1251
- .control${No}:active {
1252
- box-shadow: inset 0px -1px ${Yl};
1253
- }
1225
+ :host {
1226
+ box-sizing: border-box;
1227
+ font: ${ql};
1228
+ }
1254
1229
 
1255
- .control:not(:any-link) {
1256
- color: ${jl};
1257
- text-decoration: none;
1258
- }
1230
+ .top-container {
1231
+ display: contents;
1232
+ }
1259
1233
 
1260
- .control:not(:any-link):active {
1261
- color: ${Ql};
1262
- }
1234
+ .control {
1235
+ color: ${Ul};
1236
+ text-decoration: underline;
1237
+ }
1263
1238
 
1264
- :host([underline-hidden]) .control {
1265
- text-decoration: none;
1266
- }
1239
+ :host([underline-hidden]) .control {
1240
+ text-decoration: none;
1241
+ }
1267
1242
 
1268
- :host([underline-hidden]) .control:hover {
1269
- text-decoration: underline;
1270
- }
1243
+ :host([appearance='prominent']) .control {
1244
+ color: ${rc};
1245
+ }
1271
1246
 
1272
- :host([underline-hidden]) .control${No} {
1273
- text-decoration: underline;
1274
- }
1247
+ [part='start'] {
1248
+ display: none;
1249
+ }
1275
1250
 
1276
- :host([underline-hidden]) .control:not(:any-link) {
1277
- text-decoration: none;
1278
- }
1251
+ .content {
1252
+ pointer-events: none;
1253
+ }
1279
1254
 
1280
- :host([appearance='prominent']) .control {
1281
- color: ${rc};
1255
+ [part='end'] {
1256
+ display: none;
1257
+ }
1282
1258
  }
1283
1259
 
1284
- :host([appearance='prominent']) .control:active {
1285
- color: ${fc};
1260
+ @layer hover {
1261
+ .control:any-link:hover {
1262
+ text-decoration: underline;
1263
+ }
1286
1264
  }
1287
1265
 
1288
- :host([appearance='prominent']) .control${No} {
1289
- box-shadow: inset 0px -1px ${rc};
1266
+ @layer focusVisible {
1267
+ .control${No} {
1268
+ outline: none;
1269
+ box-shadow: inset 0px -1px;
1270
+ text-decoration: underline;
1271
+ }
1290
1272
  }
1291
1273
 
1292
- :host([appearance='prominent']) .control${No}:active {
1293
- box-shadow: inset 0px -1px ${fc};
1294
- }
1274
+ @layer active {
1275
+ .control:active {
1276
+ color: ${Yl};
1277
+ text-decoration: underline;
1278
+ box-shadow: none;
1279
+ }
1295
1280
 
1296
- :host([appearance='prominent']) .control:not(:any-link) {
1297
- color: ${ac};
1298
- }
1281
+ :host([appearance='prominent']) .control:active {
1282
+ color: ${fc};
1283
+ }
1299
1284
 
1300
- .content {
1301
- pointer-events: none;
1285
+ :host([underline-hidden]) .control:active {
1286
+ text-decoration: none;
1287
+ }
1302
1288
  }
1303
1289
 
1304
- [part='end'] {
1305
- display: none;
1290
+ @layer disabled {
1291
+ .control:not(:any-link) {
1292
+ color: ${jl};
1293
+ }
1306
1294
  }
1307
1295
  `
1308
1296
  class Yd extends Fo{constructor(){super(...arguments),this.underlineHidden=!1}}t([lt({attribute:"underline-hidden",mode:"boolean"})],Yd.prototype,"underlineHidden",void 0),t([lt],Yd.prototype,"appearance",void 0),t([lt({attribute:"contenteditable"})],Yd.prototype,"contentEditable",void 0)
@@ -2526,7 +2514,7 @@ const Lm=xt`
2526
2514
 
2527
2515
  .control:active {
2528
2516
  color: var(--ni-private-breadcrumb-link-active-font-color);
2529
- text-decoration: underline;
2517
+ text-decoration: none;
2530
2518
  }
2531
2519
 
2532
2520
  [part='start'] {
@@ -8390,7 +8378,7 @@ class eI{static parseMarkdownToDOM(t,e){try{eI.setup(e)
8390
8378
  const n=this.markdownParser.parse(t)
8391
8379
  return null===n?{fragment:document.createDocumentFragment(),mentionedHrefs:Array.from(eI.mentionedHrefs)}:{fragment:this.domSerializer.serializeFragment(n.content),mentionedHrefs:Array.from(eI.mentionedHrefs)}}finally{eI.cleanup()}}static initializeMarkdownParser(){const t=KE.tokenizer.configure("zero").enable(["emphasis","list","escape","autolink","newline"])
8392
8380
  return t.normalizeLinkText=t=>t,new ZE(this.updatedSchema,t,KE.tokens)}static getCustomSchemaConfiguration(){return new Zb({nodes:HE.spec.nodes,marks:{link:{attrs:{href:{},rel:{default:"noopener noreferrer"},class:{default:""}},inclusive:!1,excludes:"_",toDOM(t){const e=t.attrs.href,n=eI.mentionConfigs?.find((t=>t.isValidMentionHref(e))),i=n?.getDisplayName(e)
8393
- return n&&i?(eI.mentionedHrefs.add(e),[n.viewElement,{"mention-href":e,"mention-label":i}]):[th,{href:/^https?:\/\//i.test(e)?e:null,rel:t.attrs.rel,class:e}]}},em:HE.spec.marks.get("em"),strong:HE.spec.marks.get("strong")}})}static setup(t){eI.mentionConfigs=t,eI.mentionedHrefs.clear()}static cleanup(){eI.mentionConfigs=void 0,eI.mentionedHrefs.clear()}}tI=eI,eI.mentionedHrefs=new Set,eI.updatedSchema=tI.getCustomSchemaConfiguration(),eI.markdownParser=tI.initializeMarkdownParser(),eI.domSerializer=sy.fromSchema(tI.updatedSchema)
8381
+ return n&&i?(eI.mentionedHrefs.add(e),[n.viewElement,{"mention-href":e,"mention-label":i}]):[th,{href:eI.startsWithHttpOrHttps(e)?e:null,rel:t.attrs.rel,class:e,"underline-hidden":!eI.startsWithHttpOrHttps(e)||null}]}},em:HE.spec.marks.get("em"),strong:HE.spec.marks.get("strong")}})}static setup(t){eI.mentionConfigs=t,eI.mentionedHrefs.clear()}static cleanup(){eI.mentionConfigs=void 0,eI.mentionedHrefs.clear()}static startsWithHttpOrHttps(t){return/^https?:\/\//i.test(t)}}tI=eI,eI.mentionedHrefs=new Set,eI.updatedSchema=tI.getCustomSchemaConfiguration(),eI.markdownParser=tI.initializeMarkdownParser(),eI.domSerializer=sy.fromSchema(tI.updatedSchema)
8394
8382
  class nI{constructor(t){this.markdownSerializer=this.initializeMarkdownSerializerForTipTap(t)}serializeDOMToMarkdown(t){return this.markdownSerializer.serialize(t)}initializeMarkdownSerializerForTipTap(t){const e=function(t,e){const n=e.attrs.href
8395
8383
  t.write(`<${n}>`)},n={bulletList:XE.nodes.bullet_list,listItem:XE.nodes.list_item,orderedList:function(t,e){const n=e.attrs.start||1,i=String(n+e.childCount-1).length,o=t.repeat(" ",i+2)
8396
8384
  t.renderList(e,o,(e=>{const o=String(n+e)