@khsura/sui-mcp 0.0.0-stage → 0.1.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
@@ -1,3 +1,146 @@
1
- # Temporary Holding Version
1
+ # @khsura/sui-mcp
2
+
3
+ Model Context Protocol server for [`@khsura/sui`](https://www.npmjs.com/package/@khsura/sui). It gives AI assistants (Claude Code, Cursor, VS Code, Windsurf, …) version-accurate SUI component APIs, tested recipes and a template validator, so generated UI matches the framework instead of guessing. It runs locally over stdio and needs no API key. Component docs and live examples: [sui.surakh.com](https://sui.surakh.com/).
4
+
5
+ ## Quick start
6
+
7
+ From your app's folder, let the CLI detect your client and write its config:
8
+
9
+ ```bash
10
+ npx -y @khsura/sui-mcp config # detect clients and write their config
11
+ npx -y @khsura/sui-mcp config --dry-run # print the planned changes, write nothing
12
+ ```
13
+
14
+ | Option | Effect |
15
+ | --- | --- |
16
+ | `--client <id>` | Configure only `claude-code`, `cursor`, `vscode` or `windsurf`. Repeat it for several. |
17
+ | `--dry-run` | Print each file and its new contents without writing. |
18
+ | `--project <dir>` | Configure another folder instead of the current one. |
19
+
20
+ Detection looks for `.mcp.json`, `.claude/` or `CLAUDE.md` (Claude Code), `.cursor/` (Cursor), `.vscode/` (VS Code) and `.windsurf/` or `~/.codeium/windsurf/` (Windsurf). When none exists it writes Claude Code's `.mcp.json`. The CLI adds a `sui` server to the existing file and keeps every other server; an existing `sui` entry keeps its extra fields such as `env`. A file that is not valid JSON stops the command with its path, and nothing is written. Windsurf only reads a user-level file, so the CLI prints the snippet for `~/.codeium/windsurf/mcp_config.json` instead of writing outside the project.
21
+
22
+ Restart or reload the client afterwards so it starts the server.
23
+
24
+ ## Client setup
25
+
26
+ To configure a client by hand, add one of these entries.
27
+
28
+ **Claude Code**: `.mcp.json` in the project root, or run `claude mcp add sui -- npx -y @khsura/sui-mcp`.
29
+
30
+ ```json
31
+ {
32
+ "mcpServers": {
33
+ "sui": { "command": "npx", "args": ["-y", "@khsura/sui-mcp"] }
34
+ }
35
+ }
36
+ ```
37
+
38
+ **Cursor**: `.cursor/mcp.json` in the project (or `~/.cursor/mcp.json` for every project).
39
+
40
+ ```json
41
+ {
42
+ "mcpServers": {
43
+ "sui": { "command": "npx", "args": ["-y", "@khsura/sui-mcp"] }
44
+ }
45
+ }
46
+ ```
47
+
48
+ **VS Code**: `.vscode/mcp.json`. VS Code uses `servers` and needs `"type": "stdio"`.
49
+
50
+ ```json
51
+ {
52
+ "servers": {
53
+ "sui": { "type": "stdio", "command": "npx", "args": ["-y", "@khsura/sui-mcp"] }
54
+ }
55
+ }
56
+ ```
57
+
58
+ **Windsurf**: `~/.codeium/windsurf/mcp_config.json`.
59
+
60
+ ```json
61
+ {
62
+ "mcpServers": {
63
+ "sui": { "command": "npx", "args": ["-y", "@khsura/sui-mcp"] }
64
+ }
65
+ }
66
+ ```
67
+
68
+ If your client starts servers outside the project folder, add `"env": { "SUI_PROJECT_ROOT": "/path/to/your/app" }` to the entry so the server finds your installed `@khsura/sui` (see [Which SUI version answers](#which-sui-version-answers)).
69
+
70
+ ## What the server tells the AI
71
+
72
+ The server sends these instructions when a client connects:
73
+
74
+ - Setting up SUI: call `get_guide` with topic `installation` first.
75
+ - Before using an SUI component it has not checked, call `get_component_api`. `list_components` lists every component.
76
+ - For common patterns, start from a tested recipe (`list_recipes`, `get_recipe`).
77
+ - Always run `validate_sui_template` on every generated or changed template and fix every error before finishing.
78
+
79
+ ## Tools
80
+
81
+ | Tool | What it returns |
82
+ | --- | --- |
83
+ | `list_components` | Every component with its family and a one-line purpose. |
84
+ | `get_component_api` | Props (type, default, required, allowed values), slots and events of one component as markdown. Accepts `SButton`, `s-button` or `button`. Adds the activator-pattern note (SDialog, SMenu, STooltip, SSnackbar) or the layout-child note (SAppBar, SNavigationDrawer, SMain, SFooter, SBottomNavigation). Unknown names return an error with the three closest names. A component that only the bundled (newer) API has returns an error saying the project needs a newer `@khsura/sui`. |
85
+ | `list_guides` | The setup guide topics with what each covers. |
86
+ | `get_guide` | One setup guide as markdown: `installation` (Vue and Nuxt, styles, `@mdi/font`), `theming` (theme colors, dark mode), `component-defaults`, `display` (`useDisplay` breakpoints), `i18n`, `common-mistakes`. Unknown topics return an error with the topic list. |
87
+ | `validate_sui_template` | Checks a `.vue` SFC or bare template fragment against the API and the composition rules below. Returns a summary line, then `line:col [rule] message — fix: hint — recipe: name` per issue (the recipe part only when one applies). Issues are a normal result, not a tool error. |
88
+ | `list_recipes` | The tested, copy-ready recipes with when to use each. |
89
+ | `get_recipe` | One recipe: its notes, the full Vue SFC in a ```` ```vue ```` block and the link to its live Storybook story. Names: `app-shell`, `validated-form`, `activator-overlays`, `data-table`, `responsive-grid`, `theme-setup`. Unknown names return an error with the name list. |
90
+ | `ping` | Health check. |
91
+
92
+ ## Example prompts
93
+
94
+ - "Add a settings page with a validated form (name, email, notification toggle). Use the SUI MCP and validate the template."
95
+ - "What props does STable take in the SUI version this project installs?"
96
+ - "Build an admin shell with an app bar, a navigation drawer and a footer. Start from the SUI `app-shell` recipe."
97
+ - "Set up @khsura/sui in this Nuxt app."
98
+ - "Check `src/pages/Orders.vue` with `validate_sui_template` and fix every issue."
99
+
100
+ ## Template validator rules
101
+
102
+ | Rule | Severity | What it catches | Recipe |
103
+ | --- | --- | --- | --- |
104
+ | `parse-error` | error | Template syntax errors. | — |
105
+ | `unknown-component` | error | An `S*` / `s-*` tag that does not exist, with the closest names. | — |
106
+ | `unknown-prop` | error | Static attributes, `:prop` / `v-bind:prop`, and `v-model` / `v-model:prop` targets the component does not have (kebab and camel case both accepted). | — |
107
+ | `invalid-enum-value` | error | A static value, or a quoted literal binding, outside an enum prop's values. | — |
108
+ | `unknown-slot` | error | `#name` / `v-slot:name` the component does not have. | — |
109
+ | `activator-binding` | error | An `#activator` / `v-slot:activator` slot on SDialog, SMenu or SSnackbar whose root element does not bind both `v-on="on"` and `v-bind="attrs"` (also `#activator="props"` with `props.on` / `props.attrs`, renamed and `...rest` destructuring). A warning on STooltip when its activator slot takes slot props: STooltip passes none and listens on its own wrapper. | `activator-overlays` |
110
+ | `layout-for` | error | Inside an `SLayout name="x"`, an SAppBar, SNavigationDrawer, SMain, SFooter or SBottomNavigation without `for` (it joins the app-level layout instead), or a static `for` that matches no enclosing `SLayout name`. | `app-shell` |
111
+ | `form-rules-outside-form` | warning | An `S*` input with `rules` / `:rules` and no enclosing SForm: rules only run on value change, so untouched fields pass on submit. | `validated-form` |
112
+ | `icon-button-label` | warning | An SButton whose only content is an SIcon and that has no `aria-label`, `aria-labelledby` or `title`. | `app-shell` |
113
+ | `no-raw-replacement` | warning | Raw `<button>`, `<input>` (not `type="hidden"`), `<select>`, `<textarea>` or `<dialog>`, with the SUI component to use (`<input type="checkbox">` → SCheckbox, `radio` → SRadioGroup). | `validated-form`, `activator-overlays` for `<dialog>` |
114
+
115
+ Recipe names are stable (`app-shell`, `validated-form`, `activator-overlays`, `data-table`, `responsive-grid`, `theme-setup`); `get_recipe` serves the recipes under these names.
116
+
117
+ Future work: a `table-structure` rule (STable column keys and `item.<column>` slot names, per `packages/app/docs/components/table.md`) is waiting on complete STable slot data in `sui-api.json`.
118
+
119
+ ## What the template validator skips
120
+
121
+ - Global and common native attributes (`class`, `style`, `id`, `key`, `ref`, `role`, `type`, `href`, …), `aria-*`, `data-*` and `on*` listeners fall through to the component's root element, so they are never unknown props. The list is in `src/constants/templateValidator.ts`.
122
+ - Event listeners (`@x`, `v-on`), `v-bind="object"`, dynamic arguments (`:[name]`, `#[name]`) and dynamic values (`:size="x"`) are not checked.
123
+ - Components whose `sui-api.json` entry lists no slots (slots that could not be extracted, such as STable's `item.<column>`) skip the slot check.
124
+ - Non-SUI tags (`RouterLink`, …) are ignored, and native elements are only checked by `no-raw-replacement`.
125
+ - `layout-for` does not require `for` when there is no enclosing SLayout in the submitted code (the layout lives in a parent file) or the enclosing SLayout has no `name` (children without `for` join the app-level layout, which is correct). A child with `app`, a bound `:for` and a bound `:name` are not compared.
126
+ - `icon-button-label` cannot see inside `v-bind="object"`, so a button with an object spread is assumed labelled.
127
+
128
+ The API rules live in `src/services/templateRules.ts` and the composition rules in `src/services/compositionRules.ts`, as `{ id, target?, check(context) }` objects over the Vue template AST, independent of MCP, so more rules (or an eslint plugin) can reuse them. A rule sees the element, its ancestors and the catalog lookup; `target: 'any-element'` runs it on native elements too.
129
+
130
+ ## Where the guides come from
131
+
132
+ `get_guide` serves sections of `plugins/sui-plugin/skills/sui-getting-started/SKILL.md` and `packages/app/docs/` as they are, mapped per topic in `src/configs/guideTopics.ts`. The build copies the mapped files into `dist/guides/`; unbundled (dev, tests) the server reads them from the repo. A renamed heading or a moved file fails the tests and the build, so edit the docs, then the mapping.
133
+
134
+ ## Where the recipes come from
135
+
136
+ Each recipe is a `.vue` SFC plus a `.md` notes file with front matter (`title`, `whenToUse`, `components`) in `packages/app/storybook/recipes/`. Storybook renders every recipe as a `Recipes/*` story tagged `visual` (https://sui.surakh.com/), and a test runs `validate_sui_template` over all six and expects no errors or warnings. The build copies the files into `dist/recipes/`; unbundled (dev, tests) the server reads them from the repo. To add a recipe, add both files, its name to `RECIPE_NAMES` in `src/constants/recipes.ts` and a story to `packages/app/storybook/stories/recipes.stories.ts`.
137
+
138
+ ## Which SUI version answers
139
+
140
+ Every response starts with the `@khsura/sui` version and its source:
141
+
142
+ 1. `project`: the nearest `node_modules/@khsura/sui/dist/sui-api.json`, found by walking up from `SUI_PROJECT_ROOT` if set, else from the working directory the client starts the server in.
143
+ 2. `bundled`: the copy shipped inside `@khsura/sui-mcp` (the latest release at build time), used when no project install has the file or the project file is invalid.
144
+
145
+ Set `SUI_PROJECT_ROOT` when your client starts the server outside the project folder. Component examples: https://sui.surakh.com/
2
146
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
@@ -0,0 +1,487 @@
1
+ # SUI Utility Classes
2
+
3
+ All utility classes are prefixed with `s_`. Many support **responsive variants** — append a breakpoint infix to apply them only at that breakpoint and above.
4
+
5
+ Import styles to activate utility classes:
6
+
7
+ ```typescript
8
+ import '@khsura/sui/base.css'
9
+ // or for SCSS customization:
10
+ import '@khsura/sui/style.scss'
11
+ ```
12
+
13
+ ---
14
+
15
+ ## Breakpoints
16
+
17
+ | Infix | Min width | Breakpoint |
18
+ |-------|-----------|------------|
19
+ | *(none)* | 0 | All screens |
20
+ | `--xs` | 640px | Extra small and up |
21
+ | `--sm` | 768px | Small and up |
22
+ | `--md` | 1024px | Medium and up |
23
+ | `--lg` | 1280px | Large and up |
24
+ | `--xl` | 1536px | Extra large and up |
25
+ | `--xxl` | 1980px | Extra extra large and up |
26
+
27
+ **Responsive class pattern:** `s_{name}--{breakpoint}__{value}`
28
+
29
+ Example: `s_display--md__flex` → `display: flex` on `md` (1024px) and above.
30
+
31
+ ---
32
+
33
+ ## Spacing
34
+
35
+ **Base unit:** `4px` (1 step = 4px). Steps 0–10.
36
+
37
+ | Step | Value |
38
+ |------|-------|
39
+ | 0 | 0 |
40
+ | 1 | 4px |
41
+ | 2 | 8px |
42
+ | 3 | 12px |
43
+ | 4 | 16px |
44
+ | 5 | 20px |
45
+ | 6 | 24px |
46
+ | 7 | 28px |
47
+ | 8 | 32px |
48
+ | 9 | 36px |
49
+ | 10 | 40px |
50
+
51
+ ### Margin classes — `s_m{direction}__{step}`
52
+
53
+ | Class | CSS property |
54
+ |-------|-------------|
55
+ | `s_ma__{0–10}` | `margin` |
56
+ | `s_mx__{0–10}` | `margin-left` + `margin-right` |
57
+ | `s_my__{0–10}` | `margin-top` + `margin-bottom` |
58
+ | `s_mt__{0–10}` | `margin-top` |
59
+ | `s_mr__{0–10}` | `margin-right` |
60
+ | `s_mb__{0–10}` | `margin-bottom` |
61
+ | `s_ml__{0–10}` | `margin-left` |
62
+ | `s_ma__auto` | `margin: auto` |
63
+ | `s_mx__auto` | `margin-left: auto; margin-right: auto` |
64
+
65
+ ### Padding classes — `s_p{direction}__{step}`
66
+
67
+ | Class | CSS property |
68
+ |-------|-------------|
69
+ | `s_pa__{0–10}` | `padding` |
70
+ | `s_px__{0–10}` | `padding-left` + `padding-right` |
71
+ | `s_py__{0–10}` | `padding-top` + `padding-bottom` |
72
+ | `s_pt__{0–10}` | `padding-top` |
73
+ | `s_pr__{0–10}` | `padding-right` |
74
+ | `s_pb__{0–10}` | `padding-bottom` |
75
+ | `s_pl__{0–10}` | `padding-left` |
76
+
77
+ ### Examples
78
+
79
+ ```html
80
+ <!-- 16px padding all sides -->
81
+ <div class="s_pa__4">...</div>
82
+
83
+ <!-- 8px horizontal margin -->
84
+ <div class="s_mx__2">...</div>
85
+
86
+ <!-- 12px top, 8px bottom -->
87
+ <div class="s_mt__3 s_mb__2">...</div>
88
+
89
+ <!-- Auto horizontal margin (center block) -->
90
+ <div class="s_mx__auto" style="width: 200px;">...</div>
91
+
92
+ <!-- Responsive: 8px padding on mobile, 16px on md+ -->
93
+ <div class="s_pa__2 s_pa--md__4">...</div>
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Display
99
+
100
+ **Pattern:** `s_display__{value}` or `s_display--{breakpoint}__{value}`
101
+
102
+ | Class | CSS |
103
+ |-------|-----|
104
+ | `s_display__none` | `display: none` |
105
+ | `s_display__block` | `display: block` |
106
+ | `s_display__inline` | `display: inline` |
107
+ | `s_display__inlineBlock` | `display: inline-block` |
108
+ | `s_display__flex` | `display: flex` |
109
+ | `s_display__inlineFlex` | `display: inline-flex` |
110
+
111
+ ### Examples
112
+
113
+ ```html
114
+ <!-- Hide on mobile, show as flex on md+ -->
115
+ <div class="s_display__none s_display--md__flex">...</div>
116
+
117
+ <!-- Show on mobile only -->
118
+ <div class="s_display__block s_display--md__none">...</div>
119
+ ```
120
+
121
+ ---
122
+
123
+ ## Flexbox
124
+
125
+ ### Justify Content — `s_justify__{value}`
126
+
127
+ | Class | CSS |
128
+ |-------|-----|
129
+ | `s_justify__start` | `justify-content: flex-start` |
130
+ | `s_justify__end` | `justify-content: flex-end` |
131
+ | `s_justify__center` | `justify-content: center` |
132
+ | `s_justify__spaceBetween` | `justify-content: space-between` |
133
+ | `s_justify__spaceAround` | `justify-content: space-around` |
134
+
135
+ ### Align Items — `s_align__{value}`
136
+
137
+ | Class | CSS |
138
+ |-------|-----|
139
+ | `s_align__start` | `align-items: flex-start` |
140
+ | `s_align__end` | `align-items: flex-end` |
141
+ | `s_align__center` | `align-items: center` |
142
+ | `s_align__baseline` | `align-items: baseline` |
143
+ | `s_align__stretch` | `align-items: stretch` |
144
+
145
+ ### Align Content — `s_alignContent__{value}`
146
+
147
+ | Class | CSS |
148
+ |-------|-----|
149
+ | `s_alignContent__start` | `align-content: flex-start` |
150
+ | `s_alignContent__end` | `align-content: flex-end` |
151
+ | `s_alignContent__center` | `align-content: center` |
152
+ | `s_alignContent__spaceBetween` | `align-content: space-between` |
153
+ | `s_alignContent__spaceAround` | `align-content: space-around` |
154
+ | `s_alignContent__stretch` | `align-content: stretch` |
155
+
156
+ ### Align Self — `s_alignSelf__{value}`
157
+
158
+ | Class | CSS |
159
+ |-------|-----|
160
+ | `s_alignSelf__auto` | `align-self: auto` |
161
+ | `s_alignSelf__start` | `align-self: flex-start` |
162
+ | `s_alignSelf__end` | `align-self: flex-end` |
163
+ | `s_alignSelf__center` | `align-self: center` |
164
+ | `s_alignSelf__baseline` | `align-self: baseline` |
165
+ | `s_alignSelf__stretch` | `align-self: stretch` |
166
+
167
+ ### Order — `s_order__{value}`
168
+
169
+ | Class | CSS |
170
+ |-------|-----|
171
+ | `s_order__first` | `order: -1` |
172
+ | `s_order__{0–12}` | `order: 0–12` |
173
+ | `s_order__last` | `order: 13` |
174
+
175
+ All flexbox utilities support responsive variants.
176
+
177
+ ### Examples
178
+
179
+ ```html
180
+ <!-- Centered flex row -->
181
+ <div class="s_display__flex s_justify__center s_align__center">...</div>
182
+
183
+ <!-- Space-between on md+, stacked on mobile -->
184
+ <div class="s_display__flex s_justify--md__spaceBetween s_align__center">...</div>
185
+ ```
186
+
187
+ ---
188
+
189
+ ## Position
190
+
191
+ **Pattern:** `s_position__{value}` (no `!important`)
192
+
193
+ | Class | CSS |
194
+ |-------|-----|
195
+ | `s_position__static` | `position: static` |
196
+ | `s_position__relative` | `position: relative` |
197
+ | `s_position__absolute` | `position: absolute` |
198
+ | `s_position__fixed` | `position: fixed` |
199
+ | `s_position__sticky` | `position: sticky` |
200
+ | `s_position__unset` | `position: unset` |
201
+
202
+ ---
203
+
204
+ ## Overflow
205
+
206
+ | Class | CSS |
207
+ |-------|-----|
208
+ | `s_overflow__auto` | `overflow: auto` |
209
+ | `s_overflow__hidden` | `overflow: hidden` |
210
+ | `s_overflow__visible` | `overflow: visible` |
211
+ | `s_overflowX__auto` | `overflow-x: auto` |
212
+ | `s_overflowX__hidden` | `overflow-x: hidden` |
213
+ | `s_overflowY__auto` | `overflow-y: auto` |
214
+ | `s_overflowY__hidden` | `overflow-y: hidden` |
215
+
216
+ ---
217
+
218
+ ## Typography
219
+
220
+ > **Naming convention note:**
221
+ > - `s_text--{variant}` (double dash) — type scale classes (font size + weight presets)
222
+ > - `s_text__{value}` (double underscore) — white-space and text-transform utilities
223
+ > - `s_textAlign__`, `s_textDecoration__`, `s_textShadow__`, `s_fontWeight__` — other text utilities
224
+
225
+ ---
226
+
227
+ ### Type Scale — `s_text--{variant}`
228
+
229
+ | Class | Font Size | Weight | Notes |
230
+ |-------|-----------|--------|-------|
231
+ | `s_text--h1` | 6rem | 300 | Display heading |
232
+ | `s_text--h2` | 3.75rem | 300 | Large heading |
233
+ | `s_text--h3` | 3rem | 400 | Heading |
234
+ | `s_text--h4` | 2.125rem | 400 | Sub-heading |
235
+ | `s_text--h5` | 1.5rem | 400 | Section heading |
236
+ | `s_text--h6` | 1.25rem | 500 | Card heading |
237
+ | `s_text--subtitle__1` | 1rem | 400 | Subtitle |
238
+ | `s_text--subtitle__2` | 0.875rem | 500 | Small subtitle |
239
+ | `s_text--body__1` | 1rem | 400 | Body text |
240
+ | `s_text--body__2` | 0.875rem | 400 | Secondary body text |
241
+ | `s_text--caption` | 0.75rem | 400 | Labels, hints |
242
+ | `s_text--overline` | 0.75rem | 500 | Uppercase label (text-transform: uppercase) |
243
+ | `s_text--button` | 0.875rem | 500 | Button text (text-transform: uppercase) |
244
+
245
+ ### Text State / Helpers
246
+
247
+ | Class | Effect |
248
+ |-------|--------|
249
+ | `s_text--disabled` | Disabled text color (uses theme disabled color) |
250
+ | `s_text--truncate` | `overflow: hidden; text-overflow: ellipsis; white-space: nowrap` |
251
+
252
+ ### Text Alignment — `s_textAlign__{value}`
253
+
254
+ Supports responsive variants: `s_textAlign--{breakpoint}__{value}` (e.g. `s_textAlign--md__center`)
255
+
256
+ | Class | CSS |
257
+ |-------|-----|
258
+ | `s_textAlign__left` | `text-align: left` |
259
+ | `s_textAlign__right` | `text-align: right` |
260
+ | `s_textAlign__center` | `text-align: center` |
261
+ | `s_textAlign__justify` | `text-align: justify` |
262
+ | `s_textAlign__start` | `text-align: start` |
263
+ | `s_textAlign__end` | `text-align: end` |
264
+
265
+ ### Text Decoration — `s_textDecoration__{value}`
266
+
267
+ | Class | CSS |
268
+ |-------|-----|
269
+ | `s_textDecoration__lineThrough` | `text-decoration: line-through` |
270
+ | `s_textDecoration__none` | `text-decoration: none` |
271
+ | `s_textDecoration__overline` | `text-decoration: overline` |
272
+ | `s_textDecoration__underline` | `text-decoration: underline` |
273
+
274
+ ### White Space — `s_text__{value}`
275
+
276
+ | Class | CSS |
277
+ |-------|-----|
278
+ | `s_text__wrap` | `white-space: normal` |
279
+ | `s_text__noWrap` | `white-space: nowrap` |
280
+ | `s_text__pre` | `white-space: pre` |
281
+ | `s_text__preLine` | `white-space: pre-line` |
282
+ | `s_text__preWrap` | `white-space: pre-wrap` |
283
+ | `s_text__breakword` | `overflow-wrap: break-word; word-break: break-word` |
284
+
285
+ ### Text Transform — `s_text__{value}`
286
+
287
+ | Class | CSS |
288
+ |-------|-----|
289
+ | `s_text__capitalize` | `text-transform: capitalize` |
290
+ | `s_text__lowercase` | `text-transform: lowercase` |
291
+ | `s_text__uppercase` | `text-transform: uppercase` |
292
+
293
+ ### Font Weight — `s_fontWeight__{value}`
294
+
295
+ | Class | CSS |
296
+ |-------|-----|
297
+ | `s_fontWeight__bold` | `font-weight: 700` |
298
+
299
+ ### Text Shadow — `s_textShadow__{0–3}`
300
+
301
+ | Class | Effect |
302
+ |-------|--------|
303
+ | `s_textShadow__0` | No shadow |
304
+ | `s_textShadow__1` | Subtle 1px shadow |
305
+ | `s_textShadow__2` | Medium 8px shadow |
306
+ | `s_textShadow__3` | Strong 16px shadow |
307
+
308
+ ### Examples
309
+
310
+ ```html
311
+ <!-- Headings -->
312
+ <h1 class="s_text--h1">Display</h1>
313
+ <h2 class="s_text--h2">Large Heading</h2>
314
+ <h3 class="s_text--h3">Heading</h3>
315
+ <h4 class="s_text--h4">Sub-heading</h4>
316
+ <h5 class="s_text--h5">Section</h5>
317
+ <h6 class="s_text--h6">Card Title</h6>
318
+
319
+ <!-- Body / labels -->
320
+ <p class="s_text--body__1">Primary body text</p>
321
+ <p class="s_text--body__2">Secondary body text</p>
322
+ <span class="s_text--caption">Helper text / label</span>
323
+ <span class="s_text--overline">OVERLINE LABEL</span>
324
+ <span class="s_text--subtitle__1">Subtitle</span>
325
+ <span class="s_text--subtitle__2">Small subtitle</span>
326
+
327
+ <!-- Helpers -->
328
+ <span class="s_text--disabled">Disabled text</span>
329
+ <p class="s_text--truncate" style="max-width: 200px;">Very long text that gets cut off...</p>
330
+
331
+ <!-- Alignment -->
332
+ <p class="s_textAlign__center">Centered</p>
333
+ <p class="s_textAlign--md__right">Right on md+</p>
334
+
335
+ <!-- White space -->
336
+ <p class="s_text__noWrap">Won't wrap</p>
337
+ <pre class="s_text__pre">Preserves whitespace</pre>
338
+
339
+ <!-- Transform -->
340
+ <span class="s_text__uppercase">uppercase text</span>
341
+ <span class="s_text__capitalize">capitalize each word</span>
342
+
343
+ <!-- Decoration -->
344
+ <span class="s_textDecoration__underline">underlined</span>
345
+ <span class="s_textDecoration__lineThrough">struck through</span>
346
+
347
+ <!-- Shadow -->
348
+ <h2 class="s_text--h2 s_textShadow__2">Shadowed heading</h2>
349
+ ```
350
+
351
+ ---
352
+
353
+ ## Elevation
354
+
355
+ **Pattern:** `s_elevation__{0–24}`
356
+
357
+ Adds a Material Design box shadow. Maps to the same values as the `elevation` component prop.
358
+
359
+ ```html
360
+ <div class="s_elevation__2">Card-like shadow</div>
361
+ <div class="s_elevation__8">Floating panel</div>
362
+ <div class="s_elevation__0">Flat</div>
363
+ ```
364
+
365
+ ---
366
+
367
+ ## Border / Shape
368
+
369
+ | Class | Description |
370
+ |-------|-------------|
371
+ | `s_tile` | Remove border radius (`border-radius: 0`) |
372
+ | `s_rounded` | Apply default border radius |
373
+ | `s_outlined` | Border outline |
374
+ | `s_underlined` | Bottom border only |
375
+
376
+ ---
377
+
378
+ ## State
379
+
380
+ | Class | Description |
381
+ |-------|-------------|
382
+ | `s_disabled` | Disabled appearance (opacity + pointer-events: none) |
383
+ | `s_text--disabled` | Disabled text color only |
384
+ | `s_readonly` | Pointer-events: none, no opacity change |
385
+ | `s_linkElement` | Reset anchor styles (`color: inherit`, `text-decoration: none`, cursor: pointer) |
386
+
387
+ ---
388
+
389
+ ## Sizing Helpers
390
+
391
+ | Class | CSS |
392
+ |-------|-----|
393
+ | `s_height--fill` | `height: 100%` |
394
+ | `s_width--fill` | `width: 100%` |
395
+
396
+ ---
397
+
398
+ ---
399
+
400
+ ## List Style
401
+
402
+ | Class | Description |
403
+ |-------|-------------|
404
+ | `s_list--asterisk` | List with `※` as the list marker |
405
+
406
+ ---
407
+
408
+ ## Transitions (Vue named transitions)
409
+
410
+ Use these as the `name` prop on Vue `<Transition>`:
411
+
412
+ | Name | Effect |
413
+ |------|--------|
414
+ | `s_transition--fade` | Opacity fade in/out |
415
+ | `s_transition--appear` | Fade + scale appear |
416
+ | `s_transition--bounce` | Scale bounce in, scale-out leave |
417
+
418
+ ```vue
419
+ <Transition name="s_transition--fade">
420
+ <div v-if="show">Content</div>
421
+ </Transition>
422
+
423
+ <Transition name="s_transition--bounce">
424
+ <SBadge v-if="hasNotifications" ... />
425
+ </Transition>
426
+ ```
427
+
428
+ ---
429
+
430
+ ## Complete Class Quick Reference
431
+
432
+ ```html
433
+ <!-- Spacing -->
434
+ s_pa__4 s_px__2 s_py__3
435
+ s_mt__4 s_mb__2 s_ml__3 s_mr__1
436
+ s_mx__auto s_ma__0
437
+
438
+ <!-- Display -->
439
+ s_display__flex s_display__none
440
+ s_display__block s_display__inlineBlock
441
+ s_display--md__flex s_display--md__none
442
+
443
+ <!-- Flex -->
444
+ s_justify__center s_justify__spaceBetween
445
+ s_align__center s_align__start
446
+ s_alignSelf__end
447
+
448
+ <!-- Position -->
449
+ s_position__relative s_position__absolute
450
+
451
+ <!-- Overflow -->
452
+ s_overflow__hidden s_overflowY__auto
453
+
454
+ <!-- Typography: type scale (s_text--) -->
455
+ s_text--h1 s_text--h2 s_text--h3 s_text--h4 s_text--h5 s_text--h6
456
+ s_text--subtitle__1 s_text--subtitle__2
457
+ s_text--body__1 s_text--body__2
458
+ s_text--caption s_text--overline s_text--button
459
+ s_text--disabled s_text--truncate
460
+
461
+ <!-- Typography: alignment -->
462
+ s_textAlign__left s_textAlign__right s_textAlign__center
463
+ s_textAlign__justify s_textAlign__start s_textAlign__end
464
+
465
+ <!-- Typography: decoration -->
466
+ s_textDecoration__underline s_textDecoration__lineThrough
467
+ s_textDecoration__overline s_textDecoration__none
468
+
469
+ <!-- Typography: white-space (s_text__) -->
470
+ s_text__wrap s_text__noWrap s_text__pre s_text__preLine s_text__preWrap
471
+ s_text__breakword
472
+
473
+ <!-- Typography: transform (s_text__) -->
474
+ s_text__uppercase s_text__lowercase s_text__capitalize
475
+
476
+ <!-- Typography: weight & shadow -->
477
+ s_fontWeight__bold
478
+ s_textShadow__0 s_textShadow__1 s_textShadow__2 s_textShadow__3
479
+
480
+ <!-- Elevation -->
481
+ s_elevation__2 s_elevation__8
482
+
483
+ <!-- Shape & State -->
484
+ s_rounded s_tile
485
+ s_disabled s_readonly
486
+ s_height--fill s_width--fill
487
+ ```