@ni/nimble-components 23.0.1 → 24.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all-components-bundle.js +89 -119
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +3581 -3612
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/menu-button/index.d.ts +2 -2
- package/dist/esm/menu-button/index.js +4 -2
- package/dist/esm/menu-button/index.js.map +1 -1
- package/dist/esm/menu-button/template.js +1 -0
- package/dist/esm/menu-button/template.js.map +1 -1
- package/dist/esm/menu-button/types.d.ts +1 -1
- package/dist/esm/menu-button/types.js +1 -1
- package/dist/esm/menu-button/types.js.map +1 -1
- package/dist/esm/patterns/button/styles.js +42 -42
- package/dist/esm/patterns/button/styles.js.map +1 -1
- package/dist/esm/theme-provider/design-token-comments.js +0 -2
- package/dist/esm/theme-provider/design-token-comments.js.map +1 -1
- package/dist/esm/theme-provider/design-token-names.js +0 -2
- package/dist/esm/theme-provider/design-token-names.js.map +1 -1
- package/dist/esm/theme-provider/design-tokens.d.ts +0 -2
- package/dist/esm/theme-provider/design-tokens.js +4 -6
- package/dist/esm/theme-provider/design-tokens.js.map +1 -1
- package/dist/esm/toggle-button/index.d.ts +7 -1
- package/dist/esm/toggle-button/index.js +3 -0
- package/dist/esm/toggle-button/index.js.map +1 -1
- package/dist/esm/toggle-button/styles.js +27 -58
- package/dist/esm/toggle-button/styles.js.map +1 -1
- package/dist/esm/toggle-button/types.d.ts +1 -1
- package/dist/esm/toggle-button/types.js +1 -1
- package/dist/esm/toggle-button/types.js.map +1 -1
- package/dist/tokens-internal.scss +0 -12
- package/dist/tokens.scss +0 -6
- package/package.json +2 -2
|
@@ -16301,7 +16301,7 @@
|
|
|
16301
16301
|
|
|
16302
16302
|
/**
|
|
16303
16303
|
* Do not edit directly
|
|
16304
|
-
* Generated on
|
|
16304
|
+
* Generated on Tue, 26 Mar 2024 20:29:30 GMT
|
|
16305
16305
|
*/
|
|
16306
16306
|
|
|
16307
16307
|
const Information100DarkUi = "#a46eff";
|
|
@@ -16324,9 +16324,8 @@
|
|
|
16324
16324
|
const DigitalGreenLight = "#009b65";
|
|
16325
16325
|
const BannerFail100DarkUi = "#d63434";
|
|
16326
16326
|
const Warning100LightUi = "#ff4b00";
|
|
16327
|
-
const DigitalGreenDark = "#
|
|
16327
|
+
const DigitalGreenDark = "#008557";
|
|
16328
16328
|
const DigitalGreenDark105 = "#00734b";
|
|
16329
|
-
const DigitalGreenDark110 = "#00613f";
|
|
16330
16329
|
const PowerGreen = "#32eb96";
|
|
16331
16330
|
const Title2Family = "Source Sans Pro";
|
|
16332
16331
|
const Title2Weight = "400";
|
|
@@ -16447,12 +16446,10 @@
|
|
|
16447
16446
|
sectionBackgroundColor: 'section-background-color',
|
|
16448
16447
|
buttonFillPrimaryColor: 'button-fill-primary-color',
|
|
16449
16448
|
buttonPrimaryFontColor: 'button-primary-font-color',
|
|
16450
|
-
buttonFillActivePrimaryColor: 'button-fill-active-primary-color',
|
|
16451
16449
|
buttonFillAccentColor: 'button-fill-accent-color',
|
|
16452
16450
|
buttonAccentBlockFontColor: 'button-accent-block-font-color',
|
|
16453
16451
|
buttonAccentOutlineFontColor: 'button-accent-outline-font-color',
|
|
16454
16452
|
buttonBorderAccentOutlineColor: 'button-border-accent-outline-color',
|
|
16455
|
-
buttonFillAccentActiveColor: 'button-fill-accent-active-color',
|
|
16456
16453
|
fillSelectedColor: 'fill-selected-color',
|
|
16457
16454
|
fillSelectedRgbPartialColor: 'fill-selected-rgb-partial-color',
|
|
16458
16455
|
fillHoverSelectedColor: 'fill-hover-selected-color',
|
|
@@ -16905,12 +16902,10 @@
|
|
|
16905
16902
|
const tableRowBorderColor = DesignToken.create(styleNameFromTokenName(tokenNames.tableRowBorderColor)).withDefault((element) => getColorForTheme(element, Black15, Black80, ForestGreen));
|
|
16906
16903
|
const buttonFillPrimaryColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonFillPrimaryColor)).withDefault((element) => getColorForTheme(element, hexToRgbaCssColor(Black91, 0.75), hexToRgbaCssColor(Black15, 0.3), hexToRgbaCssColor(White, 0.3)));
|
|
16907
16904
|
const buttonPrimaryFontColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonPrimaryFontColor)).withDefault((element) => getColorForTheme(element, Black15, Black15, White));
|
|
16908
|
-
const buttonFillActivePrimaryColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonFillActivePrimaryColor)).withDefault((element) => getColorForTheme(element, hexToRgbaCssColor(Black91, 0.85), hexToRgbaCssColor(Black15, 0.2), hexToRgbaCssColor(White, 0.2)));
|
|
16909
16905
|
const buttonFillAccentColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonFillAccentColor)).withDefault((element) => getColorForTheme(element, DigitalGreenDark, DigitalGreenLight, hexToRgbaCssColor(White, 0.1)));
|
|
16910
16906
|
const buttonAccentBlockFontColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonAccentBlockFontColor)).withDefault((element) => getColorForTheme(element, White, Black15, White));
|
|
16911
16907
|
const buttonAccentOutlineFontColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonAccentOutlineFontColor)).withDefault((element) => getColorForTheme(element, DigitalGreenDark105, PowerGreen, White));
|
|
16912
16908
|
const buttonBorderAccentOutlineColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonBorderAccentOutlineColor)).withDefault((element) => getColorForTheme(element, DigitalGreenLight, PowerGreen, hexToRgbaCssColor(White, 0.3)));
|
|
16913
|
-
const buttonFillAccentActiveColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonFillAccentActiveColor)).withDefault((element) => getColorForTheme(element, DigitalGreenDark110, DigitalGreenDark, hexToRgbaCssColor(White, 0.2)));
|
|
16914
16909
|
// Component Sizing Tokens
|
|
16915
16910
|
const controlHeight = DesignToken.create(styleNameFromTokenName(tokenNames.controlHeight)).withDefault('32px');
|
|
16916
16911
|
const controlSlimHeight = DesignToken.create(styleNameFromTokenName(tokenNames.controlSlimHeight)).withDefault('24px');
|
|
@@ -16946,9 +16941,9 @@
|
|
|
16946
16941
|
const [subtitlePlus1Font, subtitlePlus1FontColor, subtitlePlus1DisabledFontColor, subtitlePlus1FontFamily, subtitlePlus1FontWeight, subtitlePlus1FontSize, subtitlePlus1FontLineHeight, subtitlePlus1FallbackFontFamily] = createFontTokens(tokenNames.subtitlePlus1Font, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), Subtitle2Family, Subtitle2Weight, Subtitle2Size, Subtitle2LineHeight, Subtitle2FallbackFontFamily);
|
|
16947
16942
|
const [subtitleFont, subtitleFontColor, subtitleDisabledFontColor, subtitleFontFamily, subtitleFontWeight, subtitleFontSize, subtitleFontLineHeight, subtitleFallbackFontFamily] = createFontTokens(tokenNames.subtitleFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), Subtitle1Family, Subtitle1Weight, Subtitle1Size, Subtitle1LineHeight, Subtitle1FallbackFontFamily);
|
|
16948
16943
|
const [linkFont, linkFontColor, linkDisabledFontColor, linkFontFamily, linkFontWeight, linkFontSize, linkFontLineHeight, linkFallbackFontFamily] = createFontTokens(tokenNames.linkFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), LinkLightUiFamily, LinkLightUiWeight, LinkLightUiSize, LinkLineHeight, LinkFallbackFontFamily);
|
|
16949
|
-
const [linkActiveFont, linkActiveFontColor, linkActiveDisabledFontColor, linkActiveFontFamily, linkActiveFontWeight, linkActiveFontSize, linkActiveFontLineHeight, linkActiveFallbackFontFamily] = createFontTokens(tokenNames.linkActiveFont, (element) => getColorForTheme(element,
|
|
16950
|
-
const [linkProminentFont, linkProminentFontColor, linkProminentDisabledFontColor, linkProminentFontFamily, linkProminentFontWeight, linkProminentFontSize, linkProminentFontLineHeight, linkProminentFallbackFontFamily] = createFontTokens(tokenNames.linkProminentFont, (element) => getColorForTheme(element,
|
|
16951
|
-
const [linkActiveProminentFont, linkActiveProminentFontColor, linkActiveProminentDisabledFontColor, linkActiveProminentFontFamily, linkActiveProminentFontWeight, linkActiveProminentFontSize, linkActiveProminentFontLineHeight, linkActiveProminentFallbackFontFamily] = createFontTokens(tokenNames.linkActiveProminentFont, (element) =>
|
|
16944
|
+
const [linkActiveFont, linkActiveFontColor, linkActiveDisabledFontColor, linkActiveFontFamily, linkActiveFontWeight, linkActiveFontSize, linkActiveFontLineHeight, linkActiveFallbackFontFamily] = createFontTokens(tokenNames.linkActiveFont, (element) => getColorForTheme(element, DigitalGreenLight, DigitalGreenLight, hexToRgbaCssColor(White, 0.6)), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), LinkLightUiFamily, LinkLightUiWeight, LinkLightUiSize, LinkLineHeight, LinkFallbackFontFamily);
|
|
16945
|
+
const [linkProminentFont, linkProminentFontColor, linkProminentDisabledFontColor, linkProminentFontFamily, linkProminentFontWeight, linkProminentFontSize, linkProminentFontLineHeight, linkProminentFallbackFontFamily] = createFontTokens(tokenNames.linkProminentFont, (element) => getColorForTheme(element, DigitalGreenDark105, PowerGreen, PowerGreen), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), LinkLightUiFamily, LinkLightUiWeight, LinkLightUiSize, LinkLineHeight, LinkFallbackFontFamily);
|
|
16946
|
+
const [linkActiveProminentFont, linkActiveProminentFontColor, linkActiveProminentDisabledFontColor, linkActiveProminentFontFamily, linkActiveProminentFontWeight, linkActiveProminentFontSize, linkActiveProminentFontLineHeight, linkActiveProminentFallbackFontFamily] = createFontTokens(tokenNames.linkActiveProminentFont, (element) => getColorForTheme(element, DigitalGreenLight, DigitalGreenLight, PowerGreen), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), LinkLightUiFamily, LinkLightUiWeight, LinkLightUiSize, LinkLineHeight, LinkFallbackFontFamily);
|
|
16952
16947
|
const [placeholderFont, placeholderFontColor, placeholderDisabledFontColor, placeholderFontFamily, placeholderFontWeight, placeholderFontSize, placeholderFontLineHeight, placeholderFallbackFontFamily] = createFontTokens(tokenNames.placeholderFont, (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.6), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), PlaceholderFamily, PlaceholderWeight, PlaceholderSize, PlaceholderLineHeight, PlaceholderFallbackFontFamily);
|
|
16953
16948
|
const [bodyFont, bodyFontColor, bodyDisabledFontColor, bodyFontFamily, bodyFontWeight, bodyFontSize, bodyFontLineHeight, bodyFallbackFontFamily] = createFontTokens(tokenNames.bodyFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), BodyFamily, BodyWeight, BodySize, BodyLineHeight, BodyFallbackFontFamily);
|
|
16954
16949
|
const [bodyEmphasizedFont, bodyEmphasizedFontColor, bodyEmphasizedDisabledFontColor, bodyEmphasizedFontFamily, bodyEmphasizedFontWeight, bodyEmphasizedFontSize, bodyEmphasizedFontLineHeight, bodyEmphasizedFallbackFontFamily] = createFontTokens(tokenNames.bodyEmphasizedFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), BodyEmphasizedFamily, BodyEmphasizedWeight, BodyEmphasizedSize, BodyEmphasizedLineHeight, BodyEmphasizedFallbackFontFamily);
|
|
@@ -17352,7 +17347,7 @@
|
|
|
17352
17347
|
`;
|
|
17353
17348
|
|
|
17354
17349
|
const styles$V = css `
|
|
17355
|
-
@layer base, hover, focusVisible, active, disabled, top;
|
|
17350
|
+
@layer base, checked, hover, focusVisible, active, disabled, top;
|
|
17356
17351
|
|
|
17357
17352
|
@layer base {
|
|
17358
17353
|
${display('inline-flex')}
|
|
@@ -17425,15 +17420,15 @@
|
|
|
17425
17420
|
display: contents;
|
|
17426
17421
|
}
|
|
17427
17422
|
|
|
17428
|
-
:host([content-hidden]) .content {
|
|
17429
|
-
${accessiblyHidden}
|
|
17430
|
-
}
|
|
17431
|
-
|
|
17432
17423
|
[part='start'] {
|
|
17433
17424
|
display: contents;
|
|
17434
17425
|
${iconColor.cssCustomProperty}: ${buttonLabelFontColor};
|
|
17435
17426
|
}
|
|
17436
17427
|
|
|
17428
|
+
:host([content-hidden]) .content {
|
|
17429
|
+
${accessiblyHidden}
|
|
17430
|
+
}
|
|
17431
|
+
|
|
17437
17432
|
[part='end'] {
|
|
17438
17433
|
display: contents;
|
|
17439
17434
|
${iconColor.cssCustomProperty}: ${buttonLabelFontColor};
|
|
@@ -17462,6 +17457,8 @@
|
|
|
17462
17457
|
@layer active {
|
|
17463
17458
|
.control:active {
|
|
17464
17459
|
box-shadow: none;
|
|
17460
|
+
color: ${buttonLabelFontColor};
|
|
17461
|
+
border-color: ${borderHoverColor};
|
|
17465
17462
|
background-image: linear-gradient(
|
|
17466
17463
|
${fillSelectedColor},
|
|
17467
17464
|
${fillSelectedColor}
|
|
@@ -17472,29 +17469,30 @@
|
|
|
17472
17469
|
.control:active::before {
|
|
17473
17470
|
outline: none;
|
|
17474
17471
|
}
|
|
17472
|
+
|
|
17473
|
+
.control:active [part='start'],
|
|
17474
|
+
.control:active [part='end'] {
|
|
17475
|
+
${iconColor.cssCustomProperty}: ${buttonLabelFontColor};
|
|
17476
|
+
}
|
|
17475
17477
|
}
|
|
17476
17478
|
|
|
17477
17479
|
@layer disabled {
|
|
17478
17480
|
:host([disabled]) {
|
|
17479
|
-
color: ${buttonLabelDisabledFontColor};
|
|
17480
17481
|
cursor: default;
|
|
17481
17482
|
}
|
|
17482
17483
|
|
|
17483
17484
|
:host([disabled]) .control {
|
|
17485
|
+
color: ${buttonLabelDisabledFontColor};
|
|
17484
17486
|
box-shadow: none;
|
|
17485
17487
|
background-image: none;
|
|
17486
|
-
|
|
17488
|
+
background-size: 100% 100%;
|
|
17487
17489
|
}
|
|
17488
17490
|
|
|
17489
17491
|
:host([disabled]) .control::before {
|
|
17490
17492
|
box-shadow: none;
|
|
17491
17493
|
}
|
|
17492
17494
|
|
|
17493
|
-
:host([disabled]) slot[name='start']::slotted(*)
|
|
17494
|
-
opacity: 0.3;
|
|
17495
|
-
${iconColor.cssCustomProperty}: ${buttonLabelFontColor};
|
|
17496
|
-
}
|
|
17497
|
-
|
|
17495
|
+
:host([disabled]) slot[name='start']::slotted(*),
|
|
17498
17496
|
:host([disabled]) slot[name='end']::slotted(*) {
|
|
17499
17497
|
opacity: 0.3;
|
|
17500
17498
|
${iconColor.cssCustomProperty}: ${buttonLabelFontColor};
|
|
@@ -17559,7 +17557,6 @@
|
|
|
17559
17557
|
rgba(${borderRgbPartialColor}, 0.1),
|
|
17560
17558
|
rgba(${borderRgbPartialColor}, 0.1)
|
|
17561
17559
|
);
|
|
17562
|
-
background-size: 100% 100%;
|
|
17563
17560
|
border-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
17564
17561
|
}
|
|
17565
17562
|
}
|
|
@@ -17574,13 +17571,29 @@
|
|
|
17574
17571
|
border-color: ${buttonBorderAccentOutlineColor};
|
|
17575
17572
|
color: ${buttonAccentOutlineFontColor};
|
|
17576
17573
|
}
|
|
17574
|
+
|
|
17575
|
+
:host([appearance-variant='accent']) [part='start'],
|
|
17576
|
+
:host([appearance-variant='accent']) [part='end'] {
|
|
17577
|
+
${iconColor.cssCustomProperty}: ${buttonAccentOutlineFontColor};
|
|
17578
|
+
}
|
|
17577
17579
|
}
|
|
17578
|
-
|
|
17579
|
-
@layer
|
|
17580
|
-
:host([appearance-variant='
|
|
17581
|
-
${
|
|
17580
|
+
|
|
17581
|
+
@layer active {
|
|
17582
|
+
:host([appearance-variant='accent']) .control:active {
|
|
17583
|
+
color: ${buttonAccentOutlineFontColor};
|
|
17582
17584
|
}
|
|
17583
17585
|
|
|
17586
|
+
:host([appearance-variant='accent'])
|
|
17587
|
+
.control:active
|
|
17588
|
+
[part='start'],
|
|
17589
|
+
:host([appearance-variant='accent'])
|
|
17590
|
+
.control:active
|
|
17591
|
+
[part='end'] {
|
|
17592
|
+
${iconColor.cssCustomProperty}: ${buttonAccentOutlineFontColor};
|
|
17593
|
+
}
|
|
17594
|
+
}
|
|
17595
|
+
`), appearanceBehavior(ButtonAppearance.block, css `
|
|
17596
|
+
@layer base {
|
|
17584
17597
|
:host([appearance-variant='primary']) .control {
|
|
17585
17598
|
background-image: linear-gradient(
|
|
17586
17599
|
${buttonFillPrimaryColor},
|
|
@@ -17590,14 +17603,6 @@
|
|
|
17590
17603
|
border-color: ${buttonFillPrimaryColor};
|
|
17591
17604
|
}
|
|
17592
17605
|
|
|
17593
|
-
:host([appearance-variant='primary']) [part='end'] {
|
|
17594
|
-
${iconColor.cssCustomProperty}: white;
|
|
17595
|
-
}
|
|
17596
|
-
|
|
17597
|
-
:host([appearance-variant='accent']) [part='start'] {
|
|
17598
|
-
${iconColor.cssCustomProperty}: white;
|
|
17599
|
-
}
|
|
17600
|
-
|
|
17601
17606
|
:host([appearance-variant='accent']) .control {
|
|
17602
17607
|
background-image: linear-gradient(
|
|
17603
17608
|
${buttonFillAccentColor},
|
|
@@ -17607,24 +17612,14 @@
|
|
|
17607
17612
|
border-color: ${buttonFillAccentColor};
|
|
17608
17613
|
}
|
|
17609
17614
|
|
|
17610
|
-
:host([appearance-variant='
|
|
17611
|
-
|
|
17612
|
-
|
|
17613
|
-
}
|
|
17614
|
-
|
|
17615
|
-
@layer active {
|
|
17616
|
-
:host([appearance-variant='primary']) .control:active {
|
|
17617
|
-
background-image: linear-gradient(
|
|
17618
|
-
${buttonFillActivePrimaryColor},
|
|
17619
|
-
${buttonFillActivePrimaryColor}
|
|
17620
|
-
);
|
|
17615
|
+
:host([appearance-variant='primary']) [part='start'],
|
|
17616
|
+
:host([appearance-variant='primary']) [part='end'] {
|
|
17617
|
+
${iconColor.cssCustomProperty}: ${buttonPrimaryFontColor};
|
|
17621
17618
|
}
|
|
17622
17619
|
|
|
17623
|
-
:host([appearance-variant='accent'])
|
|
17624
|
-
|
|
17625
|
-
|
|
17626
|
-
${buttonFillAccentActiveColor}
|
|
17627
|
-
);
|
|
17620
|
+
:host([appearance-variant='accent']) [part='start'],
|
|
17621
|
+
:host([appearance-variant='accent']) [part='end'] {
|
|
17622
|
+
${iconColor.cssCustomProperty}: ${buttonPrimaryFontColor};
|
|
17628
17623
|
}
|
|
17629
17624
|
}
|
|
17630
17625
|
`));
|
|
@@ -20442,60 +20437,22 @@
|
|
|
20442
20437
|
|
|
20443
20438
|
const styles$G = css `
|
|
20444
20439
|
${styles$V}
|
|
20440
|
+
${buttonAppearanceVariantStyles}
|
|
20445
20441
|
|
|
20446
|
-
@layer
|
|
20442
|
+
@layer checked {
|
|
20447
20443
|
.control[aria-pressed='true'] {
|
|
20448
20444
|
background-color: transparent;
|
|
20445
|
+
color: ${buttonLabelFontColor};
|
|
20449
20446
|
background-image: linear-gradient(
|
|
20450
20447
|
${fillSelectedColor},
|
|
20451
20448
|
${fillSelectedColor}
|
|
20452
20449
|
);
|
|
20453
20450
|
border-color: rgba(${fillSelectedRgbPartialColor}, 0.3);
|
|
20454
20451
|
}
|
|
20455
|
-
}
|
|
20456
20452
|
|
|
20457
|
-
|
|
20458
|
-
.control[aria-pressed='true']
|
|
20459
|
-
|
|
20460
|
-
box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
|
|
20461
|
-
background-image: linear-gradient(
|
|
20462
|
-
${fillSelectedColor},
|
|
20463
|
-
${fillSelectedColor}
|
|
20464
|
-
);
|
|
20465
|
-
background-size: calc(100% - 4px) calc(100% - 4px);
|
|
20466
|
-
}
|
|
20467
|
-
}
|
|
20468
|
-
|
|
20469
|
-
@layer focusVisible {
|
|
20470
|
-
.control[aria-pressed='true']${focusVisible} {
|
|
20471
|
-
border-color: ${borderHoverColor};
|
|
20472
|
-
box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
|
|
20473
|
-
background-image: linear-gradient(
|
|
20474
|
-
${fillSelectedColor},
|
|
20475
|
-
${fillSelectedColor}
|
|
20476
|
-
);
|
|
20477
|
-
background-size: calc(100% - 4px) calc(100% - 4px);
|
|
20478
|
-
}
|
|
20479
|
-
|
|
20480
|
-
.control[aria-pressed='true']${focusVisible}::before {
|
|
20481
|
-
outline: ${borderWidth} solid ${borderHoverColor};
|
|
20482
|
-
outline-offset: -3px;
|
|
20483
|
-
color: transparent;
|
|
20484
|
-
}
|
|
20485
|
-
}
|
|
20486
|
-
|
|
20487
|
-
@layer active {
|
|
20488
|
-
.control[aria-pressed='true']:active {
|
|
20489
|
-
box-shadow: none;
|
|
20490
|
-
background-image: linear-gradient(
|
|
20491
|
-
${fillSelectedColor},
|
|
20492
|
-
${fillSelectedColor}
|
|
20493
|
-
);
|
|
20494
|
-
background-size: calc(100% - 2px) calc(100% - 2px);
|
|
20495
|
-
}
|
|
20496
|
-
|
|
20497
|
-
.control[aria-pressed='true']:active::before {
|
|
20498
|
-
outline: none;
|
|
20453
|
+
.control[aria-pressed='true'] [part='start'],
|
|
20454
|
+
.control[aria-pressed='true'] [part='end'] {
|
|
20455
|
+
${iconColor.cssCustomProperty}: ${buttonLabelFontColor};
|
|
20499
20456
|
}
|
|
20500
20457
|
}
|
|
20501
20458
|
|
|
@@ -20507,18 +20464,24 @@
|
|
|
20507
20464
|
);
|
|
20508
20465
|
border-color: rgba(${fillSelectedRgbPartialColor}, 0.3);
|
|
20509
20466
|
}
|
|
20510
|
-
|
|
20511
|
-
:host([disabled]) .control[aria-pressed='true']:hover {
|
|
20512
|
-
background-image: linear-gradient(
|
|
20513
|
-
${fillSelectedColor},
|
|
20514
|
-
${fillSelectedColor}
|
|
20515
|
-
);
|
|
20516
|
-
background-size: 100% 100%;
|
|
20517
|
-
border-color: rgba(${fillSelectedRgbPartialColor}, 0.3);
|
|
20518
|
-
box-shadow: none;
|
|
20519
|
-
}
|
|
20520
20467
|
}
|
|
20521
|
-
|
|
20468
|
+
`.withBehaviors(appearanceBehavior(ButtonAppearance.outline, css `
|
|
20469
|
+
@layer checked {
|
|
20470
|
+
:host([appearance-variant='accent'])
|
|
20471
|
+
.control[aria-pressed='true'] {
|
|
20472
|
+
color: ${buttonAccentOutlineFontColor};
|
|
20473
|
+
}
|
|
20474
|
+
|
|
20475
|
+
:host([appearance-variant='accent'])
|
|
20476
|
+
.control[aria-pressed='true']
|
|
20477
|
+
[part='start'],
|
|
20478
|
+
:host([appearance-variant='accent'])
|
|
20479
|
+
.control[aria-pressed='true']
|
|
20480
|
+
[part='end'] {
|
|
20481
|
+
${iconColor.cssCustomProperty}: ${buttonAccentOutlineFontColor};
|
|
20482
|
+
}
|
|
20483
|
+
}
|
|
20484
|
+
`));
|
|
20522
20485
|
|
|
20523
20486
|
const template$v = (context, definition) => html `
|
|
20524
20487
|
<div
|
|
@@ -20589,6 +20552,9 @@
|
|
|
20589
20552
|
__decorate$1([
|
|
20590
20553
|
attr
|
|
20591
20554
|
], ToggleButton.prototype, "appearance", void 0);
|
|
20555
|
+
__decorate$1([
|
|
20556
|
+
attr({ attribute: 'appearance-variant' })
|
|
20557
|
+
], ToggleButton.prototype, "appearanceVariant", void 0);
|
|
20592
20558
|
__decorate$1([
|
|
20593
20559
|
attr({ attribute: 'content-hidden', mode: 'boolean' })
|
|
20594
20560
|
], ToggleButton.prototype, "contentHidden", void 0);
|
|
@@ -24706,6 +24672,19 @@
|
|
|
24706
24672
|
});
|
|
24707
24673
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
|
|
24708
24674
|
|
|
24675
|
+
/**
|
|
24676
|
+
* Types of menu button appearance.
|
|
24677
|
+
* @public
|
|
24678
|
+
*/
|
|
24679
|
+
/**
|
|
24680
|
+
* The options of where to position the menu relative to the menu button.
|
|
24681
|
+
*/
|
|
24682
|
+
const MenuButtonPosition = {
|
|
24683
|
+
above: 'above',
|
|
24684
|
+
below: 'below',
|
|
24685
|
+
auto: 'auto'
|
|
24686
|
+
};
|
|
24687
|
+
|
|
24709
24688
|
const styles$y = css `
|
|
24710
24689
|
${display('inline-block')}
|
|
24711
24690
|
|
|
@@ -24733,6 +24712,7 @@
|
|
|
24733
24712
|
<${toggleButtonTag}
|
|
24734
24713
|
part="button"
|
|
24735
24714
|
appearance="${x => x.appearance}"
|
|
24715
|
+
appearance-variant="${x => x.appearanceVariant}"
|
|
24736
24716
|
?content-hidden="${x => x.contentHidden}"
|
|
24737
24717
|
?checked="${x => x.open}"
|
|
24738
24718
|
?disabled="${x => x.disabled}"
|
|
@@ -24768,19 +24748,6 @@
|
|
|
24768
24748
|
</template>
|
|
24769
24749
|
`;
|
|
24770
24750
|
|
|
24771
|
-
/**
|
|
24772
|
-
* Types of menu button appearance.
|
|
24773
|
-
* @public
|
|
24774
|
-
*/
|
|
24775
|
-
/**
|
|
24776
|
-
* The options of where to position the menu relative to the menu button.
|
|
24777
|
-
*/
|
|
24778
|
-
const MenuButtonPosition = {
|
|
24779
|
-
above: 'above',
|
|
24780
|
-
below: 'below',
|
|
24781
|
-
auto: 'auto'
|
|
24782
|
-
};
|
|
24783
|
-
|
|
24784
24751
|
/**
|
|
24785
24752
|
* A nimble-styled menu button control.
|
|
24786
24753
|
*/
|
|
@@ -24957,6 +24924,9 @@
|
|
|
24957
24924
|
__decorate$1([
|
|
24958
24925
|
attr
|
|
24959
24926
|
], MenuButton.prototype, "appearance", void 0);
|
|
24927
|
+
__decorate$1([
|
|
24928
|
+
attr({ attribute: 'appearance-variant' })
|
|
24929
|
+
], MenuButton.prototype, "appearanceVariant", void 0);
|
|
24960
24930
|
__decorate$1([
|
|
24961
24931
|
attr({ mode: 'boolean' })
|
|
24962
24932
|
], MenuButton.prototype, "disabled", void 0);
|