@discuss-ds/ui 0.35.0 → 0.37.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 +17 -0
- package/dist/index.cjs +556 -484
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -1
- package/dist/index.d.ts +36 -1
- package/dist/index.js +532 -463
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/styles/globals.css +1 -0
- package/src/styles/overlayDestructive.test.ts +16 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@discuss-ds/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.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
|
+
})
|