@tangible/ui 0.2.42 → 0.2.43
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/components/IconButton/IconButton.js +5 -2
- package/components/IconButton/IconButtonCore.js +16 -4
- package/components/IconButton/badge.d.ts +20 -0
- package/components/IconButton/badge.js +22 -0
- package/components/IconButton/types.d.ts +54 -2
- package/components/IconButton/types.js +2 -0
- package/figma-tokens.json +1 -1
- package/icons/icons.svg +1 -1
- package/icons/sprite-version.js +1 -1
- package/icons/sprite.php +1 -1
- package/package.json +1 -1
- package/skills/building-with-tui/SKILL.md +18 -0
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +49 -4
- package/styles/all.expanded.unlayered.css +49 -4
- package/styles/all.unlayered.css +1 -1
- package/styles/components/icon-button.scss +76 -4
- package/tui-manifest.json +25 -5
- package/vanilla/styles.css +1 -1
- package/vanilla/styles.unlayered.css +1 -1
package/styles/all.expanded.css
CHANGED
|
@@ -257,6 +257,9 @@
|
|
|
257
257
|
--tui-icon-button-fg-interact
|
|
258
258
|
--tui-icon-button-bg-pressed
|
|
259
259
|
--tui-icon-button-fg-pressed
|
|
260
|
+
--tui-icon-button-badge-bg
|
|
261
|
+
--tui-icon-button-badge-fg
|
|
262
|
+
--tui-icon-button-badge-ring
|
|
260
263
|
*/
|
|
261
264
|
/* @tui-tokens
|
|
262
265
|
--tui-icon-tile-size
|
|
@@ -5770,6 +5773,41 @@
|
|
|
5770
5773
|
.tui-interface .tui-icon-button[aria-busy=true] .tui-icon {
|
|
5771
5774
|
visibility: hidden;
|
|
5772
5775
|
}
|
|
5776
|
+
.tui-interface .tui-icon-button__badge {
|
|
5777
|
+
--_badge-bg: var(--tui-icon-button-badge-bg, var(--tui-theme-primary-base));
|
|
5778
|
+
--_badge-fg: var(--tui-icon-button-badge-fg, var(--tui-theme-primary-on-base));
|
|
5779
|
+
--_badge-ring: var(--tui-icon-button-badge-ring, var(--tui-color-bg));
|
|
5780
|
+
--_badge-h: 1rem;
|
|
5781
|
+
--_icon-inset: calc(var(--_size) * 0.125);
|
|
5782
|
+
position: absolute;
|
|
5783
|
+
z-index: 1;
|
|
5784
|
+
inset-block-start: calc(var(--_icon-inset) - var(--_badge-h) / 3);
|
|
5785
|
+
inset-inline-start: calc(50% + var(--_size) * 0.075);
|
|
5786
|
+
box-sizing: border-box;
|
|
5787
|
+
min-inline-size: var(--_badge-h);
|
|
5788
|
+
block-size: var(--_badge-h);
|
|
5789
|
+
padding-inline: var(--tui-spacing-xxs);
|
|
5790
|
+
display: inline-flex;
|
|
5791
|
+
align-items: center;
|
|
5792
|
+
justify-content: center;
|
|
5793
|
+
border-radius: var(--tui-radius-full);
|
|
5794
|
+
background-color: var(--_badge-bg);
|
|
5795
|
+
color: var(--_badge-fg);
|
|
5796
|
+
box-shadow: 0 0 0 2px var(--_badge-ring);
|
|
5797
|
+
font-size: calc(11 * var(--tui-typography-size-multiplier, 0.0625rem));
|
|
5798
|
+
font-weight: var(--tui-typography-weight-semibold, 600);
|
|
5799
|
+
font-variant-numeric: tabular-nums;
|
|
5800
|
+
line-height: 1;
|
|
5801
|
+
white-space: nowrap;
|
|
5802
|
+
}
|
|
5803
|
+
.tui-interface .tui-icon-button__badge.is-dot {
|
|
5804
|
+
--_badge-h: 0.5rem;
|
|
5805
|
+
padding: 0;
|
|
5806
|
+
}
|
|
5807
|
+
.tui-interface .tui-icon-button.is-size-xs .tui-icon-button__badge:not(.is-dot) {
|
|
5808
|
+
--_badge-h: 0.875rem;
|
|
5809
|
+
font-size: calc(10 * var(--tui-typography-size-multiplier, 0.0625rem));
|
|
5810
|
+
}
|
|
5773
5811
|
.tui-interface .tui-icon-button__spinner {
|
|
5774
5812
|
position: absolute;
|
|
5775
5813
|
width: 1em;
|
|
@@ -5786,21 +5824,28 @@
|
|
|
5786
5824
|
}
|
|
5787
5825
|
}
|
|
5788
5826
|
@media (forced-colors: active) {
|
|
5789
|
-
.tui-icon-button {
|
|
5827
|
+
.tui-interface .tui-icon-button {
|
|
5790
5828
|
forced-color-adjust: none;
|
|
5791
5829
|
background-color: Canvas;
|
|
5792
5830
|
color: CanvasText;
|
|
5793
5831
|
border-color: CanvasText;
|
|
5794
5832
|
}
|
|
5795
|
-
.tui-icon-button:is(:hover, :active) {
|
|
5833
|
+
.tui-interface .tui-icon-button:is(:hover, :active) {
|
|
5796
5834
|
background-color: Highlight;
|
|
5797
5835
|
color: Canvas;
|
|
5798
5836
|
}
|
|
5799
|
-
.tui-icon-
|
|
5837
|
+
.tui-interface .tui-icon-button__badge {
|
|
5838
|
+
forced-color-adjust: none;
|
|
5839
|
+
background-color: CanvasText;
|
|
5840
|
+
color: Canvas;
|
|
5841
|
+
box-shadow: none;
|
|
5842
|
+
outline: 2px solid Canvas;
|
|
5843
|
+
}
|
|
5844
|
+
.tui-interface .tui-icon-button:focus-visible {
|
|
5800
5845
|
outline: 2px solid Highlight;
|
|
5801
5846
|
outline-offset: 2px;
|
|
5802
5847
|
}
|
|
5803
|
-
.tui-icon-button:is(:disabled, [aria-disabled=true]) {
|
|
5848
|
+
.tui-interface .tui-icon-button:is(:disabled, [aria-disabled=true]) {
|
|
5804
5849
|
color: GrayText;
|
|
5805
5850
|
border-color: GrayText;
|
|
5806
5851
|
background-color: Canvas;
|
|
@@ -257,6 +257,9 @@
|
|
|
257
257
|
--tui-icon-button-fg-interact
|
|
258
258
|
--tui-icon-button-bg-pressed
|
|
259
259
|
--tui-icon-button-fg-pressed
|
|
260
|
+
--tui-icon-button-badge-bg
|
|
261
|
+
--tui-icon-button-badge-fg
|
|
262
|
+
--tui-icon-button-badge-ring
|
|
260
263
|
*/
|
|
261
264
|
/* @tui-tokens
|
|
262
265
|
--tui-icon-tile-size
|
|
@@ -5770,6 +5773,41 @@
|
|
|
5770
5773
|
.tui-interface .tui-icon-button[aria-busy=true] .tui-icon {
|
|
5771
5774
|
visibility: hidden;
|
|
5772
5775
|
}
|
|
5776
|
+
.tui-interface .tui-icon-button__badge {
|
|
5777
|
+
--_badge-bg: var(--tui-icon-button-badge-bg, var(--tui-theme-primary-base));
|
|
5778
|
+
--_badge-fg: var(--tui-icon-button-badge-fg, var(--tui-theme-primary-on-base));
|
|
5779
|
+
--_badge-ring: var(--tui-icon-button-badge-ring, var(--tui-color-bg));
|
|
5780
|
+
--_badge-h: 1rem;
|
|
5781
|
+
--_icon-inset: calc(var(--_size) * 0.125);
|
|
5782
|
+
position: absolute;
|
|
5783
|
+
z-index: 1;
|
|
5784
|
+
inset-block-start: calc(var(--_icon-inset) - var(--_badge-h) / 3);
|
|
5785
|
+
inset-inline-start: calc(50% + var(--_size) * 0.075);
|
|
5786
|
+
box-sizing: border-box;
|
|
5787
|
+
min-inline-size: var(--_badge-h);
|
|
5788
|
+
block-size: var(--_badge-h);
|
|
5789
|
+
padding-inline: var(--tui-spacing-xxs);
|
|
5790
|
+
display: inline-flex;
|
|
5791
|
+
align-items: center;
|
|
5792
|
+
justify-content: center;
|
|
5793
|
+
border-radius: var(--tui-radius-full);
|
|
5794
|
+
background-color: var(--_badge-bg);
|
|
5795
|
+
color: var(--_badge-fg);
|
|
5796
|
+
box-shadow: 0 0 0 2px var(--_badge-ring);
|
|
5797
|
+
font-size: calc(11 * var(--tui-typography-size-multiplier, 0.0625rem));
|
|
5798
|
+
font-weight: var(--tui-typography-weight-semibold, 600);
|
|
5799
|
+
font-variant-numeric: tabular-nums;
|
|
5800
|
+
line-height: 1;
|
|
5801
|
+
white-space: nowrap;
|
|
5802
|
+
}
|
|
5803
|
+
.tui-interface .tui-icon-button__badge.is-dot {
|
|
5804
|
+
--_badge-h: 0.5rem;
|
|
5805
|
+
padding: 0;
|
|
5806
|
+
}
|
|
5807
|
+
.tui-interface .tui-icon-button.is-size-xs .tui-icon-button__badge:not(.is-dot) {
|
|
5808
|
+
--_badge-h: 0.875rem;
|
|
5809
|
+
font-size: calc(10 * var(--tui-typography-size-multiplier, 0.0625rem));
|
|
5810
|
+
}
|
|
5773
5811
|
.tui-interface .tui-icon-button__spinner {
|
|
5774
5812
|
position: absolute;
|
|
5775
5813
|
width: 1em;
|
|
@@ -5786,21 +5824,28 @@
|
|
|
5786
5824
|
}
|
|
5787
5825
|
}
|
|
5788
5826
|
@media (forced-colors: active) {
|
|
5789
|
-
.tui-icon-button {
|
|
5827
|
+
.tui-interface .tui-icon-button {
|
|
5790
5828
|
forced-color-adjust: none;
|
|
5791
5829
|
background-color: Canvas;
|
|
5792
5830
|
color: CanvasText;
|
|
5793
5831
|
border-color: CanvasText;
|
|
5794
5832
|
}
|
|
5795
|
-
.tui-icon-button:is(:hover, :active) {
|
|
5833
|
+
.tui-interface .tui-icon-button:is(:hover, :active) {
|
|
5796
5834
|
background-color: Highlight;
|
|
5797
5835
|
color: Canvas;
|
|
5798
5836
|
}
|
|
5799
|
-
.tui-icon-
|
|
5837
|
+
.tui-interface .tui-icon-button__badge {
|
|
5838
|
+
forced-color-adjust: none;
|
|
5839
|
+
background-color: CanvasText;
|
|
5840
|
+
color: Canvas;
|
|
5841
|
+
box-shadow: none;
|
|
5842
|
+
outline: 2px solid Canvas;
|
|
5843
|
+
}
|
|
5844
|
+
.tui-interface .tui-icon-button:focus-visible {
|
|
5800
5845
|
outline: 2px solid Highlight;
|
|
5801
5846
|
outline-offset: 2px;
|
|
5802
5847
|
}
|
|
5803
|
-
.tui-icon-button:is(:disabled, [aria-disabled=true]) {
|
|
5848
|
+
.tui-interface .tui-icon-button:is(:disabled, [aria-disabled=true]) {
|
|
5804
5849
|
color: GrayText;
|
|
5805
5850
|
border-color: GrayText;
|
|
5806
5851
|
background-color: Canvas;
|