@discourser/design-system 0.13.0 → 0.15.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/dist/{chunk-BQAXPMOR.js → chunk-F7LHARS4.js} +3 -3
- package/dist/{chunk-BQAXPMOR.js.map → chunk-F7LHARS4.js.map} +1 -1
- package/dist/{chunk-ZNAYN5UV.js → chunk-M7J7WKJY.js} +178 -242
- package/dist/chunk-M7J7WKJY.js.map +1 -0
- package/dist/{chunk-XSX6TKJZ.cjs → chunk-QC44JPCA.cjs} +178 -242
- package/dist/chunk-QC44JPCA.cjs.map +1 -0
- package/dist/{chunk-MIBEMJNS.cjs → chunk-QP4EJI3G.cjs} +2 -2
- package/dist/{chunk-MIBEMJNS.cjs.map → chunk-QP4EJI3G.cjs.map} +1 -1
- package/dist/components/Badge.d.ts +1 -1
- package/dist/components/Badge.d.ts.map +1 -1
- package/dist/components/Checkbox.d.ts +13 -13
- package/dist/components/index.cjs +33 -33
- package/dist/components/index.js +1 -1
- package/dist/index.cjs +37 -37
- package/dist/index.js +2 -2
- package/dist/preset/colors/create-palette-bridge.d.ts +45 -0
- package/dist/preset/colors/create-palette-bridge.d.ts.map +1 -0
- package/dist/preset/colors/index.d.ts +13 -926
- package/dist/preset/colors/index.d.ts.map +1 -1
- package/dist/preset/colors/m3-error.d.ts +4 -306
- package/dist/preset/colors/m3-error.d.ts.map +1 -1
- package/dist/preset/colors/m3-primary.d.ts +1 -306
- package/dist/preset/colors/m3-primary.d.ts.map +1 -1
- package/dist/preset/colors/m3-secondary.d.ts +7 -0
- package/dist/preset/colors/m3-secondary.d.ts.map +1 -0
- package/dist/preset/colors/m3-tertiary.d.ts +7 -0
- package/dist/preset/colors/m3-tertiary.d.ts.map +1 -0
- package/dist/preset/index.cjs +2 -2
- package/dist/preset/index.d.ts.map +1 -1
- package/dist/preset/index.js +1 -1
- package/dist/preset/recipes/radio-group.d.ts.map +1 -1
- package/dist/preset/semantic-tokens.d.ts +4 -4
- package/dist/preset/shadows.d.ts +12 -26
- package/dist/preset/shadows.d.ts.map +1 -1
- package/package.json +31 -30
- package/src/components/Badge.tsx +1 -1
- package/src/languages/__tests__/transform.test.ts +100 -0
- package/src/preset/__tests__/shadows.test.ts +83 -0
- package/src/preset/__tests__/token-resolution.test.ts +247 -0
- package/src/preset/__tests__/translation-component-completeness.test.ts +349 -0
- package/src/preset/__tests__/translation-token-accuracy.test.ts +349 -0
- package/src/preset/colors/create-palette-bridge.ts +156 -0
- package/src/preset/colors/index.ts +4 -0
- package/src/preset/colors/m3-error.ts +12 -77
- package/src/preset/colors/m3-primary.ts +5 -90
- package/src/preset/colors/m3-secondary.ts +13 -0
- package/src/preset/colors/m3-tertiary.ts +13 -0
- package/src/preset/index.ts +1 -6
- package/src/preset/recipes/__tests__/recipe-shadows.test.ts +238 -0
- package/src/preset/recipes/button.ts +3 -3
- package/src/preset/recipes/radio-group.ts +12 -11
- package/src/preset/semantic-tokens.ts +6 -6
- package/src/preset/shadows.ts +12 -26
- package/src/stories/foundations/Colors.mdx +1 -1
- package/src/stories/foundations/Elevation.mdx +37 -8
- package/src/stories/foundations/Spacing.mdx +1 -1
- package/src/stories/foundations/Typography.mdx +1 -1
- package/dist/chunk-XSX6TKJZ.cjs.map +0 -1
- package/dist/chunk-ZNAYN5UV.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkQC44JPCA_cjs = require('./chunk-QC44JPCA.cjs');
|
|
4
|
+
var chunkQP4EJI3G_cjs = require('./chunk-QP4EJI3G.cjs');
|
|
5
5
|
require('./chunk-EARF7VDF.cjs');
|
|
6
6
|
var clsx = require('clsx');
|
|
7
7
|
|
|
@@ -11,143 +11,143 @@ function cn(...inputs) {
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, "activeLanguage", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkQC44JPCA_cjs.material3Language; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "discourserPandaPreset", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkQC44JPCA_cjs.discourserPandaPreset; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "transformToPandaTheme", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkQC44JPCA_cjs.transformToPandaTheme; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "AbsoluteCenter", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkQP4EJI3G_cjs.AbsoluteCenter_exports; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "Accordion", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkQP4EJI3G_cjs.Accordion_exports; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "Avatar", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkQP4EJI3G_cjs.Avatar_exports; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "Badge", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkQP4EJI3G_cjs.Badge; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "Button", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkQP4EJI3G_cjs.Button; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "ButtonGroup", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkQP4EJI3G_cjs.ButtonGroup; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "Card", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkQP4EJI3G_cjs.Card_exports; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "Checkbox", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkQP4EJI3G_cjs.Checkbox_exports; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "CloseButton", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkQP4EJI3G_cjs.CloseButton_exports; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "Dialog", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkQP4EJI3G_cjs.Dialog_exports; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "Drawer", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkQP4EJI3G_cjs.Drawer_exports; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "Group", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkQP4EJI3G_cjs.Group_exports; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "Heading", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkQP4EJI3G_cjs.Heading; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "Icon", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkQP4EJI3G_cjs.Icon_exports; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "IconButton", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkQP4EJI3G_cjs.IconButton; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "Input", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkQP4EJI3G_cjs.Input; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "InputAddon", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkQP4EJI3G_cjs.InputAddon; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "InputGroup", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkQP4EJI3G_cjs.InputGroup; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "Popover", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkQP4EJI3G_cjs.Popover_exports; }
|
|
99
99
|
});
|
|
100
100
|
Object.defineProperty(exports, "Progress", {
|
|
101
101
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkQP4EJI3G_cjs.Progress_exports; }
|
|
103
103
|
});
|
|
104
104
|
Object.defineProperty(exports, "RadioGroup", {
|
|
105
105
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkQP4EJI3G_cjs.RadioGroup_exports; }
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "Select", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkQP4EJI3G_cjs.Select_exports; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, "Skeleton", {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkQP4EJI3G_cjs.Skeleton_exports; }
|
|
115
115
|
});
|
|
116
116
|
Object.defineProperty(exports, "Slider", {
|
|
117
117
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunkQP4EJI3G_cjs.Slider_exports; }
|
|
119
119
|
});
|
|
120
120
|
Object.defineProperty(exports, "Spinner", {
|
|
121
121
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
122
|
+
get: function () { return chunkQP4EJI3G_cjs.Spinner; }
|
|
123
123
|
});
|
|
124
124
|
Object.defineProperty(exports, "Stepper", {
|
|
125
125
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunkQP4EJI3G_cjs.Stepper; }
|
|
127
127
|
});
|
|
128
128
|
Object.defineProperty(exports, "Switch", {
|
|
129
129
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunkQP4EJI3G_cjs.Switch_exports; }
|
|
131
131
|
});
|
|
132
132
|
Object.defineProperty(exports, "Tabs", {
|
|
133
133
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunkQP4EJI3G_cjs.Tabs_exports; }
|
|
135
135
|
});
|
|
136
136
|
Object.defineProperty(exports, "Textarea", {
|
|
137
137
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
138
|
+
get: function () { return chunkQP4EJI3G_cjs.Textarea; }
|
|
139
139
|
});
|
|
140
140
|
Object.defineProperty(exports, "Toaster", {
|
|
141
141
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
142
|
+
get: function () { return chunkQP4EJI3G_cjs.Toaster; }
|
|
143
143
|
});
|
|
144
144
|
Object.defineProperty(exports, "Tooltip", {
|
|
145
145
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
146
|
+
get: function () { return chunkQP4EJI3G_cjs.Tooltip_exports; }
|
|
147
147
|
});
|
|
148
148
|
Object.defineProperty(exports, "toaster", {
|
|
149
149
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
150
|
+
get: function () { return chunkQP4EJI3G_cjs.toaster; }
|
|
151
151
|
});
|
|
152
152
|
exports.cn = cn;
|
|
153
153
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { material3Language as activeLanguage, discourserPandaPreset, transformToPandaTheme } from './chunk-
|
|
2
|
-
export { AbsoluteCenter_exports as AbsoluteCenter, Accordion_exports as Accordion, Avatar_exports as Avatar, Badge, Button, ButtonGroup, Card_exports as Card, Checkbox_exports as Checkbox, CloseButton_exports as CloseButton, Dialog_exports as Dialog, Drawer_exports as Drawer, Group_exports as Group, Heading, Icon_exports as Icon, IconButton, Input, InputAddon, InputGroup, Popover_exports as Popover, Progress_exports as Progress, RadioGroup_exports as RadioGroup, Select_exports as Select, Skeleton_exports as Skeleton, Slider_exports as Slider, Spinner, Stepper, Switch_exports as Switch, Tabs_exports as Tabs, Textarea, Toaster, Tooltip_exports as Tooltip, toaster } from './chunk-
|
|
1
|
+
export { material3Language as activeLanguage, discourserPandaPreset, transformToPandaTheme } from './chunk-M7J7WKJY.js';
|
|
2
|
+
export { AbsoluteCenter_exports as AbsoluteCenter, Accordion_exports as Accordion, Avatar_exports as Avatar, Badge, Button, ButtonGroup, Card_exports as Card, Checkbox_exports as Checkbox, CloseButton_exports as CloseButton, Dialog_exports as Dialog, Drawer_exports as Drawer, Group_exports as Group, Heading, Icon_exports as Icon, IconButton, Input, InputAddon, InputGroup, Popover_exports as Popover, Progress_exports as Progress, RadioGroup_exports as RadioGroup, Select_exports as Select, Skeleton_exports as Skeleton, Slider_exports as Slider, Spinner, Stepper, Switch_exports as Switch, Tabs_exports as Tabs, Textarea, Toaster, Tooltip_exports as Tooltip, toaster } from './chunk-F7LHARS4.js';
|
|
3
3
|
import './chunk-WR5Z5QMQ.js';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Factory for creating Radix-scale bridges from M3 tonal palettes
|
|
3
|
+
*
|
|
4
|
+
* Converts Material 3 tonal palettes (0-100 scale) to Park UI Radix scale (1-12 + alpha + semantic variants)
|
|
5
|
+
*
|
|
6
|
+
* Mapping Strategy:
|
|
7
|
+
* - Radix 1-12 represents light → dark in light mode
|
|
8
|
+
* - M3 tonal palette 100 → 0 (white to black)
|
|
9
|
+
*
|
|
10
|
+
* Radix Scale Semantics:
|
|
11
|
+
* 1-2: App background
|
|
12
|
+
* 3-4: Subtle backgrounds
|
|
13
|
+
* 5-6: UI element backgrounds
|
|
14
|
+
* 7-8: Borders and separators
|
|
15
|
+
* 9: Solid backgrounds (primary action color)
|
|
16
|
+
* 10: Hovered solid backgrounds
|
|
17
|
+
* 11: Low-contrast text
|
|
18
|
+
* 12: High-contrast text
|
|
19
|
+
*/
|
|
20
|
+
import type { TonalPalette } from '../../contracts/design-language.contract';
|
|
21
|
+
interface PaletteBridgeOptions {
|
|
22
|
+
/**
|
|
23
|
+
* Palette name for self-referencing semantic tokens (e.g., 'primary', 'error')
|
|
24
|
+
*/
|
|
25
|
+
name: string;
|
|
26
|
+
/**
|
|
27
|
+
* M3 tonal palette object with keys 0-100
|
|
28
|
+
*/
|
|
29
|
+
palette: TonalPalette;
|
|
30
|
+
/**
|
|
31
|
+
* Whether to include a DEFAULT key (used for error palette)
|
|
32
|
+
*/
|
|
33
|
+
includeDefault?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Override for solid.fg token (default uses white/palette[1] pattern)
|
|
36
|
+
* If true, uses 'white' for both light and dark modes (error pattern)
|
|
37
|
+
*/
|
|
38
|
+
solidFgWhiteBoth?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Creates a complete Radix-scale bridge from an M3 tonal palette
|
|
42
|
+
*/
|
|
43
|
+
export declare function createPaletteBridge({ name, palette: m3, includeDefault, solidFgWhiteBoth, }: PaletteBridgeOptions): any;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=create-palette-bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-palette-bridge.d.ts","sourceRoot":"","sources":["../../../src/preset/colors/create-palette-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAE7E,UAAU,oBAAoB;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,YAAY,CAAC;IAEtB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,OAAO,EAAE,EAAE,EACX,cAAsB,EACtB,gBAAwB,GACzB,EAAE,oBAAoB,OAqGtB"}
|