@digigov/css 2.0.13 → 2.0.14-platform-201.01-04-26-11-49

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.
Files changed (50) hide show
  1. package/README.md +73 -4
  2. package/dist/digigov-base.css +1 -0
  3. package/dist/digigov-plain.css +1 -0
  4. package/dist/digigov.css +1 -9
  5. package/package.json +14 -47
  6. package/src/base/index.css +0 -2
  7. package/src/components/accordion.common.css +0 -1
  8. package/src/components/blockquote.common.css +0 -1
  9. package/src/components/button.common.css +0 -1
  10. package/src/components/card.common.css +0 -1
  11. package/src/components/checkboxes.common.css +0 -1
  12. package/src/components/chip.common.css +0 -1
  13. package/src/components/components.css +0 -1
  14. package/src/components/details.common.css +0 -1
  15. package/src/components/dropdown.common.css +0 -1
  16. package/src/components/form.common.css +0 -1
  17. package/src/components/header.common.css +0 -1
  18. package/src/components/layout.common.css +0 -1
  19. package/src/components/loader.common.css +0 -1
  20. package/src/components/modal.common.css +0 -1
  21. package/src/components/nav.common.css +0 -1
  22. package/src/components/notification-banner.common.css +0 -1
  23. package/src/components/panel.common.css +0 -1
  24. package/src/components/phase-banner.common.css +0 -1
  25. package/src/components/radios.common.css +0 -1
  26. package/src/components/skeleton.common.css +0 -1
  27. package/src/components/stack.common.css +0 -1
  28. package/src/components/summary-list.common.css +0 -1
  29. package/src/components/svg-icons.common.css +0 -1
  30. package/src/components/typography.common.css +0 -1
  31. package/src/components/warning-text.common.css +0 -1
  32. package/src/index.css +6 -3
  33. package/tailwind.config.js +1 -1
  34. package/dist/base/index.css +0 -7
  35. package/dist/base.js +0 -1
  36. package/dist/components.js +0 -1
  37. package/dist/utilities/index.css +0 -1
  38. package/dist/utilities.js +0 -1
  39. package/index.js +0 -127
  40. package/postcss.config.js +0 -20
  41. package/src/base/postcss.config.js +0 -33
  42. package/src/base/tailwind.config.js +0 -14
  43. package/src/components/postcss.config.js +0 -20
  44. package/src/components/tailwind.config.js +0 -16
  45. package/src/pages/_app.js +0 -5
  46. package/src/pages/headings/service-heading.js +0 -20
  47. package/src/pages/index.js +0 -417
  48. package/src/utilities/postcss.config.js +0 -20
  49. package/src/utilities/tailwind.config.js +0 -10
  50. package/theming.js +0 -121
package/README.md CHANGED
@@ -1,7 +1,76 @@
1
- # Digigov Css
1
+ # @digigov/css
2
2
 
3
- Get started with Digigov CSS, the official CSS library of the GOV.GR design system for building responsive, mobile-first services.
3
+ CSS component library for the Digigov design system. Ships pre-built CSS files that include base styles, component classes (`.ds-*`), and layout utilities all built on Tailwind CSS and themed via CSS custom properties.
4
4
 
5
- Our goal is to provide a lightweight, easy-to-use and well documented CSS library for everyone that wants to create a pixel-perfect GOV.GR Service.
5
+ ## Installation
6
6
 
7
- Use our [design system](https://guide.demo.gov.gr/) to make your service consistent with GOV.GR.
7
+ ```bash
8
+ npm install @digigov/css
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### Without Tailwind CSS
14
+
15
+ Import the pre-built CSS bundle. No build tooling required — all Tailwind directives are already compiled.
16
+
17
+ ```js
18
+ import '@digigov/css'; // dist/digigov.css — includes theme-default + theme-govgr
19
+ ```
20
+
21
+ Or pick a variant:
22
+
23
+ | Dist file | Contents |
24
+ | ------------------------ | ----------------------------------------------------------- |
25
+ | `dist/digigov.css` | theme-default + theme-govgr + base + components + utilities |
26
+ | `dist/digigov-plain.css` | theme-default + base + components + utilities |
27
+ | `dist/digigov-base.css` | base + components + utilities (no theme) |
28
+
29
+ ### With Tailwind CSS
30
+
31
+ If your app uses Tailwind and you want to write utility classes like `bg-primary`, `text-error/50`, or `md:flex` using the design system tokens, use the exported Tailwind config as a preset:
32
+
33
+ ```js
34
+ // tailwind.config.js
35
+ module.exports = {
36
+ presets: [require('@digigov/css/tailwind.config.js')],
37
+ content: ['./src/**/*.{js,ts,jsx,tsx}'],
38
+ };
39
+ ```
40
+
41
+ Then import the dist CSS alongside your own Tailwind entry:
42
+
43
+ ```js
44
+ import '@digigov/css'; // design system components + theme
45
+ import './main.css'; // your Tailwind entry point
46
+ ```
47
+
48
+ ```css
49
+ /* main.css */
50
+ @tailwind base;
51
+ @tailwind components;
52
+ @tailwind utilities;
53
+ ```
54
+
55
+ The preset gives your Tailwind build access to all design system colors, breakpoints, fonts, and extended theme values. Your utility classes will resolve to the same CSS custom properties that the design system components use.
56
+
57
+ ## Dist contents
58
+
59
+ The pre-built CSS includes:
60
+
61
+ - **Base styles** — Global defaults (`body`, `html`) using design system tokens
62
+ - **Components** — All `.ds-*` component classes (buttons, forms, cards, accordions, navigation, etc.)
63
+ - **Utilities** — Layout helpers (`.ds-grid`, `.ds-gap-*`, `.ds-m-*`, `.ds-p-*`, `.ds-print-*`)
64
+
65
+ ## Theming
66
+
67
+ Themes provide CSS custom properties (e.g. `--color-primary-rgb`) that the component styles reference. Two themes are available:
68
+
69
+ - **theme-default** — included in `digigov.css` and `digigov-plain.css`
70
+ - **theme-govgr** — included in `digigov.css`
71
+
72
+ Use `digigov-plain.css` if you only need the default theme, or `digigov-base.css` if you want to provide your own theme variables.
73
+
74
+ ### Dark mode
75
+
76
+ Dark mode uses the `class` strategy. Add the `dark` class to an ancestor element to activate dark theme overrides.