Skip to content

Commit ac73bdc

Browse files
authored
feat(components): DLT-3159 enforce positive boolean props (#1198)
1 parent 721c834 commit ac73bdc

File tree

105 files changed

+327
-327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+327
-327
lines changed

.claude/rules/documentation-writing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Use GFM-style blockquote alerts to render `<dt-notice>` components. A markdown-i
176176

177177
**KIND** must be one of: `BASE`, `INFO`, `SUCCESS`, `WARNING`, `ERROR` (case-insensitive, but uppercase is the convention — maps to DtNotice's `kind` prop).
178178

179-
The plugin always adds `hide-close` and `class="d-wmx100p d-my-200 dialtone-doc-notice"`. Links in the body automatically get `d-link` styling.
179+
The plugin always adds `:show-close="false"` and `class="d-wmx100p d-my-200 dialtone-doc-notice"`. Links in the body automatically get `d-link` styling.
180180

181181
### Choosing a kind
182182

.claude/rules/vue-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ paths:
1515
- Use `validator` — NEVER `validate`. Vue silently ignores `validate`.
1616
- Import allowed values from `*_constants.js`. Never hardcode valid value arrays inline.
1717
- Add JSDoc with `@values` annotation.
18-
- Boolean visibility toggles: prefer `hideX` negative polarity (`hideClose`, `hideHeader`, `hideArrow`).
18+
- Boolean visibility toggles: use positive polarity (`showClose`, `showHeader`, `showArrow`). Never use negative names (`hideX`, `preventX`, `skipX`).
1919

2020
## Events
2121

.claude/skills/vue-conventions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ Detailed rules are applied automatically via path-scoped rules when editing comp
2020
| Structural slots | `header` / `footer` |
2121
| Sizes (interactive) | `xs`, `sm`, `md`, `lg`, `xl` |
2222
| Sizes (icons) | `100``800` numeric |
23-
| Visibility toggles | `hideX` negative polarity |
23+
| Visibility toggles | `showX` positive polarity |
2424
| Styles | `<style scoped>` or `d-*` utility classes, `var(--dt-*)` tokens only |
2525
| Shared behavior | Composables for new, mixins for legacy in `packages/dialtone-vue/common/mixins/` (`InputMixin`, `CheckableMixin`, `GroupableMixin`, `MessagesMixin`) |

apps/dialtone-documentation/docs/.vuepress/baseComponents/CodeExampleTabs.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
v-if="showHtmlWarning"
5252
class="d-ps-static"
5353
kind="warning"
54-
hide-close
54+
:show-close="false"
5555
>
5656
Raw HTML renders visuals only. You may need to add JS to replicate its functionality.
5757
</dt-banner>

apps/dialtone-documentation/docs/.vuepress/exampleComponents/ExampleRichTextEditor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
:output-format="$attrs.outputFormat"
88
:auto-focus="false"
99
placeholder="Type here..."
10-
:prevent-typing="$attrs.preventTyping"
10+
:allow-typing="$attrs.allowTyping"
1111
:link="true"
1212
:mention-suggestion="$attrs.mentionSuggestion"
1313
:channel-suggestion="$attrs.channelSuggestion"

apps/dialtone-documentation/docs/.vuepress/plugins/markdown-it-notice.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Supported kinds: BASE, INFO, SUCCESS, WARNING, ERROR
1010
* (uppercase by convention, case-insensitive — maps to DtNotice's `kind` prop)
1111
*
12-
* Always outputs: hide-close, class="d-wmx100p d-my-200"
12+
* Always outputs: :show-close="false", class="d-wmx100p d-my-200"
1313
*
1414
* Two-pass design:
1515
* 1. `notice_detect` runs BEFORE inline parsing — matches [!KIND] in raw
@@ -106,7 +106,7 @@ export default function noticePlugin (md) {
106106
if (title) {
107107
attrs.push(`title="${encodeForAttr(title)}"`);
108108
}
109-
attrs.push('hide-close', 'class="d-wmx100p d-my-200 dialtone-doc-notice"');
109+
attrs.push(':show-close="false"', 'class="d-wmx100p d-my-200 dialtone-doc-notice"');
110110

111111
const html = `<dt-notice ${attrs.join(' ')}>\n${bodyHtml}</dt-notice>\n`;
112112

apps/dialtone-documentation/docs/components/banner.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Banners are a type of notice and so you can use the following [Notice](notice.md
4040

4141
```vue demo-only
4242
<dt-stack direction="row" gap="200">
43-
<dt-select-menu :label-visible="false" label="Style" :options="bannerOptions" v-model="selectedKind" />
43+
<dt-select-menu :show-label="false" label="Style" :options="bannerOptions" v-model="selectedKind" />
4444
<dt-checkbox value="important" @input="toggleImportant">Important</dt-checkbox>
4545
<dt-button @click="toggleBanner('example-kind')">Toggle Example</dt-button>
4646
</dt-stack>

apps/dialtone-documentation/docs/components/chip.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ Use the `disabled` prop to disable both the Chip and its close button. This sets
3838
### Without Close Button
3939

4040
```vue demo
41-
<dt-chip :hide-close="true">Chip</dt-chip>
41+
<dt-chip :show-close="false">Chip</dt-chip>
4242
```
4343

4444
### With Icon
4545

4646
```vue demo
47-
<dt-chip :hide-close="true">
47+
<dt-chip :show-close="false">
4848
<template #icon>
4949
<dt-icon
5050
name="phone"

apps/dialtone-documentation/docs/components/filter-pill.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,15 @@ A clear button appears when any filter is active. It emits the `reset` event whe
183183

184184
### Non clearable
185185

186-
Setting the `hide-clear` prop hides the reset/clear button.
186+
Setting the `:show-clear="false"` prop hides the reset/clear button.
187187

188188
```vue demo
189189
<!-- @wrapper -->
190190
<dt-stack direction="row" gap="100">
191191
<dt-filter-pill
192192
:model-value="[{name: '0–5 min', active: true}, {name: '5–15 min'}, {name: '15–30 min'}, {name: '30+ min'}]"
193193
label="Duration"
194-
hide-clear
194+
:show-clear="false"
195195
>
196196
</dt-filter-pill>
197197
</dt-stack>

apps/dialtone-documentation/docs/components/segmented-control.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,15 @@ Remove the border and padding from the container.
101101
```vue demo
102102
<!-- @wrapper -->
103103
<div class="d-w100p">
104-
<dt-segmented-control v-model="selected" hide-divider aria-label="View filter">
104+
<dt-segmented-control v-model="selected" :show-divider="false" aria-label="View filter">
105105
<dt-segmented-control-item value="all">All</dt-segmented-control-item>
106106
<dt-segmented-control-item value="favorites">Favorites</dt-segmented-control-item>
107107
<dt-segmented-control-item value="recent">Recent</dt-segmented-control-item>
108108
<dt-segmented-control-item value="groups">Groups</dt-segmented-control-item>
109109
</dt-segmented-control>
110110
</div>
111111
<!-- @code -->
112-
<dt-segmented-control v-model="selected" hide-divider>
112+
<dt-segmented-control v-model="selected" :show-divider="false">
113113
...
114114
</dt-segmented-control>
115115
```
@@ -141,7 +141,7 @@ Add `disabled` to the group to disable all items.
141141
```vue demo
142142
<!-- @wrapper -->
143143
<div class="d-w100p">
144-
<dt-segmented-control v-model="selected" disabled aria-label="Disabled example" hide-divider>
144+
<dt-segmented-control v-model="selected" disabled aria-label="Disabled example" :show-divider="false">
145145
<dt-segmented-control-item value="all">All</dt-segmented-control-item>
146146
<dt-segmented-control-item value="favorites">Favorites</dt-segmented-control-item>
147147
<dt-segmented-control-item value="recent">Recent</dt-segmented-control-item>

0 commit comments

Comments
 (0)