@@ -3,6 +3,108 @@ import { IconButton } from './icon-button';
3
3
import styles from './icon-button.style' ;
4
4
import { baseButtonStyles } from '../base-button' ;
5
5
6
+ /**
7
+ * ### Example
8
+ *
9
+ * ##### Simple
10
+ *
11
+ * ```html
12
+ * <tap-icon-button size="medium">
13
+ * <tap-icon name="check"></tap-icon>
14
+ * </tap-icon-button>
15
+ * ```
16
+ *
17
+ * ##### Disabled IconButton
18
+ *
19
+ * ```html
20
+ * <tap-icon-button disabled>
21
+ * <tap-icon name="check"></tap-icon>
22
+ * </tap-icon-button>
23
+ * ```
24
+ *
25
+ * ##### Variants
26
+ *
27
+ * ```html
28
+ * <tap-icon-button variant="primary">
29
+ * <tap-icon name="check"></tap-icon>
30
+ * </tap-icon-button>
31
+ * <tap-icon-button variant="ghost">
32
+ * <tap-icon name="check"></tap-icon>
33
+ * </tap-icon-button>
34
+ * <tap-icon-button variant="naked">
35
+ * <tap-icon name="check"></tap-icon>
36
+ * </tap-icon-button>
37
+ * <tap-icon-button variant="elevated">
38
+ * <tap-icon name="check"></tap-icon>
39
+ * </tap-icon-button>
40
+ * <tap-icon-button variant="destructive">
41
+ * <tap-icon name="check"></tap-icon>
42
+ * </tap-icon-button>
43
+ * <tap-icon-button variant="brand">
44
+ * <tap-icon name="check"></tap-icon>
45
+ * </tap-icon-button>
46
+ * ```
47
+ *
48
+ * ##### Sizes
49
+ *
50
+ * ```html
51
+ * <tap-icon-button size="small">
52
+ * <tap-icon name="check"></tap-icon>
53
+ * </tap-icon-button>
54
+ * <tap-icon-button size="medium">
55
+ * <tap-icon name="check"></tap-icon>
56
+ * </tap-icon-button>
57
+ * <tap-icon-button size="large">
58
+ * <tap-icon name="check"></tap-icon>
59
+ * </tap-icon-button>
60
+ * ```
61
+ *
62
+ * @summary A customizable icon button component with various styles and states.
63
+ *
64
+ * @prop {`boolean` } [`disabled`=`false`] - Whether the icon button is disabled.
65
+ * @prop {`'small'` \| `'medium'` \| `'large'` } [`size`=`'medium'`] - The size of the icon button.
66
+ * @prop {`'primary'` \| `'ghost'` \| `'naked'` \| `'elevated'` \| `'destructive'` \| `'brand'` } [`variant`=`'primary'`] - The variant style of the icon button.
67
+ *
68
+ * @csspart button - The button element.
69
+ *
70
+ * @cssprop [`--tap-font-family`=`--tap-sys-font-family`] - The font family for the button.
71
+ * @cssprop [`--tap-sys-radius-full`] - The border radius for the button.
72
+ * @cssprop [`--tap-button-color-surface-cover`=`--tap-sys-color-surface-overlay-light`] - The surface cover color for the button.
73
+ * @cssprop [`--tap-sys-color-surface-overlay-light`] - The overlay light color for the button.
74
+ * @cssprop [`--tap-sys-color-surface-disabled`] - The disabled surface color for the button.
75
+ * @cssprop [`--tap-button-color-surface-disabled`=`--tap-sys-color-surface-disabled`] - The disabled surface color for the button.
76
+ * @cssprop [`--tap-sys-spacing-9`] - The spacing for the small button height.
77
+ * @cssprop [`--tap-sys-spacing-10`] - The spacing for the medium button height.
78
+ * @cssprop [`--tap-sys-spacing-11`] - The spacing for the large button height.
79
+ * @cssprop [`--tap-sys-spacing-5`] - The spacing for the small button padding.
80
+ * @cssprop [`--tap-sys-spacing-6`] - The spacing for the medium button padding.
81
+ * @cssprop [`--tap-sys-spacing-8`] - The spacing for the large button padding.
82
+ * @cssprop [`--tap-button-typography-label-sm-height`=`--tap-sys-typography-label-sm-height`] - The line height for the small button label.
83
+ * @cssprop [`--tap-button-typography-label-sm-size`=`--tap-sys-typography-label-sm-size`] - The font size for the small button label.
84
+ * @cssprop [`--tap-button-typography-label-sm-weight`=`--tap-sys-typography-label-sm-weight`] - The font weight for the small button label.
85
+ * @cssprop [`--tap-button-typography-label-md-height`=`--tap-sys-typography-label-sm-height`] - The line height for the medium button label.
86
+ * @cssprop [`--tap-button-typography-label-md-size`=`--tap-sys-typography-label-sm-size`] - The font size for the medium button label.
87
+ * @cssprop [`--tap-button-typography-label-md-weight`=`--tap-sys-typography-label-sm-weight`] - The font weight for the medium button label.
88
+ * @cssprop [`--tap-button-typography-label-lg-height`=`--tap-sys-typography-label-lg-height`] - The line height for the large button label.
89
+ * @cssprop [`--tap-button-typography-label-lg-size`=`--tap-sys-typography-label-lg-size`] - The font size for the large button label.
90
+ * @cssprop [`--tap-button-typography-label-lg-weight`=`--tap-sys-typography-label-lg-weight`] - The font weight for the large button label.
91
+ * @cssprop [`--tap-button-color-surface-inverse-primary`=`--tap-sys-color-surface-inverse-primary`] - The surface color for the primary variant.
92
+ * @cssprop [`--tap-sys-color-surface-inverse-primary`] - The surface color for the primary variant.
93
+ * @cssprop [`--tap-button-color-content-on-inverse`=`--tap-sys-color-content-on-inverse`] - The content color on inverse surface.
94
+ * @cssprop [`--tap-sys-color-content-on-inverse`] - The content color on inverse surface.
95
+ * @cssprop [`--tap-button-color-surface-tertiary`=`--tap-sys-color-surface-tertiary`] - The surface color for the ghost variant.
96
+ * @cssprop [`--tap-sys-color-surface-tertiary`] - The surface color for the ghost variant.
97
+ * @cssprop [`--tap-button-color-content-primary`=`--tap-sys-color-content-primary`] - The content color for the primary variant.
98
+ * @cssprop [`--tap-sys-color-content-primary`] - The content color for the primary variant.
99
+ * @cssprop [`--tap-button-color-surface-primary`=`--tap-sys-color-surface-primary`] - The surface color for the elevated variant.
100
+ * @cssprop [`--tap-sys-color-surface-primary`] - The surface color for the elevated variant.
101
+ * @cssprop [`--tap-button-color-surface-destructive`=`--tap-sys-color-surface-negative-light`] - The surface color for the destructive variant.
102
+ * @cssprop [`--tap-sys-color-surface-negative-light`] - The surface color for the destructive variant.
103
+ * @cssprop [`--tap-button-color-content-destructive`=`--tap-sys-color-content-negative`] - The content color for the destructive variant.
104
+ * @cssprop [`--tap-sys-color-content-negative`] - The content color for the destructive variant.
105
+ * @cssprop [`--tap-button-color-gradient-brand`=`--tap-sys-color-gradient-brand`] - The gradient color for the brand variant.
106
+ * @cssprop [`--tap-sys-color-gradient-brand`] - The gradient color for the brand variant.
107
+ */
6
108
@customElement ( 'tap-icon-button' )
7
109
export class TapIconButton extends IconButton {
8
110
static readonly styles = [ baseButtonStyles , styles ] ;
0 commit comments