@discuss-ds/ui 0.35.0 → 0.36.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/CHANGELOG.md +11 -0
- package/package.json +2 -2
- package/src/styles/globals.css +1 -0
- package/src/styles/overlayDestructive.test.ts +16 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @discuss-ds/ui
|
|
2
2
|
|
|
3
|
+
## 0.36.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#137](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/137) [`1c4573c`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/1c4573cab4cb9a4c6dc8a37993e92fa84f6a2634) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - New overlay token `overlay-destructive-20` (`--sys-color-overlay-destructive-20`, Tailwind `from-overlay-destructive-20`): the coral of the destructive text at 20% opacity. Use it only for the hover of a component that has the `destructive-soft` background (for example a clickable red badge). Nothing existing changes.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`1c4573c`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/1c4573cab4cb9a4c6dc8a37993e92fa84f6a2634)]:
|
|
12
|
+
- @discuss-ds/tokens@0.4.0
|
|
13
|
+
|
|
3
14
|
## 0.35.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@discuss-ds/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"react-day-picker": "^10.0.2",
|
|
24
24
|
"react-hook-form": "^7.88.0",
|
|
25
25
|
"tailwind-merge": "^2.6.0",
|
|
26
|
-
"@discuss-ds/tokens": "0.
|
|
26
|
+
"@discuss-ds/tokens": "0.4.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": "^19.0.0",
|
package/src/styles/globals.css
CHANGED
|
@@ -90,6 +90,7 @@
|
|
|
90
90
|
--color-overlay-dark-3: var(--sys-color-overlay-dark-3);
|
|
91
91
|
--color-overlay-dark-5: var(--sys-color-overlay-dark-5);
|
|
92
92
|
--color-overlay-dark-10: var(--sys-color-overlay-dark-10);
|
|
93
|
+
--color-overlay-destructive-20: var(--sys-color-overlay-destructive-20);
|
|
93
94
|
--color-surface-foreground: var(--sys-color-surface-foreground);
|
|
94
95
|
--color-accent-muted: var(--sys-color-accent-muted);
|
|
95
96
|
--color-input-accent: var(--sys-color-input-accent);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs'
|
|
2
|
+
import { resolve } from 'node:path'
|
|
3
|
+
import { describe, expect, it } from 'vitest'
|
|
4
|
+
|
|
5
|
+
const tokens = readFileSync(resolve(__dirname, '../../../tokens/src/tokens.css'), 'utf8')
|
|
6
|
+
const globals = readFileSync(resolve(__dirname, 'globals.css'), 'utf8')
|
|
7
|
+
const definition = /--sys-color-overlay-destructive-20: color-mix\(in srgb, var\(--sys-color-destructive-soft-foreground\) 20%, transparent\);/g
|
|
8
|
+
|
|
9
|
+
describe('overlay-destructive-20', () => {
|
|
10
|
+
it('is the destructive text colour at 20%, defined in the Light and the Dark scope', () => {
|
|
11
|
+
expect(tokens.match(definition)).toHaveLength(2)
|
|
12
|
+
})
|
|
13
|
+
it('is available as a Tailwind colour utility', () => {
|
|
14
|
+
expect(globals).toContain('--color-overlay-destructive-20: var(--sys-color-overlay-destructive-20);')
|
|
15
|
+
})
|
|
16
|
+
})
|