@pokela/components 2.5.1 → 2.5.2

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,6 +1,6 @@
1
1
  # @pokela/components
2
2
 
3
- React-komponentit: **Pokela Design System**, versio 2.5.1.
3
+ React-komponentit: **Pokela Design System**, versio 2.5.2.
4
4
 
5
5
  > Generoitu hakemistosta `components/` — samoista tiedostoista joita sivusto
6
6
  > ajaa. Älä muokkaa käsin: muutokset tehdään lähteeseen ja paketti
@@ -10,11 +10,11 @@ React-komponentit: **Pokela Design System**, versio 2.5.1.
10
10
 
11
11
  ```js
12
12
  import { ListRow, Icon, Accordion, Grid, Col, Reveal } from '@pokela/components';
13
- import '@pokela/components/styles.css';
14
13
  ```
15
14
 
16
- `styles.css` tuo myös `@pokela/tokens`:n muuttujat, joten erillistä tuontia ei
17
- tarvita.
15
+ Tyylit, `@pokela/tokens`:n muuttujat ja fontit (Google Fonts) latautuvat
16
+ komponenttien mukana. Erillistä tuontia ei tarvita. Ilman bundleria
17
+ tyylit saa myös suoraan: `@pokela/components/styles.css`.
18
18
 
19
19
  ## Komponentit
20
20
 
@@ -3,26 +3,8 @@
3
3
  Install **both** packages as direct dependencies, at the same, latest
4
4
  version. `@pokela/components` uses the tokens of the same release.
5
5
 
6
- Import the stylesheet once, in the app entry:
7
-
8
- ```js
9
- import '@pokela/components/styles.css';
10
- ```
11
-
12
- It pulls in the tokens. Do not import the tokens stylesheet separately.
13
-
14
- Load the two typefaces from Google Fonts, once, in the document head. The
15
- tokens fall back to them by name (`--font-display` → Bodoni Moda,
16
- `--font-ui` → Archivo); without them the page renders in Georgia and
17
- Helvetica.
18
-
19
- <!-- generated:make-fontit -->
20
- ```html
21
- <link rel="preconnect" href="https://fonts.googleapis.com">
22
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
23
- <link href="https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600&family=Bodoni+Moda:wght@400;500&display=swap" rel="stylesheet">
24
- ```
25
- <!-- /generated -->
6
+ Styles, tokens and typefaces load with the components. Do not import any stylesheet or add font
7
+ links yourself.
26
8
 
27
9
  Component props are typed. Read them from the package — they are not repeated
28
10
  in these guidelines, because a copy would go stale.
package/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import './styles.css';
1
2
  export { default as Icon, ICON_NAMES } from './Icon.js';
2
3
  export type { IconName, IconSize, IconProps } from './Icon.js';
3
4
  export { default as ListRow } from './ListRow.js';
package/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  /* @pokela/components — kokooma. Generoitu, ks. scripts/paketti-komponentit.mjs. */
2
+ import './styles.css';
2
3
  export { default as Icon, ICON_NAMES } from './Icon.js';
3
4
  export { default as ListRow } from './ListRow.js';
4
5
  export { Accordion, useAccordionGroup } from './Accordion.js';
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@pokela/components",
3
- "version": "2.5.1",
3
+ "version": "2.5.2",
4
4
  "description": "React-komponentit: Pokela Design System. Generoitu tiedostoista components/, ei käsin ylläpidetty.",
5
5
  "license": "MIT",
6
6
  "author": "Veli-Matti Pokela",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
- "*.css"
9
+ "*.css",
10
+ "./index.js"
10
11
  ],
11
12
  "exports": {
12
13
  ".": {
@@ -26,7 +27,7 @@
26
27
  "LICENSE"
27
28
  ],
28
29
  "dependencies": {
29
- "@pokela/tokens": "^2.5.1"
30
+ "@pokela/tokens": "^2.5.2"
30
31
  },
31
32
  "peerDependencies": {
32
33
  "react": ">=18"
package/styles.css CHANGED
@@ -1,4 +1,5 @@
1
1
  /* @pokela/components — kaikki tyylit. Järjestys on merkitsevä. */
2
+ @import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600&family=Bodoni+Moda:wght@400;500&display=swap');
2
3
  @import '@pokela/tokens/tokens.css';
3
4
  @import './styles/base.css';
4
5
  @import './styles/icon.css';