@ni/ok-components 0.2.11 → 0.2.13
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.
|
@@ -14876,7 +14876,25 @@
|
|
|
14876
14876
|
calendarEventFillBlockedColor: 'calendar-event-fill-blocked-color',
|
|
14877
14877
|
calendarGrabHandleBackgroundColor: 'calendar-grab-handle-background-color',
|
|
14878
14878
|
calendarGridBorderColor: 'calendar-grid-border-color',
|
|
14879
|
-
calendarGroupHeaderBackgroundColor: 'calendar-group-header-background-color'
|
|
14879
|
+
calendarGroupHeaderBackgroundColor: 'calendar-group-header-background-color',
|
|
14880
|
+
calendarEventBackgroundJobColor: 'calendar-event-background-job-color',
|
|
14881
|
+
calendarEventBackgroundHoverJobColor: 'calendar-event-background-hover-job-color',
|
|
14882
|
+
calendarEventBorderJobColor: 'calendar-event-border-job-color',
|
|
14883
|
+
calendarEventJobFontColor: 'calendar-event-job-font-color',
|
|
14884
|
+
calendarEventBackgroundMaintenanceColor: 'calendar-event-background-maintenance-color',
|
|
14885
|
+
calendarEventBackgroundHoverMaintenanceColor: 'calendar-event-background-hover-maintenance-color',
|
|
14886
|
+
calendarEventBorderMaintenanceColor: 'calendar-event-border-maintenance-color',
|
|
14887
|
+
calendarEventBackgroundCalibrationColor: 'calendar-event-background-calibration-color',
|
|
14888
|
+
calendarEventBackgroundHoverCalibrationColor: 'calendar-event-background-hover-calibration-color',
|
|
14889
|
+
calendarEventBorderCalibrationColor: 'calendar-event-border-calibration-color',
|
|
14890
|
+
calendarEventBackgroundReservationColor: 'calendar-event-background-reservation-color',
|
|
14891
|
+
calendarEventBackgroundHoverReservationColor: 'calendar-event-background-hover-reservation-color',
|
|
14892
|
+
calendarEventBorderReservationColor: 'calendar-event-border-reservation-color',
|
|
14893
|
+
calendarEventBackgroundTransportOrderColor: 'calendar-event-background-transport-order-color',
|
|
14894
|
+
calendarEventBackgroundHoverTransportOrderColor: 'calendar-event-background-hover-transport-order-color',
|
|
14895
|
+
calendarEventBorderTransportOrderColor: 'calendar-event-border-transport-order-color',
|
|
14896
|
+
calendarEventBackgroundAggregateAvailabilityColor: 'calendar-event-background-aggregate-availability-color',
|
|
14897
|
+
calendarEventBorderAggregateAvailabilityColor: 'calendar-event-border-aggregate-availability-color'
|
|
14880
14898
|
};
|
|
14881
14899
|
const prefix = 'ni-nimble';
|
|
14882
14900
|
const styleNameFromTokenName = (tokenName) => `${prefix}-${tokenName}`;
|
|
@@ -16111,7 +16129,16 @@
|
|
|
16111
16129
|
|
|
16112
16130
|
const Information100DarkUi = "#a46eff";
|
|
16113
16131
|
const Information100LightUi = "#804ad9";
|
|
16132
|
+
const InformationLight10 = "#f3edfc";
|
|
16133
|
+
const InformationDark10 = "#413d4c";
|
|
16134
|
+
const InformationLight30 = "#d9c9f4";
|
|
16135
|
+
const InformationDark30 = "#574873";
|
|
16136
|
+
const InformationDarkTypography = "#c9abff";
|
|
16114
16137
|
const Warning100DarkUi = "#ff8126";
|
|
16138
|
+
const WarningLight10 = "#ffede6";
|
|
16139
|
+
const WarningDark10 = "#4a3e36";
|
|
16140
|
+
const WarningLight20 = "#ffdbcc";
|
|
16141
|
+
const WarningDark20 = "#5e4635";
|
|
16115
16142
|
const Pass100LightUi = "#009921";
|
|
16116
16143
|
const Pass100DarkUi = "#00c12b";
|
|
16117
16144
|
const Fail100LightUi = "#c4000c";
|
|
@@ -16132,6 +16159,8 @@
|
|
|
16132
16159
|
const NiSky = "#3cb4e7";
|
|
16133
16160
|
const BannerFail100DarkUi = "#d63434";
|
|
16134
16161
|
const Warning100LightUi = "#ff4b00";
|
|
16162
|
+
const Black91V10 = "#e8e8e8";
|
|
16163
|
+
const Black82V100 = "#6e6f70";
|
|
16135
16164
|
const DigitalGreenDark = "#008557";
|
|
16136
16165
|
const DigitalGreenDark105 = "#00734b";
|
|
16137
16166
|
const DigitalGreenDark110 = "#00613f";
|
|
@@ -16150,10 +16179,25 @@
|
|
|
16150
16179
|
const NiSea = "#00aba5";
|
|
16151
16180
|
const NiSeaLight = "#a5d8c8";
|
|
16152
16181
|
const NiTulip = "#e54c8a";
|
|
16182
|
+
const NiTulip10 = "#fdeef4";
|
|
16183
|
+
const NiTulipDark10 = "#483a41";
|
|
16184
|
+
const NiTulip20 = "#fadbe8";
|
|
16185
|
+
const NiTulipDark20 = "#593b49";
|
|
16153
16186
|
const NiIndigo = "#8e78b7";
|
|
16154
16187
|
const NiPlumDark1 = "#8c459a";
|
|
16155
16188
|
const NiIndigoDark2 = "#312e7f";
|
|
16156
16189
|
const NiSeaDark2 = "#00685f";
|
|
16190
|
+
const NiSpec10 = "#e6f6fb";
|
|
16191
|
+
const NiSpecDark10 = "#304147";
|
|
16192
|
+
const NiSpec20 = "#ccecf6";
|
|
16193
|
+
const NiSpecDark20 = "#2b4c57";
|
|
16194
|
+
const NiSpec = "#00a1d4";
|
|
16195
|
+
const BrownLight10 = "#f1eeeb";
|
|
16196
|
+
const BrownDark10 = "#403e3d";
|
|
16197
|
+
const BrownLight20 = "#e2dcd7";
|
|
16198
|
+
const BrownDark20 = "#4a4440";
|
|
16199
|
+
const BrownLight = "#6f4e37";
|
|
16200
|
+
const BrownDark = "#9b7a60";
|
|
16157
16201
|
const Title2Family = "Source Sans Pro";
|
|
16158
16202
|
const Title2Weight = "400";
|
|
16159
16203
|
const ControlLabel1Family = "Source Sans Pro";
|
|
@@ -16312,6 +16356,24 @@
|
|
|
16312
16356
|
calendarGrabHandleBackgroundColor: createThemeColor(DigitalGreenLight, PowerGreen, PowerGreen),
|
|
16313
16357
|
calendarGridBorderColor: createThemeColor(Black22, Black80, Black80),
|
|
16314
16358
|
calendarGroupHeaderBackgroundColor: createThemeColor(Black7, hexToRgbaCssColor(Black91, 0.1), hexToRgbaCssColor(Black91, 0.1)),
|
|
16359
|
+
calendarEventBackgroundJobColor: createThemeColor(InformationLight10, InformationDark10, InformationDark10),
|
|
16360
|
+
calendarEventBackgroundHoverJobColor: createThemeColor(InformationLight30, InformationDark30, InformationDark30),
|
|
16361
|
+
calendarEventBorderJobColor: createThemeColor(Information100LightUi, Information100DarkUi, Information100DarkUi),
|
|
16362
|
+
calendarEventJobFontColor: createThemeColor(Information100LightUi, InformationDarkTypography, InformationDarkTypography),
|
|
16363
|
+
calendarEventBackgroundMaintenanceColor: createThemeColor(WarningLight10, WarningDark10, WarningDark10),
|
|
16364
|
+
calendarEventBackgroundHoverMaintenanceColor: createThemeColor(WarningLight20, WarningDark20, WarningDark20),
|
|
16365
|
+
calendarEventBorderMaintenanceColor: createThemeColor(Warning100LightUi, Warning100DarkUi, Warning100DarkUi),
|
|
16366
|
+
calendarEventBackgroundCalibrationColor: createThemeColor(NiTulip10, NiTulipDark10, NiTulipDark10),
|
|
16367
|
+
calendarEventBackgroundHoverCalibrationColor: createThemeColor(NiTulip20, NiTulipDark20, NiTulipDark20),
|
|
16368
|
+
calendarEventBorderCalibrationColor: createThemeColor(NiTulip, NiTulip, NiTulip),
|
|
16369
|
+
calendarEventBackgroundReservationColor: createThemeColor(NiSpec10, NiSpecDark10, NiSpecDark10),
|
|
16370
|
+
calendarEventBackgroundHoverReservationColor: createThemeColor(NiSpec20, NiSpecDark20, NiSpecDark20),
|
|
16371
|
+
calendarEventBorderReservationColor: createThemeColor(NiSpec, NiSpec, NiSpec),
|
|
16372
|
+
calendarEventBackgroundTransportOrderColor: createThemeColor(BrownLight10, BrownDark10, BrownDark10),
|
|
16373
|
+
calendarEventBackgroundHoverTransportOrderColor: createThemeColor(BrownLight20, BrownDark20, BrownDark20),
|
|
16374
|
+
calendarEventBorderTransportOrderColor: createThemeColor(BrownLight, BrownDark, BrownDark),
|
|
16375
|
+
calendarEventBackgroundAggregateAvailabilityColor: createThemeColor(Black91V10, Black82, Black82),
|
|
16376
|
+
calendarEventBorderAggregateAvailabilityColor: hexToRgbaCssThemeColor(createThemeColor(Black91, Black82V100, Black82V100), 0.5, 1, 1),
|
|
16315
16377
|
controlHeight: '32px',
|
|
16316
16378
|
controlSlimHeight: '24px',
|
|
16317
16379
|
smallPadding: '4px',
|
|
@@ -16467,6 +16529,24 @@
|
|
|
16467
16529
|
createThemeColorToken(tokenNames.calendarGrabHandleBackgroundColor, tokenValues.calendarGrabHandleBackgroundColor);
|
|
16468
16530
|
createThemeColorToken(tokenNames.calendarGridBorderColor, tokenValues.calendarGridBorderColor);
|
|
16469
16531
|
createThemeColorToken(tokenNames.calendarGroupHeaderBackgroundColor, tokenValues.calendarGroupHeaderBackgroundColor);
|
|
16532
|
+
createThemeColorToken(tokenNames.calendarEventBackgroundJobColor, tokenValues.calendarEventBackgroundJobColor);
|
|
16533
|
+
createThemeColorToken(tokenNames.calendarEventBackgroundHoverJobColor, tokenValues.calendarEventBackgroundHoverJobColor);
|
|
16534
|
+
createThemeColorToken(tokenNames.calendarEventBorderJobColor, tokenValues.calendarEventBorderJobColor);
|
|
16535
|
+
createThemeColorToken(tokenNames.calendarEventJobFontColor, tokenValues.calendarEventJobFontColor);
|
|
16536
|
+
createThemeColorToken(tokenNames.calendarEventBackgroundMaintenanceColor, tokenValues.calendarEventBackgroundMaintenanceColor);
|
|
16537
|
+
createThemeColorToken(tokenNames.calendarEventBackgroundHoverMaintenanceColor, tokenValues.calendarEventBackgroundHoverMaintenanceColor);
|
|
16538
|
+
createThemeColorToken(tokenNames.calendarEventBorderMaintenanceColor, tokenValues.calendarEventBorderMaintenanceColor);
|
|
16539
|
+
createThemeColorToken(tokenNames.calendarEventBackgroundCalibrationColor, tokenValues.calendarEventBackgroundCalibrationColor);
|
|
16540
|
+
createThemeColorToken(tokenNames.calendarEventBackgroundHoverCalibrationColor, tokenValues.calendarEventBackgroundHoverCalibrationColor);
|
|
16541
|
+
createThemeColorToken(tokenNames.calendarEventBorderCalibrationColor, tokenValues.calendarEventBorderCalibrationColor);
|
|
16542
|
+
createThemeColorToken(tokenNames.calendarEventBackgroundReservationColor, tokenValues.calendarEventBackgroundReservationColor);
|
|
16543
|
+
createThemeColorToken(tokenNames.calendarEventBackgroundHoverReservationColor, tokenValues.calendarEventBackgroundHoverReservationColor);
|
|
16544
|
+
createThemeColorToken(tokenNames.calendarEventBorderReservationColor, tokenValues.calendarEventBorderReservationColor);
|
|
16545
|
+
createThemeColorToken(tokenNames.calendarEventBackgroundTransportOrderColor, tokenValues.calendarEventBackgroundTransportOrderColor);
|
|
16546
|
+
createThemeColorToken(tokenNames.calendarEventBackgroundHoverTransportOrderColor, tokenValues.calendarEventBackgroundHoverTransportOrderColor);
|
|
16547
|
+
createThemeColorToken(tokenNames.calendarEventBorderTransportOrderColor, tokenValues.calendarEventBorderTransportOrderColor);
|
|
16548
|
+
createThemeColorToken(tokenNames.calendarEventBackgroundAggregateAvailabilityColor, tokenValues.calendarEventBackgroundAggregateAvailabilityColor);
|
|
16549
|
+
createThemeColorToken(tokenNames.calendarEventBorderAggregateAvailabilityColor, tokenValues.calendarEventBorderAggregateAvailabilityColor);
|
|
16470
16550
|
// #endregion
|
|
16471
16551
|
// #region size tokens
|
|
16472
16552
|
const controlHeight = createStringToken(tokenNames.controlHeight, tokenValues.controlHeight);
|
|
@@ -96895,6 +96975,7 @@ focus outline in that case.
|
|
|
96895
96975
|
|
|
96896
96976
|
const styles$7 = css `
|
|
96897
96977
|
${display$1('flex')}
|
|
96978
|
+
${styles$Y}
|
|
96898
96979
|
|
|
96899
96980
|
:host {
|
|
96900
96981
|
width: 100%;
|
|
@@ -96936,6 +97017,22 @@ focus outline in that case.
|
|
|
96936
97017
|
border-bottom-color: ${borderHoverColor};
|
|
96937
97018
|
}
|
|
96938
97019
|
|
|
97020
|
+
:host([error-visible]) .container::after {
|
|
97021
|
+
border-bottom-color: ${failColor};
|
|
97022
|
+
}
|
|
97023
|
+
|
|
97024
|
+
:host([error-visible]) .container {
|
|
97025
|
+
border-bottom-color: ${failColor};
|
|
97026
|
+
}
|
|
97027
|
+
|
|
97028
|
+
:host([error-visible]:hover) .container::after {
|
|
97029
|
+
border-bottom-color: ${failColor};
|
|
97030
|
+
}
|
|
97031
|
+
|
|
97032
|
+
:host([error-visible]:focus-within) .container {
|
|
97033
|
+
border-bottom-color: ${failColor};
|
|
97034
|
+
}
|
|
97035
|
+
|
|
96939
97036
|
@media (prefers-reduced-motion) {
|
|
96940
97037
|
.container::after {
|
|
96941
97038
|
transition-duration: 0s;
|
|
@@ -96962,6 +97059,17 @@ focus outline in that case.
|
|
|
96962
97059
|
color: ${controlLabelFontColor};
|
|
96963
97060
|
}
|
|
96964
97061
|
|
|
97062
|
+
:host([error-visible]) .error-icon {
|
|
97063
|
+
display: none;
|
|
97064
|
+
}
|
|
97065
|
+
|
|
97066
|
+
:host([error-visible]) .error-icon.scrollbar-width-calculated {
|
|
97067
|
+
display: inline-flex;
|
|
97068
|
+
position: absolute;
|
|
97069
|
+
top: ${mediumPadding};
|
|
97070
|
+
right: var(--ni-private-scrollbar-width);
|
|
97071
|
+
}
|
|
97072
|
+
|
|
96965
97073
|
.action-button {
|
|
96966
97074
|
align-self: flex-end;
|
|
96967
97075
|
width: 80px;
|
|
@@ -96993,12 +97101,18 @@ focus outline in that case.
|
|
|
96993
97101
|
${x => (x.processing ? x.stopButtonLabel : x.sendButtonLabel)}
|
|
96994
97102
|
${when(x => x.processing, html `<${iconStopSquareTag} slot="start"></${iconStopSquareTag}>`, html `<${iconPaperPlaneTag} slot="start"></${iconPaperPlaneTag}>`)}
|
|
96995
97103
|
</${buttonTag}>
|
|
97104
|
+
<${iconExclamationMarkTag}
|
|
97105
|
+
severity="error"
|
|
97106
|
+
class="error-icon ${x => (x.scrollbarWidth >= 0 ? 'scrollbar-width-calculated' : '')}"
|
|
97107
|
+
style="--ni-private-scrollbar-width: ${x => x.scrollbarWidth}px;"
|
|
97108
|
+
></${iconExclamationMarkTag}>
|
|
97109
|
+
${errorTextTemplate}
|
|
96996
97110
|
</div>`;
|
|
96997
97111
|
|
|
96998
97112
|
/**
|
|
96999
97113
|
* A Spright component for composing and sending a chat message
|
|
97000
97114
|
*/
|
|
97001
|
-
class ChatInput extends FoundationElement {
|
|
97115
|
+
class ChatInput extends mixinErrorPattern(FoundationElement) {
|
|
97002
97116
|
constructor() {
|
|
97003
97117
|
super(...arguments);
|
|
97004
97118
|
this.value = '';
|
|
@@ -97008,6 +97122,12 @@ focus outline in that case.
|
|
|
97008
97122
|
* @internal
|
|
97009
97123
|
*/
|
|
97010
97124
|
this.disableSendButton = true;
|
|
97125
|
+
/**
|
|
97126
|
+
* The width of the vertical scrollbar, if displayed.
|
|
97127
|
+
* @internal
|
|
97128
|
+
*/
|
|
97129
|
+
this.scrollbarWidth = -1;
|
|
97130
|
+
this.updateScrollbarWidthQueued = false;
|
|
97011
97131
|
}
|
|
97012
97132
|
/**
|
|
97013
97133
|
* @internal
|
|
@@ -97028,6 +97148,19 @@ focus outline in that case.
|
|
|
97028
97148
|
textAreaInputHandler() {
|
|
97029
97149
|
this.value = this.textArea.value;
|
|
97030
97150
|
this.disableSendButton = this.shouldDisableSendButton();
|
|
97151
|
+
this.queueUpdateScrollbarWidth();
|
|
97152
|
+
}
|
|
97153
|
+
// If a property can affect whether a scrollbar is visible, we need to
|
|
97154
|
+
// call queueUpdateScrollbarWidth() when it changes. The exceptions are
|
|
97155
|
+
// properties that affect size (e.g. height, width, cols, rows), because
|
|
97156
|
+
// we already have a ResizeObserver handling those changes. Also,
|
|
97157
|
+
// a change to errorVisible cannot cause scrollbar visibility to change,
|
|
97158
|
+
// because we always reserve space for the error icon.
|
|
97159
|
+
/**
|
|
97160
|
+
* @internal
|
|
97161
|
+
*/
|
|
97162
|
+
placeholderChanged() {
|
|
97163
|
+
this.queueUpdateScrollbarWidth();
|
|
97031
97164
|
}
|
|
97032
97165
|
/**
|
|
97033
97166
|
* @internal
|
|
@@ -97036,6 +97169,7 @@ focus outline in that case.
|
|
|
97036
97169
|
if (this.textArea) {
|
|
97037
97170
|
this.textArea.value = this.value;
|
|
97038
97171
|
this.disableSendButton = this.shouldDisableSendButton();
|
|
97172
|
+
this.queueUpdateScrollbarWidth();
|
|
97039
97173
|
}
|
|
97040
97174
|
}
|
|
97041
97175
|
/**
|
|
@@ -97045,6 +97179,15 @@ focus outline in that case.
|
|
|
97045
97179
|
super.connectedCallback();
|
|
97046
97180
|
this.textArea.value = this.value;
|
|
97047
97181
|
this.disableSendButton = this.shouldDisableSendButton();
|
|
97182
|
+
this.resizeObserver = new ResizeObserver(() => this.onResize());
|
|
97183
|
+
this.resizeObserver.observe(this);
|
|
97184
|
+
}
|
|
97185
|
+
/**
|
|
97186
|
+
* @internal
|
|
97187
|
+
*/
|
|
97188
|
+
disconnectedCallback() {
|
|
97189
|
+
super.disconnectedCallback();
|
|
97190
|
+
this.resizeObserver?.disconnect();
|
|
97048
97191
|
}
|
|
97049
97192
|
/**
|
|
97050
97193
|
* @internal
|
|
@@ -97080,6 +97223,22 @@ focus outline in that case.
|
|
|
97080
97223
|
this.textArea.focus();
|
|
97081
97224
|
}
|
|
97082
97225
|
}
|
|
97226
|
+
onResize() {
|
|
97227
|
+
this.scrollbarWidth = this.textArea.offsetWidth - this.textArea.clientWidth;
|
|
97228
|
+
}
|
|
97229
|
+
queueUpdateScrollbarWidth() {
|
|
97230
|
+
if (!this.$fastController.isConnected) {
|
|
97231
|
+
return;
|
|
97232
|
+
}
|
|
97233
|
+
if (!this.updateScrollbarWidthQueued) {
|
|
97234
|
+
this.updateScrollbarWidthQueued = true;
|
|
97235
|
+
DOM.queueUpdate(() => this.updateScrollbarWidth());
|
|
97236
|
+
}
|
|
97237
|
+
}
|
|
97238
|
+
updateScrollbarWidth() {
|
|
97239
|
+
this.updateScrollbarWidthQueued = false;
|
|
97240
|
+
this.scrollbarWidth = this.textArea.offsetWidth - this.textArea.clientWidth;
|
|
97241
|
+
}
|
|
97083
97242
|
}
|
|
97084
97243
|
__decorate([
|
|
97085
97244
|
attr
|
|
@@ -97108,6 +97267,9 @@ focus outline in that case.
|
|
|
97108
97267
|
__decorate([
|
|
97109
97268
|
observable
|
|
97110
97269
|
], ChatInput.prototype, "disableSendButton", void 0);
|
|
97270
|
+
__decorate([
|
|
97271
|
+
observable
|
|
97272
|
+
], ChatInput.prototype, "scrollbarWidth", void 0);
|
|
97111
97273
|
const sprightChatInput = ChatInput.compose({
|
|
97112
97274
|
baseName: 'chat-input',
|
|
97113
97275
|
template: template$7,
|