@digitalservicebund/ris-ui 3.21.2 → 4.0.0
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 +13 -101
- package/dist/config/locale.d.ts +1 -1
- package/dist/lib/tags.d.ts +1 -1
- package/dist/primevue/autocomplete/autocomplete.d.ts +1 -1
- package/dist/primevue/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist/primevue/button/button.d.ts +1 -1
- package/dist/primevue/checkbox/checkbox.d.ts +1 -1
- package/dist/primevue/chip/chip.d.ts +1 -1
- package/dist/primevue/confirmDialog/confirmDialog.d.ts +1 -1
- package/dist/primevue/dataTable/dataTable.d.ts +1 -1
- package/dist/primevue/dialog/dialog.d.ts +1 -1
- package/dist/primevue/fileUpload/fileUpload.d.ts +1 -1
- package/dist/primevue/index.js +598 -843
- package/dist/primevue/index.js.map +1 -1
- package/dist/primevue/inputGroup/inputGroup.d.ts +1 -1
- package/dist/primevue/inputMask/inputMask.d.ts +1 -1
- package/dist/primevue/inputText/inputText.d.ts +1 -1
- package/dist/primevue/menu/menu.d.ts +1 -1
- package/dist/primevue/message/message.d.ts +1 -1
- package/dist/primevue/multiSelect/multiSelect.d.ts +1 -1
- package/dist/primevue/panelMenu/panelMenu.d.ts +1 -1
- package/dist/primevue/password/password.d.ts +1 -1
- package/dist/primevue/progressSpinner/progressSpinner.d.ts +1 -1
- package/dist/primevue/radioButton/radioButton.d.ts +1 -1
- package/dist/primevue/select/select.d.ts +1 -1
- package/dist/primevue/splitter/splitter.d.ts +1 -1
- package/dist/primevue/tabs/tabs.d.ts +1 -1
- package/dist/primevue/textarea/textarea.d.ts +1 -1
- package/dist/primevue/toast/toast.d.ts +1 -1
- package/dist/primevue/tooltip/tooltip.d.ts +1 -1
- package/dist/primevue/tree/tree.d.ts +1 -1
- package/dist/style.css +2 -1
- package/dist/tailwind/index.js +0 -2
- package/package.json +37 -66
- package/dist/components/RisAutoComplete/RisAutoComplete.vue.d.ts +0 -22
- package/dist/components/RisAutoCompleteMultiple/RisAutoCompleteMultiple.vue.d.ts +0 -24
- package/dist/components/RisChipsInput/ChipInput.vue.d.ts +0 -23
- package/dist/components/RisChipsInput/RisChipsInput.vue.d.ts +0 -18
- package/dist/components/RisCopyableLabel/RisCopyableLabel.vue.d.ts +0 -22
- package/dist/components/RisExpandableText/RisExpandableText.vue.d.ts +0 -34
- package/dist/components/RisGhostButton/RisGhostButton.vue.d.ts +0 -16
- package/dist/components/RisPaginator/RisPaginator.vue.d.ts +0 -15
- package/dist/components/RisSingleAccordion/RisSingleAccordion.vue.d.ts +0 -25
- package/dist/components/index.d.ts +0 -15
- package/dist/components/index.js +0 -6912
- package/dist/components/index.js.map +0 -1
- package/dist/tags-Dde6Li6m.js +0 -5
- package/dist/tags-Dde6Li6m.js.map +0 -1
- package/dist/tailwind/index.js.map +0 -1
- package/dist/vitest-setup.d.ts +0 -1
package/README.md
CHANGED
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
RIS UI contains
|
|
7
|
+
RIS UI contains two things:
|
|
8
8
|
|
|
9
9
|
- a [theme](./src/primevue/) for [Vue 3](https://vuejs.org) components from [PrimeVue 4](https://primevue.org);
|
|
10
|
-
- [custom components](./src/components/);
|
|
11
10
|
- a [configuration](./src/tailwind/global.css) file for [Tailwind](https://tailwindcss.com) that includes design tokens, typography, and global component styles, ensuring consistency across custom UI and PrimeVue components.
|
|
12
11
|
|
|
13
12
|
Vue, PrimeVue and Tailwind are required for RIS UI to work (you'll see a warning about missing peer dependencies if you're trying to use RIS UI without them). To get started, install:
|
|
@@ -20,13 +19,7 @@ pnpm install vue primevue tailwindcss
|
|
|
20
19
|
pnpm install @digitalservicebund/ris-ui
|
|
21
20
|
```
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
> [!NOTE]
|
|
26
|
-
>
|
|
27
|
-
> If you're using Nuxt, follow the instructions for [Nuxt](#nuxt-setup) below instead.
|
|
28
|
-
|
|
29
|
-
Import and apply the RIS UI theme and fonts where you set up your application (typically `main.ts`):
|
|
22
|
+
Import and apply the RIS UI theme and fonts where you set up your application (typically `main.ts` or a [Nuxt plugin](https://nuxt.com/docs/4.x/directory-structure/app/plugins)):
|
|
30
23
|
|
|
31
24
|
```diff
|
|
32
25
|
// main.ts
|
|
@@ -55,85 +48,6 @@ Then, extend your Tailwind configuration for RIS UI:
|
|
|
55
48
|
/* other config and styles */
|
|
56
49
|
```
|
|
57
50
|
|
|
58
|
-
### Nuxt setup
|
|
59
|
-
|
|
60
|
-
If using Nuxt, skip the Vue setup above.
|
|
61
|
-
|
|
62
|
-
Install the Nuxt PrimeVue module:
|
|
63
|
-
|
|
64
|
-
```sh
|
|
65
|
-
pnpm install @primevue/nuxt-module
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Add the PrimeVue module and configure it in `nuxt.config.ts`:
|
|
69
|
-
|
|
70
|
-
```diff
|
|
71
|
-
// nuxt.config.ts
|
|
72
|
-
+ import tailwindcss from "@tailwindcss/vite";
|
|
73
|
-
export default defineNuxtConfig({
|
|
74
|
-
// your other configuration
|
|
75
|
-
modules: [
|
|
76
|
-
+ "@primevue/nuxt-module",
|
|
77
|
-
],
|
|
78
|
-
+ primevue: {
|
|
79
|
-
+ usePrimeVue: false, // configured in plugins/ris-ui.ts
|
|
80
|
-
+ },
|
|
81
|
-
vite: {
|
|
82
|
-
plugins: [
|
|
83
|
-
+ tailwindcss(),
|
|
84
|
-
],
|
|
85
|
-
}
|
|
86
|
-
})
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
Add a new Nuxt plugin to configure PrimeVue:
|
|
90
|
-
|
|
91
|
-
```typescript
|
|
92
|
-
// plugins/ris-ui.ts
|
|
93
|
-
import { RisUiTheme, RisUiLocale } from "@digitalservicebund/ris-ui/primevue";
|
|
94
|
-
import PrimeVue from "primevue/config";
|
|
95
|
-
|
|
96
|
-
export default defineNuxtPlugin((nuxtApp) => {
|
|
97
|
-
nuxtApp.vueApp.use(PrimeVue, {
|
|
98
|
-
pt: RisUiTheme,
|
|
99
|
-
unstyled: true,
|
|
100
|
-
locale: RisUiLocale.deDE,
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Continue with the next step, _Tailwind CSS Configuration_.
|
|
106
|
-
|
|
107
|
-
## Getting started
|
|
108
|
-
|
|
109
|
-
To get you started, here's an example how to use a RIS UI button in your ui component. The Storybook code snippet is hiding some essential parts from you. Here is an an example `StartPage.vue`:
|
|
110
|
-
|
|
111
|
-
```vue
|
|
112
|
-
<script lang="ts" setup>
|
|
113
|
-
import { useRouter } from "vue-router";
|
|
114
|
-
import Button from "primevue/button";
|
|
115
|
-
import IconAdd from "~icons/material-symbols/add";
|
|
116
|
-
|
|
117
|
-
const router = useRouter();
|
|
118
|
-
</script>
|
|
119
|
-
|
|
120
|
-
<template>
|
|
121
|
-
<Button
|
|
122
|
-
:disabled="false"
|
|
123
|
-
:loading="false"
|
|
124
|
-
:text="false"
|
|
125
|
-
label="Neue Dokumentationseinheit"
|
|
126
|
-
@click="router.push({ path: '/documentUnit/new' })"
|
|
127
|
-
>
|
|
128
|
-
<template #icon>
|
|
129
|
-
<IconAdd />
|
|
130
|
-
</template>
|
|
131
|
-
</Button>
|
|
132
|
-
</template>
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
In addition to the installation steps, the icon is being provided by [unplugin-icons](https://www.npmjs.com/package/unplugin-icons) in conjunction with [@iconify-json/material-symbols](https://www.npmjs.com/package/@iconify-json/material-symbols).
|
|
136
|
-
|
|
137
51
|
## Development
|
|
138
52
|
|
|
139
53
|
To make changes to RIS UI, you'll need the current [Node.js LTS](https://nodejs.org/en/download/package-manager) along with pnpm installed on your machine.
|
|
@@ -171,22 +85,20 @@ RIS UI uses the following tools:
|
|
|
171
85
|
- [Vite](https://vitejs.dev/) as our dev server and bundler
|
|
172
86
|
- [Unplugin Icons](https://github.com/unplugin/unplugin-icons) for providing SVG icons as components
|
|
173
87
|
- [TypeScript](https://www.typescriptlang.org/)
|
|
174
|
-
- [
|
|
175
|
-
- [Vitest](https://vitest.dev) as our test runner
|
|
88
|
+
- [Oxlint](https://oxc.rs/docs/guide/usage/linter.html) and [Oxfmt](https://oxc.rs/docs/guide/usage/formatter.html) for code consistency
|
|
176
89
|
|
|
177
90
|
You can find more in [package.json](./package.json), but the above are the ones you'll work with the most.
|
|
178
91
|
|
|
179
92
|
In terms of files and folders, you'll find:
|
|
180
93
|
|
|
181
|
-
| Folder
|
|
182
|
-
|
|
|
183
|
-
| (root)
|
|
184
|
-
| `.github/`
|
|
185
|
-
| `.storybook/`
|
|
186
|
-
| `src/
|
|
187
|
-
| `src/
|
|
188
|
-
| `src/
|
|
189
|
-
| `src/lib` | Internal tools and helpers |
|
|
94
|
+
| Folder | Contents |
|
|
95
|
+
| -------------- | ----------------------------------------- |
|
|
96
|
+
| (root) | General docs and configuration |
|
|
97
|
+
| `.github/` | GitHub Actions configuration |
|
|
98
|
+
| `.storybook/` | Storybook setup |
|
|
99
|
+
| `src/primevue` | The RIS UI preset for PrimeVue |
|
|
100
|
+
| `src/tailwind` | The RIS UI preset and plugin for Tailwind |
|
|
101
|
+
| `src/lib` | Internal tools and helpers |
|
|
190
102
|
|
|
191
103
|
### Tailwind IntelliSense
|
|
192
104
|
|
|
@@ -228,8 +140,8 @@ lefthook install
|
|
|
228
140
|
|
|
229
141
|
When you make a commit now, Lefthook will ensure your changes and commit message adhere to our coding guidelines:
|
|
230
142
|
|
|
231
|
-
- Code is formatted
|
|
232
|
-
-
|
|
143
|
+
- Code is formatted
|
|
144
|
+
- Linter passes without warnings
|
|
233
145
|
- The commit message follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. If you're making changes to a component, please use the component name as the scope (multiple scopes are allowed).
|
|
234
146
|
|
|
235
147
|
Keep in mind that your commit messages will be used for generating changelogs and inferring version numbers when making a release. If you made multiple changes, please consider squashing them to keep the history, as well as the changelogs, tidy and readable.
|
package/dist/config/locale.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PrimeVueLocaleOptions } from "primevue/config";
|
|
1
|
+
import type { PrimeVueLocaleOptions } from "primevue/config";
|
|
2
2
|
export declare const deDE: PrimeVueLocaleOptions;
|
package/dist/lib/tags.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare const html: (strings: TemplateStringsArray, ...values: unknown[])
|
|
|
12
12
|
* Tagged template string for Tailwind classes. The tag itself doesn't do
|
|
13
13
|
* anything, but using it will allow your editor to provide Tailwind
|
|
14
14
|
* Intellisense for template strings in scripts, as well as automatic class
|
|
15
|
-
* sorting
|
|
15
|
+
* sorting.
|
|
16
16
|
*
|
|
17
17
|
* ```ts
|
|
18
18
|
* const classes = tw`px-16 bg-blue-200`
|