@ni/ok-components 1.12.1 → 1.12.3
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/all-components-bundle.js +78 -44
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +2832 -2812
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/custom-elements.json +118 -118
- package/dist/custom-elements.md +25 -25
- package/dist/esm/fv/split-button/index.d.ts +2 -2
- package/dist/esm/fv/split-button/index.js +4 -4
- package/dist/esm/fv/split-button/index.js.map +1 -1
- package/dist/esm/fv/split-button/styles.js +51 -36
- package/dist/esm/fv/split-button/styles.js.map +1 -1
- package/dist/esm/fv/split-button/template.js +2 -2
- package/dist/esm/fv/split-button/template.js.map +1 -1
- package/package.json +2 -2
|
@@ -105411,6 +105411,11 @@ focus outline in that case.
|
|
|
105411
105411
|
font: ${subtitleFont};
|
|
105412
105412
|
color: ${subtitleFontColor};
|
|
105413
105413
|
text-align: center;
|
|
105414
|
+
${linkFont.cssCustomProperty}: ${subtitleFont};
|
|
105415
|
+
}
|
|
105416
|
+
|
|
105417
|
+
.subtitle.subtitle-empty {
|
|
105418
|
+
display: none;
|
|
105414
105419
|
}
|
|
105415
105420
|
|
|
105416
105421
|
.message-content {
|
|
@@ -105518,9 +105523,9 @@ focus outline in that case.
|
|
|
105518
105523
|
${when(x => x.welcomeTitle, html `
|
|
105519
105524
|
<div class="title">${x => x.welcomeTitle}</div>
|
|
105520
105525
|
`)}
|
|
105521
|
-
${
|
|
105522
|
-
<
|
|
105523
|
-
|
|
105526
|
+
<div class="subtitle ${x => (!x.subtitle && x.subtitleIsEmpty ? 'subtitle-empty' : '')}">
|
|
105527
|
+
<slot name="subtitle" ${slotted({ property: 'slottedSubtitleElements' })}>${x => x.subtitle}</slot>
|
|
105528
|
+
</div>
|
|
105524
105529
|
<section class="message-content">
|
|
105525
105530
|
<slot></slot>
|
|
105526
105531
|
</section>
|
|
@@ -105531,6 +105536,14 @@ focus outline in that case.
|
|
|
105531
105536
|
* A Spright component for displaying a welcome chat message
|
|
105532
105537
|
*/
|
|
105533
105538
|
class ChatMessageWelcome extends FoundationElement {
|
|
105539
|
+
constructor() {
|
|
105540
|
+
super(...arguments);
|
|
105541
|
+
/** @internal */
|
|
105542
|
+
this.subtitleIsEmpty = true;
|
|
105543
|
+
}
|
|
105544
|
+
slottedSubtitleElementsChanged(_prev, next) {
|
|
105545
|
+
this.subtitleIsEmpty = next === undefined || next.length === 0;
|
|
105546
|
+
}
|
|
105534
105547
|
}
|
|
105535
105548
|
__decorate([
|
|
105536
105549
|
attr({ attribute: 'welcome-title' })
|
|
@@ -105538,6 +105551,12 @@ focus outline in that case.
|
|
|
105538
105551
|
__decorate([
|
|
105539
105552
|
attr
|
|
105540
105553
|
], ChatMessageWelcome.prototype, "subtitle", void 0);
|
|
105554
|
+
__decorate([
|
|
105555
|
+
observable
|
|
105556
|
+
], ChatMessageWelcome.prototype, "slottedSubtitleElements", void 0);
|
|
105557
|
+
__decorate([
|
|
105558
|
+
observable
|
|
105559
|
+
], ChatMessageWelcome.prototype, "subtitleIsEmpty", void 0);
|
|
105541
105560
|
const sprightChatMessageWelcome = ChatMessageWelcome.compose({
|
|
105542
105561
|
baseName: 'chat-message-welcome',
|
|
105543
105562
|
template: template$s,
|
|
@@ -108455,8 +108474,6 @@ focus outline in that case.
|
|
|
108455
108474
|
|
|
108456
108475
|
:host {
|
|
108457
108476
|
--ni-private-ok-fv-split-button-background-image: none;
|
|
108458
|
-
--ni-private-ok-fv-split-button-background-size: 100% 100%;
|
|
108459
|
-
--ni-private-ok-fv-split-button-background-size-emphasis: 100% 100%;
|
|
108460
108477
|
--ni-private-ok-fv-split-button-border: rgba(${actionRgbPartialColor}, 0.3);
|
|
108461
108478
|
--ni-private-ok-fv-split-button-color: ${buttonLabelFontColor};
|
|
108462
108479
|
position: relative;
|
|
@@ -108474,7 +108491,6 @@ focus outline in that case.
|
|
|
108474
108491
|
rgba(${borderRgbPartialColor}, 0.1)
|
|
108475
108492
|
);
|
|
108476
108493
|
--ni-private-ok-fv-split-button-border: rgba(${borderRgbPartialColor}, 0.1);
|
|
108477
|
-
--ni-private-ok-fv-split-button-background-size-emphasis: calc(100% - 4px) calc(100% - 4px);
|
|
108478
108494
|
}
|
|
108479
108495
|
|
|
108480
108496
|
:host([appearance='outline'][appearance-variant='primary']) {
|
|
@@ -108511,6 +108527,16 @@ focus outline in that case.
|
|
|
108511
108527
|
height: 100%;
|
|
108512
108528
|
}
|
|
108513
108529
|
|
|
108530
|
+
.split-button-container::before {
|
|
108531
|
+
content: '';
|
|
108532
|
+
position: absolute;
|
|
108533
|
+
inset: 0;
|
|
108534
|
+
border: ${borderWidth} solid var(--ni-private-ok-fv-split-button-border);
|
|
108535
|
+
background-image: var(--ni-private-ok-fv-split-button-background-image);
|
|
108536
|
+
background-repeat: no-repeat;
|
|
108537
|
+
pointer-events: none;
|
|
108538
|
+
}
|
|
108539
|
+
|
|
108514
108540
|
.split-button-primary,
|
|
108515
108541
|
.split-button-toggle {
|
|
108516
108542
|
appearance: none;
|
|
@@ -108519,12 +108545,12 @@ focus outline in that case.
|
|
|
108519
108545
|
height: 100%;
|
|
108520
108546
|
box-sizing: border-box;
|
|
108521
108547
|
margin: 0;
|
|
108522
|
-
border: ${borderWidth} solid
|
|
108548
|
+
border: ${borderWidth} solid transparent;
|
|
108523
108549
|
background-color: transparent;
|
|
108524
|
-
background-image: var(--ni-private-ok-fv-split-button-background-image);
|
|
108525
108550
|
background-position: center;
|
|
108526
108551
|
background-repeat: no-repeat;
|
|
108527
|
-
background-
|
|
108552
|
+
background-origin: border-box;
|
|
108553
|
+
background-size: 100% 100%;
|
|
108528
108554
|
color: var(--ni-private-ok-fv-split-button-color);
|
|
108529
108555
|
fill: currentcolor;
|
|
108530
108556
|
font: ${buttonLabelFont};
|
|
@@ -108549,7 +108575,7 @@ focus outline in that case.
|
|
|
108549
108575
|
|
|
108550
108576
|
.split-button-primary {
|
|
108551
108577
|
padding: 0 ${standardPadding};
|
|
108552
|
-
|
|
108578
|
+
padding-inline-end: ${mediumPadding};
|
|
108553
108579
|
white-space: nowrap;
|
|
108554
108580
|
}
|
|
108555
108581
|
|
|
@@ -108559,8 +108585,17 @@ focus outline in that case.
|
|
|
108559
108585
|
display: inline-flex;
|
|
108560
108586
|
align-items: center;
|
|
108561
108587
|
justify-content: center;
|
|
108562
|
-
|
|
108563
|
-
|
|
108588
|
+
padding: 0;
|
|
108589
|
+
}
|
|
108590
|
+
|
|
108591
|
+
.split-button-toggle::after {
|
|
108592
|
+
content: '';
|
|
108593
|
+
position: absolute;
|
|
108594
|
+
inset-block: ${smallPadding};
|
|
108595
|
+
inset-inline-start: calc(-1 * ${borderWidth});
|
|
108596
|
+
width: calc(2 * ${borderWidth});
|
|
108597
|
+
background: rgba(${borderRgbPartialColor}, 0.1);
|
|
108598
|
+
pointer-events: none;
|
|
108564
108599
|
}
|
|
108565
108600
|
|
|
108566
108601
|
.split-button-toggle > * {
|
|
@@ -108568,40 +108603,31 @@ focus outline in that case.
|
|
|
108568
108603
|
${iconColor.cssCustomProperty}: currentColor;
|
|
108569
108604
|
}
|
|
108570
108605
|
|
|
108571
|
-
:host([appearance='ghost']) .split-button-primary,
|
|
108572
|
-
:host([appearance='ghost']) .split-button-toggle {
|
|
108573
|
-
border-color: transparent;
|
|
108574
|
-
box-shadow: none;
|
|
108575
|
-
}
|
|
108576
|
-
|
|
108577
108606
|
slot[name='menu']::slotted(*) {
|
|
108578
108607
|
min-width: 100%;
|
|
108579
|
-
margin:
|
|
108608
|
+
margin: ${smallPadding} 0 0;
|
|
108580
108609
|
}
|
|
108581
108610
|
}
|
|
108582
108611
|
|
|
108583
108612
|
@layer hover {
|
|
108584
|
-
.split-button-primary:hover,
|
|
108585
|
-
.split-button-toggle:hover {
|
|
108613
|
+
.split-button-primary:enabled:hover,
|
|
108614
|
+
.split-button-toggle:enabled:hover {
|
|
108586
108615
|
border-color: ${borderHoverColor};
|
|
108587
108616
|
box-shadow: 0 0 0 ${borderWidth} ${borderHoverColor} inset;
|
|
108588
|
-
background-size: var(--ni-private-ok-fv-split-button-background-size-emphasis);
|
|
108589
108617
|
z-index: 1;
|
|
108590
108618
|
}
|
|
108591
108619
|
|
|
108592
|
-
|
|
108593
|
-
|
|
108594
|
-
|
|
108595
|
-
box-shadow: 0 0 0 ${borderWidth} ${borderHoverColor} inset;
|
|
108620
|
+
.split-button-primary:enabled:hover + .split-button-toggle::after,
|
|
108621
|
+
.split-button-toggle:enabled:hover::after {
|
|
108622
|
+
visibility: hidden;
|
|
108596
108623
|
}
|
|
108597
108624
|
}
|
|
108598
108625
|
|
|
108599
108626
|
@layer focusVisible {
|
|
108600
|
-
.split-button-primary:focus-visible,
|
|
108601
|
-
.split-button-toggle:focus-visible {
|
|
108627
|
+
.split-button-primary:enabled:focus-visible,
|
|
108628
|
+
.split-button-toggle:enabled:focus-visible {
|
|
108602
108629
|
border-color: ${borderHoverColor};
|
|
108603
108630
|
box-shadow: 0 0 0 ${borderWidth} ${borderHoverColor} inset;
|
|
108604
|
-
background-size: var(--ni-private-ok-fv-split-button-background-size-emphasis);
|
|
108605
108631
|
z-index: 1;
|
|
108606
108632
|
}
|
|
108607
108633
|
|
|
@@ -108610,16 +108636,15 @@ focus outline in that case.
|
|
|
108610
108636
|
outline: ${borderWidth} solid ${borderHoverColor};
|
|
108611
108637
|
}
|
|
108612
108638
|
|
|
108613
|
-
|
|
108614
|
-
|
|
108615
|
-
|
|
108616
|
-
box-shadow: 0 0 0 ${borderWidth} ${borderHoverColor} inset;
|
|
108639
|
+
.split-button-primary:focus-visible + .split-button-toggle::after,
|
|
108640
|
+
.split-button-toggle:focus-visible::after {
|
|
108641
|
+
visibility: hidden;
|
|
108617
108642
|
}
|
|
108618
108643
|
}
|
|
108619
108644
|
|
|
108620
108645
|
@layer active {
|
|
108621
|
-
.split-button-primary:active,
|
|
108622
|
-
.split-button-toggle:active,
|
|
108646
|
+
.split-button-primary:enabled:active,
|
|
108647
|
+
.split-button-toggle:enabled:active,
|
|
108623
108648
|
:host([open]) .split-button-toggle {
|
|
108624
108649
|
border-color: ${borderHoverColor};
|
|
108625
108650
|
box-shadow: none;
|
|
@@ -108627,10 +108652,19 @@ focus outline in that case.
|
|
|
108627
108652
|
background-size: calc(100% - 2px) calc(100% - 2px);
|
|
108628
108653
|
}
|
|
108629
108654
|
|
|
108630
|
-
:host([
|
|
108631
|
-
|
|
108655
|
+
:host([open]) .split-button-toggle {
|
|
108656
|
+
border-color: rgba(${fillSelectedRgbPartialColor}, 0.3);
|
|
108657
|
+
background-size: 100% 100%;
|
|
108658
|
+
}
|
|
108659
|
+
|
|
108660
|
+
:host([open]) .split-button-toggle::after {
|
|
108661
|
+
visibility: hidden;
|
|
108662
|
+
}
|
|
108663
|
+
|
|
108664
|
+
:host([appearance='block']) .split-button-primary:enabled:active,
|
|
108665
|
+
:host([appearance='block']) .split-button-toggle:enabled:active,
|
|
108632
108666
|
:host([appearance='block'][open]) .split-button-toggle {
|
|
108633
|
-
background-
|
|
108667
|
+
background-color: ${applicationBackgroundColor};
|
|
108634
108668
|
}
|
|
108635
108669
|
|
|
108636
108670
|
:host([appearance='outline'][appearance-variant='accent']) .split-button-primary:active,
|
|
@@ -108667,7 +108701,6 @@ focus outline in that case.
|
|
|
108667
108701
|
const template$b = html `
|
|
108668
108702
|
<div
|
|
108669
108703
|
class="split-button-container"
|
|
108670
|
-
${ref('splitButtonContainer')}
|
|
108671
108704
|
>
|
|
108672
108705
|
<button
|
|
108673
108706
|
class="split-button-primary"
|
|
@@ -108682,6 +108715,7 @@ focus outline in that case.
|
|
|
108682
108715
|
</button>
|
|
108683
108716
|
<button
|
|
108684
108717
|
class="split-button-toggle"
|
|
108718
|
+
${ref('toggleButton')}
|
|
108685
108719
|
type="button"
|
|
108686
108720
|
?disabled="${x => x.disabled}"
|
|
108687
108721
|
aria-label="${x => `More actions for ${x.label}`}"
|
|
@@ -108701,9 +108735,9 @@ focus outline in that case.
|
|
|
108701
108735
|
auto-update-mode="auto"
|
|
108702
108736
|
horizontal-inset
|
|
108703
108737
|
horizontal-positioning-mode="dynamic"
|
|
108738
|
+
horizontal-default-position="end"
|
|
108704
108739
|
vertical-positioning-mode="locktodefault"
|
|
108705
108740
|
vertical-default-position="bottom"
|
|
108706
|
-
horizontal-scaling="anchor"
|
|
108707
108741
|
${ref('region')}
|
|
108708
108742
|
>
|
|
108709
108743
|
<span part="menu">
|
|
@@ -108791,14 +108825,14 @@ focus outline in that case.
|
|
|
108791
108825
|
prev.removeEventListener('change', this.menuChangeHandler);
|
|
108792
108826
|
}
|
|
108793
108827
|
if (this.region) {
|
|
108794
|
-
this.region.anchorElement = this.
|
|
108828
|
+
this.region.anchorElement = this.toggleButton ?? this;
|
|
108795
108829
|
this.region.addEventListener('change', this.menuChangeHandler, { capture: true });
|
|
108796
108830
|
}
|
|
108797
108831
|
}
|
|
108798
108832
|
/** @internal */
|
|
108799
|
-
|
|
108833
|
+
toggleButtonChanged() {
|
|
108800
108834
|
if (this.region) {
|
|
108801
|
-
this.region.anchorElement = this.
|
|
108835
|
+
this.region.anchorElement = this.toggleButton ?? this;
|
|
108802
108836
|
}
|
|
108803
108837
|
}
|
|
108804
108838
|
setOpen(nextOpen) {
|
|
@@ -108830,7 +108864,7 @@ focus outline in that case.
|
|
|
108830
108864
|
], FvSplitButton.prototype, "appearanceVariant", void 0);
|
|
108831
108865
|
__decorate([
|
|
108832
108866
|
observable
|
|
108833
|
-
], FvSplitButton.prototype, "
|
|
108867
|
+
], FvSplitButton.prototype, "toggleButton", void 0);
|
|
108834
108868
|
__decorate([
|
|
108835
108869
|
observable
|
|
108836
108870
|
], FvSplitButton.prototype, "region", void 0);
|