From b15502a01e0d231912f1f481b4d59298cbf9cbfe Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Thu, 22 May 2025 14:33:24 -0400 Subject: [PATCH] Use `with-` and `without-` consistently (#977) * use with- and without- consistently * fix test * cleanup * remove console --- docs/_includes/search.njk | 2 +- docs/_layouts/overview.njk | 2 +- docs/_layouts/palette.njk | 2 +- docs/_layouts/theme.njk | 6 ++--- docs/docs/components/cheatsheet/index.njk | 2 +- docs/docs/components/color-picker.md | 2 +- docs/docs/components/input.md | 4 +-- docs/docs/components/qr-code.md | 2 +- docs/docs/components/select.md | 26 +++++++++---------- docs/docs/components/tag.md | 8 +++--- docs/docs/experimental/themer.md | 2 +- docs/docs/form-controls.md | 2 +- docs/docs/resources/changelog.md | 8 ++++++ src/components/color-picker/color-picker.ts | 4 +-- .../format-number/format-number.test.ts | 6 ++--- src/components/format-number/format-number.ts | 4 +-- src/components/input/input.css | 2 +- src/components/input/input.test.ts | 4 +-- src/components/input/input.ts | 6 ++--- src/components/select/select.test.ts | 2 +- src/components/select/select.ts | 6 ++--- src/components/tab-group/tab-group.test.ts | 2 +- src/components/tab-group/tab-group.ts | 6 ++--- src/components/tag/tag.test.ts | 6 ++--- src/components/tag/tag.ts | 4 +-- 25 files changed, 64 insertions(+), 56 deletions(-) diff --git a/docs/_includes/search.njk b/docs/_includes/search.njk index 8448870af..c372a5bf2 100644 --- a/docs/_includes/search.njk +++ b/docs/_includes/search.njk @@ -8,7 +8,7 @@ type="search" appearance="filled" size="large" - clearable + with-clear placeholder="Search" autofocus autocomplete="off" diff --git a/docs/_layouts/overview.njk b/docs/_layouts/overview.njk index 48645d379..f0e201092 100644 --- a/docs/_layouts/overview.njk +++ b/docs/_layouts/overview.njk @@ -7,7 +7,7 @@ layout: page-outline {% endif %}
- +
diff --git a/docs/_layouts/palette.njk b/docs/_layouts/palette.njk index 08b7fffe4..06e9b4a9c 100644 --- a/docs/_layouts/palette.njk +++ b/docs/_layouts/palette.njk @@ -68,7 +68,7 @@ This palette has been tweaked.
- +
diff --git a/docs/_layouts/theme.njk b/docs/_layouts/theme.njk index 5efda7907..5ac6bad97 100644 --- a/docs/_layouts/theme.njk +++ b/docs/_layouts/theme.njk @@ -28,7 +28,7 @@ if (location.pathname.endsWith('/custom/') && !location.search) { Customize this theme by changing its colors and/or remixing it with design elements from other themes! - + @@ -42,7 +42,7 @@ if (location.pathname.endsWith('/custom/') && !location.search) { - + - + diff --git a/docs/docs/components/cheatsheet/index.njk b/docs/docs/components/cheatsheet/index.njk index f86dd5ddd..e7dde94c1 100644 --- a/docs/docs/components/cheatsheet/index.njk +++ b/docs/docs/components/cheatsheet/index.njk @@ -17,7 +17,7 @@ table code {
Filter by name - + Case sensitive Regular expression
diff --git a/docs/docs/components/color-picker.md b/docs/docs/components/color-picker.md index 2bce6504d..bc6ac7699 100644 --- a/docs/docs/components/color-picker.md +++ b/docs/docs/components/color-picker.md @@ -36,7 +36,7 @@ Use the `opacity` attribute to enable the opacity slider. When this is enabled, Set the color picker's format with the `format` attribute. Valid options include `hex`, `rgb`, `hsl`, and `hsv`. Note that the color picker's input will accept any parsable format (including CSS color names) regardless of this option. -To prevent users from toggling the format themselves, add the `no-format-toggle` attribute. +To prevent users from toggling the format themselves, add the `without-format-toggle` attribute. ```html {.example} diff --git a/docs/docs/components/select.md b/docs/docs/components/select.md index 0f7b0a560..8c785ba71 100644 --- a/docs/docs/components/select.md +++ b/docs/docs/components/select.md @@ -61,10 +61,10 @@ Use the `placeholder` attribute to add a placeholder. ### Clearable -Use the `clearable` attribute to make the control clearable. The clear button only appears when an option is selected. +Use the `with-clear` attribute to make the control clearable. The clear button only appears when an option is selected. ```html {.example} - + Option 1 Option 2 Option 3 @@ -109,10 +109,10 @@ Use the `disabled` attribute to disable a select. ### Multiple -To allow multiple options to be selected, use the `multiple` attribute. It's a good practice to use `clearable` when this option is enabled. To set multiple values at once, set `value` to a space-delimited list of values. +To allow multiple options to be selected, use the `multiple` attribute. It's a good practice to use `with-clear` when this option is enabled. To set multiple values at once, set `value` to a space-delimited list of values. ```html {.example} - + Option 1 Option 2 Option 3 @@ -142,7 +142,7 @@ Use the `value` attribute to set the initial selection. When using `multiple`, the `value` _attribute_ uses space-delimited values to select more than one option. Because of this, `` values cannot contain spaces. If you're accessing the `value` _property_ through Javascript, it will be an array. ```html {.example} - + Option 1 Option 2 Option 3 @@ -213,21 +213,21 @@ The preferred placement of the select's listbox can be set with the `placement` Use the `prefix` slot to prepend an icon to the control. ```html {.example} - + Option 1 Option 2 Option 3
- + Option 1 Option 2 Option 3
- + Option 1 Option 2 @@ -240,21 +240,21 @@ Use the `prefix` slot to prepend an icon to the control. Use the `suffix` slot to append an icon to the control. ```html {.example} - + Option 1 Option 2 Option 3
- + Option 1 Option 2 Option 3
- + Option 1 Option 2 @@ -273,7 +273,7 @@ Remember that custom tags are rendered in a shadow root. To style them, you can placeholder="Select one" value="email phone" multiple - clearable + with-clear class="custom-tag" > @@ -301,7 +301,7 @@ Remember that custom tags are rendered in a shadow root. To style them, you can // You can return a string, a Lit Template, or an HTMLElement here return ` - + ${option.label} diff --git a/docs/docs/components/tag.md b/docs/docs/components/tag.md index b1d8919e0..8b54747fb 100644 --- a/docs/docs/components/tag.md +++ b/docs/docs/components/tag.md @@ -78,13 +78,13 @@ Use the `pill` attribute to give tabs rounded edges. ### Removable -Use the `removable` attribute to add a remove button to the tag. +Use the `with-remove` attribute to add a remove button to the tag. ```html {.example}
- Small - Medium - Large + Small + Medium + Large