ionbase-ui 0.17.0 → 0.18.0

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/README.md CHANGED
@@ -172,16 +172,53 @@ icon sit correctly inside a Button.
172
172
 
173
173
  ## Entry points
174
174
 
175
- | Import | What it is |
176
- | ----------------------- | --------------------------------------------------- |
177
- | `ionbase-ui` | Components, `Icon`, and the `tokens` object |
178
- | `ionbase-ui/styles` | Everything: tokens + typography + components |
179
- | `ionbase-ui/styles/*` | One component stylesheet, e.g. `button.css` |
180
- | `ionbase-ui/tokens` | Token custom properties only, no component CSS |
181
- | `ionbase-ui/tokens/*` | One token layer, e.g. `theme-dark.css` |
182
- | `ionbase-ui/meta/index` | Component index — names, summaries, variants (12KB) |
183
- | `ionbase-ui/meta` | Every component's full contract in one file (180KB) |
184
- | `ionbase-ui/meta/*` | One component's contract, e.g. `Button.json` |
175
+ | Import | What it is |
176
+ | ----------------------------- | --------------------------------------------------- |
177
+ | `ionbase-ui` | Components, `Icon`, and the `tokens` object |
178
+ | `ionbase-ui/styles` | Everything: tokens + typography + components |
179
+ | `ionbase-ui/styles/*` | One component stylesheet, e.g. `button.css` |
180
+ | `ionbase-ui/tokens` | Token custom properties only, no component CSS |
181
+ | `ionbase-ui/tokens/*` | One token layer, e.g. `theme-dark.css` |
182
+ | `ionbase-ui/meta/index` | Component index — names, summaries, variants (12KB) |
183
+ | `ionbase-ui/meta` | Every component's full contract in one file (180KB) |
184
+ | `ionbase-ui/meta/*` | One component's contract, e.g. `Button.json` |
185
+ | `ionbase-ui/eslint-plugin` | Lint rules generated from the contracts |
186
+ | `ionbase-ui/stylelint-config` | Token rules for your own CSS |
187
+
188
+ ## Lint rules that ship with the system
189
+
190
+ ```js
191
+ // eslint.config.js
192
+ import ionbase from 'ionbase-ui/eslint-plugin';
193
+ export default [ionbase.configs.recommended];
194
+ ```
195
+
196
+ ```js
197
+ // stylelint.config.js
198
+ export default { extends: ['ionbase-ui/stylelint-config'] };
199
+ ```
200
+
201
+ | rule | catches |
202
+ | --------------------------- | ----------------------------------------------- |
203
+ | `no-deprecated-props` | `<Button disabled>` — autofixes to `isDisabled` |
204
+ | `no-known-contrast-failure` | prop combinations measured to fail WCAG AA |
205
+ | `no-raw-style-values` | `style={{ color: '#1a73e8', padding: 16 }}` |
206
+ | `needs-accessible-name` | icon-only controls announced as just "button" |
207
+ | `one-primary-action` | more than one primary Button in a Modal |
208
+
209
+ The rules read their data from the component contracts, so they stay correct on
210
+ their own: when a contrast defect is fixed the measurement changes, the contract
211
+ loses the entry, and the rule stops firing.
212
+
213
+ Messages name the fix, not the principle — a raw `13px` reports that it is not
214
+ on the scale and that the neighbouring rungs are `var(--spacing-12)` and
215
+ `var(--spacing-14)`.
216
+
217
+ Use `ionbase.configs.warn` instead if you are adopting IonBase in an existing
218
+ app and want the same rules without failing the build. Both configs need peer
219
+ dependencies you may already have (`eslint`, `stylelint`,
220
+ `stylelint-declaration-strict-value`); all are optional, so nothing is installed
221
+ unless you opt in.
185
222
 
186
223
  ## Machine-readable component contracts
187
224
 
@@ -77,6 +77,27 @@
77
77
  ],
78
78
  "notes": [
79
79
  "role=alert interrupts whatever the screen reader is saying; role=status waits for a pause. This is why the role is not a prop."
80
+ ],
81
+ "knownIssues": [
82
+ {
83
+ "pairing": "--text-on-color on --surface-information",
84
+ "mode": "Dark",
85
+ "ratio": 3.44,
86
+ "required": 4.5,
87
+ "sc": "1.4.3",
88
+ "states": [
89
+ "default"
90
+ ],
91
+ "status": "known, not yet fixed",
92
+ "where": "Alert with emphasis=solid intent=information",
93
+ "appliesTo": {
94
+ "component": "Alert",
95
+ "props": {
96
+ "emphasis": "solid",
97
+ "intent": "information"
98
+ }
99
+ }
100
+ }
80
101
  ]
