diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index e45b4e13f..789b391bf 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -5,6 +5,7 @@ import StorybookDecorator from './storybook-decorator'; import '../src/tedi/styles/index.scss'; import '../src/community/styles/index.scss'; +import '../node_modules/@tedi-design-system/core/icons/_all.scss'; import '../node_modules/@tedi-design-system/core/tedi-storybook-styles.scss'; import { PrintingProvider } from '../src/tedi/providers/printing-provider'; diff --git a/package-lock.json b/package-lock.json index 231e627f5..d43e3f676 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@mui/material": "^5.15.13", "@mui/x-date-pickers": "^5.0.20", "@tanstack/react-table": "^8.13.2", - "@tedi-design-system/core": "^6.9.0", + "@tedi-design-system/core": "6.11.2", "classnames": "^2.5.1", "draft-js": "^0.11.7", "draftjs-md-converter": "^1.5.2", @@ -10560,9 +10560,9 @@ } }, "node_modules/@tedi-design-system/core": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/@tedi-design-system/core/-/core-6.9.0.tgz", - "integrity": "sha512-+RPnP8d9xcgabfFODJRd472JPzRIT8OR6XMd67RtbKyLOMNHKl8RwT22DCKcMnH4FEMv/v7Uay1jwgWL9Wp/Rg==", + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/@tedi-design-system/core/-/core-6.11.2.tgz", + "integrity": "sha512-iYKcXyJV1KJCpcjwxN4bQVTi9jnIkvp/5bUtR8jRes2BMvTpx7PKuoFnOnjiBZmRpm2hhgiqzhP/SpvwJCRR9A==", "engines": { "node": ">=24.0.0", "npm": ">=11.0.0" diff --git a/package.json b/package.json index ac3f88743..63bd86c9a 100644 --- a/package.json +++ b/package.json @@ -15,12 +15,14 @@ "import": "./community.es.js", "require": "./community.cjs.js" }, - "./index.css": "./index.css" + "./index.css": "./index.css", + "./index-without-icons.css": "./index-without-icons.css", + "./icons/*.css": "./icons/*.css" }, "scripts": { "prepare": "husky", "start": "storybook dev -p 4400 -c .storybook", - "build": "rm -rf dist && vite build --config vite.lib.config.ts && replace-in-file //fonts//g \"./fonts/\" dist/index.css --isRegex", + "build": "rm -rf dist && vite build --config vite.lib.config.ts && replace-in-file //fonts//g \"./fonts/\" dist/index.css dist/index-without-icons.css --isRegex", "build:sb": "storybook build -c .storybook -o dist/storybook-static --stats-json && replace-in-file //fonts//g \"../fonts/\" \"dist/storybook-static/assets/*.css\" --isRegex", "lint": "npx stylelint \"src/**/*.scss\" --fix && eslint \"src/**/*.{ts,tsx}\" --no-ignore --fix", "lint:ci": "npx stylelint \"src/**/*.scss\" --quiet && npx eslint . --quiet", @@ -47,7 +49,7 @@ "@mui/material": "^5.15.13", "@mui/x-date-pickers": "^5.0.20", "@tanstack/react-table": "^8.13.2", - "@tedi-design-system/core": "^6.9.0", + "@tedi-design-system/core": "6.11.2", "classnames": "^2.5.1", "draft-js": "^0.11.7", "draftjs-md-converter": "^1.5.2", diff --git a/skills/tedi-react/SKILL.md b/skills/tedi-react/SKILL.md index 7973820d7..1f5768a26 100644 --- a/skills/tedi-react/SKILL.md +++ b/skills/tedi-react/SKILL.md @@ -132,6 +132,13 @@ function App() { import '@tedi-design-system/react/index.css'; ``` +`index.css` declares all three Material Symbols fonts. When the app uses one `Icon` `type` (recommended), load only that font instead: + +```tsx +import '@tedi-design-system/react/index-without-icons.css'; +import '@tedi-design-system/react/icons/outlined.css'; // or rounded.css / sharp.css +``` + Or in SCSS: ```scss @use '@tedi-design-system/core/scss' as tedi; @@ -278,7 +285,7 @@ sendNotification({ type: 'success', title: 'Done', children: 'Task completed' }) A handful of mistakes account for most TEDI integration issues. Avoid them up front: -- **Import from `/tedi` or `/community`, never the package root.** `@tedi-design-system/react` is not a valid import path — the package has explicit entry points (`@tedi-design-system/react/tedi`, `@tedi-design-system/react/community`, `@tedi-design-system/react/index.css`). Importing from the root will fail or silently miss types. +- **Import from `/tedi` or `/community`, never the package root.** `@tedi-design-system/react` is not a valid import path — the package has explicit entry points (`@tedi-design-system/react/tedi`, `@tedi-design-system/react/community`, `@tedi-design-system/react/index.css`, `@tedi-design-system/react/index-without-icons.css`, `@tedi-design-system/react/icons/*.css`). Importing from the root will fail or silently miss types. - **Prefer TEDI-Ready over Community whenever possible.** Several Community components are deprecated in favor of TEDI-Ready equivalents, and the set with no TEDI-Ready alternative yet shifts over time — check the manifest's `status` field and the component JSDoc for the current deprecation status before reaching into Community. See [references/components.md](references/components.md). - **Always pass `id` to form controls.** `TextField`, `Select`, `Checkbox`, `Radio`, etc. require it — it's how the label/helper/aria wiring works. There is no auto-generated fallback. - **Use design tokens, not hardcoded colors.** Prefer the semantic roles (`var(--general-surface-primary)`, `var(--general-text-secondary)`) and drop to a `--tedi-*` primitive only when no semantic token fits. This is what makes theme switching and brand overrides work. Look names up in `node_modules/@tedi-design-system/core/tokens.json` rather than recalling them — see [references/theming.md](references/theming.md). diff --git a/src/community/components/form/choice-group/components/filter-item/filter-item.module.scss b/src/community/components/form/choice-group/components/filter-item/filter-item.module.scss index fc1c99422..e3402b0d5 100644 --- a/src/community/components/form/choice-group/components/filter-item/filter-item.module.scss +++ b/src/community/components/form/choice-group/components/filter-item/filter-item.module.scss @@ -22,7 +22,7 @@ $backgrounds: ( background: var(--general-surface-tertiary); border-radius: var(--tedi-radius-02-default); - .filter-item__input:focus + & { + .filter-item__input:focus-visible + & { @include mixins.focus-element; } diff --git a/src/community/components/form/choice-group/components/light-item/light-item.module.scss b/src/community/components/form/choice-group/components/light-item/light-item.module.scss index b72ec42e2..6a0a901bc 100644 --- a/src/community/components/form/choice-group/components/light-item/light-item.module.scss +++ b/src/community/components/form/choice-group/components/light-item/light-item.module.scss @@ -17,7 +17,7 @@ border: 1px solid var(--general-surface-disabled); border-radius: var(--tedi-radius-02-default); - .light-item__input:focus + & { + .light-item__input:focus-visible + & { @include mixins.focus-element; } diff --git a/src/community/components/form/choice-group/components/selector-item/selector-item.module.scss b/src/community/components/form/choice-group/components/selector-item/selector-item.module.scss index 2cce027a6..b8ff86f0f 100644 --- a/src/community/components/form/choice-group/components/selector-item/selector-item.module.scss +++ b/src/community/components/form/choice-group/components/selector-item/selector-item.module.scss @@ -24,7 +24,7 @@ background-color: var(--general-surface-tertiary); border: 1px solid var(--general-border-secondary); - .selector-item__input:focus + & { + .selector-item__input:focus-visible + & { @include mixins.focus-element; border-radius: 0; diff --git a/src/tedi/components/base/icon/icon.stories.tsx b/src/tedi/components/base/icon/icon.stories.tsx index 3703d30c3..4593e06ba 100644 --- a/src/tedi/components/base/icon/icon.stories.tsx +++ b/src/tedi/components/base/icon/icon.stories.tsx @@ -11,7 +11,11 @@ import { Icon, IconProps } from './icon'; * Zeroheight ↗