@ni/spright-components 6.3.2 → 6.3.4

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.
@@ -14803,6 +14803,258 @@
14803
14803
  */
14804
14804
  const focusVisible = `:${focusVisible$1}`;
14805
14805
 
14806
+ const Theme = {
14807
+ light: 'light',
14808
+ dark: 'dark',
14809
+ color: 'color'
14810
+ };
14811
+
14812
+ /**
14813
+ * Design token names should follow the token naming convention:
14814
+ * See: https://github.com/ni/nimble/blob/main/packages/nimble-components/CONTRIBUTING.md#token-naming
14815
+ */
14816
+ const tokenNames = {
14817
+ actionRgbPartialColor: 'action-rgb-partial-color',
14818
+ applicationBackgroundColor: 'application-background-color',
14819
+ dividerBackgroundColor: 'divider-background-color',
14820
+ headerBackgroundColor: 'header-background-color',
14821
+ sectionBackgroundColor: 'section-background-color',
14822
+ sectionBackgroundImage: 'section-background-image',
14823
+ buttonFillPrimaryColor: 'button-fill-primary-color',
14824
+ buttonPrimaryFontColor: 'button-primary-font-color',
14825
+ buttonFillAccentColor: 'button-fill-accent-color',
14826
+ buttonAccentBlockFontColor: 'button-accent-block-font-color',
14827
+ buttonAccentOutlineFontColor: 'button-accent-outline-font-color',
14828
+ buttonBorderAccentOutlineColor: 'button-border-accent-outline-color',
14829
+ fillSelectedColor: 'fill-selected-color',
14830
+ fillSelectedRgbPartialColor: 'fill-selected-rgb-partial-color',
14831
+ fillHoverSelectedColor: 'fill-hover-selected-color',
14832
+ fillHoverColor: 'fill-hover-color',
14833
+ fillHoverRgbPartialColor: 'fill-hover-rgb-partial-color',
14834
+ fillDownColor: 'fill-down-color',
14835
+ borderColor: 'border-color',
14836
+ borderRgbPartialColor: 'border-rgb-partial-color',
14837
+ failColor: 'fail-color',
14838
+ warningColor: 'warning-color',
14839
+ passColor: 'pass-color',
14840
+ informationColor: 'information-color',
14841
+ borderHoverColor: 'border-hover-color',
14842
+ iconColor: 'icon-color',
14843
+ modalBackdropColor: 'modal-backdrop-color',
14844
+ popupBorderColor: 'popup-border-color',
14845
+ cardBorderColor: 'card-border-color',
14846
+ tagFillColor: 'tag-fill-color',
14847
+ controlHeight: 'control-height',
14848
+ controlSlimHeight: 'control-slim-height',
14849
+ smallPadding: 'small-padding',
14850
+ mediumPadding: 'medium-padding',
14851
+ standardPadding: 'standard-padding',
14852
+ largePadding: 'large-padding',
14853
+ labelHeight: 'label-height',
14854
+ borderWidth: 'border-width',
14855
+ dividerWidth: 'divider-width',
14856
+ iconSize: 'icon-size',
14857
+ groupHeaderTextTransform: 'group-header-text-transform',
14858
+ drawerWidth: 'drawer-width',
14859
+ dialogSmallWidth: 'dialog-small-width',
14860
+ dialogSmallHeight: 'dialog-small-height',
14861
+ dialogSmallMaxHeight: 'dialog-small-max-height',
14862
+ dialogLargeWidth: 'dialog-large-width',
14863
+ dialogLargeHeight: 'dialog-large-height',
14864
+ dialogLargeMaxHeight: 'dialog-large-max-height',
14865
+ menuMinWidth: 'menu-min-width',
14866
+ bannerGapSize: 'banner-gap-size',
14867
+ spinnerSmallHeight: 'spinner-small-height',
14868
+ spinnerMediumHeight: 'spinner-medium-height',
14869
+ spinnerLargeHeight: 'spinner-large-height',
14870
+ tableFitRowsHeight: 'table-fit-rows-height',
14871
+ smallDelay: 'small-delay',
14872
+ mediumDelay: 'medium-delay',
14873
+ largeDelay: 'large-delay',
14874
+ headlinePlus1Font: 'headline-plus-1-font',
14875
+ headlineFont: 'headline-font',
14876
+ tableHeaderFont: 'table-header-font',
14877
+ titlePlus2Font: 'title-plus-2-font',
14878
+ titlePlus1Font: 'title-plus-1-font',
14879
+ titleFont: 'title-font',
14880
+ subtitlePlus1Font: 'subtitle-plus-1-font',
14881
+ subtitleFont: 'subtitle-font',
14882
+ linkFont: 'link-font',
14883
+ linkActiveFont: 'link-active-font',
14884
+ linkProminentFont: 'link-prominent-font',
14885
+ linkActiveProminentFont: 'link-active-prominent-font',
14886
+ placeholderFont: 'placeholder-font',
14887
+ bodyFont: 'body-font',
14888
+ bodyEmphasizedFont: 'body-emphasized-font',
14889
+ bodyPlus1Font: 'body-plus-1-font',
14890
+ bodyPlus1EmphasizedFont: 'body-plus-1-emphasized-font',
14891
+ groupHeaderFont: 'group-header-font',
14892
+ controlLabelFont: 'control-label-font',
14893
+ buttonLabelFont: 'button-label-font',
14894
+ tooltipCaptionFont: 'tooltip-caption-font',
14895
+ tooltipBackgroundColor: 'tooltip-background-color',
14896
+ errorTextFont: 'error-text-font',
14897
+ tableRowBorderColor: 'table-row-border-color',
14898
+ elevation1BoxShadow: 'elevation-1-box-shadow',
14899
+ elevation2BoxShadow: 'elevation-2-box-shadow',
14900
+ elevation3BoxShadow: 'elevation-3-box-shadow',
14901
+ graphGridlineColor: 'graph-gridline-color',
14902
+ graphTrace1Color: 'graph-trace-1-color',
14903
+ graphTrace2Color: 'graph-trace-2-color',
14904
+ graphTrace3Color: 'graph-trace-3-color',
14905
+ graphTrace4Color: 'graph-trace-4-color',
14906
+ graphTrace5Color: 'graph-trace-5-color',
14907
+ graphTrace6Color: 'graph-trace-6-color',
14908
+ graphTrace7Color: 'graph-trace-7-color',
14909
+ graphTrace8Color: 'graph-trace-8-color',
14910
+ mentionFont: 'mention-font',
14911
+ calendarEventBackgroundStaticColor: 'calendar-event-background-static-color',
14912
+ calendarEventBackgroundDynamicColor: 'calendar-event-background-dynamic-color',
14913
+ calendarEventBackgroundTransientColor: 'calendar-event-background-transient-color',
14914
+ calendarEventBorderStaticColor: 'calendar-event-border-static-color',
14915
+ calendarEventBorderTransientColor: 'calendar-event-border-transient-color',
14916
+ calendarEventStaticFontColor: 'calendar-event-static-font-color',
14917
+ calendarEventDynamicFontColor: 'calendar-event-dynamic-font-color',
14918
+ calendarEventTransientFontColor: 'calendar-event-transient-font-color',
14919
+ calendarEventBackgroundHoverStaticColor: 'calendar-event-background-hover-static-color',
14920
+ calendarEventBackgroundHoverDynamicColor: 'calendar-event-background-hover-dynamic-color',
14921
+ calendarEventBackgroundHoverTransientColor: 'calendar-event-background-hover-transient-color',
14922
+ calendarEventOuterBorderHighlightedColor: 'calendar-event-outer-border-highlighted-color',
14923
+ calendarRowBackgroundSelectedColor: 'calendar-row-background-selected-color',
14924
+ calendarRowBackgroundConflictColor: 'calendar-row-background-conflict-color',
14925
+ calendarEventFillBlockedColor: 'calendar-event-fill-blocked-color',
14926
+ calendarGrabHandleBackgroundColor: 'calendar-grab-handle-background-color',
14927
+ calendarGridBorderColor: 'calendar-grid-border-color',
14928
+ calendarGroupHeaderBackgroundColor: 'calendar-group-header-background-color'
14929
+ };
14930
+ const prefix = 'ni-nimble';
14931
+ const styleNameFromTokenName = (tokenName) => `${prefix}-${tokenName}`;
14932
+
14933
+ const template$S = html `<slot></slot>`;
14934
+
14935
+ const styles$15 = css `
14936
+ ${display$1('contents')}
14937
+ `;
14938
+
14939
+ /**
14940
+ * Observable class to subscribe to changes in the page's lang attribute
14941
+ */
14942
+ class DocumentElementLang {
14943
+ constructor() {
14944
+ this.lang = document.documentElement.lang;
14945
+ const observer = new MutationObserver(mutations => {
14946
+ for (const mutation of mutations) {
14947
+ if (mutation.type === 'attributes'
14948
+ && mutation.attributeName === 'lang') {
14949
+ this.lang = mutation.target.lang;
14950
+ }
14951
+ }
14952
+ });
14953
+ observer.observe(document.documentElement, {
14954
+ attributeFilter: ['lang']
14955
+ });
14956
+ }
14957
+ }
14958
+ __decorate([
14959
+ observable
14960
+ ], DocumentElementLang.prototype, "lang", void 0);
14961
+ const documentElementLang = new DocumentElementLang();
14962
+
14963
+ function isValidLang(value) {
14964
+ try {
14965
+ // We are relying on the Locale constructor to validate the value
14966
+ // eslint-disable-next-line no-new
14967
+ new Intl.Locale(value);
14968
+ return true;
14969
+ }
14970
+ catch (e) {
14971
+ return false;
14972
+ }
14973
+ }
14974
+ const lang = DesignToken.create({
14975
+ name: 'lang',
14976
+ cssCustomPropertyName: null
14977
+ }).withDefault(() => (isValidLang(documentElementLang.lang) ? documentElementLang.lang : 'en-US'));
14978
+ // Not represented as a CSS Custom Property, instead available
14979
+ // as an attribute of theme provider.
14980
+ const direction = DesignToken.create({
14981
+ name: 'direction',
14982
+ cssCustomPropertyName: null
14983
+ }).withDefault(Direction.ltr);
14984
+ const theme = DesignToken.create({
14985
+ name: 'theme',
14986
+ cssCustomPropertyName: null
14987
+ }).withDefault(Theme.light);
14988
+ /**
14989
+ * The ThemeProvider implementation. Add this component to the page and set its `theme` attribute to control
14990
+ * the values of design tokens that provide colors and fonts as CSS custom properties to any descendant components.
14991
+ * @internal
14992
+ */
14993
+ class ThemeProvider extends FoundationElement {
14994
+ constructor() {
14995
+ super(...arguments);
14996
+ this.theme = Theme.light;
14997
+ this.langIsInvalid = false;
14998
+ }
14999
+ get validity() {
15000
+ return {
15001
+ invalidLang: this.langIsInvalid
15002
+ };
15003
+ }
15004
+ checkValidity() {
15005
+ return !this.langIsInvalid;
15006
+ }
15007
+ langChanged(_prev, next) {
15008
+ if (next === null || next === undefined) {
15009
+ lang.deleteValueFor(this);
15010
+ this.langIsInvalid = false;
15011
+ return;
15012
+ }
15013
+ if (isValidLang(next)) {
15014
+ lang.setValueFor(this, next);
15015
+ this.langIsInvalid = false;
15016
+ }
15017
+ else {
15018
+ lang.deleteValueFor(this);
15019
+ this.langIsInvalid = true;
15020
+ }
15021
+ }
15022
+ directionChanged(_prev, next) {
15023
+ if (next !== undefined && next !== null) {
15024
+ direction.setValueFor(this, next);
15025
+ }
15026
+ else {
15027
+ direction.deleteValueFor(this);
15028
+ }
15029
+ }
15030
+ themeChanged(_prev, next) {
15031
+ if (next !== undefined && next !== null) {
15032
+ theme.setValueFor(this, next);
15033
+ }
15034
+ else {
15035
+ theme.deleteValueFor(this);
15036
+ }
15037
+ }
15038
+ }
15039
+ __decorate([
15040
+ attr()
15041
+ ], ThemeProvider.prototype, "lang", void 0);
15042
+ __decorate([
15043
+ attr()
15044
+ ], ThemeProvider.prototype, "direction", void 0);
15045
+ __decorate([
15046
+ attr()
15047
+ ], ThemeProvider.prototype, "theme", void 0);
15048
+ const nimbleDesignSystemProvider = ThemeProvider.compose({
15049
+ baseName: 'theme-provider',
15050
+ styles: styles$15,
15051
+ template: template$S
15052
+ });
15053
+ DesignSystem.getOrCreate()
15054
+ .withPrefix('nimble')
15055
+ .register(nimbleDesignSystemProvider());
15056
+ const themeProviderTag = 'nimble-theme-provider';
15057
+
14806
15058
  /**
14807
15059
  * Ensures that an input number does not exceed a max value and is not less than a min value.
14808
15060
  * @param i - the number to clamp
@@ -15834,452 +16086,200 @@
15834
16086
  * parseColorWebRGB("rgba(255, 0, 0");
15835
16087
  * ```
15836
16088
  * @public
15837
- */
15838
- function parseColorWebRGB(raw) {
15839
- const result = webRGBRegex.exec(raw);
15840
- if (result === null) {
15841
- return null;
15842
- }
15843
- const split = result[1].split(",");
15844
- return new ColorRGBA64(normalize$3(Number(split[0]), 0, 255), normalize$3(Number(split[1]), 0, 255), normalize$3(Number(split[2]), 0, 255), 1);
15845
- }
15846
- /**
15847
- * Converts a rgba color string to a {@link @ni/fast-colors#ColorRGBA64}.
15848
- * @param raw - a color string format "rgba(RR,GG,BB,a)" where RR,GG,BB are [0,255] and a is [0,1]
15849
- * @example
15850
- * ```ts
15851
- * parseColorWebRGBA("rgba(255, 0, 0, 1");
15852
- * ```
15853
- * @public
15854
- */
15855
- function parseColorWebRGBA(raw) {
15856
- const result = webRGBARegex.exec(raw);
15857
- if (result === null) {
15858
- return null;
15859
- }
15860
- const split = result[1].split(",");
15861
- if (split.length === 4) {
15862
- return new ColorRGBA64(normalize$3(Number(split[0]), 0, 255), normalize$3(Number(split[1]), 0, 255), normalize$3(Number(split[2]), 0, 255), Number(split[3]));
15863
- }
15864
- return null;
15865
- }
15866
- /**
15867
- * Converts a named color to a {@link @ni/fast-colors#ColorRGBA64}.
15868
- * @param raw - a {@link https://developer.mozilla.org/en-US/docs/Web/CSS/named-color | CSS color name}.
15869
- * @example
15870
- * ```ts
15871
- * parseColorNamed("red");
15872
- * ```
15873
- * @public
15874
- */
15875
- function parseColorNamed(raw) {
15876
- // const rawLower: typeof raw = raw.toLowerCase() : raw.toString();
15877
- const config = namedColorsConfigs[raw.toLowerCase()];
15878
- return config
15879
- ? new ColorRGBA64(config.r, config.g, config.b, config.hasOwnProperty("a") ? config.a : void 0)
15880
- : null;
15881
- }
15882
- /**
15883
- *
15884
- Expects any of the following and attempts to determine which is being used
15885
- * #RRGGBB, #AARRGGBB, rgb(RR,GG,BB) rgba(RR,GG,BB,a),
15886
- * or any of the {@link https://developer.mozilla.org/en-US/docs/Web/CSS/named-color | CSS color names}.
15887
- * @param raw - the color string to parse
15888
- * @public
15889
- */
15890
- function parseColor(raw) {
15891
- const rawLower = raw.toLowerCase();
15892
- return isColorStringHexRGB(rawLower)
15893
- ? parseColorHexRGB(rawLower)
15894
- : isColorStringHexRGBA(rawLower)
15895
- ? parseColorHexARGB(rawLower)
15896
- : isColorStringWebRGB(rawLower)
15897
- ? parseColorWebRGB(rawLower)
15898
- : isColorStringWebRGBA(rawLower)
15899
- ? parseColorWebRGBA(rawLower)
15900
- : isColorNamed(rawLower)
15901
- ? parseColorNamed(rawLower)
15902
- : null;
15903
- }
15904
-
15905
- /**
15906
- * Do not edit directly, this file was auto-generated.
15907
- */
15908
-
15909
- const Information100DarkUi = "#a46eff";
15910
- const Information100LightUi = "#804ad9";
15911
- const Warning100DarkUi = "#ff8126";
15912
- const Pass100LightUi = "#009921";
15913
- const Pass100DarkUi = "#00c12b";
15914
- const Fail100LightUi = "#c4000c";
15915
- const Fail100DarkUi = "#ff4663";
15916
- const Black75 = "#818386";
15917
- const Black15 = "#f1f1f2";
15918
- const Black7 = "#f5f5f5";
15919
- const White = "#ffffff";
15920
- const Black88 = "#252526";
15921
- const Black85 = "#363738";
15922
- const Black80 = "#505153";
15923
- const Black = "#000000";
15924
- const Black91 = "#161617";
15925
- const ForestGreen = "#074023";
15926
- const DigitalGreenLight = "#009b65";
15927
- const DigitalGreenLight10 = "#e6f5f0";
15928
- const DigitalGreenLight30 = "#b3e1d1";
15929
- const NiSky = "#3cb4e7";
15930
- const BannerFail100DarkUi = "#d63434";
15931
- const Warning100LightUi = "#ff4b00";
15932
- const DigitalGreenDark = "#008557";
15933
- const DigitalGreenDark105 = "#00734b";
15934
- const DigitalGreenDark110 = "#00613f";
15935
- const PowerGreen = "#32eb96";
15936
- const PowerGreen10 = "#364941";
15937
- const PowerGreen30 = "#356d54";
15938
- const PowerGreenDark50 = "#98f5ca";
15939
- const Black22 = "#e6e6e6";
15940
- const Black82 = "#434445";
15941
- const NiHoneyLight = "#ffe76b";
15942
- const NiScarlet = "#ef463f";
15943
- const NiFern = "#76bc43";
15944
- const NiScarletDark3 = "#371615";
15945
- const NiScarletDark1 = "#cd1722";
15946
- const NiFernDark1 = "#499146";
15947
- const NiSea = "#00aba5";
15948
- const NiSeaLight = "#a5d8c8";
15949
- const NiTulip = "#e54c8a";
15950
- const NiIndigo = "#8e78b7";
15951
- const NiPlumDark1 = "#8c459a";
15952
- const NiIndigoDark2 = "#312e7f";
15953
- const NiSeaDark2 = "#00685f";
15954
- const Title2Family = "Source Sans Pro";
15955
- const Title2Weight = "400";
15956
- const ControlLabel1Family = "Source Sans Pro";
15957
- const ControlLabel1Weight = "600";
15958
- const BodyFamily = "Source Sans Pro";
15959
- const BodyWeight = "400";
15960
- const Body2Family = "Source Sans Pro";
15961
- const Body2Weight = "400";
15962
- const GroupLabel1Family = "Source Sans Pro";
15963
- const GroupLabel1Weight = "600";
15964
- const ButtonLabel1Family = "Source Sans Pro";
15965
- const ButtonLabel1Weight = "600";
15966
- const Title1Family = "Source Sans Pro";
15967
- const Title1Weight = "400";
15968
- const Headline2Family = "Noto Serif";
15969
- const Headline2Weight = "400";
15970
- const PlaceholderFamily = "Source Sans Pro";
15971
- const PlaceholderWeight = "400";
15972
- const TooltipCaptionFamily = "Source Sans Pro";
15973
- const TooltipCaptionWeight = "400";
15974
- const BodyEmphasizedFamily = "Source Sans Pro";
15975
- const BodyEmphasizedWeight = "600";
15976
- const BodyEmphasized2Family = "Source Sans Pro";
15977
- const BodyEmphasized2Weight = "600";
15978
- const Subtitle1Family = "Source Sans Pro";
15979
- const Subtitle1Weight = "300";
15980
- const Title3Family = "Source Sans Pro";
15981
- const Title3Weight = "400";
15982
- const Subtitle2Family = "Source Sans Pro";
15983
- const Subtitle2Weight = "300";
15984
- const LinkLightUiFamily = "Source Sans Pro";
15985
- const LinkLightUiWeight = "400";
15986
- const Headline1Family = "Noto Serif";
15987
- const Headline1Weight = "400";
15988
- const ErrorLightUiFamily = "Source Sans Pro";
15989
- const ErrorLightUiWeight = "400";
15990
- const GridHeaderFamily = "Source Sans Pro";
15991
- const GridHeaderWeight = "600";
15992
- const Title2Size = "22px";
15993
- const ControlLabel1Size = "11px";
15994
- const BodySize = "14px";
15995
- const Body2Size = "16px";
15996
- const GroupLabel1Size = "11px";
15997
- const ButtonLabel1Size = "14px";
15998
- const Title1Size = "19px";
15999
- const Headline2Size = "29.1px";
16000
- const PlaceholderSize = "14px";
16001
- const TooltipCaptionSize = "11px";
16002
- const BodyEmphasizedSize = "14px";
16003
- const BodyEmphasized2Size = "16px";
16004
- const Subtitle1Size = "12.8px";
16005
- const Title3Size = "25px";
16006
- const Subtitle2Size = "16px";
16007
- const LinkLightUiSize = "14px";
16008
- const Headline1Size = "25px";
16009
- const ErrorLightUiSize = "11px";
16010
- const GridHeaderSize = "12.8px";
16011
- const BodyLineHeight = "18px";
16012
- const Body2LineHeight = "16px";
16013
- const ControlLabel1LineHeight = "16px";
16014
- const GroupLabel1LineHeight = "16px";
16015
- const Headline2LineHeight = "40px";
16016
- const Headline1LineHeight = "32px";
16017
- const Title3LineHeight = "32px";
16018
- const Title2LineHeight = "28px";
16019
- const Title1LineHeight = "24px";
16020
- const Subtitle2LineHeight = "20px";
16021
- const Subtitle1LineHeight = "16px";
16022
- const LinkLineHeight = "18px";
16023
- const PlaceholderLineHeight = "18px";
16024
- const BodyEmphasizedLineHeight = "18px";
16025
- const BodyEmphasized2LineHeight = "16px";
16026
- const ButtonLabel1LineHeight = "16px";
16027
- const TooltipCaptionLineHeight = "14px";
16028
- const SmallDelay = "0.075s"; // Short animation delay used for control state change animation
16029
- const MediumDelay = "0.15s"; // Medium animation delay for control state change animation
16030
- const LargeDelay = "0.25s"; // Long animation delay used for control state change animation
16031
-
16032
- const Theme = {
16033
- light: 'light',
16034
- dark: 'dark',
16035
- color: 'color'
16036
- };
16037
-
16038
- /**
16039
- * Design token names should follow the token naming convention:
16040
- * See: https://github.com/ni/nimble/blob/main/packages/nimble-components/CONTRIBUTING.md#token-naming
16041
- */
16042
- const tokenNames = {
16043
- actionRgbPartialColor: 'action-rgb-partial-color',
16044
- applicationBackgroundColor: 'application-background-color',
16045
- dividerBackgroundColor: 'divider-background-color',
16046
- headerBackgroundColor: 'header-background-color',
16047
- sectionBackgroundColor: 'section-background-color',
16048
- sectionBackgroundImage: 'section-background-image',
16049
- buttonFillPrimaryColor: 'button-fill-primary-color',
16050
- buttonPrimaryFontColor: 'button-primary-font-color',
16051
- buttonFillAccentColor: 'button-fill-accent-color',
16052
- buttonAccentBlockFontColor: 'button-accent-block-font-color',
16053
- buttonAccentOutlineFontColor: 'button-accent-outline-font-color',
16054
- buttonBorderAccentOutlineColor: 'button-border-accent-outline-color',
16055
- fillSelectedColor: 'fill-selected-color',
16056
- fillSelectedRgbPartialColor: 'fill-selected-rgb-partial-color',
16057
- fillHoverSelectedColor: 'fill-hover-selected-color',
16058
- fillHoverColor: 'fill-hover-color',
16059
- fillHoverRgbPartialColor: 'fill-hover-rgb-partial-color',
16060
- fillDownColor: 'fill-down-color',
16061
- borderColor: 'border-color',
16062
- borderRgbPartialColor: 'border-rgb-partial-color',
16063
- failColor: 'fail-color',
16064
- warningColor: 'warning-color',
16065
- passColor: 'pass-color',
16066
- informationColor: 'information-color',
16067
- borderHoverColor: 'border-hover-color',
16068
- iconColor: 'icon-color',
16069
- modalBackdropColor: 'modal-backdrop-color',
16070
- popupBorderColor: 'popup-border-color',
16071
- cardBorderColor: 'card-border-color',
16072
- tagFillColor: 'tag-fill-color',
16073
- controlHeight: 'control-height',
16074
- controlSlimHeight: 'control-slim-height',
16075
- smallPadding: 'small-padding',
16076
- mediumPadding: 'medium-padding',
16077
- standardPadding: 'standard-padding',
16078
- largePadding: 'large-padding',
16079
- labelHeight: 'label-height',
16080
- borderWidth: 'border-width',
16081
- dividerWidth: 'divider-width',
16082
- iconSize: 'icon-size',
16083
- groupHeaderTextTransform: 'group-header-text-transform',
16084
- drawerWidth: 'drawer-width',
16085
- dialogSmallWidth: 'dialog-small-width',
16086
- dialogSmallHeight: 'dialog-small-height',
16087
- dialogSmallMaxHeight: 'dialog-small-max-height',
16088
- dialogLargeWidth: 'dialog-large-width',
16089
- dialogLargeHeight: 'dialog-large-height',
16090
- dialogLargeMaxHeight: 'dialog-large-max-height',
16091
- menuMinWidth: 'menu-min-width',
16092
- bannerGapSize: 'banner-gap-size',
16093
- spinnerSmallHeight: 'spinner-small-height',
16094
- spinnerMediumHeight: 'spinner-medium-height',
16095
- spinnerLargeHeight: 'spinner-large-height',
16096
- tableFitRowsHeight: 'table-fit-rows-height',
16097
- smallDelay: 'small-delay',
16098
- mediumDelay: 'medium-delay',
16099
- largeDelay: 'large-delay',
16100
- headlinePlus1Font: 'headline-plus-1-font',
16101
- headlineFont: 'headline-font',
16102
- tableHeaderFont: 'table-header-font',
16103
- titlePlus2Font: 'title-plus-2-font',
16104
- titlePlus1Font: 'title-plus-1-font',
16105
- titleFont: 'title-font',
16106
- subtitlePlus1Font: 'subtitle-plus-1-font',
16107
- subtitleFont: 'subtitle-font',
16108
- linkFont: 'link-font',
16109
- linkActiveFont: 'link-active-font',
16110
- linkProminentFont: 'link-prominent-font',
16111
- linkActiveProminentFont: 'link-active-prominent-font',
16112
- placeholderFont: 'placeholder-font',
16113
- bodyFont: 'body-font',
16114
- bodyEmphasizedFont: 'body-emphasized-font',
16115
- bodyPlus1Font: 'body-plus-1-font',
16116
- bodyPlus1EmphasizedFont: 'body-plus-1-emphasized-font',
16117
- groupHeaderFont: 'group-header-font',
16118
- controlLabelFont: 'control-label-font',
16119
- buttonLabelFont: 'button-label-font',
16120
- tooltipCaptionFont: 'tooltip-caption-font',
16121
- tooltipBackgroundColor: 'tooltip-background-color',
16122
- errorTextFont: 'error-text-font',
16123
- tableRowBorderColor: 'table-row-border-color',
16124
- elevation1BoxShadow: 'elevation-1-box-shadow',
16125
- elevation2BoxShadow: 'elevation-2-box-shadow',
16126
- elevation3BoxShadow: 'elevation-3-box-shadow',
16127
- graphGridlineColor: 'graph-gridline-color',
16128
- graphTrace1Color: 'graph-trace-1-color',
16129
- graphTrace2Color: 'graph-trace-2-color',
16130
- graphTrace3Color: 'graph-trace-3-color',
16131
- graphTrace4Color: 'graph-trace-4-color',
16132
- graphTrace5Color: 'graph-trace-5-color',
16133
- graphTrace6Color: 'graph-trace-6-color',
16134
- graphTrace7Color: 'graph-trace-7-color',
16135
- graphTrace8Color: 'graph-trace-8-color',
16136
- mentionFont: 'mention-font',
16137
- calendarEventBackgroundStaticColor: 'calendar-event-background-static-color',
16138
- calendarEventBackgroundDynamicColor: 'calendar-event-background-dynamic-color',
16139
- calendarEventBackgroundTransientColor: 'calendar-event-background-transient-color',
16140
- calendarEventBorderStaticColor: 'calendar-event-border-static-color',
16141
- calendarEventBorderTransientColor: 'calendar-event-border-transient-color',
16142
- calendarEventStaticFontColor: 'calendar-event-static-font-color',
16143
- calendarEventDynamicFontColor: 'calendar-event-dynamic-font-color',
16144
- calendarEventTransientFontColor: 'calendar-event-transient-font-color',
16145
- calendarEventBackgroundHoverStaticColor: 'calendar-event-background-hover-static-color',
16146
- calendarEventBackgroundHoverDynamicColor: 'calendar-event-background-hover-dynamic-color',
16147
- calendarEventBackgroundHoverTransientColor: 'calendar-event-background-hover-transient-color',
16148
- calendarEventOuterBorderHighlightedColor: 'calendar-event-outer-border-highlighted-color',
16149
- calendarRowBackgroundSelectedColor: 'calendar-row-background-selected-color',
16150
- calendarRowBackgroundConflictColor: 'calendar-row-background-conflict-color',
16151
- calendarEventFillBlockedColor: 'calendar-event-fill-blocked-color',
16152
- calendarGrabHandleBackgroundColor: 'calendar-grab-handle-background-color',
16153
- calendarGridBorderColor: 'calendar-grid-border-color',
16154
- calendarGroupHeaderBackgroundColor: 'calendar-group-header-background-color'
16155
- };
16156
- const prefix = 'ni-nimble';
16157
- const styleNameFromTokenName = (tokenName) => `${prefix}-${tokenName}`;
16158
-
16159
- const template$S = html `<slot></slot>`;
16160
-
16161
- const styles$15 = css `
16162
- ${display$1('contents')}
16163
- `;
16164
-
16165
- /**
16166
- * Observable class to subscribe to changes in the page's lang attribute
16167
- */
16168
- class DocumentElementLang {
16169
- constructor() {
16170
- this.lang = document.documentElement.lang;
16171
- const observer = new MutationObserver(mutations => {
16172
- for (const mutation of mutations) {
16173
- if (mutation.type === 'attributes'
16174
- && mutation.attributeName === 'lang') {
16175
- this.lang = mutation.target.lang;
16176
- }
16177
- }
16178
- });
16179
- observer.observe(document.documentElement, {
16180
- attributeFilter: ['lang']
16181
- });
16182
- }
16183
- }
16184
- __decorate([
16185
- observable
16186
- ], DocumentElementLang.prototype, "lang", void 0);
16187
- const documentElementLang = new DocumentElementLang();
16188
-
16189
- function isValidLang(value) {
16190
- try {
16191
- // We are relying on the Locale constructor to validate the value
16192
- // eslint-disable-next-line no-new
16193
- new Intl.Locale(value);
16194
- return true;
16195
- }
16196
- catch (e) {
16197
- return false;
16198
- }
16199
- }
16200
- const lang = DesignToken.create({
16201
- name: 'lang',
16202
- cssCustomPropertyName: null
16203
- }).withDefault(() => (isValidLang(documentElementLang.lang) ? documentElementLang.lang : 'en-US'));
16204
- // Not represented as a CSS Custom Property, instead available
16205
- // as an attribute of theme provider.
16206
- const direction = DesignToken.create({
16207
- name: 'direction',
16208
- cssCustomPropertyName: null
16209
- }).withDefault(Direction.ltr);
16210
- const theme = DesignToken.create({
16211
- name: 'theme',
16212
- cssCustomPropertyName: null
16213
- }).withDefault(Theme.light);
16214
- /**
16215
- * The ThemeProvider implementation. Add this component to the page and set its `theme` attribute to control
16216
- * the values of design tokens that provide colors and fonts as CSS custom properties to any descendant components.
16217
- * @internal
16218
- */
16219
- class ThemeProvider extends FoundationElement {
16220
- constructor() {
16221
- super(...arguments);
16222
- this.theme = Theme.light;
16223
- this.langIsInvalid = false;
16224
- }
16225
- get validity() {
16226
- return {
16227
- invalidLang: this.langIsInvalid
16228
- };
16229
- }
16230
- checkValidity() {
16231
- return !this.langIsInvalid;
16232
- }
16233
- langChanged(_prev, next) {
16234
- if (next === null || next === undefined) {
16235
- lang.deleteValueFor(this);
16236
- this.langIsInvalid = false;
16237
- return;
16238
- }
16239
- if (isValidLang(next)) {
16240
- lang.setValueFor(this, next);
16241
- this.langIsInvalid = false;
16242
- }
16243
- else {
16244
- lang.deleteValueFor(this);
16245
- this.langIsInvalid = true;
16246
- }
16089
+ */
16090
+ function parseColorWebRGB(raw) {
16091
+ const result = webRGBRegex.exec(raw);
16092
+ if (result === null) {
16093
+ return null;
16247
16094
  }
16248
- directionChanged(_prev, next) {
16249
- if (next !== undefined && next !== null) {
16250
- direction.setValueFor(this, next);
16251
- }
16252
- else {
16253
- direction.deleteValueFor(this);
16254
- }
16095
+ const split = result[1].split(",");
16096
+ return new ColorRGBA64(normalize$3(Number(split[0]), 0, 255), normalize$3(Number(split[1]), 0, 255), normalize$3(Number(split[2]), 0, 255), 1);
16097
+ }
16098
+ /**
16099
+ * Converts a rgba color string to a {@link @ni/fast-colors#ColorRGBA64}.
16100
+ * @param raw - a color string format "rgba(RR,GG,BB,a)" where RR,GG,BB are [0,255] and a is [0,1]
16101
+ * @example
16102
+ * ```ts
16103
+ * parseColorWebRGBA("rgba(255, 0, 0, 1");
16104
+ * ```
16105
+ * @public
16106
+ */
16107
+ function parseColorWebRGBA(raw) {
16108
+ const result = webRGBARegex.exec(raw);
16109
+ if (result === null) {
16110
+ return null;
16255
16111
  }
16256
- themeChanged(_prev, next) {
16257
- if (next !== undefined && next !== null) {
16258
- theme.setValueFor(this, next);
16259
- }
16260
- else {
16261
- theme.deleteValueFor(this);
16262
- }
16112
+ const split = result[1].split(",");
16113
+ if (split.length === 4) {
16114
+ return new ColorRGBA64(normalize$3(Number(split[0]), 0, 255), normalize$3(Number(split[1]), 0, 255), normalize$3(Number(split[2]), 0, 255), Number(split[3]));
16263
16115
  }
16116
+ return null;
16264
16117
  }
16265
- __decorate([
16266
- attr()
16267
- ], ThemeProvider.prototype, "lang", void 0);
16268
- __decorate([
16269
- attr()
16270
- ], ThemeProvider.prototype, "direction", void 0);
16271
- __decorate([
16272
- attr()
16273
- ], ThemeProvider.prototype, "theme", void 0);
16274
- const nimbleDesignSystemProvider = ThemeProvider.compose({
16275
- baseName: 'theme-provider',
16276
- styles: styles$15,
16277
- template: template$S
16278
- });
16279
- DesignSystem.getOrCreate()
16280
- .withPrefix('nimble')
16281
- .register(nimbleDesignSystemProvider());
16282
- const themeProviderTag = 'nimble-theme-provider';
16118
+ /**
16119
+ * Converts a named color to a {@link @ni/fast-colors#ColorRGBA64}.
16120
+ * @param raw - a {@link https://developer.mozilla.org/en-US/docs/Web/CSS/named-color | CSS color name}.
16121
+ * @example
16122
+ * ```ts
16123
+ * parseColorNamed("red");
16124
+ * ```
16125
+ * @public
16126
+ */
16127
+ function parseColorNamed(raw) {
16128
+ // const rawLower: typeof raw = raw.toLowerCase() : raw.toString();
16129
+ const config = namedColorsConfigs[raw.toLowerCase()];
16130
+ return config
16131
+ ? new ColorRGBA64(config.r, config.g, config.b, config.hasOwnProperty("a") ? config.a : void 0)
16132
+ : null;
16133
+ }
16134
+ /**
16135
+ *
16136
+ Expects any of the following and attempts to determine which is being used
16137
+ * #RRGGBB, #AARRGGBB, rgb(RR,GG,BB) rgba(RR,GG,BB,a),
16138
+ * or any of the {@link https://developer.mozilla.org/en-US/docs/Web/CSS/named-color | CSS color names}.
16139
+ * @param raw - the color string to parse
16140
+ * @public
16141
+ */
16142
+ function parseColor(raw) {
16143
+ const rawLower = raw.toLowerCase();
16144
+ return isColorStringHexRGB(rawLower)
16145
+ ? parseColorHexRGB(rawLower)
16146
+ : isColorStringHexRGBA(rawLower)
16147
+ ? parseColorHexARGB(rawLower)
16148
+ : isColorStringWebRGB(rawLower)
16149
+ ? parseColorWebRGB(rawLower)
16150
+ : isColorStringWebRGBA(rawLower)
16151
+ ? parseColorWebRGBA(rawLower)
16152
+ : isColorNamed(rawLower)
16153
+ ? parseColorNamed(rawLower)
16154
+ : null;
16155
+ }
16156
+
16157
+ /**
16158
+ * Do not edit directly, this file was auto-generated.
16159
+ */
16160
+
16161
+ const Information100DarkUi = "#a46eff";
16162
+ const Information100LightUi = "#804ad9";
16163
+ const Warning100DarkUi = "#ff8126";
16164
+ const Pass100LightUi = "#009921";
16165
+ const Pass100DarkUi = "#00c12b";
16166
+ const Fail100LightUi = "#c4000c";
16167
+ const Fail100DarkUi = "#ff4663";
16168
+ const Black75 = "#818386";
16169
+ const Black15 = "#f1f1f2";
16170
+ const Black7 = "#f5f5f5";
16171
+ const White = "#ffffff";
16172
+ const Black88 = "#252526";
16173
+ const Black85 = "#363738";
16174
+ const Black80 = "#505153";
16175
+ const Black = "#000000";
16176
+ const Black91 = "#161617";
16177
+ const ForestGreen = "#074023";
16178
+ const DigitalGreenLight = "#009b65";
16179
+ const DigitalGreenLight10 = "#e6f5f0";
16180
+ const DigitalGreenLight30 = "#b3e1d1";
16181
+ const NiSky = "#3cb4e7";
16182
+ const BannerFail100DarkUi = "#d63434";
16183
+ const Warning100LightUi = "#ff4b00";
16184
+ const DigitalGreenDark = "#008557";
16185
+ const DigitalGreenDark105 = "#00734b";
16186
+ const DigitalGreenDark110 = "#00613f";
16187
+ const PowerGreen = "#32eb96";
16188
+ const PowerGreen10 = "#364941";
16189
+ const PowerGreen30 = "#356d54";
16190
+ const PowerGreenDark50 = "#98f5ca";
16191
+ const Black22 = "#e6e6e6";
16192
+ const Black82 = "#434445";
16193
+ const NiHoneyLight = "#ffe76b";
16194
+ const NiScarlet = "#ef463f";
16195
+ const NiFern = "#76bc43";
16196
+ const NiScarletDark3 = "#371615";
16197
+ const NiScarletDark1 = "#cd1722";
16198
+ const NiFernDark1 = "#499146";
16199
+ const NiSea = "#00aba5";
16200
+ const NiSeaLight = "#a5d8c8";
16201
+ const NiTulip = "#e54c8a";
16202
+ const NiIndigo = "#8e78b7";
16203
+ const NiPlumDark1 = "#8c459a";
16204
+ const NiIndigoDark2 = "#312e7f";
16205
+ const NiSeaDark2 = "#00685f";
16206
+ const Title2Family = "Source Sans Pro";
16207
+ const Title2Weight = "400";
16208
+ const ControlLabel1Family = "Source Sans Pro";
16209
+ const ControlLabel1Weight = "600";
16210
+ const BodyFamily = "Source Sans Pro";
16211
+ const BodyWeight = "400";
16212
+ const Body2Family = "Source Sans Pro";
16213
+ const Body2Weight = "400";
16214
+ const GroupLabel1Family = "Source Sans Pro";
16215
+ const GroupLabel1Weight = "600";
16216
+ const ButtonLabel1Family = "Source Sans Pro";
16217
+ const ButtonLabel1Weight = "600";
16218
+ const Title1Family = "Source Sans Pro";
16219
+ const Title1Weight = "400";
16220
+ const Headline2Family = "Noto Serif";
16221
+ const Headline2Weight = "400";
16222
+ const PlaceholderFamily = "Source Sans Pro";
16223
+ const PlaceholderWeight = "400";
16224
+ const TooltipCaptionFamily = "Source Sans Pro";
16225
+ const TooltipCaptionWeight = "400";
16226
+ const BodyEmphasizedFamily = "Source Sans Pro";
16227
+ const BodyEmphasizedWeight = "600";
16228
+ const BodyEmphasized2Family = "Source Sans Pro";
16229
+ const BodyEmphasized2Weight = "600";
16230
+ const Subtitle1Family = "Source Sans Pro";
16231
+ const Subtitle1Weight = "300";
16232
+ const Title3Family = "Source Sans Pro";
16233
+ const Title3Weight = "400";
16234
+ const Subtitle2Family = "Source Sans Pro";
16235
+ const Subtitle2Weight = "300";
16236
+ const LinkLightUiFamily = "Source Sans Pro";
16237
+ const LinkLightUiWeight = "400";
16238
+ const Headline1Family = "Noto Serif";
16239
+ const Headline1Weight = "400";
16240
+ const ErrorLightUiFamily = "Source Sans Pro";
16241
+ const ErrorLightUiWeight = "400";
16242
+ const GridHeaderFamily = "Source Sans Pro";
16243
+ const GridHeaderWeight = "600";
16244
+ const Title2Size = "22px";
16245
+ const ControlLabel1Size = "11px";
16246
+ const BodySize = "14px";
16247
+ const Body2Size = "16px";
16248
+ const GroupLabel1Size = "11px";
16249
+ const ButtonLabel1Size = "14px";
16250
+ const Title1Size = "19px";
16251
+ const Headline2Size = "29.1px";
16252
+ const PlaceholderSize = "14px";
16253
+ const TooltipCaptionSize = "11px";
16254
+ const BodyEmphasizedSize = "14px";
16255
+ const BodyEmphasized2Size = "16px";
16256
+ const Subtitle1Size = "12.8px";
16257
+ const Title3Size = "25px";
16258
+ const Subtitle2Size = "16px";
16259
+ const LinkLightUiSize = "14px";
16260
+ const Headline1Size = "25px";
16261
+ const ErrorLightUiSize = "11px";
16262
+ const GridHeaderSize = "12.8px";
16263
+ const BodyLineHeight = "18px";
16264
+ const Body2LineHeight = "16px";
16265
+ const ControlLabel1LineHeight = "16px";
16266
+ const GroupLabel1LineHeight = "16px";
16267
+ const Headline2LineHeight = "40px";
16268
+ const Headline1LineHeight = "32px";
16269
+ const Title3LineHeight = "32px";
16270
+ const Title2LineHeight = "28px";
16271
+ const Title1LineHeight = "24px";
16272
+ const Subtitle2LineHeight = "20px";
16273
+ const Subtitle1LineHeight = "16px";
16274
+ const LinkLineHeight = "18px";
16275
+ const PlaceholderLineHeight = "18px";
16276
+ const BodyEmphasizedLineHeight = "18px";
16277
+ const BodyEmphasized2LineHeight = "16px";
16278
+ const ButtonLabel1LineHeight = "16px";
16279
+ const TooltipCaptionLineHeight = "14px";
16280
+ const SmallDelay = "0.075s"; // Short animation delay used for control state change animation
16281
+ const MediumDelay = "0.15s"; // Medium animation delay for control state change animation
16282
+ const LargeDelay = "0.25s"; // Long animation delay used for control state change animation
16283
16283
 
16284
16284
  /**
16285
16285
  * Convert a hexadecimal color string to an RGBA CSS color string
@@ -16293,157 +16293,305 @@
16293
16293
  return `rgba(${r * 255}, ${g * 255}, ${b * 255}, ${alpha})`;
16294
16294
  }
16295
16295
 
16296
- // Color Tokens
16297
- const actionRgbPartialColor = DesignToken.create(styleNameFromTokenName(tokenNames.actionRgbPartialColor)).withDefault((element) => hexToRgbPartial(getColorForTheme(element, Black91, Black15, White)));
16298
- const applicationBackgroundColor = DesignToken.create(styleNameFromTokenName(tokenNames.applicationBackgroundColor)).withDefault((element) => getColorForTheme(element, White, Black85, ForestGreen));
16299
- DesignToken.create(styleNameFromTokenName(tokenNames.headerBackgroundColor)).withDefault((element) => getColorForTheme(element, Black7, Black88, ForestGreen));
16300
- DesignToken.create(styleNameFromTokenName(tokenNames.sectionBackgroundColor)).withDefault((element) => getColorForTheme(element, Black15, Black80, ForestGreen));
16301
- const sectionBackgroundImage = DesignToken.create(styleNameFromTokenName(tokenNames.sectionBackgroundImage)).withDefault((element) => {
16302
- const start = getColorForTheme(element, Black15, Black82, ForestGreen);
16303
- const end = getColorForTheme(element, hexToRgbaCssColor(Black15, 0), hexToRgbaCssColor(Black82, 0), hexToRgbaCssColor(ForestGreen, 0));
16304
- return `linear-gradient(${start}, ${end})`;
16305
- });
16306
- DesignToken.create(styleNameFromTokenName(tokenNames.dividerBackgroundColor)).withDefault((element) => getColorForTheme(element, Black15, Black80, ForestGreen));
16307
- const fillSelectedColor = DesignToken.create(styleNameFromTokenName(tokenNames.fillSelectedColor)).withDefault((element) => hexToRgbaCssColor(getFillSelectedColorForTheme(element), 0.2));
16308
- const fillSelectedRgbPartialColor = DesignToken.create(styleNameFromTokenName(tokenNames.fillSelectedRgbPartialColor)).withDefault((element) => hexToRgbPartial(getFillSelectedColorForTheme(element)));
16309
- const fillHoverSelectedColor = DesignToken.create(styleNameFromTokenName(tokenNames.fillHoverSelectedColor)).withDefault((element) => hexToRgbaCssColor(getFillSelectedColorForTheme(element), 0.15));
16310
- const fillHoverColor = DesignToken.create(styleNameFromTokenName(tokenNames.fillHoverColor)).withDefault((element) => hexToRgbaCssColor(getFillHoverColorForTheme(element), 0.1));
16311
- DesignToken.create(styleNameFromTokenName(tokenNames.fillHoverRgbPartialColor)).withDefault((element) => hexToRgbPartial(getFillHoverColorForTheme(element)));
16312
- DesignToken.create(styleNameFromTokenName(tokenNames.fillDownColor)).withDefault((element) => hexToRgbaCssColor(getFillDownColorForTheme(element), 0.15));
16313
- const borderColor = DesignToken.create(styleNameFromTokenName(tokenNames.borderColor)).withDefault((element) => getDefaultLineColorForTheme(element));
16314
- const borderRgbPartialColor = DesignToken.create(styleNameFromTokenName(tokenNames.borderRgbPartialColor)).withDefault((element) => hexToRgbPartial(getDefaultLineColorForTheme(element)));
16315
- const failColor = DesignToken.create(styleNameFromTokenName(tokenNames.failColor)).withDefault((element) => getFailColorForTheme(element));
16316
- const warningColor = DesignToken.create(styleNameFromTokenName(tokenNames.warningColor)).withDefault((element) => getWarningColorForTheme(element));
16317
- const passColor = DesignToken.create(styleNameFromTokenName(tokenNames.passColor)).withDefault((element) => getPassColorForTheme(element));
16318
- const informationColor = DesignToken.create(styleNameFromTokenName(tokenNames.informationColor)).withDefault((element) => getInformationColorForTheme(element));
16319
- const borderHoverColor = DesignToken.create(styleNameFromTokenName(tokenNames.borderHoverColor)).withDefault((element) => getColorForTheme(element, DigitalGreenLight, PowerGreen, White));
16320
- // Component Color Tokens
16321
- const iconColor = DesignToken.create(styleNameFromTokenName(tokenNames.iconColor)).withDefault((element) => getColorForTheme(element, Black91, Black15, White));
16322
- const modalBackdropColor = DesignToken.create(styleNameFromTokenName(tokenNames.modalBackdropColor)).withDefault((element) => getModalBackdropForTheme(element));
16323
- const popupBorderColor = DesignToken.create(styleNameFromTokenName(tokenNames.popupBorderColor)).withDefault((element) => hexToRgbaCssColor(getColorForTheme(element, Black91, Black15, White), 0.3));
16324
- const cardBorderColor = DesignToken.create(styleNameFromTokenName(tokenNames.cardBorderColor)).withDefault((element) => hexToRgbaCssColor(getColorForTheme(element, Black91, Black15, White), 0.1));
16325
- DesignToken.create(styleNameFromTokenName(tokenNames.graphGridlineColor)).withDefault((element) => hexToRgbaCssColor(getColorForTheme(element, Black91, Black15, White), 0.2));
16326
- DesignToken.create(styleNameFromTokenName(tokenNames.graphTrace1Color)).withDefault((element) => getColorForTheme(element, NiIndigoDark2, NiSky, White));
16327
- DesignToken.create(styleNameFromTokenName(tokenNames.graphTrace2Color)).withDefault((element) => getColorForTheme(element, NiScarletDark1, NiScarlet, hexToRgbaCssColor(White, 0.7)));
16328
- DesignToken.create(styleNameFromTokenName(tokenNames.graphTrace3Color)).withDefault((element) => getColorForTheme(element, NiFernDark1, NiFern, hexToRgbaCssColor(White, 0.4)));
16329
- DesignToken.create(styleNameFromTokenName(tokenNames.graphTrace4Color)).withDefault((element) => getColorForTheme(element, NiPlumDark1, NiSeaLight, hexToRgbaCssColor(White, 0.25)));
16330
- DesignToken.create(styleNameFromTokenName(tokenNames.graphTrace5Color)).withDefault((element) => getColorForTheme(element, NiSeaDark2, NiSea, hexToRgbaCssColor(White, 0.55)));
16331
- DesignToken.create(styleNameFromTokenName(tokenNames.graphTrace6Color)).withDefault((element) => getColorForTheme(element, NiTulip, NiTulip, hexToRgbaCssColor(White, 0.85)));
16332
- DesignToken.create(styleNameFromTokenName(tokenNames.graphTrace7Color)).withDefault((element) => getColorForTheme(element, NiScarletDark3, NiHoneyLight, hexToRgbaCssColor(White, 0.325)));
16333
- DesignToken.create(styleNameFromTokenName(tokenNames.graphTrace8Color)).withDefault((element) => getColorForTheme(element, NiIndigo, NiIndigo, hexToRgbaCssColor(White, 0.625)));
16334
- DesignToken.create(styleNameFromTokenName(tokenNames.tooltipBackgroundColor)).withDefault((element) => getColorForTheme(element, Black15, Black85, ForestGreen));
16335
- const tableRowBorderColor = DesignToken.create(styleNameFromTokenName(tokenNames.tableRowBorderColor)).withDefault((element) => getColorForTheme(element, Black15, Black80, ForestGreen));
16336
- DesignToken.create(styleNameFromTokenName(tokenNames.tagFillColor)).withDefault((element) => hexToRgbaCssColor(getColorForTheme(element, Black91, Black15, White), 0.1));
16337
- const buttonFillPrimaryColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonFillPrimaryColor)).withDefault((element) => getColorForTheme(element, hexToRgbaCssColor(Black91, 0.75), hexToRgbaCssColor(Black15, 0.3), hexToRgbaCssColor(White, 0.3)));
16338
- const buttonPrimaryFontColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonPrimaryFontColor)).withDefault((element) => getColorForTheme(element, Black15, Black15, White));
16339
- const buttonFillAccentColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonFillAccentColor)).withDefault((element) => getColorForTheme(element, DigitalGreenDark, DigitalGreenLight, hexToRgbaCssColor(White, 0.1)));
16340
- const buttonAccentBlockFontColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonAccentBlockFontColor)).withDefault((element) => getColorForTheme(element, White, Black15, White));
16341
- const buttonAccentOutlineFontColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonAccentOutlineFontColor)).withDefault((element) => getColorForTheme(element, DigitalGreenDark105, PowerGreen, White));
16342
- const buttonBorderAccentOutlineColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonBorderAccentOutlineColor)).withDefault((element) => getColorForTheme(element, DigitalGreenLight, PowerGreen, hexToRgbaCssColor(White, 0.3)));
16343
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarEventBackgroundStaticColor)).withDefault((element) => getColorForTheme(element, DigitalGreenLight10, PowerGreen10, PowerGreen10));
16344
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarEventBackgroundDynamicColor)).withDefault((element) => getColorForTheme(element, DigitalGreenDark105, DigitalGreenDark, DigitalGreenDark));
16345
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarEventBackgroundTransientColor)).withDefault((element) => getColorForTheme(element, DigitalGreenDark105, DigitalGreenDark, DigitalGreenDark));
16346
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarEventBorderStaticColor)).withDefault((element) => getColorForTheme(element, DigitalGreenLight, DigitalGreenLight, DigitalGreenLight));
16347
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarEventBorderTransientColor)).withDefault((element) => getColorForTheme(element, DigitalGreenLight, hexToRgbaCssColor(PowerGreen, 0.85), hexToRgbaCssColor(PowerGreen, 0.85)));
16348
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarEventStaticFontColor)).withDefault((element) => getColorForTheme(element, DigitalGreenDark110, PowerGreenDark50, PowerGreenDark50));
16349
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarEventDynamicFontColor)).withDefault((element) => getColorForTheme(element, White, White, White));
16350
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarEventTransientFontColor)).withDefault((element) => getColorForTheme(element, White, White, White));
16351
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarEventBackgroundHoverStaticColor)).withDefault((element) => getColorForTheme(element, DigitalGreenLight30, PowerGreen30, PowerGreen30));
16352
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarEventBackgroundHoverDynamicColor)).withDefault((element) => getColorForTheme(element, DigitalGreenDark110, DigitalGreenDark105, DigitalGreenDark105));
16353
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarEventBackgroundHoverTransientColor)).withDefault((element) => getColorForTheme(element, DigitalGreenDark110, DigitalGreenDark105, DigitalGreenDark105));
16354
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarEventOuterBorderHighlightedColor)).withDefault((element) => getColorForTheme(element, Black88, hexToRgbaCssColor(White, 0.85), hexToRgbaCssColor(White, 0.85)));
16355
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarRowBackgroundSelectedColor)).withDefault((element) => getColorForTheme(element, hexToRgbaCssColor(DigitalGreenLight, 0.2), hexToRgbaCssColor(PowerGreen, 0.2), hexToRgbaCssColor(PowerGreen, 0.2)));
16356
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarRowBackgroundConflictColor)).withDefault((element) => getColorForTheme(element, hexToRgbaCssColor(Fail100LightUi, 0.2), hexToRgbaCssColor(Fail100DarkUi, 0.2), hexToRgbaCssColor(Fail100DarkUi, 0.2)));
16357
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarEventFillBlockedColor)).withDefault((element) => getColorForTheme(element, hexToRgbaCssColor(Black91, 0.07), Black82, Black82));
16358
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarGrabHandleBackgroundColor)).withDefault((element) => getColorForTheme(element, DigitalGreenLight, PowerGreen, PowerGreen));
16359
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarGridBorderColor)).withDefault((element) => getColorForTheme(element, Black22, Black80, Black80));
16360
- DesignToken.create(styleNameFromTokenName(tokenNames.calendarGroupHeaderBackgroundColor)).withDefault((element) => getColorForTheme(element, Black7, hexToRgbaCssColor(Black91, 0.1), hexToRgbaCssColor(Black91, 0.1)));
16361
- // Component Sizing Tokens
16362
- const controlHeight = DesignToken.create(styleNameFromTokenName(tokenNames.controlHeight)).withDefault('32px');
16363
- const controlSlimHeight = DesignToken.create(styleNameFromTokenName(tokenNames.controlSlimHeight)).withDefault('24px');
16364
- const smallPadding = DesignToken.create(styleNameFromTokenName(tokenNames.smallPadding)).withDefault('4px');
16365
- const mediumPadding = DesignToken.create(styleNameFromTokenName(tokenNames.mediumPadding)).withDefault('8px');
16366
- const standardPadding = DesignToken.create(styleNameFromTokenName(tokenNames.standardPadding)).withDefault('16px');
16367
- const largePadding = DesignToken.create(styleNameFromTokenName(tokenNames.largePadding)).withDefault('24px');
16368
- DesignToken.create(styleNameFromTokenName(tokenNames.labelHeight)).withDefault('16px');
16369
- const borderWidth = DesignToken.create(styleNameFromTokenName(tokenNames.borderWidth)).withDefault('1px');
16370
- DesignToken.create(styleNameFromTokenName(tokenNames.dividerWidth)).withDefault('2px');
16371
- const iconSize = DesignToken.create(styleNameFromTokenName(tokenNames.iconSize)).withDefault('16px');
16372
- const drawerWidth = DesignToken.create(styleNameFromTokenName(tokenNames.drawerWidth)).withDefault('784px');
16373
- const dialogSmallWidth = DesignToken.create(styleNameFromTokenName(tokenNames.dialogSmallWidth)).withDefault('400px');
16374
- const dialogSmallHeight = DesignToken.create(styleNameFromTokenName(tokenNames.dialogSmallHeight)).withDefault('fit-content');
16375
- const dialogSmallMaxHeight = DesignToken.create(styleNameFromTokenName(tokenNames.dialogSmallMaxHeight)).withDefault('600px');
16376
- DesignToken.create(styleNameFromTokenName(tokenNames.dialogLargeWidth)).withDefault('1024px');
16377
- DesignToken.create(styleNameFromTokenName(tokenNames.dialogLargeHeight)).withDefault('680px');
16378
- DesignToken.create(styleNameFromTokenName(tokenNames.dialogLargeMaxHeight)).withDefault('680px');
16379
- const menuMinWidth = DesignToken.create(styleNameFromTokenName(tokenNames.menuMinWidth)).withDefault('176px');
16380
- DesignToken.create(styleNameFromTokenName(tokenNames.bannerGapSize)).withDefault('1px');
16381
- const spinnerSmallHeight = DesignToken.create(styleNameFromTokenName(tokenNames.spinnerSmallHeight)).withDefault('16px');
16382
- DesignToken.create(styleNameFromTokenName(tokenNames.spinnerMediumHeight)).withDefault('32px');
16383
- DesignToken.create(styleNameFromTokenName(tokenNames.spinnerLargeHeight)).withDefault('64px');
16384
- // The token gets a default value of the table's default height (480px)
16385
- // but is given a calculated value in the table styles.
16386
- const tableFitRowsHeight = DesignToken.create(styleNameFromTokenName(tokenNames.tableFitRowsHeight)).withDefault('480px');
16387
- // Drop Shadow Tokens
16388
- DesignToken.create(styleNameFromTokenName(tokenNames.elevation1BoxShadow)).withDefault((element) => `0px 1px 4px ${hexToRgbaCssColor(getColorForTheme(element, Black, Black, Black), 0.16)}`);
16389
- const elevation2BoxShadow = DesignToken.create(styleNameFromTokenName(tokenNames.elevation2BoxShadow)).withDefault((element) => `0px 2px 4px ${hexToRgbaCssColor(getColorForTheme(element, Black, Black, Black), 0.16)}`);
16390
- const elevation3BoxShadow = DesignToken.create(styleNameFromTokenName(tokenNames.elevation3BoxShadow)).withDefault((element) => `0px 4px 8px ${hexToRgbaCssColor(getColorForTheme(element, Black, Black, Black), 0.3)}`);
16391
- // Font Tokens
16392
- createFontTokens(tokenNames.headlineFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), Headline1Family, Headline1Weight, Headline1Size, Headline1LineHeight);
16393
- createFontTokens(tokenNames.headlinePlus1Font, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), Headline2Family, Headline2Weight, Headline2Size, Headline2LineHeight);
16394
- createFontTokens(tokenNames.titlePlus2Font, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), Title3Family, Title3Weight, Title3Size, Title3LineHeight);
16395
- const [titlePlus1Font, titlePlus1FontColor] = createFontTokens(tokenNames.titlePlus1Font, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), Title2Family, Title2Weight, Title2Size, Title2LineHeight);
16396
- createFontTokens(tokenNames.titleFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), Title1Family, Title1Weight, Title1Size, Title1LineHeight);
16397
- const [subtitlePlus1Font] = createFontTokens(tokenNames.subtitlePlus1Font, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), Subtitle2Family, Subtitle2Weight, Subtitle2Size, Subtitle2LineHeight);
16398
- const [subtitleFont, subtitleFontColor] = createFontTokens(tokenNames.subtitleFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), Subtitle1Family, Subtitle1Weight, Subtitle1Size, Subtitle1LineHeight);
16399
- const [linkFont, linkFontColor, linkDisabledFontColor] = createFontTokens(tokenNames.linkFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), LinkLightUiFamily, LinkLightUiWeight, LinkLightUiSize, LinkLineHeight);
16400
- const [linkActiveFont, linkActiveFontColor] = createFontTokens(tokenNames.linkActiveFont, (element) => getColorForTheme(element, DigitalGreenLight, DigitalGreenLight, hexToRgbaCssColor(White, 0.75)), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), LinkLightUiFamily, LinkLightUiWeight, LinkLightUiSize, LinkLineHeight);
16401
- const [linkProminentFont, linkProminentFontColor] = createFontTokens(tokenNames.linkProminentFont, (element) => getColorForTheme(element, DigitalGreenDark105, PowerGreen, White), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), LinkLightUiFamily, LinkLightUiWeight, LinkLightUiSize, LinkLineHeight);
16402
- const [linkActiveProminentFont, linkActiveProminentFontColor] = createFontTokens(tokenNames.linkActiveProminentFont, (element) => getColorForTheme(element, DigitalGreenLight, DigitalGreenLight, hexToRgbaCssColor(White, 0.75)), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), LinkLightUiFamily, LinkLightUiWeight, LinkLightUiSize, LinkLineHeight);
16403
- const [placeholderFont, placeholderFontColor] = createFontTokens(tokenNames.placeholderFont, (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.6), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), PlaceholderFamily, PlaceholderWeight, PlaceholderSize, PlaceholderLineHeight);
16404
- const [bodyFont, bodyFontColor, bodyDisabledFontColor, bodyFontFamily, bodyFontWeight, bodyFontSize, bodyFontLineHeight] = createFontTokens(tokenNames.bodyFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), BodyFamily, BodyWeight, BodySize, BodyLineHeight);
16405
- const [bodyEmphasizedFont, bodyEmphasizedFontColor, bodyEmphasizedDisabledFontColor, bodyEmphasizedFontFamily, bodyEmphasizedFontWeight] = createFontTokens(tokenNames.bodyEmphasizedFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), BodyEmphasizedFamily, BodyEmphasizedWeight, BodyEmphasizedSize, BodyEmphasizedLineHeight);
16406
- createFontTokens(tokenNames.bodyPlus1Font, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), Body2Family, Body2Weight, Body2Size, Body2LineHeight);
16407
- createFontTokens(tokenNames.bodyPlus1EmphasizedFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), BodyEmphasized2Family, BodyEmphasized2Weight, BodyEmphasized2Size, BodyEmphasized2LineHeight);
16408
- const [groupHeaderFont, groupHeaderFontColor] = createFontTokens(tokenNames.groupHeaderFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), GroupLabel1Family, GroupLabel1Weight, GroupLabel1Size, GroupLabel1LineHeight);
16409
- const [controlLabelFont, controlLabelFontColor, controlLabelDisabledFontColor, controlLabelFontFamily, controlLabelFontWeight, controlLabelFontSize, controlLabelFontLineHeight] = createFontTokens(tokenNames.controlLabelFont, (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.6), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), ControlLabel1Family, ControlLabel1Weight, ControlLabel1Size, ControlLabel1LineHeight);
16410
- const [buttonLabelFont, buttonLabelFontColor, buttonLabelDisabledFontColor] = createFontTokens(tokenNames.buttonLabelFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), ButtonLabel1Family, ButtonLabel1Weight, ButtonLabel1Size, ButtonLabel1LineHeight);
16411
- const [tooltipCaptionFont, tooltipCaptionFontColor] = createFontTokens(tokenNames.tooltipCaptionFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), TooltipCaptionFamily, TooltipCaptionWeight, TooltipCaptionSize, TooltipCaptionLineHeight);
16412
- const [errorTextFont, errorTextFontColor, errorTextDisabledFontColor, errorTextFontFamily, errorTextFontWeight, errorTextFontSize, errorTextFontLineHeight] = createFontTokens(tokenNames.errorTextFont, (element) => getFailColorForTheme(element), (element) => hexToRgbaCssColor(getFailColorForTheme(element), 0.3), ErrorLightUiFamily, ErrorLightUiWeight, ErrorLightUiSize, TooltipCaptionLineHeight);
16413
- const [tableHeaderFont, tableHeaderFontColor] = createFontTokens(tokenNames.tableHeaderFont, (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.6), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), GridHeaderFamily, GridHeaderWeight, GridHeaderSize, TooltipCaptionLineHeight);
16414
- createFontTokens(tokenNames.mentionFont, (element) => getColorForTheme(element, DigitalGreenDark, PowerGreen, PowerGreen), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), BodyFamily, BodyEmphasizedWeight, BodySize, BodyLineHeight);
16415
- // Font Transform Tokens
16416
- const groupHeaderTextTransform = DesignToken.create(styleNameFromTokenName(tokenNames.groupHeaderTextTransform)).withDefault('uppercase');
16417
- // Animation Tokens
16418
- const smallDelay = DesignToken.create(styleNameFromTokenName(tokenNames.smallDelay)).withDefault(SmallDelay);
16419
- const mediumDelay = DesignToken.create(styleNameFromTokenName(tokenNames.mediumDelay)).withDefault(MediumDelay);
16420
- const largeDelay = DesignToken.create(styleNameFromTokenName(tokenNames.largeDelay)).withDefault(LargeDelay);
16421
- // Private helpers functions
16296
+ // #region token values
16297
+ const alias = {
16298
+ failColor: createThemeColor(Fail100LightUi, Fail100DarkUi, White),
16299
+ lineColor: createThemeColor(Black91, Black15, White),
16300
+ fillSelectedColor: createThemeColor(DigitalGreenLight, PowerGreen, White),
16301
+ fillHoverColor: createThemeColor(Black91, Black15, White),
16302
+ defaultFontColor: createThemeColor(Black91, Black15, White)
16303
+ };
16304
+ const tokenValues = {
16305
+ actionRgbPartialColor: hexToRgbPartialThemeColor(createThemeColor(Black91, Black15, White)),
16306
+ applicationBackgroundColor: createThemeColor(White, Black85, ForestGreen),
16307
+ headerBackgroundColor: createThemeColor(Black7, Black88, ForestGreen),
16308
+ sectionBackgroundColor: createThemeColor(Black15, Black80, ForestGreen),
16309
+ sectionBackgroundImage: createThemeColor(`linear-gradient(${Black15}, ${hexToRgbaCssColor(Black15, 0)})`, `linear-gradient(${Black82}, ${hexToRgbaCssColor(Black82, 0)})`, `linear-gradient(${ForestGreen}, ${hexToRgbaCssColor(ForestGreen, 0)})`),
16310
+ dividerBackgroundColor: createThemeColor(Black15, Black80, ForestGreen),
16311
+ fillSelectedColor: hexToRgbaCssThemeColor(alias.fillSelectedColor, 0.2, 0.2, 0.2),
16312
+ fillSelectedRgbPartialColor: hexToRgbPartialThemeColor(alias.fillSelectedColor),
16313
+ fillHoverSelectedColor: hexToRgbaCssThemeColor(alias.fillSelectedColor, 0.15, 0.15, 0.15),
16314
+ fillHoverColor: hexToRgbaCssThemeColor(alias.fillHoverColor, 0.1, 0.1, 0.1),
16315
+ fillHoverRgbPartialColor: hexToRgbPartialThemeColor(alias.fillHoverColor),
16316
+ fillDownColor: hexToRgbaCssThemeColor(alias.fillHoverColor, 0.15, 0.15, 0.15),
16317
+ borderColor: alias.lineColor,
16318
+ borderRgbPartialColor: hexToRgbPartialThemeColor(alias.lineColor),
16319
+ failColor: alias.failColor,
16320
+ warningColor: createThemeColor(Warning100LightUi, Warning100DarkUi, White),
16321
+ passColor: createThemeColor(Pass100LightUi, Pass100DarkUi, White),
16322
+ informationColor: createThemeColor(Information100LightUi, Information100DarkUi, White),
16323
+ borderHoverColor: createThemeColor(DigitalGreenLight, PowerGreen, White),
16324
+ iconColor: createThemeColor(Black91, Black15, White),
16325
+ modalBackdropColor: hexToRgbaCssThemeColor(createThemeColor(Black, Black, Black), 0.3, 0.6, 0.6),
16326
+ popupBorderColor: hexToRgbaCssThemeColor(alias.lineColor, 0.3, 0.3, 0.3),
16327
+ cardBorderColor: hexToRgbaCssThemeColor(alias.lineColor, 0.1, 0.1, 0.1),
16328
+ graphGridlineColor: hexToRgbaCssThemeColor(alias.lineColor, 0.2, 0.2, 0.2),
16329
+ graphTrace1Color: createThemeColor(NiIndigoDark2, NiSky, White),
16330
+ graphTrace2Color: createThemeColor(NiScarletDark1, NiScarlet, hexToRgbaCssColor(White, 0.7)),
16331
+ graphTrace3Color: createThemeColor(NiFernDark1, NiFern, hexToRgbaCssColor(White, 0.4)),
16332
+ graphTrace4Color: createThemeColor(NiPlumDark1, NiSeaLight, hexToRgbaCssColor(White, 0.25)),
16333
+ graphTrace5Color: createThemeColor(NiSeaDark2, NiSea, hexToRgbaCssColor(White, 0.55)),
16334
+ graphTrace6Color: createThemeColor(NiTulip, NiTulip, hexToRgbaCssColor(White, 0.85)),
16335
+ graphTrace7Color: createThemeColor(NiScarletDark3, NiHoneyLight, hexToRgbaCssColor(White, 0.325)),
16336
+ graphTrace8Color: createThemeColor(NiIndigo, NiIndigo, hexToRgbaCssColor(White, 0.625)),
16337
+ tooltipBackgroundColor: createThemeColor(Black15, Black85, ForestGreen),
16338
+ tableRowBorderColor: createThemeColor(Black15, Black80, ForestGreen),
16339
+ tagFillColor: hexToRgbaCssThemeColor(alias.lineColor, 0.1, 0.1, 0.1),
16340
+ buttonFillPrimaryColor: hexToRgbaCssThemeColor(createThemeColor(Black91, Black15, White), 0.75, 0.3, 0.3),
16341
+ buttonPrimaryFontColor: createThemeColor(Black15, Black15, White),
16342
+ buttonFillAccentColor: createThemeColor(DigitalGreenDark, DigitalGreenLight, hexToRgbaCssColor(White, 0.1)),
16343
+ buttonAccentBlockFontColor: createThemeColor(White, Black15, White),
16344
+ buttonAccentOutlineFontColor: createThemeColor(DigitalGreenDark105, PowerGreen, White),
16345
+ buttonBorderAccentOutlineColor: createThemeColor(DigitalGreenLight, PowerGreen, hexToRgbaCssColor(White, 0.3)),
16346
+ calendarEventBackgroundStaticColor: createThemeColor(DigitalGreenLight10, PowerGreen10, PowerGreen10),
16347
+ calendarEventBackgroundDynamicColor: createThemeColor(DigitalGreenDark105, DigitalGreenDark, DigitalGreenDark),
16348
+ calendarEventBackgroundTransientColor: createThemeColor(DigitalGreenDark105, DigitalGreenDark, DigitalGreenDark),
16349
+ calendarEventBorderStaticColor: createThemeColor(DigitalGreenLight, DigitalGreenLight, DigitalGreenLight),
16350
+ calendarEventBorderTransientColor: createThemeColor(DigitalGreenLight, hexToRgbaCssColor(PowerGreen, 0.85), hexToRgbaCssColor(PowerGreen, 0.85)),
16351
+ calendarEventStaticFontColor: createThemeColor(DigitalGreenDark110, PowerGreenDark50, PowerGreenDark50),
16352
+ calendarEventDynamicFontColor: createThemeColor(White, White, White),
16353
+ calendarEventTransientFontColor: createThemeColor(White, White, White),
16354
+ calendarEventBackgroundHoverStaticColor: createThemeColor(DigitalGreenLight30, PowerGreen30, PowerGreen30),
16355
+ calendarEventBackgroundHoverDynamicColor: createThemeColor(DigitalGreenDark110, DigitalGreenDark105, DigitalGreenDark105),
16356
+ calendarEventBackgroundHoverTransientColor: createThemeColor(DigitalGreenDark110, DigitalGreenDark105, DigitalGreenDark105),
16357
+ calendarEventOuterBorderHighlightedColor: createThemeColor(Black88, hexToRgbaCssColor(White, 0.85), hexToRgbaCssColor(White, 0.85)),
16358
+ calendarRowBackgroundSelectedColor: hexToRgbaCssThemeColor(createThemeColor(DigitalGreenLight, PowerGreen, PowerGreen), 0.2, 0.2, 0.2),
16359
+ calendarRowBackgroundConflictColor: hexToRgbaCssThemeColor(createThemeColor(Fail100LightUi, Fail100DarkUi, Fail100DarkUi), 0.2, 0.2, 0.2),
16360
+ calendarEventFillBlockedColor: createThemeColor(hexToRgbaCssColor(Black91, 0.07), Black82, Black82),
16361
+ calendarGrabHandleBackgroundColor: createThemeColor(DigitalGreenLight, PowerGreen, PowerGreen),
16362
+ calendarGridBorderColor: createThemeColor(Black22, Black80, Black80),
16363
+ calendarGroupHeaderBackgroundColor: createThemeColor(Black7, hexToRgbaCssColor(Black91, 0.1), hexToRgbaCssColor(Black91, 0.1)),
16364
+ controlHeight: '32px',
16365
+ controlSlimHeight: '24px',
16366
+ smallPadding: '4px',
16367
+ mediumPadding: '8px',
16368
+ standardPadding: '16px',
16369
+ largePadding: '24px',
16370
+ labelHeight: '16px',
16371
+ borderWidth: '1px',
16372
+ dividerWidth: '2px',
16373
+ iconSize: '16px',
16374
+ drawerWidth: '784px',
16375
+ dialogSmallWidth: '400px',
16376
+ dialogSmallHeight: 'fit-content',
16377
+ dialogSmallMaxHeight: '600px',
16378
+ dialogLargeWidth: '1024px',
16379
+ dialogLargeHeight: '680px',
16380
+ dialogLargeMaxHeight: '680px',
16381
+ menuMinWidth: '176px',
16382
+ bannerGapSize: '1px',
16383
+ spinnerSmallHeight: '16px',
16384
+ spinnerMediumHeight: '32px',
16385
+ spinnerLargeHeight: '64px',
16386
+ tableFitRowsHeight: '480px',
16387
+ elevation1BoxShadow: createThemeColor(`0px 1px 4px ${hexToRgbaCssColor(Black, 0.16)}`, `0px 1px 4px ${hexToRgbaCssColor(Black, 0.16)}`, `0px 1px 4px ${hexToRgbaCssColor(Black, 0.16)}`),
16388
+ elevation2BoxShadow: createThemeColor(`0px 2px 4px ${hexToRgbaCssColor(Black, 0.16)}`, `0px 2px 4px ${hexToRgbaCssColor(Black, 0.16)}`, `0px 2px 4px ${hexToRgbaCssColor(Black, 0.16)}`),
16389
+ elevation3BoxShadow: createThemeColor(`0px 4px 8px ${hexToRgbaCssColor(Black, 0.3)}`, `0px 4px 8px ${hexToRgbaCssColor(Black, 0.3)}`, `0px 4px 8px ${hexToRgbaCssColor(Black, 0.3)}`),
16390
+ ...createFont('headline', alias.defaultFontColor, hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), Headline1Family, Headline1Weight, Headline1Size, Headline1LineHeight),
16391
+ ...createFont('headlinePlus1', alias.defaultFontColor, hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), Headline2Family, Headline2Weight, Headline2Size, Headline2LineHeight),
16392
+ ...createFont('titlePlus2', alias.defaultFontColor, hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), Title3Family, Title3Weight, Title3Size, Title3LineHeight),
16393
+ ...createFont('titlePlus1', alias.defaultFontColor, hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), Title2Family, Title2Weight, Title2Size, Title2LineHeight),
16394
+ ...createFont('title', alias.defaultFontColor, hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), Title1Family, Title1Weight, Title1Size, Title1LineHeight),
16395
+ ...createFont('subtitlePlus1', alias.defaultFontColor, hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), Subtitle2Family, Subtitle2Weight, Subtitle2Size, Subtitle2LineHeight),
16396
+ ...createFont('subtitle', alias.defaultFontColor, hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), Subtitle1Family, Subtitle1Weight, Subtitle1Size, Subtitle1LineHeight),
16397
+ ...createFont('link', alias.defaultFontColor, hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), LinkLightUiFamily, LinkLightUiWeight, LinkLightUiSize, LinkLineHeight),
16398
+ ...createFont('linkActive', createThemeColor(DigitalGreenLight, DigitalGreenLight, hexToRgbaCssColor(White, 0.75)), hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), LinkLightUiFamily, LinkLightUiWeight, LinkLightUiSize, LinkLineHeight),
16399
+ ...createFont('linkProminent', createThemeColor(DigitalGreenDark105, PowerGreen, White), hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), LinkLightUiFamily, LinkLightUiWeight, LinkLightUiSize, LinkLineHeight),
16400
+ ...createFont('linkActiveProminent', createThemeColor(DigitalGreenLight, DigitalGreenLight, hexToRgbaCssColor(White, 0.75)), hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), LinkLightUiFamily, LinkLightUiWeight, LinkLightUiSize, LinkLineHeight),
16401
+ ...createFont('placeholder', hexToRgbaCssThemeColor(alias.defaultFontColor, 0.6, 0.6, 0.6), hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), PlaceholderFamily, PlaceholderWeight, PlaceholderSize, PlaceholderLineHeight),
16402
+ ...createFont('body', alias.defaultFontColor, hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), BodyFamily, BodyWeight, BodySize, BodyLineHeight),
16403
+ ...createFont('bodyEmphasized', alias.defaultFontColor, hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), BodyEmphasizedFamily, BodyEmphasizedWeight, BodyEmphasizedSize, BodyEmphasizedLineHeight),
16404
+ ...createFont('bodyPlus1', alias.defaultFontColor, hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), Body2Family, Body2Weight, Body2Size, Body2LineHeight),
16405
+ ...createFont('bodyPlus1Emphasized', alias.defaultFontColor, hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), BodyEmphasized2Family, BodyEmphasized2Weight, BodyEmphasized2Size, BodyEmphasized2LineHeight),
16406
+ ...createFont('groupHeader', alias.defaultFontColor, hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), GroupLabel1Family, GroupLabel1Weight, GroupLabel1Size, GroupLabel1LineHeight),
16407
+ ...createFont('controlLabel', hexToRgbaCssThemeColor(alias.defaultFontColor, 0.6, 0.6, 0.6), hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), ControlLabel1Family, ControlLabel1Weight, ControlLabel1Size, ControlLabel1LineHeight),
16408
+ ...createFont('buttonLabel', alias.defaultFontColor, hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), ButtonLabel1Family, ButtonLabel1Weight, ButtonLabel1Size, ButtonLabel1LineHeight),
16409
+ ...createFont('tooltipCaption', alias.defaultFontColor, hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), TooltipCaptionFamily, TooltipCaptionWeight, TooltipCaptionSize, TooltipCaptionLineHeight),
16410
+ ...createFont('errorText', alias.failColor, hexToRgbaCssThemeColor(alias.failColor, 0.3, 0.3, 0.3), ErrorLightUiFamily, ErrorLightUiWeight, ErrorLightUiSize, TooltipCaptionLineHeight),
16411
+ ...createFont('tableHeader', hexToRgbaCssThemeColor(alias.defaultFontColor, 0.6, 0.6, 0.6), hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), GridHeaderFamily, GridHeaderWeight, GridHeaderSize, TooltipCaptionLineHeight),
16412
+ ...createFont('mention', createThemeColor(DigitalGreenDark, PowerGreen, PowerGreen), hexToRgbaCssThemeColor(alias.defaultFontColor, 0.3, 0.3, 0.3), BodyFamily, BodyEmphasizedWeight, BodySize, BodyLineHeight),
16413
+ groupHeaderTextTransform: 'uppercase',
16414
+ smallDelay: SmallDelay,
16415
+ mediumDelay: MediumDelay,
16416
+ largeDelay: LargeDelay
16417
+ };
16418
+ // #endregion
16419
+ function hexToRgbaCssThemeColor(themeColor, lightAlpha, darkAlpha, colorAlpha) {
16420
+ return {
16421
+ light: hexToRgbaCssColor(themeColor.light, lightAlpha),
16422
+ dark: hexToRgbaCssColor(themeColor.dark, darkAlpha),
16423
+ color: hexToRgbaCssColor(themeColor.color, colorAlpha),
16424
+ };
16425
+ }
16422
16426
  function hexToRgbPartial(hexValue) {
16423
16427
  const { r, g, b } = parseColorHexRGB(hexValue);
16424
16428
  return `${r * 255}, ${g * 255}, ${b * 255}`;
16425
16429
  }
16426
- function createFontTokens(fontTokenName, colorFunction, disabledColorFunction, family, weight, size, lineHeight) {
16427
- if (fontTokenName === ''
16428
- || family === ''
16429
- || weight === ''
16430
- || size === ''
16431
- || lineHeight === '') {
16432
- throw new Error('createFontTokens parameter unexpectedly set to empty string');
16433
- }
16430
+ function hexToRgbPartialThemeColor(themeColor) {
16431
+ return {
16432
+ light: hexToRgbPartial(themeColor.light),
16433
+ dark: hexToRgbPartial(themeColor.dark),
16434
+ color: hexToRgbPartial(themeColor.color),
16435
+ };
16436
+ }
16437
+ function createThemeColor(light, dark, color) {
16438
+ return {
16439
+ light,
16440
+ dark,
16441
+ color
16442
+ };
16443
+ }
16444
+ function createFont(token, color, disabledColor, family, weight, size, lineHeight) {
16434
16445
  const familyWithFallback = `${family}, ${family} Fallback`;
16435
- const fontToken = DesignToken.create(styleNameFromTokenName(fontTokenName)).withDefault(`${weight} ${size}/${lineHeight} ${familyWithFallback}`);
16446
+ return {
16447
+ [`${token}Font`]: `${weight} ${size}/${lineHeight} ${familyWithFallback}`,
16448
+ [`${token}FontColor`]: color,
16449
+ [`${token}DisabledFontColor`]: disabledColor,
16450
+ [`${token}FontFamily`]: family,
16451
+ [`${token}FontWeight`]: weight,
16452
+ [`${token}FontSize`]: size,
16453
+ [`${token}FontLineHeight`]: lineHeight,
16454
+ };
16455
+ }
16456
+
16457
+ // #region color tokens
16458
+ const actionRgbPartialColor = createThemeColorToken(tokenNames.actionRgbPartialColor, tokenValues.actionRgbPartialColor);
16459
+ const applicationBackgroundColor = createThemeColorToken(tokenNames.applicationBackgroundColor, tokenValues.applicationBackgroundColor);
16460
+ createThemeColorToken(tokenNames.headerBackgroundColor, tokenValues.headerBackgroundColor);
16461
+ createThemeColorToken(tokenNames.sectionBackgroundColor, tokenValues.sectionBackgroundColor);
16462
+ const sectionBackgroundImage = createThemeColorToken(tokenNames.sectionBackgroundImage, tokenValues.sectionBackgroundImage);
16463
+ createThemeColorToken(tokenNames.dividerBackgroundColor, tokenValues.dividerBackgroundColor);
16464
+ const fillSelectedColor = createThemeColorToken(tokenNames.fillSelectedColor, tokenValues.fillSelectedColor);
16465
+ const fillSelectedRgbPartialColor = createThemeColorToken(tokenNames.fillSelectedRgbPartialColor, tokenValues.fillSelectedRgbPartialColor);
16466
+ const fillHoverSelectedColor = createThemeColorToken(tokenNames.fillHoverSelectedColor, tokenValues.fillHoverSelectedColor);
16467
+ const fillHoverColor = createThemeColorToken(tokenNames.fillHoverColor, tokenValues.fillHoverColor);
16468
+ createThemeColorToken(tokenNames.fillHoverRgbPartialColor, tokenValues.fillHoverRgbPartialColor);
16469
+ createThemeColorToken(tokenNames.fillDownColor, tokenValues.fillDownColor);
16470
+ const borderColor = createThemeColorToken(tokenNames.borderColor, tokenValues.borderColor);
16471
+ const borderRgbPartialColor = createThemeColorToken(tokenNames.borderRgbPartialColor, tokenValues.borderRgbPartialColor);
16472
+ const failColor = createThemeColorToken(tokenNames.failColor, tokenValues.failColor);
16473
+ const warningColor = createThemeColorToken(tokenNames.warningColor, tokenValues.warningColor);
16474
+ const passColor = createThemeColorToken(tokenNames.passColor, tokenValues.passColor);
16475
+ const informationColor = createThemeColorToken(tokenNames.informationColor, tokenValues.informationColor);
16476
+ const borderHoverColor = createThemeColorToken(tokenNames.borderHoverColor, tokenValues.borderHoverColor);
16477
+ // #endregion
16478
+ // #region component color tokens
16479
+ const iconColor = createThemeColorToken(tokenNames.iconColor, tokenValues.iconColor);
16480
+ const modalBackdropColor = createThemeColorToken(tokenNames.modalBackdropColor, tokenValues.modalBackdropColor);
16481
+ const popupBorderColor = createThemeColorToken(tokenNames.popupBorderColor, tokenValues.popupBorderColor);
16482
+ const cardBorderColor = createThemeColorToken(tokenNames.cardBorderColor, tokenValues.cardBorderColor);
16483
+ createThemeColorToken(tokenNames.graphGridlineColor, tokenValues.graphGridlineColor);
16484
+ createThemeColorToken(tokenNames.graphTrace1Color, tokenValues.graphTrace1Color);
16485
+ createThemeColorToken(tokenNames.graphTrace2Color, tokenValues.graphTrace2Color);
16486
+ createThemeColorToken(tokenNames.graphTrace3Color, tokenValues.graphTrace3Color);
16487
+ createThemeColorToken(tokenNames.graphTrace4Color, tokenValues.graphTrace4Color);
16488
+ createThemeColorToken(tokenNames.graphTrace5Color, tokenValues.graphTrace5Color);
16489
+ createThemeColorToken(tokenNames.graphTrace6Color, tokenValues.graphTrace6Color);
16490
+ createThemeColorToken(tokenNames.graphTrace7Color, tokenValues.graphTrace7Color);
16491
+ createThemeColorToken(tokenNames.graphTrace8Color, tokenValues.graphTrace8Color);
16492
+ createThemeColorToken(tokenNames.tooltipBackgroundColor, tokenValues.tooltipBackgroundColor);
16493
+ const tableRowBorderColor = createThemeColorToken(tokenNames.tableRowBorderColor, tokenValues.tableRowBorderColor);
16494
+ createThemeColorToken(tokenNames.tagFillColor, tokenValues.tagFillColor);
16495
+ const buttonFillPrimaryColor = createThemeColorToken(tokenNames.buttonFillPrimaryColor, tokenValues.buttonFillPrimaryColor);
16496
+ const buttonPrimaryFontColor = createThemeColorToken(tokenNames.buttonPrimaryFontColor, tokenValues.buttonPrimaryFontColor);
16497
+ const buttonFillAccentColor = createThemeColorToken(tokenNames.buttonFillAccentColor, tokenValues.buttonFillAccentColor);
16498
+ const buttonAccentBlockFontColor = createThemeColorToken(tokenNames.buttonAccentBlockFontColor, tokenValues.buttonAccentBlockFontColor);
16499
+ const buttonAccentOutlineFontColor = createThemeColorToken(tokenNames.buttonAccentOutlineFontColor, tokenValues.buttonAccentOutlineFontColor);
16500
+ const buttonBorderAccentOutlineColor = createThemeColorToken(tokenNames.buttonBorderAccentOutlineColor, tokenValues.buttonBorderAccentOutlineColor);
16501
+ createThemeColorToken(tokenNames.calendarEventBackgroundStaticColor, tokenValues.calendarEventBackgroundStaticColor);
16502
+ createThemeColorToken(tokenNames.calendarEventBackgroundDynamicColor, tokenValues.calendarEventBackgroundDynamicColor);
16503
+ createThemeColorToken(tokenNames.calendarEventBackgroundTransientColor, tokenValues.calendarEventBackgroundTransientColor);
16504
+ createThemeColorToken(tokenNames.calendarEventBorderStaticColor, tokenValues.calendarEventBorderStaticColor);
16505
+ createThemeColorToken(tokenNames.calendarEventBorderTransientColor, tokenValues.calendarEventBorderTransientColor);
16506
+ createThemeColorToken(tokenNames.calendarEventStaticFontColor, tokenValues.calendarEventStaticFontColor);
16507
+ createThemeColorToken(tokenNames.calendarEventDynamicFontColor, tokenValues.calendarEventDynamicFontColor);
16508
+ createThemeColorToken(tokenNames.calendarEventTransientFontColor, tokenValues.calendarEventTransientFontColor);
16509
+ createThemeColorToken(tokenNames.calendarEventBackgroundHoverStaticColor, tokenValues.calendarEventBackgroundHoverStaticColor);
16510
+ createThemeColorToken(tokenNames.calendarEventBackgroundHoverDynamicColor, tokenValues.calendarEventBackgroundHoverDynamicColor);
16511
+ createThemeColorToken(tokenNames.calendarEventBackgroundHoverTransientColor, tokenValues.calendarEventBackgroundHoverTransientColor);
16512
+ createThemeColorToken(tokenNames.calendarEventOuterBorderHighlightedColor, tokenValues.calendarEventOuterBorderHighlightedColor);
16513
+ createThemeColorToken(tokenNames.calendarRowBackgroundSelectedColor, tokenValues.calendarRowBackgroundSelectedColor);
16514
+ createThemeColorToken(tokenNames.calendarRowBackgroundConflictColor, tokenValues.calendarRowBackgroundConflictColor);
16515
+ createThemeColorToken(tokenNames.calendarEventFillBlockedColor, tokenValues.calendarEventFillBlockedColor);
16516
+ createThemeColorToken(tokenNames.calendarGrabHandleBackgroundColor, tokenValues.calendarGrabHandleBackgroundColor);
16517
+ createThemeColorToken(tokenNames.calendarGridBorderColor, tokenValues.calendarGridBorderColor);
16518
+ createThemeColorToken(tokenNames.calendarGroupHeaderBackgroundColor, tokenValues.calendarGroupHeaderBackgroundColor);
16519
+ // #endregion
16520
+ // #region size tokens
16521
+ const controlHeight = createStringToken(tokenNames.controlHeight, tokenValues.controlHeight);
16522
+ const controlSlimHeight = createStringToken(tokenNames.controlSlimHeight, tokenValues.controlSlimHeight);
16523
+ const smallPadding = createStringToken(tokenNames.smallPadding, tokenValues.smallPadding);
16524
+ const mediumPadding = createStringToken(tokenNames.mediumPadding, tokenValues.mediumPadding);
16525
+ const standardPadding = createStringToken(tokenNames.standardPadding, tokenValues.standardPadding);
16526
+ const largePadding = createStringToken(tokenNames.largePadding, tokenValues.largePadding);
16527
+ createStringToken(tokenNames.labelHeight, tokenValues.labelHeight);
16528
+ const borderWidth = createStringToken(tokenNames.borderWidth, tokenValues.borderWidth);
16529
+ createStringToken(tokenNames.dividerWidth, tokenValues.dividerWidth);
16530
+ const iconSize = createStringToken(tokenNames.iconSize, tokenValues.iconSize);
16531
+ const drawerWidth = createStringToken(tokenNames.drawerWidth, tokenValues.drawerWidth);
16532
+ const dialogSmallWidth = createStringToken(tokenNames.dialogSmallWidth, tokenValues.dialogSmallWidth);
16533
+ const dialogSmallHeight = createStringToken(tokenNames.dialogSmallHeight, tokenValues.dialogSmallHeight);
16534
+ const dialogSmallMaxHeight = createStringToken(tokenNames.dialogSmallMaxHeight, tokenValues.dialogSmallMaxHeight);
16535
+ createStringToken(tokenNames.dialogLargeWidth, tokenValues.dialogLargeWidth);
16536
+ createStringToken(tokenNames.dialogLargeHeight, tokenValues.dialogLargeHeight);
16537
+ createStringToken(tokenNames.dialogLargeMaxHeight, tokenValues.dialogLargeMaxHeight);
16538
+ const menuMinWidth = createStringToken(tokenNames.menuMinWidth, tokenValues.menuMinWidth);
16539
+ createStringToken(tokenNames.bannerGapSize, tokenValues.bannerGapSize);
16540
+ const spinnerSmallHeight = createStringToken(tokenNames.spinnerSmallHeight, tokenValues.spinnerSmallHeight);
16541
+ createStringToken(tokenNames.spinnerMediumHeight, tokenValues.spinnerMediumHeight);
16542
+ createStringToken(tokenNames.spinnerLargeHeight, tokenValues.spinnerLargeHeight);
16543
+ const tableFitRowsHeight = createStringToken(tokenNames.tableFitRowsHeight, tokenValues.tableFitRowsHeight);
16544
+ // #endregion
16545
+ // #region drop shadow tokens
16546
+ createThemeColorToken(tokenNames.elevation1BoxShadow, tokenValues.elevation1BoxShadow);
16547
+ const elevation2BoxShadow = createThemeColorToken(tokenNames.elevation2BoxShadow, tokenValues.elevation2BoxShadow);
16548
+ const elevation3BoxShadow = createThemeColorToken(tokenNames.elevation3BoxShadow, tokenValues.elevation3BoxShadow);
16549
+ // #endregion
16550
+ // #region font tokens
16551
+ createFontTokens(tokenNames.headlineFont, tokenValues.headlineFont, tokenValues.headlineFontColor, tokenValues.headlineDisabledFontColor, tokenValues.headlineFontFamily, tokenValues.headlineFontWeight, tokenValues.headlineFontSize, tokenValues.headlineFontLineHeight);
16552
+ createFontTokens(tokenNames.headlinePlus1Font, tokenValues.headlinePlus1Font, tokenValues.headlinePlus1FontColor, tokenValues.headlinePlus1DisabledFontColor, tokenValues.headlinePlus1FontFamily, tokenValues.headlinePlus1FontWeight, tokenValues.headlinePlus1FontSize, tokenValues.headlinePlus1FontLineHeight);
16553
+ createFontTokens(tokenNames.titlePlus2Font, tokenValues.titlePlus2Font, tokenValues.titlePlus2FontColor, tokenValues.titlePlus2DisabledFontColor, tokenValues.titlePlus2FontFamily, tokenValues.titlePlus2FontWeight, tokenValues.titlePlus2FontSize, tokenValues.titlePlus2FontLineHeight);
16554
+ const [titlePlus1Font, titlePlus1FontColor] = createFontTokens(tokenNames.titlePlus1Font, tokenValues.titlePlus1Font, tokenValues.titlePlus1FontColor, tokenValues.titlePlus1DisabledFontColor, tokenValues.titlePlus1FontFamily, tokenValues.titlePlus1FontWeight, tokenValues.titlePlus1FontSize, tokenValues.titlePlus1FontLineHeight);
16555
+ createFontTokens(tokenNames.titleFont, tokenValues.titleFont, tokenValues.titleFontColor, tokenValues.titleDisabledFontColor, tokenValues.titleFontFamily, tokenValues.titleFontWeight, tokenValues.titleFontSize, tokenValues.titleFontLineHeight);
16556
+ const [subtitlePlus1Font] = createFontTokens(tokenNames.subtitlePlus1Font, tokenValues.subtitlePlus1Font, tokenValues.subtitlePlus1FontColor, tokenValues.subtitlePlus1DisabledFontColor, tokenValues.subtitlePlus1FontFamily, tokenValues.subtitlePlus1FontWeight, tokenValues.subtitlePlus1FontSize, tokenValues.subtitlePlus1FontLineHeight);
16557
+ const [subtitleFont, subtitleFontColor] = createFontTokens(tokenNames.subtitleFont, tokenValues.subtitleFont, tokenValues.subtitleFontColor, tokenValues.subtitleDisabledFontColor, tokenValues.subtitleFontFamily, tokenValues.subtitleFontWeight, tokenValues.subtitleFontSize, tokenValues.subtitleFontLineHeight);
16558
+ const [linkFont, linkFontColor, linkDisabledFontColor] = createFontTokens(tokenNames.linkFont, tokenValues.linkFont, tokenValues.linkFontColor, tokenValues.linkDisabledFontColor, tokenValues.linkFontFamily, tokenValues.linkFontWeight, tokenValues.linkFontSize, tokenValues.linkFontLineHeight);
16559
+ const [linkActiveFont, linkActiveFontColor] = createFontTokens(tokenNames.linkActiveFont, tokenValues.linkActiveFont, tokenValues.linkActiveFontColor, tokenValues.linkActiveDisabledFontColor, tokenValues.linkActiveFontFamily, tokenValues.linkActiveFontWeight, tokenValues.linkActiveFontSize, tokenValues.linkActiveFontLineHeight);
16560
+ const [linkProminentFont, linkProminentFontColor] = createFontTokens(tokenNames.linkProminentFont, tokenValues.linkProminentFont, tokenValues.linkProminentFontColor, tokenValues.linkProminentDisabledFontColor, tokenValues.linkProminentFontFamily, tokenValues.linkProminentFontWeight, tokenValues.linkProminentFontSize, tokenValues.linkProminentFontLineHeight);
16561
+ const [linkActiveProminentFont, linkActiveProminentFontColor] = createFontTokens(tokenNames.linkActiveProminentFont, tokenValues.linkActiveProminentFont, tokenValues.linkActiveProminentFontColor, tokenValues.linkActiveProminentDisabledFontColor, tokenValues.linkActiveProminentFontFamily, tokenValues.linkActiveProminentFontWeight, tokenValues.linkActiveProminentFontSize, tokenValues.linkActiveProminentFontLineHeight);
16562
+ const [placeholderFont, placeholderFontColor] = createFontTokens(tokenNames.placeholderFont, tokenValues.placeholderFont, tokenValues.placeholderFontColor, tokenValues.placeholderDisabledFontColor, tokenValues.placeholderFontFamily, tokenValues.placeholderFontWeight, tokenValues.placeholderFontSize, tokenValues.placeholderFontLineHeight);
16563
+ const [bodyFont, bodyFontColor, bodyDisabledFontColor, bodyFontFamily, bodyFontWeight, bodyFontSize, bodyFontLineHeight] = createFontTokens(tokenNames.bodyFont, tokenValues.bodyFont, tokenValues.bodyFontColor, tokenValues.bodyDisabledFontColor, tokenValues.bodyFontFamily, tokenValues.bodyFontWeight, tokenValues.bodyFontSize, tokenValues.bodyFontLineHeight);
16564
+ const [bodyEmphasizedFont, bodyEmphasizedFontColor, bodyEmphasizedDisabledFontColor, bodyEmphasizedFontFamily, bodyEmphasizedFontWeight] = createFontTokens(tokenNames.bodyEmphasizedFont, tokenValues.bodyEmphasizedFont, tokenValues.bodyEmphasizedFontColor, tokenValues.bodyEmphasizedDisabledFontColor, tokenValues.bodyEmphasizedFontFamily, tokenValues.bodyEmphasizedFontWeight, tokenValues.bodyEmphasizedFontSize, tokenValues.bodyEmphasizedFontLineHeight);
16565
+ createFontTokens(tokenNames.bodyPlus1Font, tokenValues.bodyPlus1Font, tokenValues.bodyPlus1FontColor, tokenValues.bodyPlus1DisabledFontColor, tokenValues.bodyPlus1FontFamily, tokenValues.bodyPlus1FontWeight, tokenValues.bodyPlus1FontSize, tokenValues.bodyPlus1FontLineHeight);
16566
+ createFontTokens(tokenNames.bodyPlus1EmphasizedFont, tokenValues.bodyPlus1EmphasizedFont, tokenValues.bodyPlus1EmphasizedFontColor, tokenValues.bodyPlus1EmphasizedDisabledFontColor, tokenValues.bodyPlus1EmphasizedFontFamily, tokenValues.bodyPlus1EmphasizedFontWeight, tokenValues.bodyPlus1EmphasizedFontSize, tokenValues.bodyPlus1EmphasizedFontLineHeight);
16567
+ const [groupHeaderFont, groupHeaderFontColor] = createFontTokens(tokenNames.groupHeaderFont, tokenValues.groupHeaderFont, tokenValues.groupHeaderFontColor, tokenValues.groupHeaderDisabledFontColor, tokenValues.groupHeaderFontFamily, tokenValues.groupHeaderFontWeight, tokenValues.groupHeaderFontSize, tokenValues.groupHeaderFontLineHeight);
16568
+ const [controlLabelFont, controlLabelFontColor, controlLabelDisabledFontColor, controlLabelFontFamily, controlLabelFontWeight, controlLabelFontSize, controlLabelFontLineHeight] = createFontTokens(tokenNames.controlLabelFont, tokenValues.controlLabelFont, tokenValues.controlLabelFontColor, tokenValues.controlLabelDisabledFontColor, tokenValues.controlLabelFontFamily, tokenValues.controlLabelFontWeight, tokenValues.controlLabelFontSize, tokenValues.controlLabelFontLineHeight);
16569
+ const [buttonLabelFont, buttonLabelFontColor, buttonLabelDisabledFontColor] = createFontTokens(tokenNames.buttonLabelFont, tokenValues.buttonLabelFont, tokenValues.buttonLabelFontColor, tokenValues.buttonLabelDisabledFontColor, tokenValues.buttonLabelFontFamily, tokenValues.buttonLabelFontWeight, tokenValues.buttonLabelFontSize, tokenValues.buttonLabelFontLineHeight);
16570
+ const [tooltipCaptionFont, tooltipCaptionFontColor] = createFontTokens(tokenNames.tooltipCaptionFont, tokenValues.tooltipCaptionFont, tokenValues.tooltipCaptionFontColor, tokenValues.tooltipCaptionDisabledFontColor, tokenValues.tooltipCaptionFontFamily, tokenValues.tooltipCaptionFontWeight, tokenValues.tooltipCaptionFontSize, tokenValues.tooltipCaptionFontLineHeight);
16571
+ const [errorTextFont, errorTextFontColor, errorTextDisabledFontColor, errorTextFontFamily, errorTextFontWeight, errorTextFontSize, errorTextFontLineHeight] = createFontTokens(tokenNames.errorTextFont, tokenValues.errorTextFont, tokenValues.errorTextFontColor, tokenValues.errorTextDisabledFontColor, tokenValues.errorTextFontFamily, tokenValues.errorTextFontWeight, tokenValues.errorTextFontSize, tokenValues.errorTextFontLineHeight);
16572
+ const [tableHeaderFont, tableHeaderFontColor] = createFontTokens(tokenNames.tableHeaderFont, tokenValues.tableHeaderFont, tokenValues.tableHeaderFontColor, tokenValues.tableHeaderDisabledFontColor, tokenValues.tableHeaderFontFamily, tokenValues.tableHeaderFontWeight, tokenValues.tableHeaderFontSize, tokenValues.tableHeaderFontLineHeight);
16573
+ createFontTokens(tokenNames.mentionFont, tokenValues.mentionFont, tokenValues.mentionFontColor, tokenValues.mentionDisabledFontColor, tokenValues.mentionFontFamily, tokenValues.mentionFontWeight, tokenValues.mentionFontSize, tokenValues.mentionFontLineHeight);
16574
+ // #endregion
16575
+ // #region text transform tokens
16576
+ const groupHeaderTextTransform = createStringToken(tokenNames.groupHeaderTextTransform, tokenValues.groupHeaderTextTransform);
16577
+ // #endregion
16578
+ // #region animation tokens
16579
+ const smallDelay = createStringToken(tokenNames.smallDelay, tokenValues.smallDelay);
16580
+ const mediumDelay = createStringToken(tokenNames.mediumDelay, tokenValues.mediumDelay);
16581
+ const largeDelay = createStringToken(tokenNames.largeDelay, tokenValues.largeDelay);
16582
+ // #endregion
16583
+ // #region helpers
16584
+ function createFontTokens(fontTokenName, font, fontColor, disabledFontColor, fontFamily, fontWeight, fontSize, fontLineHeight) {
16436
16585
  const fontNameParts = fontTokenName.split('-font');
16437
16586
  const tokenPrefixWithoutFont = fontNameParts[0];
16438
- if (tokenPrefixWithoutFont === undefined || fontNameParts[1] !== '') {
16439
- throw new Error(`fontTokenName value of ${fontTokenName} did not have the expected '-font' suffix`);
16440
- }
16441
- const fontColorToken = DesignToken.create(styleNameFromTokenName(`${tokenPrefixWithoutFont}-font-color`)).withDefault((element) => colorFunction(element));
16442
- const fontDisabledColorToken = DesignToken.create(styleNameFromTokenName(`${tokenPrefixWithoutFont}-disabled-font-color`)).withDefault((element) => disabledColorFunction(element));
16443
- const fontFamilyToken = DesignToken.create(styleNameFromTokenName(`${tokenPrefixWithoutFont}-font-family`)).withDefault(familyWithFallback);
16444
- const fontWeightToken = DesignToken.create(styleNameFromTokenName(`${tokenPrefixWithoutFont}-font-weight`)).withDefault(weight);
16445
- const fontSizeToken = DesignToken.create(styleNameFromTokenName(`${tokenPrefixWithoutFont}-font-size`)).withDefault(size);
16446
- const fontLineHeightToken = DesignToken.create(styleNameFromTokenName(`${tokenPrefixWithoutFont}-font-line-height`)).withDefault(lineHeight);
16587
+ const fontFamilyWithFallback = `${fontFamily}, ${fontFamily} Fallback`;
16588
+ const fontToken = createStringToken(fontTokenName, font);
16589
+ const fontColorToken = createThemeColorToken(`${tokenPrefixWithoutFont}-font-color`, fontColor);
16590
+ const fontDisabledColorToken = createThemeColorToken(`${tokenPrefixWithoutFont}-disabled-font-color`, disabledFontColor);
16591
+ const fontFamilyToken = createStringToken(`${tokenPrefixWithoutFont}-font-family`, fontFamilyWithFallback);
16592
+ const fontWeightToken = createStringToken(`${tokenPrefixWithoutFont}-font-weight`, fontWeight);
16593
+ const fontSizeToken = createStringToken(`${tokenPrefixWithoutFont}-font-size`, fontSize);
16594
+ const fontLineHeightToken = createStringToken(`${tokenPrefixWithoutFont}-font-line-height`, fontLineHeight);
16447
16595
  return [
16448
16596
  fontToken,
16449
16597
  fontColorToken,
@@ -16454,57 +16602,24 @@
16454
16602
  fontLineHeightToken
16455
16603
  ];
16456
16604
  }
16457
- function getColorForTheme(element, lightThemeColor, darkThemeColor, colorThemeColor) {
16458
- switch (theme.getValueFor(element)) {
16459
- case Theme.light:
16460
- return lightThemeColor;
16461
- case Theme.dark:
16462
- return darkThemeColor;
16463
- case Theme.color:
16464
- return colorThemeColor;
16465
- default:
16466
- return lightThemeColor;
16467
- }
16468
- }
16469
- function getWarningColorForTheme(element) {
16470
- return getColorForTheme(element, Warning100LightUi, Warning100DarkUi, White);
16471
- }
16472
- function getFailColorForTheme(element) {
16473
- return getColorForTheme(element, Fail100LightUi, Fail100DarkUi, White);
16474
- }
16475
- function getPassColorForTheme(element) {
16476
- return getColorForTheme(element, Pass100LightUi, Pass100DarkUi, White);
16477
- }
16478
- function getInformationColorForTheme(element) {
16479
- return getColorForTheme(element, Information100LightUi, Information100DarkUi, White);
16480
- }
16481
- function getDefaultLineColorForTheme(element) {
16482
- return getColorForTheme(element, Black91, Black15, White);
16483
- }
16484
- function getDefaultFontColorForTheme(element) {
16485
- return getColorForTheme(element, Black91, Black15, White);
16486
- }
16487
- function getFillSelectedColorForTheme(element) {
16488
- return getColorForTheme(element, DigitalGreenLight, PowerGreen, White);
16489
- }
16490
- function getFillHoverColorForTheme(element) {
16491
- return getColorForTheme(element, Black91, Black15, White);
16492
- }
16493
- function getFillDownColorForTheme(element) {
16494
- return getColorForTheme(element, Black91, Black15, White);
16495
- }
16496
- function getModalBackdropForTheme(element) {
16497
- switch (theme.getValueFor(element)) {
16498
- case Theme.light:
16499
- return hexToRgbaCssColor(Black, 0.3);
16500
- case Theme.dark:
16501
- return hexToRgbaCssColor(Black, 0.6);
16502
- case Theme.color:
16503
- return hexToRgbaCssColor(Black, 0.6);
16504
- default:
16505
- return hexToRgbaCssColor(Black, 0.3);
16506
- }
16605
+ function createStringToken(tokenName, tokenValue) {
16606
+ return DesignToken.create(styleNameFromTokenName(tokenName)).withDefault(tokenValue);
16607
+ }
16608
+ function createThemeColorToken(tokenName, themeColor) {
16609
+ return DesignToken.create(styleNameFromTokenName(tokenName)).withDefault((element) => {
16610
+ switch (theme.getValueFor(element)) {
16611
+ case Theme.light:
16612
+ return themeColor.light;
16613
+ case Theme.dark:
16614
+ return themeColor.dark;
16615
+ case Theme.color:
16616
+ return themeColor.color;
16617
+ default:
16618
+ return themeColor.light;
16619
+ }
16620
+ });
16507
16621
  }
16622
+ // #endregion
16508
16623
 
16509
16624
  const styles$14 = css `
16510
16625
  @layer base, hover, focusVisible, active, disabled;
@@ -18740,7 +18855,8 @@
18740
18855
  filterNoResultsLabel: 'No items found',
18741
18856
  loadingLabel: 'Loading…',
18742
18857
  scrollBackwardLabel: 'Scroll backward',
18743
- scrollForwardLabel: 'Scroll forward'
18858
+ scrollForwardLabel: 'Scroll forward',
18859
+ itemRemoveLabel: 'Remove'
18744
18860
  };
18745
18861
 
18746
18862
  const popupDismissLabel = DesignToken.create({
@@ -18787,6 +18903,10 @@
18787
18903
  name: 'scroll-forward-label',
18788
18904
  cssCustomPropertyName: null
18789
18905
  }).withDefault(coreLabelDefaults.scrollForwardLabel);
18906
+ const itemRemoveLabel = DesignToken.create({
18907
+ name: 'item-remove-label',
18908
+ cssCustomPropertyName: null
18909
+ }).withDefault(coreLabelDefaults.itemRemoveLabel);
18790
18910
 
18791
18911
  const template$L = (context, definition) => html `
18792
18912
  <div
@@ -25254,7 +25374,8 @@ so this becomes the fallback color for the slot */ ''}
25254
25374
  filterNoResults: filterNoResultsLabel,
25255
25375
  loading: loadingLabel,
25256
25376
  scrollBackward: scrollBackwardLabel,
25257
- scrollForward: scrollForwardLabel
25377
+ scrollForward: scrollForwardLabel,
25378
+ itemRemove: itemRemoveLabel
25258
25379
  };
25259
25380
  /**
25260
25381
  * Core label provider for Nimble
@@ -25298,6 +25419,9 @@ so this becomes the fallback color for the slot */ ''}
25298
25419
  __decorate([
25299
25420
  attr({ attribute: 'scroll-forward' })
25300
25421
  ], LabelProviderCore.prototype, "scrollForward", void 0);
25422
+ __decorate([
25423
+ attr({ attribute: 'item-remove' })
25424
+ ], LabelProviderCore.prototype, "itemRemove", void 0);
25301
25425
  const nimbleLabelProviderCore = LabelProviderCore.compose({
25302
25426
  baseName: 'label-provider-core',
25303
25427
  styles: styles$J