-
Couldn't load subscription status.
- Fork 235
1042-form-field-mixin #5809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
1042-form-field-mixin #5809
Changes from 38 commits
12f2fc9
b6ea53b
6117e6b
d5448f1
cf1c9d7
743d553
c386f09
e812721
5be1715
56954ed
b5bdd62
d6dde5b
e0e85c5
3c226f8
183218c
c408b4e
84c67c3
8822ec1
4868c82
9cdc838
d36080d
c304d57
da60cf4
c40127f
9717285
0ffa462
4ac3c92
dd22117
4263db4
58fab11
6a22c11
93289a4
f0b3a39
462f5bb
8d7b1ad
3934124
56e2e38
c124b0c
c7561a8
287fe7b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@spectrum-web-components/menu': minor | ||
| --- | ||
|
|
||
| **Fixed** MenuItem focus stealing from input elements on mouseover by enhanceing MenuItem's `handleMouseover` method to detect when an input element currently has focus and prevent stealing focus in those cases. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,7 @@ The color field consists of several key parts: | |
| - **Size variations**: Different size options to match your design requirements | ||
|
|
||
| ```html | ||
| <sp-color-field value="#ffff00"></sp-color-field> | ||
| <sp-color-field value="#ffff00">Background color</sp-color-field> | ||
| ``` | ||
|
|
||
| ### Options | ||
|
|
@@ -45,15 +45,23 @@ The color field consists of several key parts: | |
| <sp-tab-panel value="s"> | ||
|
|
||
| ```html | ||
| <sp-color-field size="s" value="#ffff00"></sp-color-field> | ||
| <sp-color-field | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Label can be an attribute. |
||
| size="s" | ||
| value="#ffff00" | ||
| label="Background color" | ||
| ></sp-color-field> | ||
| ``` | ||
|
|
||
| </sp-tab-panel> | ||
| <sp-tab value="m">Medium</sp-tab> | ||
| <sp-tab-panel value="m"> | ||
|
|
||
| ```html | ||
| <sp-color-field size="m" value="#ffff00"></sp-color-field> | ||
| <sp-color-field | ||
| size="m" | ||
| value="#ffff00" | ||
| label="Background color" | ||
| ></sp-color-field> | ||
| ``` | ||
|
|
||
| </sp-tab-panel> | ||
|
|
@@ -62,7 +70,11 @@ The color field consists of several key parts: | |
| <sp-tab-panel value="l"> | ||
|
|
||
| ```html | ||
| <sp-color-field size="l" value="#ffff00"></sp-color-field> | ||
| <sp-color-field | ||
| size="l" | ||
| value="#ffff00" | ||
| label="Background color" | ||
| ></sp-color-field> | ||
| ``` | ||
|
|
||
| </sp-tab-panel> | ||
|
|
@@ -71,7 +83,11 @@ The color field consists of several key parts: | |
| <sp-tab-panel value="xl"> | ||
|
|
||
| ```html | ||
| <sp-color-field size="xl" value="#ffff00"></sp-color-field> | ||
| <sp-color-field | ||
| size="xl" | ||
| value="#ffff00" | ||
| label="Background color" | ||
| ></sp-color-field> | ||
| ``` | ||
|
|
||
| </sp-tab-panel> | ||
|
|
@@ -82,15 +98,15 @@ The color field consists of several key parts: | |
| When `view-color` is true, the color handle will be rendered. This is useful for development and debugging purposes. | ||
|
|
||
| ```html | ||
| <sp-color-field view-color value="#f00"></sp-color-field> | ||
| <sp-color-field view-color value="#f00">Icon color</sp-color-field> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or label can be slotted. |
||
| ``` | ||
|
|
||
| #### Quiet | ||
|
|
||
| A quiet color field provides a more subtle appearance: | ||
|
|
||
| ```html | ||
| <sp-color-field quiet value="#e6e600"></sp-color-field> | ||
| <sp-color-field quiet value="#e6e600">Icon color</sp-color-field> | ||
| ``` | ||
|
|
||
| ### States | ||
|
|
@@ -100,23 +116,23 @@ A quiet color field provides a more subtle appearance: | |
| The default state of the color field, ready for user input: | ||
|
|
||
| ```html | ||
| <sp-color-field value="#ffff00"></sp-color-field> | ||
| <sp-color-field value="#ffff00">Icon color</sp-color-field> | ||
| ``` | ||
|
|
||
| #### Read Only | ||
|
|
||
| A readonly color field that displays the color value but prevents user modification: | ||
|
|
||
| ```html | ||
| <sp-color-field readonly value="#ffff00"></sp-color-field> | ||
| <sp-color-field readonly value="#ffff00">Icon color</sp-color-field> | ||
| ``` | ||
|
|
||
| #### Invalid Input | ||
|
|
||
| If the input value is not a valid color, `<sp-color-field>` will not accept it and may show validation feedback: | ||
|
|
||
| ```html | ||
| <sp-color-field value="not a color"></sp-color-field> | ||
| <sp-color-field value="not a color">Icon color</sp-color-field> | ||
| ``` | ||
|
|
||
| ### Behaviors | ||
|
|
@@ -134,7 +150,7 @@ For a complete list of supported color formats, see the [ColorController documen | |
| A hexadecimal color is specified with: `#RRGGBB`. `RR` (red), `GG` (green) and `BB` (blue) are hexadecimal integers between `00` and `FF` specifying the intensity of the color. | ||
|
|
||
| ```html | ||
| <sp-color-field view-color value="#ff0000"></sp-color-field> | ||
| <sp-color-field view-color value="#ff0000" label="Text color"></sp-color-field> | ||
| ``` | ||
|
|
||
| </sp-tab-panel> | ||
|
|
@@ -144,7 +160,7 @@ A hexadecimal color is specified with: `#RRGGBB`. `RR` (red), `GG` (green) and ` | |
| Shorthand hexadecimal color values are also supported. `#RGB` is a shorthand for `#RRGGBB`. In the shorthand form, `R` (red), `G` (green), and `B` (blue) are hexadecimal characters between `0` and `F`. Each character is repeated to create the full 6-digit color code. For example, `#123` would expand to `#112233`. | ||
|
|
||
| ```html | ||
| <sp-color-field view-color value="#f00"></sp-color-field> | ||
| <sp-color-field view-color value="#f00" label="Text color"></sp-color-field> | ||
| ``` | ||
|
|
||
| </sp-tab-panel> | ||
|
|
@@ -154,7 +170,11 @@ Shorthand hexadecimal color values are also supported. `#RGB` is a shorthand for | |
| An RGB color value is specified with: rgb(red, green, blue). Each parameter defines the intensity of the color with a value between 0 and 255. | ||
|
|
||
| ```html | ||
| <sp-color-field view-color value="rgb(255,0,0)"></sp-color-field> | ||
| <sp-color-field | ||
| view-color | ||
| value="rgb(255,0,0)" | ||
| label="Text color" | ||
| ></sp-color-field> | ||
| ``` | ||
|
|
||
| </sp-tab-panel> | ||
|
|
@@ -164,7 +184,11 @@ An RGB color value is specified with: rgb(red, green, blue). Each parameter defi | |
| An RGBA color value is specified with: `rgba(red, green, blue, alpha)`. The `alpha` parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). | ||
|
|
||
| ```html | ||
| <sp-color-field view-color value="rgba(0,255,0,0.3)"></sp-color-field> | ||
| <sp-color-field | ||
| view-color | ||
| value="rgba(0,255,0,0.3)" | ||
| label="Text color" | ||
| ></sp-color-field> | ||
| ``` | ||
|
|
||
| </sp-tab-panel> | ||
|
|
@@ -174,7 +198,11 @@ An RGBA color value is specified with: `rgba(red, green, blue, alpha)`. The `alp | |
| An HSL color value is specified with: hsl(hue, saturation, lightness). Hue is a degree on the color wheel from 0 to 360. 0 is red, 120 is green, and 240 is blue. Saturation and lightness are percentages. | ||
|
|
||
| ```html | ||
| <sp-color-field view-color value="hsl(234, 70%, 50%)"></sp-color-field> | ||
| <sp-color-field | ||
| view-color | ||
| value="hsl(234, 70%, 50%)" | ||
| label="Text color" | ||
| ></sp-color-field> | ||
| ``` | ||
|
|
||
| </sp-tab-panel> | ||
|
|
@@ -184,7 +212,11 @@ An HSL color value is specified with: hsl(hue, saturation, lightness). Hue is a | |
| An HSV color value is specified with: hsv(hue, saturation, value). Hue is a degree on the color wheel from 0 to 360. 0 is red, 120 is green, and 240 is blue. Saturation and value are percentages. | ||
|
|
||
| ```html | ||
| <sp-color-field view-color value="hsv(0, 70%, 50%)"></sp-color-field> | ||
| <sp-color-field | ||
| view-color | ||
| value="hsv(0, 70%, 50%)" | ||
| label="Text color" | ||
| ></sp-color-field> | ||
| ``` | ||
|
|
||
| </sp-tab-panel> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,6 +66,7 @@ | |
| "dependencies": { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
reviewdog suggestion errorGitHub comment range and suggestion line range must be same. L66-L66 v.s. L53-L80 |
||
| "@spectrum-web-components/action-button": "1.9.0", | ||
| "@spectrum-web-components/base": "1.9.0", | ||
| "@spectrum-web-components/field-label": "1.9.0", | ||
| "@spectrum-web-components/icon": "1.9.0", | ||
| "@spectrum-web-components/icons-ui": "1.9.0", | ||
| "@spectrum-web-components/menu": "1.9.0", | ||
|
|
@@ -74,6 +75,7 @@ | |
| "@spectrum-web-components/popover": "1.9.0", | ||
| "@spectrum-web-components/progress-circle": "1.9.0", | ||
| "@spectrum-web-components/reactive-controllers": "1.9.0", | ||
| "@spectrum-web-components/shared": "1.9.0", | ||
| "@spectrum-web-components/textfield": "1.9.0" | ||
| }, | ||
| "types": "./src/index.d.ts", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
reviewdog suggestion errorGitHub comment range and suggestion line range must be same. L81-L81 v.s. L53-L81 |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Color field uses
TextfieldBasewhich now includes the mixin for a slotted label