81
102
  },
82
103
  "antiPatterns": [
@@ -80,6 +80,44 @@
80
80
  ],
81
81
  "requires": [
82
82
  "an accessible name — `children`, or `aria-label` when the button is icon-only"
83
+ ],
84
+ "knownIssues": [
85
+ {
86
+ "pairing": "--text-primary on --surface-primary-subtle-hover",
87
+ "mode": "Dark",
88
+ "ratio": 4.25,
89
+ "required": 4.5,
90
+ "sc": "1.4.3",
91
+ "states": [
92
+ "hover"
93
+ ],
94
+ "status": "known, not yet fixed",
95
+ "where": "Button variant=primary-soft, hover",
96
+ "appliesTo": {
97
+ "component": "Button",
98
+ "props": {
99
+ "variant": "primary-soft"
100
+ }
101
+ }
102
+ },
103
+ {
104
+ "pairing": "--text-primary on --surface-primary-tint",
105
+ "mode": "Dark",
106
+ "ratio": 4.25,
107
+ "required": 4.5,
108
+ "sc": "1.4.3",
109
+ "states": [
110
+ "pressed"
111
+ ],
112
+ "status": "known, not yet fixed",
113
+ "where": "Button variant=primary-soft, pressed",
114
+ "appliesTo": {
115
+ "component": "Button",
116
+ "props": {
117
+ "variant": "primary-soft"
118
+ }
119
+ }
120
+ }
83
121
  ]
84
122
  },
85
123
  "antiPatterns": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "ionbase-ui",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "generated": "by scripts/build-meta.mjs — do not edit; intent lives in meta/*.json",
5
5
  "hooks": [
6
6
  "useToast"
@@ -85,6 +85,27 @@
85
85
  ],
86
86
  "notes": [
87
87
  "role=alert interrupts whatever the screen reader is saying; role=status waits for a pause. This is why the role is not a prop."
88
+ ],
89
+ "knownIssues": [
90
+ {
91
+ "pairing": "--text-on-color on --surface-information",
92
+ "mode": "Dark",
93
+ "ratio": 3.44,
94
+ "required": 4.5,
95
+ "sc": "1.4.3",
96
+ "states": [
97
+ "default"
98
+ ],
99
+ "status": "known, not yet fixed",
100
+ "where": "Alert with emphasis=solid intent=information",
101
+ "appliesTo": {
102
+ "component": "Alert",
103
+ "props": {
104
+ "emphasis": "solid",
105
+ "intent": "information"
106
+ }
107
+ }
108
+ }
88
109
  ]
89
110
  },
90
111
  "antiPatterns": [
@@ -598,6 +619,44 @@
598
619
  ],
599
620
  "requires": [
600
621
  "an accessible name — `children`, or `aria-label` when the button is icon-only"
622
+ ],
623
+ "knownIssues": [
624
+ {
625
+ "pairing": "--text-primary on --surface-primary-subtle-hover",
626
+ "mode": "Dark",
627
+ "ratio": 4.25,
628
+ "required": 4.5,
629
+ "sc": "1.4.3",
630
+ "states": [
631
+ "hover"
632
+ ],
633
+ "status": "known, not yet fixed",
634
+ "where": "Button variant=primary-soft, hover",
635
+ "appliesTo": {
636
+ "component": "Button",
637
+ "props": {
638
+ "variant": "primary-soft"
639
+ }
640
+ }
641
+ },
642
+ {
643
+ "pairing": "--text-primary on --surface-primary-tint",
644
+ "mode": "Dark",
645
+ "ratio": 4.25,
646
+ "required": 4.5,
647
+ "sc": "1.4.3",
648
+ "states": [
649
+ "pressed"
650
+ ],
651
+ "status": "known, not yet fixed",
652
+ "where": "Button variant=primary-soft, pressed",
653
+ "appliesTo": {
654
+ "component": "Button",
655
+ "props": {
656
+ "variant": "primary-soft"
657
+ }
658
+ }
659
+ }
601
660
  ]
602
661
  },
603
662
  "antiPatterns": [