Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
bf96b97
Release/0.9.0 (#207)
Nikita-Polyakov May 31, 2021
5b4b64d
Release/0.9.1 (#209)
Nikita-Polyakov Jun 1, 2021
b3fffa5
Release/0.9.2 (#211)
Nikita-Polyakov Jun 2, 2021
5387909
Release/0.9.3 (#213)
Nikita-Polyakov Jun 4, 2021
e8d67e7
Release/0.9.4 (#216)
Nikita-Polyakov Jun 7, 2021
8b45599
Merge branch 'master' into release/0.9.5
Sociopacific Jun 11, 2021
961c7b9
Merge pull request #219 from soramitsu/release/0.9.5
Sociopacific Jun 11, 2021
e1e9516
Merge branch 'master' into release/0.9.6
Sociopacific Jun 15, 2021
9639b43
Merge pull request #222 from soramitsu/release/0.9.6
Sociopacific Jun 15, 2021
8953ad5
Fix broken `SInput` error state (#225) (#226)
0x009922 Jun 18, 2021
87ee971
Release 0.9.8 (#231)
alexnatalia Jun 22, 2021
3d852c2
Release 0.9.9 (#233)
alexnatalia Jun 22, 2021
052d594
Release 0.9.10 (#236)
alexnatalia Jun 23, 2021
2d4f8b0
Merge branch 'master' into release/0.9.11
Sociopacific Jun 28, 2021
2967d29
Merge branch 'release/0.9.11' of https://github.com/soramitsu/soramit…
Sociopacific Jun 28, 2021
99252f9
Merge pull request #238 from soramitsu/release/0.9.11
Sociopacific Jun 28, 2021
15a3745
pass icon path, install other plugins inside index (#240) (#241)
Nikita-Polyakov Jun 30, 2021
33e34c1
Release/0.9.13 (#243)
Nikita-Polyakov Jun 30, 2021
ec9ad32
Release 0.9.14 (#246)
alexnatalia Jul 2, 2021
95285fe
Release/0.9.15 (#247)
Nikita-Polyakov Jul 2, 2021
39b779a
Release 0.9.16 (#249)
alexnatalia Jul 12, 2021
f9a64ba
Release 0.9.17 (#252)
alexnatalia Jul 15, 2021
0cc3676
Merge branch 'master' into release/0.9.18
Sociopacific Jul 19, 2021
7227724
Update version to 0.9.18
Sociopacific Jul 19, 2021
6931729
Merge pull request #255 from soramitsu/release/0.9.18
Sociopacific Jul 19, 2021
5b735ad
Merge branch 'master' into release/1.0.0
Sociopacific Jul 20, 2021
97e6a70
Merge pull request #257 from soramitsu/release/1.0.0
Sociopacific Jul 20, 2021
55fd862
Scrollbar implementation (#258) (#259)
stefashkaa Jul 21, 2021
a2645f0
Release/1.0.2 (#261)
Nikita-Polyakov Jul 21, 2021
7cde512
Release 1.0.3 (#265)
stefashkaa Jul 22, 2021
fbfbeeb
Release 1.0.3 (#267)
stefashkaa Jul 22, 2021
d3b2f93
Release 1.0.4 (#274)
alexnatalia Jul 29, 2021
e7a1bad
Release 1.0.5 (#277)
stefashkaa Aug 2, 2021
8224f99
Release 1.0.6 (#279)
stefashkaa Aug 3, 2021
8e5386f
Release/1.0.7 (#281)
Nikita-Polyakov Aug 3, 2021
db4c51d
Release 1.0.8 (#284)
stefashkaa Aug 4, 2021
bcf171f
Release/1.0.9 (#286)
Nikita-Polyakov Aug 4, 2021
d51df3d
Release 1.0.10 (#288)
alexnatalia Aug 4, 2021
054d55d
Release/1.0.11 (#290)
Nikita-Polyakov Aug 5, 2021
f4a48f0
Release 1.0.12 (#294)
alexnatalia Aug 5, 2021
cfd768d
Release 1.0.13 (#297)
stefashkaa Aug 5, 2021
999335a
Release 1.0.14 (#299)
stefashkaa Aug 9, 2021
0667dc1
Release 1.0.15 (#304)
stefashkaa Aug 10, 2021
4a3098f
Release/1.0.16 (#307)
Nikita-Polyakov Aug 12, 2021
f644deb
Release 1.0.17 (#309)
alexnatalia Aug 13, 2021
c098b69
Release 1.0.18 (#311)
alexnatalia Aug 16, 2021
bc3855b
Release 1.0.19 (#313)
alexnatalia Aug 26, 2021
4be0087
Release 1.0.20 (#316)
RustemYuzlibaev Sep 21, 2021
6ece39c
Release 1.0.21 (#321)
stefashkaa Oct 13, 2021
086d037
Release/1.0.22 (#333)
Nikita-Polyakov Nov 24, 2021
9233834
Release/1.0.23 (#338)
Nikita-Polyakov Dec 3, 2021
bd47fd9
Release 1.0.24 (#340)
alexnatalia Dec 6, 2021
6ea9baf
Release/1.0.25 (#343)
RustemYuzlibaev Dec 21, 2021
7c3b09b
Release/1.0.26 (#345)
RustemYuzlibaev Dec 21, 2021
1a0caea
Merge branch 'master' into release/1.0.27
Sociopacific Feb 1, 2022
ed06965
Merge pull request #369 from soramitsu/release/1.0.27
Sociopacific Feb 2, 2022
0bc385a
Release/1.0.28 (#386)
Nikita-Polyakov Feb 24, 2022
f41749e
Release 1.0.29 (#393)
stefashkaa Mar 3, 2022
4fed0dc
Release/1.0.30 (#403)
RustemYuzlibaev Mar 29, 2022
7483b6a
Release 1.0.32 (#409)
stefashkaa Apr 20, 2022
19307f8
Release 1.0.33 (#421)
stefashkaa Jun 2, 2022
4a922b8
Release 1.0.34 (#446)
alexnatalia Jul 15, 2022
92a26a1
Release/1.0.35 (#459)
Nikita-Polyakov Aug 9, 2022
6a27f6c
Release 1.0.36 (#463)
alexnatalia Aug 29, 2022
bcece97
Release 1.0.37 (#465)
stefashkaa Aug 30, 2022
6c5d503
Release 1.0.38 (#467)
alexnatalia Sep 20, 2022
36d224a
Release 1.0.39 (#469)
alexnatalia Sep 26, 2022
c4be88d
Release/1.0.40 (#483)
Nikita-Polyakov Nov 30, 2022
55065fe
Update Dockerfile
Dec 5, 2022
ab4c58b
Merge pull request #487 from soramitsu/fix-vulns-master
Dec 5, 2022
879359b
Release/1.0.41 (#490)
Nikita-Polyakov Dec 8, 2022
20ac90b
Release/1.0.42 (#492)
Nikita-Polyakov Dec 9, 2022
a045de3
Release 1.0.43 (#508)
stefashkaa Mar 10, 2023
5a360e8
Release 1.0.44 (#510)
stefashkaa Mar 10, 2023
ce3abf3
Release/1.0.45 (#559)
Nikita-Polyakov Aug 15, 2023
bd92910
Release/1.0.46 (#560)
Nikita-Polyakov Aug 21, 2023
33713f4
Release: public vue2 version (#565)
stefashkaa Oct 9, 2023
9260b0f
Release 1.1.1 (#572)
stefashkaa Feb 9, 2024
17e61b3
Release 1.1.2
Kron1749 Aug 23, 2024
d2f1066
Release/1.1.3 (#629)
Kron1749 Sep 24, 2024
d1eb59f
Release/1.1.4 (#631) (#632)
Nikita-Polyakov Sep 26, 2024
b852c53
tooltip: change appendToBody prop default value (#633) (#635)
Nikita-Polyakov Oct 4, 2024
38d420e
add default attr to element-icons font (#636) (#637)
Nikita-Polyakov Oct 14, 2024
97da051
bump version
takemiyamakoto Sep 28, 2025
55b8254
fix merge conflicts with master
takemiyamakoto Sep 28, 2025
9b11df9
update docs
takemiyamakoto Sep 28, 2025
ee47261
Merge branch 'develop' into bump-version
takemiyamakoto Sep 28, 2025
cb1ce5f
lint
takemiyamakoto Sep 28, 2025
259b020
Merge remote-tracking branch 'origin/bump-version' into bump-version
takemiyamakoto Sep 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ Usage examples, migration notes, and per-component guidance live alongside the p
`packages/ui/README.md` for code snippets and plugin setup instructions, or spin up Storybook (`yarn sb:serve`) and
browse the stories locally.

## Documentation

For a complete handbook covering setup, theming, development workflow, testing, and release processes, see
[`docs/README.md`](docs/README.md).

OR **cypress component-testing:**

```shell
Expand Down
52 changes: 52 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Soramitsu UI Library Documentation

This directory gathers the practical knowledge required to work with the Soramitsu UI monorepo. Use it as a handbook whether you are onboarding, building an application with the published packages, or contributing new components to the design system.

## Quick start checklist

- Review [getting-started.md](getting-started.md) for prerequisites, environment setup, and the fastest way to spin up Storybook locally.
- Skim [project-structure.md](project-structure.md) to understand how the monorepo is organised and where to place new work.
- If you are consuming the library, jump to [components.md](components.md) for usage patterns and integration recipes.
- If you are contributing, read [development-workflow.md](development-workflow.md) and [testing-and-quality.md](testing-and-quality.md) to align with the tooling and quality bars.
- Customising themes or tokens? See [theming.md](theming.md) for the token architecture and Sass utilities.

## Document map

- [getting-started.md](getting-started.md) — installation, environment, and workshop-ready commands.
- [project-structure.md](project-structure.md) — packages, folders, and how code flows between them.
- [components.md](components.md) — consuming Soramitsu components, patterns, and API conventions.
- [theming.md](theming.md) — tokens, typography presets, and runtime theming strategies.
- [development-workflow.md](development-workflow.md) — day-to-day development loops, linting, and recommended toolchain integrations.
- [testing-and-quality.md](testing-and-quality.md) — unit, visual, and integration testing plus accessibility checks.
- [storybook.md](storybook.md) — Storybook configuration, authoring guidelines, and how to embed stories in downstream docs.
- [release-management.md](release-management.md) — versioning, changesets, and publishing coordination.
- [contributing.md](contributing.md) — collaboration standards, review expectations, and branch hygiene.
- [troubleshooting.md](troubleshooting.md) — common issues, diagnostics, and escalation paths.
- [scripts-reference.md](scripts-reference.md) — root-level and package-level scripts with when-to-use guidance.
- [glossary.md](glossary.md) — shared vocabulary for design system discussions.
- [backlog.md](backlog.md) — outstanding technical debt and follow-up tasks retained from the initial audit.

## Core principles

- **Design-system first.** Tokens, typography, and components are designed to stay in sync with Soramitsu’s design language. When in doubt, start from `@soramitsu-ui/theme` and align component styles with token contracts.
- **Composable Vue 3 architecture.** Components rely on composition API patterns, provide/inject contracts, and a-la-carte imports to keep bundles lean.
- **Story-driven development.** Storybook acts as the home for manual QA, visual review, and long-tail usage examples. Stories accompany every component change.
- **Automation as guardrails.** Lint, type-checks, Vitest, and Cypress component tests all run in CI via `yarn test:all`. Keeping them green locally shortens review cycles.

## Audience guide

| Persona | Focus areas |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| Application consumers | [getting-started.md](getting-started.md), [components.md](components.md), [theming.md](theming.md) |
| Component contributors | [development-workflow.md](development-workflow.md), [components.md](components.md), [testing-and-quality.md](testing-and-quality.md) |
| Release managers | [release-management.md](release-management.md), [scripts-reference.md](scripts-reference.md) |
| QA and accessibility reviewers | [storybook.md](storybook.md), [testing-and-quality.md](testing-and-quality.md) |

## Keeping this documentation healthy

- Update the relevant guide whenever you add a notable script, workflow, or architectural rule.
- Link to source files (`path/to/file.ts:Line`) when documenting opinions so readers can verify context quickly.
- Prefer short, task-oriented sections rather than prose-heavy essays; readers should find answers in under a minute.
- Raise a pull request for documentation gaps discovered during review and add them to [backlog.md](backlog.md) if they require separate follow-up.

Questions or suggestions? Open a discussion in the repository or tag the design system maintainers in your pull request. This documentation is meant to evolve with the codebase.
File renamed without changes.
133 changes: 133 additions & 0 deletions docs/components.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Components

This guide explains how to consume, configure, and extend the Vue components provided by `@soramitsu-ui/ui`.

## Import patterns

### Global plugin

The simplest way to register every component is through the bundled plugin. It installs components, composables, and global styles.

```ts
import { createApp } from 'vue'
import { plugin as SoramitsuUI } from '@soramitsu-ui/ui'
import '@soramitsu-ui/ui/styles'

createApp(App).use(SoramitsuUI()).mount('#app')
```

Use this approach when you control the entire application shell and can tolerate the additional bundle size.

### A-la-carte imports

For micro-frontends or performance-sensitive builds, import only the pieces you need.

```vue
<script setup lang="ts">
import { SButton, SAlert } from '@soramitsu-ui/ui'
</script>
<template>
<SAlert type="info">
<SButton appearance="secondary">Retry</SButton>
</SAlert>
</template>
```

Tree shaking relies on ES module imports. Keep bundlers configured for ESM (`moduleResolution: "bundler"` in TypeScript, Vite build in ESM mode).

### Styles

All components share a single CSS bundle emitted as `@soramitsu-ui/ui/styles`. Import it once at the top of your project or in the plugin entry point. The CSS bundle injects CSS variables and resets sourced from `@soramitsu-ui/theme` tokens.

## Component catalogue

| Category | Components |
| ---------- | -------------------------------------------------------------------------------------- |
| Inputs | `SCheckbox`, `SRadio`, `SSwitch`, `SSelect`, `STextField`, `SDatePicker`, `SJsonInput` |
| Navigation | `SNavigationMenu`, `SNavigationSubmenu`, `SNavigationMenuItem`, `STabs`, `SLink` |
| Feedback | `SAlert`, `SBadge`, `SProgressBar`, `SSpinner`, `SNotifications`, `SToasts` |
| Surfaces | `SAccordion`, `SModal`, `SPopover`, `STable`, `SCard`-style layouts (table adapt mode) |
| Utilities | `SBodyScrollLockProvider`, `STooltip`, transition wrappers in `Transitions/` |

Storybook documents the full API surface with live examples. Use `yarn sb:serve` and navigate through component categories.

## API conventions

- **Props are typed via TypeScript interfaces** (`types.ts` per component). Keep props flat and serialisable; prefer objects for complex configuration.
- **Events follow the `action:noun` pattern** (`click:row`, `update:modelValue`, `change:expand`). Avoid hyphenated legacy names when adding new events.
- **Slots mirror the DOM structure** (e.g. `header`, `row`, `details`, `prefix`). When adding slots, document default renderers in the Storybook stories.
- **Class names use BEM with underscores** (`button__icon_size_small`). Reuse existing modifiers before adding new ones.
- **Accessibility first.** Components ship with ARIA attributes, focus management, and keyboard interactions. When editing them:
- Preserve tab order.
- Keep `aria-*` attributes in sync with state.
- Cover focus-trap behaviour in Cypress tests when toggling modals, popovers, and dropdowns.

## Provide/inject contracts

Complex components such as Checkbox groups, Navigation menus, and Tabs provide a context via `provide/inject`. Shared contracts live in `api.ts` inside the component directory. When extending APIs:

1. Update the provided context type and default object.
2. Consume the context via a dedicated composable (e.g. `useCheckboxGroupApi`).
3. Document required provider usage in Storybook and this guide.

## Data attributes for testing

Cypress component tests target `data-testid` attributes. Keep them stable and descriptive:

```vue
<button data-testid="s-checkbox__control"> ... </button>
```

If you rename a `data-testid`, update the corresponding spec under `packages/ui/cypress/component/`.

## Writing a new component

1. **Scaffold the directory** under `packages/ui/src/components/<Name>` and create an `S<Name>.vue` file.
2. **Export it** from `index.ts` inside the component folder, then surface it through `packages/ui/src/components/index.ts` and `all-components.ts`.
3. **Author a Storybook story** in `packages/ui/stories/components/<Name>.stories.ts` to showcase common states, edge cases, and accessibility usage.
4. **Write Cypress component tests** under `packages/ui/cypress/component/<Name>.spec.cy.ts`. Focus on keyboard interaction, focus traps, and visual state toggles.
5. **Add unit tests** for complex utilities or composables in the component folder (`*.spec.ts`).
6. **Lint and type-check** using `yarn lint:check` and `yarn --cwd packages/ui typecheck`.
7. **Update API Extractor output** by running `yarn --cwd packages/ui build:tsc` followed by `yarn --cwd packages/ui api:extract:local`.

## Composables and utilities

`packages/ui/src/composables` and `packages/ui/src/util` host sharable logic such as:

- `useClickOutside`
- `useTrapFocus`
- `useDimensions`
- Date and formatting helpers

When adding new composables:

- Prefix the file with `use`.
- Export both the named composable and the inferred return type.
- Cover tricky logic with Vitest specs (`packages/ui/src/composables/__tests__`).
- Document their intended use in component stories when they alter behaviour.

## Icons

The `icons` directory under the UI components is reserved for icon wrappers. Most implementations delegate to the `@soramitsu-ui/icons` package. When adding icons:

- Add the SVG to `packages/icons` (if it does not exist yet).
- Create a Vue wrapper in `packages/ui/src/components/icons` for consistent sizing and loading.
- Update `packages/ui/src/components/icons/index.ts` to export new icons.

## Accessibility checklist

Before shipping a component change:

- Verify keyboard navigation paths in Storybook.
- Run Cypress specs with `yarn --cwd packages/ui cy:ci:component` (CI uses the same command).
- Use `cypress-axe` or browser plugins to scan for WAI-ARIA violations.
- Document accessible usage in the corresponding story (e.g. labelling inputs, describing popovers).

## Integration tips

- Keep consumer apps aligned with the same Vue version as listed in `packages/ui/package.json` (`^3.5.21`).
- When using `pinia` or other peer dependencies in stories, import them inside Storybook preview files to avoid leaking peers into the component bundle.
- For SSR projects, import CSS in the entry server file and avoid DOM-only APIs in component setup (gate them behind `if (process.client)` checks or use `onMounted`).

Refer back to this guide whenever you introduce API changes to maintain consistency across the library.
63 changes: 63 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Contributing

We welcome contributions that enhance the Soramitsu UI library. This guide captures expectations for collaboration, code style, and review.

## Communication

- Discuss major features or breaking changes with maintainers before implementation.
- Use GitHub issues for bugs and feature requests; cross-link related Storybook stories or Figma files.
- Mention relevant stakeholders (design, QA) when changes impact them.

## Coding standards

- Follow the [components.md](components.md) conventions for Vue architecture, naming, and accessibility.
- Adhere to the existing TypeScript config; avoid introducing alternative build systems without discussion.
- Keep files ASCII-encoded unless existing files use extended characters.

## Commit and Changeset messages

- Commits can be descriptive (`fix: align tooltip with trigger`), but releases rely on Changesets for user-facing notes.
- Changeset format: `**type**(scope): message` (e.g. `**fix**(SSelect): avoid double focus trap`).
- Include breaking change notices in the Changeset body and in Storybook docs.

## Documentation updates

- Update this documentation suite whenever behaviour or workflows change.
- Link to source files in doc updates (e.g. `packages/ui/src/components/Table/STable.vue:42`).
- Keep Storybook stories in sync with component APIs.

## Code review etiquette

- Request review from at least one maintainer and one peer familiar with the affected area.
- Provide context: describe motivation, highlight risky areas, attach screenshots or videos for visual tweaks.
- Address review feedback promptly or start a discussion if trade-offs are involved.

## Testing expectations

- Run targeted tests locally; CI runs `yarn test:all`.
- For UI behaviour changes, include or update Cypress specs.
- Capture unusual failure cases in tests rather than comments.

## Accessibility and internationalisation

- Ensure keyboard navigation and focus order remain consistent.
- Provide default English copy only when a string is essential; otherwise expose props/slots for localisation.
- Use semantic HTML elements whenever possible.

## Triaging issues

- Confirm reported bugs by reproducing them in Storybook.
- Label issues with affected components and severity.
- Link to the relevant entry in [backlog.md](backlog.md) if it already tracks the gap.

## Security

- Do not include secrets in commits (API keys, tokens).
- Report security concerns privately to the maintainers before opening public issues.

## Contributor licence

- Contributions are licensed under Apache 2.0, consistent with the repository licence.
- Ensure third-party code complies with compatible licences before inclusion.

Thank you for helping keep the Soramitsu design system robust and accessible. Raise a discussion if any part of this process can be improved—processes evolve alongside the codebase.
90 changes: 90 additions & 0 deletions docs/development-workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Development Workflow

This guide captures the day-to-day routines for contributing to the Soramitsu UI monorepo.

## Branch hygiene

- Prefer `feat/<topic>`, `fix/<topic>`, or `chore/<topic>` naming.
- Keep branches focused; split large features into incremental pull requests when possible.
- Rebase onto the default branch before requesting review to avoid merge commits in history.

## Editor setup

- Enable ESLint and Prettier integration. For VS Code, install **Prettier ESLint** and configure "Format on Save" to call `./node_modules/.bin/prettier-eslint`.
- Enable Volar or Vetur for Vue 3 single-file component support.
- Configure TypeScript to use the workspace version (`cmd + shift + P` → "TypeScript: Select TypeScript Version" → "Use Workspace Version").

## Local development loop

1. **Install dependencies** (once per clone): `yarn`.
2. **Run Storybook** when working on component visuals: `yarn sb:serve`.
3. **Launch Vitest in watch mode** for instant feedback:
```sh
yarn --cwd packages/ui test:unit --watch
```
4. **Start Cypress component tests** interactively if you change behaviour reliant on the DOM or keyboard interactions:
```sh
yarn --cwd packages/ui cy
```
5. **Update theme builds** whenever you touch tokens: `yarn build:theme`.

## Linting and formatting

- Quick format fix: `yarn lint:format:fix`
- ESLint only: `yarn lint:es`
- Combined check (CI equivalent): `yarn lint:check`

Ensure lint commands run clean before pushing. Prettier and ESLint rules are shared across packages to keep code style uniform.

## Type checking

Run type checks after significant TypeScript or Vue composable changes:

```sh
yarn --cwd packages/ui typecheck
```

CI runs this step implicitly via `yarn test:all`; catching issues locally speeds up review.

## API Extractor updates

When adding or modifying public component APIs:

```sh
yarn --cwd packages/ui build:tsc
yarn --cwd packages/ui api:extract:local
```

Commit the resulting `ui.api.md` diff with the feature branch.

## Storybook maintenance

- Keep stories light; prefer controls over hard-coded variants.
- Document breaking changes or new props through Storybook docs panels.
- Run `yarn --cwd packages/ui sb:build` to ensure the static build passes before merging significant UI updates.

## Changesets

Every user-facing change (new component, breaking change, bug fix) should include a Changeset:

```sh
yarn changeset
```

Follow the prompt, using the `**type**(scope): message` format described in `README.md`.

## Pull request checklist

- [ ] Linting and formatting pass locally.
- [ ] `yarn test:all` succeeds or any failing step is explained in the PR description.
- [ ] Stories, tests, and docs updated alongside code changes.
- [ ] API Extractor output updated when public APIs change.
- [ ] Screenshots or GIFs attached for visual updates where helpful.

## Reviewing others' work

- Pull the branch locally when visual changes are involved; run Storybook to verify.
- Check Cypress and Vitest snapshots for changes caused by the patch.
- Cross-reference `backlog.md` to avoid regressing known gaps.

Consistency and automation keep the design system reliable. Adapt this workflow as tooling evolves and document updates here.
Loading