@gostudent/shared-ui-library-mcp 5.3.1 → 5.4.0-DT-17379.1

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.
@@ -1749,7 +1749,7 @@
1749
1749
  },
1750
1750
  {
1751
1751
  "name": "SelectionControl",
1752
- "description": "**SelectionControl** is a controlled button for selectable options. Content is fully\nagnostic — pass anything as `children`. Consumer manages `state` and `onClick`.\n\nIt is designed to cover two usage patterns:\n- **Form-value collection** — consumer holds the selected value in state and sends it to an API (e.g. attendance, mood rating, student pills).\n- **Action / navigation** — click triggers rendering new content or navigating (e.g. tab-like cards). Keep `state=\"default\"` if no persistent pressed state is needed; the component simply acts as a styled button.\n\n### Padding\n\nFigma strokes are \"inside\", so the component keeps a real 2px border and subtracts it from the padding.\nSet the **Figma** padding through the `--selection-control-padding-block` and `--selection-control-padding-inline`\ncustom properties (default `16px` / `8px`) instead of overriding `padding` — a plain `padding` override\nis not compensated and renders 4px larger than the design.\n\n```tsx\n<SelectionControl style={{ '--selection-control-padding-block': '8px', '--selection-control-padding-inline': '16px' }} />\n```\n\nFigma paddings by context (block / inline):\n- `14px / 16px` — emoji\n- `8px / 16px` — label-only row\n- `10px / 16px` — row with avatar\n- `24px` — large attendance card\n\n### Overriding styles\n\nAll state rules use single-class specificity, so a consumer `className` can override any property.\nTo style a specific state, target the stable `data-state` attribute (`default` | `selected` | `done` | `done-selected`) — never the hashed class names:\n\n```css\n.myChip[data-state='selected'] { font-weight: var(--font-desktop-body-font-weight-bold); }\n```\n\nText children inherit the control's per-state font-weight. When wrapping a label in `<Typography>`, pass `style={{ fontWeight: 'inherit' }}` to keep that behaviour, or set your own weight to override it.\n\n### Accessibility\n\n- Root element is `<button type=\"button\">`.\n- `aria-pressed` is `true` when `state` is `\"selected\"` or `\"done\"`, `false` when `\"default\"`.\n- For grouped single-select usage, wrap controls in a `<div role=\"group\" aria-label=\"...\">` so screen readers announce the group boundary.",
1752
+ "description": "**SelectionControl** is a controlled button for selectable options. Content is fully\nagnostic — pass anything as `children`. Consumer manages `state` and `onClick`.\n\nIt is designed to cover two usage patterns:\n- **Form-value collection** — consumer holds the selected value in state and sends it to an API (e.g. attendance, mood rating, student pills).\n- **Action / navigation** — click triggers rendering new content or navigating (e.g. tab-like cards). Keep `state=\"default\"` if no persistent pressed state is needed; the component simply acts as a styled button.\n\n### Size\n\nUse the `size` prop for the Figma label-only boxes. It sets padding and label size together, so no CSS overrides are needed:\n\n| `size` | Box | Label |\n|---|---|---|\n| `sm` | 24px tall, 4px / 8px padding | 12px / 16px |\n| `md` | 36px tall, 8px / 16px padding | 14px / 20px |\n| `lg` | 48px tall (min-height), 8px / 16px padding | 16px / 20px |\n\nPass a `[mobile, desktop]` tuple for responsive behaviour. Figma designs the mobile `lg` and the desktop `md` as a pair, so `size={['lg', 'md']}` is the usual choice. The switch happens at the tablet breakpoint (1024px).\n\nWithout `size` the control uses the default: 48px tall on mobile (min-height, padding `8px` / `8px`) and 52px from the tablet breakpoint up (padding `16px` / `8px`); label `16px` / `20px` on mobile and `14px` / `20px` from the tablet breakpoint up.\n\nContent-driven Figma variants have no `size`; they only need a padding hook (see below) and, for the label, the matching typography:\n- `with avatar`: padding `10px / 16px`, label 14px / 20px\n- `with icon`: padding `24px`, label 16px / 24px (`<Typography variant=\"body-md\">`)\n- `emoji`: label 24px / 32px\n\n### Padding\n\nFigma strokes are \"inside\", so the component keeps a real 2px border and subtracts it from the padding.\nFor anything the `size` prop does not cover, set the **Figma** padding through the `--selection-control-padding-block` and `--selection-control-padding-inline`\ncustom properties (default `8px` / `8px` on mobile, `16px` / `8px` from tablet) instead of overriding `padding` — a plain `padding` override\nis not compensated and renders 4px larger than the design. An inline `style` always wins over the `size` padding.\n\nThe mobile default has a 48px `min-height`. When the Figma box is shorter than that, also set `--selection-control-min-height: 0` so the padding decides the height.\n\n```tsx\n<SelectionControl style={{ '--selection-control-padding-block': '8px', '--selection-control-padding-inline': '16px', '--selection-control-min-height': 0 }} />\n```\n\nFigma paddings by context (block / inline):\n- `14px / 16px` — emoji\n- `8px / 16px` — label-only row\n- `10px / 16px` — row with avatar\n- `24px` — large attendance card\n\n### Overriding styles\n\nAll state rules use single-class specificity, so a consumer `className` can override any property.\nTo style a specific state, target the stable `data-state` attribute (`default` | `selected` | `done` | `done-selected`) — never the hashed class names:\n\n```css\n.myChip[data-state='selected'] { font-weight: var(--font-desktop-body-font-weight-bold); }\n```\n\n### Labels\n\nFor a plain label, pass **text as `children`**. The control then drives the font size, line height and per-state weight (500 default, 600 selected) itself, which is what Figma specifies.\n\nDo not wrap a plain label in `<Typography>`: it replaces the control's size and weight (e.g. `body-sm` forces 14px on mobile where Figma has 16px). Use `<Typography>` only when the design needs a different size than the `size` prop offers (e.g. `body-md` for `with icon`), and pass `style={{ fontWeight: 'inherit' }}` to keep the per-state weight.\n\n### Accessibility\n\n- Root element is `<button type=\"button\">`.\n- `aria-pressed` is `true` when `state` is `\"selected\"` or `\"done\"`, `false` when `\"default\"`.\n- For grouped single-select usage, wrap controls in a `<div role=\"group\" aria-label=\"...\">` so screen readers announce the group boundary.",
1753
1753
  "storybookUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/docs/components-interaction-selectioncontrol",
1754
1754
  "props": [
1755
1755
  {
@@ -1762,6 +1762,15 @@
1762
1762
  "done-selected"
1763
1763
  ]
1764
1764
  },
1765
+ {
1766
+ "name": "size",
1767
+ "description": "Figma `sm` / `md` / `lg` box and label size. Accepts a `[mobile, desktop]` tuple (see the **Sizes** story); the controls panel only supports a single value.",
1768
+ "options": [
1769
+ "sm",
1770
+ "md",
1771
+ "lg"
1772
+ ]
1773
+ },
1765
1774
  {
1766
1775
  "name": "disabled",
1767
1776
  "description": "",
@@ -1780,19 +1789,9 @@
1780
1789
  ],
1781
1790
  "examples": [
1782
1791
  {
1783
- "name": "AllStates",
1784
- "jsx": "// See \"AllStates\" story — uses interactive render wrapper",
1785
- "storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/components-interaction-selectioncontrol--all-states"
1786
- },
1787
- {
1788
- "name": "Hover",
1789
- "jsx": "// See \"Hover\" story — uses interactive render wrapper",
1790
- "storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/components-interaction-selectioncontrol--hover"
1791
- },
1792
- {
1793
- "name": "Focus",
1794
- "jsx": "// See \"Focus\" story — uses interactive render wrapper",
1795
- "storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/components-interaction-selectioncontrol--focus"
1792
+ "name": "Responsive",
1793
+ "jsx": "<SelectionControl children=\"Present\" state=\"default\" mobileSize=\"lg\" desktopSize=\"md\" />",
1794
+ "storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/components-interaction-selectioncontrol--responsive"
1796
1795
  }
1797
1796
  ]
1798
1797
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gostudent/shared-ui-library-mcp",
3
- "version": "5.3.1",
3
+ "version": "5.4.0-DT-17379.1",
4
4
  "description": "MCP server for @gostudent/shared-ui-library — exposes components, icons, and tokens to Claude",
5
5
  "type": "module",
6
6
  "bin": {