@sovereignsquad/gds-core 3.9.0 → 6.9.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 +33 -0
- package/dist/GdsBadge-DqTdnomt.d.mts +417 -0
- package/dist/GdsBadge-DqTdnomt.d.ts +417 -0
- package/dist/PartnerDiscovery-As_-JKtb.d.ts +732 -0
- package/dist/PartnerDiscovery-Bwxixtka.d.mts +732 -0
- package/dist/QuickStartCard-Bgjdfs_t.d.ts +20798 -0
- package/dist/QuickStartCard-DnZMDjzb.d.mts +20798 -0
- package/dist/chunk-3B5MK2PG.mjs +6349 -0
- package/dist/{chunk-TQ7ZYMEA.mjs → chunk-5G3XZWSW.mjs} +4916 -6400
- package/dist/chunk-5GH7XD7X.mjs +430 -0
- package/dist/chunk-6WDH57MJ.mjs +430 -0
- package/dist/chunk-A32PWTD2.mjs +430 -0
- package/dist/chunk-BD5XQH5Z.mjs +430 -0
- package/dist/chunk-DBJE4TRO.mjs +430 -0
- package/dist/chunk-EQ7Y2PUI.mjs +1842 -0
- package/dist/chunk-F76YTG3S.mjs +430 -0
- package/dist/chunk-HJVDKPVW.mjs +245 -0
- package/dist/chunk-IMT3UTOT.mjs +430 -0
- package/dist/chunk-J66ITCXC.mjs +473 -0
- package/dist/chunk-KEYBUMOR.mjs +430 -0
- package/dist/chunk-KLFTBWEG.mjs +430 -0
- package/dist/chunk-KNP35WAB.mjs +27 -0
- package/dist/chunk-LERXSJHD.mjs +430 -0
- package/dist/chunk-MKEWYVTJ.mjs +430 -0
- package/dist/chunk-NTNVQZJU.mjs +89 -0
- package/dist/chunk-OH5HH4G3.mjs +430 -0
- package/dist/chunk-SPPTDVJC.mjs +211 -0
- package/dist/chunk-W5O2JSVK.mjs +20 -0
- package/dist/{chunk-BUC7QXRO.mjs → chunk-WI24JME4.mjs} +13 -5
- package/dist/chunk-ZFGYQSNR.mjs +33 -0
- package/dist/client.d.mts +1616 -64
- package/dist/client.d.ts +1616 -64
- package/dist/client.js +13417 -6683
- package/dist/client.mjs +303 -60
- package/dist/en-D9CWSH3F.d.mts +428 -0
- package/dist/en-D9CWSH3F.d.ts +428 -0
- package/dist/index.d.mts +632 -5
- package/dist/index.d.ts +632 -5
- package/dist/index.js +22423 -13558
- package/dist/index.mjs +2198 -61
- package/dist/locales/lazy/all.d.mts +2 -0
- package/dist/locales/lazy/all.d.ts +2 -0
- package/dist/locales/lazy/all.js +5150 -0
- package/dist/locales/lazy/all.mjs +50 -0
- package/dist/locales/lazy/ar.d.mts +2 -0
- package/dist/locales/lazy/ar.d.ts +2 -0
- package/dist/locales/lazy/ar.js +870 -0
- package/dist/locales/lazy/ar.mjs +10 -0
- package/dist/locales/lazy/de.d.mts +2 -0
- package/dist/locales/lazy/de.d.ts +2 -0
- package/dist/locales/lazy/de.js +870 -0
- package/dist/locales/lazy/de.mjs +10 -0
- package/dist/locales/lazy/es.d.mts +2 -0
- package/dist/locales/lazy/es.d.ts +2 -0
- package/dist/locales/lazy/es.js +870 -0
- package/dist/locales/lazy/es.mjs +10 -0
- package/dist/locales/lazy/fr.d.mts +2 -0
- package/dist/locales/lazy/fr.d.ts +2 -0
- package/dist/locales/lazy/fr.js +870 -0
- package/dist/locales/lazy/fr.mjs +10 -0
- package/dist/locales/lazy/he.d.mts +2 -0
- package/dist/locales/lazy/he.d.ts +2 -0
- package/dist/locales/lazy/he.js +870 -0
- package/dist/locales/lazy/he.mjs +10 -0
- package/dist/locales/lazy/hu.d.mts +2 -0
- package/dist/locales/lazy/hu.d.ts +2 -0
- package/dist/locales/lazy/hu.js +870 -0
- package/dist/locales/lazy/hu.mjs +10 -0
- package/dist/locales/lazy/index.d.mts +25 -0
- package/dist/locales/lazy/index.d.ts +25 -0
- package/dist/locales/lazy/index.js +479 -0
- package/dist/locales/lazy/index.mjs +9 -0
- package/dist/locales/lazy/it.d.mts +2 -0
- package/dist/locales/lazy/it.d.ts +2 -0
- package/dist/locales/lazy/it.js +870 -0
- package/dist/locales/lazy/it.mjs +10 -0
- package/dist/locales/lazy/ja.d.mts +2 -0
- package/dist/locales/lazy/ja.d.ts +2 -0
- package/dist/locales/lazy/ja.js +870 -0
- package/dist/locales/lazy/ja.mjs +10 -0
- package/dist/locales/lazy/ko.d.mts +2 -0
- package/dist/locales/lazy/ko.d.ts +2 -0
- package/dist/locales/lazy/ko.js +870 -0
- package/dist/locales/lazy/ko.mjs +10 -0
- package/dist/locales/lazy/ru.d.mts +2 -0
- package/dist/locales/lazy/ru.d.ts +2 -0
- package/dist/locales/lazy/ru.js +870 -0
- package/dist/locales/lazy/ru.mjs +10 -0
- package/dist/locales/lazy/zh.d.mts +2 -0
- package/dist/locales/lazy/zh.d.ts +2 -0
- package/dist/locales/lazy/zh.js +870 -0
- package/dist/locales/lazy/zh.mjs +10 -0
- package/dist/map.css +658 -0
- package/dist/map.d.mts +118 -0
- package/dist/map.d.ts +118 -0
- package/dist/map.js +778 -0
- package/dist/map.mjs +395 -0
- package/dist/reference-theme-explorer.d.mts +34 -0
- package/dist/reference-theme-explorer.d.ts +34 -0
- package/dist/reference-theme-explorer.js +9488 -0
- package/dist/reference-theme-explorer.mjs +1988 -0
- package/dist/rich-text-editor.d.mts +32 -0
- package/dist/rich-text-editor.d.ts +32 -0
- package/dist/rich-text-editor.js +469 -0
- package/dist/rich-text-editor.mjs +115 -0
- package/dist/server.d.mts +112 -248
- package/dist/server.d.ts +112 -248
- package/dist/server.js +8461 -1889
- package/dist/server.mjs +598 -57
- package/package.json +110 -10
- package/dist/AISearchCard-Bbnsd-yl.d.mts +0 -7786
- package/dist/AISearchCard-Bbnsd-yl.d.ts +0 -7786
- package/dist/chunk-5AJJNRZF.mjs +0 -5847
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @sovereignsquad/gds-core
|
|
2
|
+
|
|
3
|
+
Layouts, cards, shells, forms, tables, overlays, charts, page templates, access gates and i18n for the General Design System (GDS).
|
|
4
|
+
|
|
5
|
+
Most apps install the umbrella [`@sovereignsquad/gds`](https://www.npmjs.com/package/@sovereignsquad/gds) instead, which includes this package. Install granular packages only when the app deliberately separates runtime lanes, and keep every GDS package on the same version.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @sovereignsquad/gds-theme @sovereignsquad/gds-core react react-dom
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Installs from npmjs.com need no `.npmrc` entry and no token. Bootstrap (the stylesheet import and one `GdsProvider`) is in the [installation guide](https://github.com/sovereignsquad/general-design-system/blob/main/INSTALLATION_GUIDE.md#3-root-runtime-setup).
|
|
14
|
+
|
|
15
|
+
## Entry points
|
|
16
|
+
|
|
17
|
+
- `@sovereignsquad/gds-core`, `@sovereignsquad/gds-core/client` and `@sovereignsquad/gds-core/server`: the root, interactive and non-interactive structural surfaces.
|
|
18
|
+
- `@sovereignsquad/gds-core/rich-text-editor`: `GdsRichTextEditor`, opt-in because of its Tiptap dependency.
|
|
19
|
+
- `@sovereignsquad/gds-core/reference-theme-explorer`: `ReferenceThemeExplorer`.
|
|
20
|
+
- `@sovereignsquad/gds-core/map` and `@sovereignsquad/gds-core/map.css`: `GdsMap` and its stylesheet ([map system](https://github.com/sovereignsquad/general-design-system/blob/main/docs/MAP_SYSTEM.md)).
|
|
21
|
+
- `@sovereignsquad/gds-core/locales/lazy`, `@sovereignsquad/gds-core/locales/lazy/all` and one subpath per locale (`./locales/lazy/es`, `./locales/lazy/hu`, `./locales/lazy/de`, `./locales/lazy/fr`, `./locales/lazy/it`, `./locales/lazy/ru`, `./locales/lazy/he`, `./locales/lazy/ar`, `./locales/lazy/zh`, `./locales/lazy/ja`, `./locales/lazy/ko`): lazy message packs ([i18n runtime](https://github.com/sovereignsquad/general-design-system/blob/main/docs/I18N_RUNTIME.md)).
|
|
22
|
+
|
|
23
|
+
## Documentation
|
|
24
|
+
|
|
25
|
+
- Agent entry point: https://github.com/sovereignsquad/general-design-system/blob/main/llms.txt
|
|
26
|
+
- Components and patterns: https://github.com/sovereignsquad/general-design-system/blob/main/COMPONENTS_AND_PATTERNS.md
|
|
27
|
+
- Page templates: https://github.com/sovereignsquad/general-design-system/blob/main/docs/PAGE_TEMPLATES.md
|
|
28
|
+
- API reference: https://sovereignsquad.github.io/general-design-system/api
|
|
29
|
+
- Live pattern catalog: https://sovereignsquad.github.io/general-design-system/patterns
|
|
30
|
+
|
|
31
|
+
## License
|
|
32
|
+
|
|
33
|
+
MIT. See https://github.com/sovereignsquad/general-design-system/blob/main/LICENSE.
|
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { BadgeProps } from '@mantine/core';
|
|
4
|
+
import { GdsBadgeIconStyle } from '@sovereignsquad/gds-theme';
|
|
5
|
+
import * as _tabler_icons_react from '@tabler/icons-react';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* GdsIcons is the centralized semantic icon dictionary.
|
|
9
|
+
* Applications MUST use these exported icons instead of importing
|
|
10
|
+
* raw icons from tabler/icons-react directly. This ensures complete
|
|
11
|
+
* visual consistency across the platform.
|
|
12
|
+
*/
|
|
13
|
+
declare const GdsIcons: {
|
|
14
|
+
Dashboard: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
15
|
+
Settings: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
16
|
+
Users: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
17
|
+
Analytics: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
18
|
+
Home: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
19
|
+
Inbox: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
20
|
+
Calendar: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
21
|
+
Gallery: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
22
|
+
History: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
23
|
+
Profile: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
24
|
+
Add: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
25
|
+
Remove: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
26
|
+
Edit: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
27
|
+
Delete: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
28
|
+
Search: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
29
|
+
Save: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
30
|
+
Play: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
31
|
+
Start: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
32
|
+
Send: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
33
|
+
Reply: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
34
|
+
Forward: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
35
|
+
Attach: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
36
|
+
Upload: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
37
|
+
Download: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
38
|
+
Print: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
39
|
+
Copy: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
40
|
+
Duplicate: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
41
|
+
Check: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
42
|
+
Uncheck: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
43
|
+
Complete: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
44
|
+
Clear: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
45
|
+
Cancel: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
46
|
+
Confirm: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
47
|
+
Close: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
48
|
+
Compare: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
49
|
+
Language: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
50
|
+
Theme: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
51
|
+
Capture: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
52
|
+
Record: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
53
|
+
Flip: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
54
|
+
Flash: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
55
|
+
Course: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
56
|
+
Lesson: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
57
|
+
Certificate: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
58
|
+
Student: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
59
|
+
Class: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
60
|
+
Grade: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
61
|
+
Child: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
62
|
+
Family: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
63
|
+
Habit: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
64
|
+
Goal: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
65
|
+
Streak: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
66
|
+
Reward: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
67
|
+
Success: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
68
|
+
Warning: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
69
|
+
Danger: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
70
|
+
Info: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
71
|
+
Trophy: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
72
|
+
Crown: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
73
|
+
Star: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
74
|
+
StarFilled: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
75
|
+
Pause: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
76
|
+
Message: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
77
|
+
Mail: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
78
|
+
Refresh: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
79
|
+
TrendingUp: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
80
|
+
TrendingDown: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
81
|
+
Currency: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
82
|
+
Grid: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
83
|
+
List: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
84
|
+
Logout: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
85
|
+
Notifications: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
86
|
+
Back: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
87
|
+
Eye: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
88
|
+
EyeOff: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
89
|
+
Help: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
90
|
+
Filter: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
91
|
+
Sort: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
92
|
+
Export: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
93
|
+
Import: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
94
|
+
Preview: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
95
|
+
Clone: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
96
|
+
Restore: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
97
|
+
Toggle: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
98
|
+
Submit: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
99
|
+
Reset: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
100
|
+
Login: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
101
|
+
Register: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
102
|
+
Verify: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
103
|
+
Launch: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
104
|
+
Draft: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
105
|
+
Refer: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
106
|
+
Evidence: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
107
|
+
ChevronDown: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
108
|
+
ChevronUp: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
109
|
+
Menu: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
110
|
+
Moon: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
111
|
+
Sun: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
112
|
+
Move: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
113
|
+
More: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
114
|
+
Kanban: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
115
|
+
Bold: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
116
|
+
Italic: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
117
|
+
Underline: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
118
|
+
Strikethrough: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
119
|
+
Quote: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
120
|
+
OrderedList: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
121
|
+
InlineCode: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
122
|
+
Heading1: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
123
|
+
Heading2: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
124
|
+
Undo: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
125
|
+
Redo: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
126
|
+
ChevronLeft: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
127
|
+
ChevronRight: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
128
|
+
ArrowUp: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
129
|
+
ArrowDown: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
130
|
+
ExternalLink: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
131
|
+
Link: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
132
|
+
Cart: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
133
|
+
Package: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
134
|
+
Payment: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
135
|
+
Wallet: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
136
|
+
Discount: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
137
|
+
Tag: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
138
|
+
Favorite: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
139
|
+
Bookmark: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
140
|
+
Lock: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
141
|
+
Unlock: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
142
|
+
Key: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
143
|
+
Biometric: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
144
|
+
Time: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
145
|
+
Globe: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
146
|
+
Location: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
147
|
+
Building: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
148
|
+
Folder: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
149
|
+
Archive: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
150
|
+
Connectivity: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
151
|
+
QrCode: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
152
|
+
Flag: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
153
|
+
Tool: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
154
|
+
Phone: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
155
|
+
DragHandle: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
156
|
+
Confirmed: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
157
|
+
Freshness: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
158
|
+
Stale: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
159
|
+
Price: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
160
|
+
Schedule: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
161
|
+
Checklist: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
162
|
+
SourceInfo: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
163
|
+
};
|
|
164
|
+
/** Canonical name of an icon in the {@link GdsIcons} dictionary. */
|
|
165
|
+
type GdsIconKey = keyof typeof GdsIcons;
|
|
166
|
+
/** Accepted icon identifier: a canonical key, its lowercase form, or a known alias. */
|
|
167
|
+
type GdsIconName = GdsIconKey | Lowercase<GdsIconKey> | keyof typeof gdsIconNameAliases;
|
|
168
|
+
/** Semantic grouping used to categorize registry icons. */
|
|
169
|
+
type GdsIconCategory = 'action' | 'status' | 'resource' | 'navigation' | 'media' | 'feedback' | 'system' | 'content' | 'commerce' | 'security';
|
|
170
|
+
/** Whether an icon is purely decorative or conveys information to assistive tech. */
|
|
171
|
+
type GdsIconA11yMode = 'decorative' | 'informative';
|
|
172
|
+
/** Registry metadata for a single icon. */
|
|
173
|
+
interface GdsIconMetadata {
|
|
174
|
+
name: GdsIconKey;
|
|
175
|
+
category: GdsIconCategory;
|
|
176
|
+
/** Human-readable label derived from the icon name (start-cased). */
|
|
177
|
+
defaultLabel: string;
|
|
178
|
+
a11yMode: GdsIconA11yMode;
|
|
179
|
+
/** Suggested `<GdsIcon />` usage snippet replacing a direct tabler import. */
|
|
180
|
+
directImportReplacement: string;
|
|
181
|
+
}
|
|
182
|
+
declare const gdsIconNameAliases: {
|
|
183
|
+
readonly add: "Add";
|
|
184
|
+
readonly analytics: "Analytics";
|
|
185
|
+
readonly attach: "Attach";
|
|
186
|
+
readonly back: "Back";
|
|
187
|
+
readonly calendar: "Calendar";
|
|
188
|
+
readonly cancel: "Cancel";
|
|
189
|
+
readonly capture: "Capture";
|
|
190
|
+
readonly check: "Check";
|
|
191
|
+
readonly clear: "Clear";
|
|
192
|
+
readonly clone: "Clone";
|
|
193
|
+
readonly close: "Close";
|
|
194
|
+
readonly compare: "Compare";
|
|
195
|
+
readonly confirm: "Confirm";
|
|
196
|
+
readonly copy: "Copy";
|
|
197
|
+
readonly danger: "Danger";
|
|
198
|
+
readonly dashboard: "Dashboard";
|
|
199
|
+
readonly delete: "Delete";
|
|
200
|
+
readonly download: "Download";
|
|
201
|
+
readonly edit: "Edit";
|
|
202
|
+
readonly error: "Danger";
|
|
203
|
+
readonly evidence: "Evidence";
|
|
204
|
+
readonly export: "Export";
|
|
205
|
+
readonly filter: "Filter";
|
|
206
|
+
readonly gallery: "Gallery";
|
|
207
|
+
readonly help: "Help";
|
|
208
|
+
readonly home: "Home";
|
|
209
|
+
readonly import: "Import";
|
|
210
|
+
readonly info: "Info";
|
|
211
|
+
readonly language: "Language";
|
|
212
|
+
readonly launch: "Launch";
|
|
213
|
+
readonly login: "Login";
|
|
214
|
+
readonly logout: "Logout";
|
|
215
|
+
readonly menu: "Menu";
|
|
216
|
+
readonly notifications: "Notifications";
|
|
217
|
+
readonly preview: "Preview";
|
|
218
|
+
readonly print: "Print";
|
|
219
|
+
readonly refresh: "Refresh";
|
|
220
|
+
readonly remove: "Remove";
|
|
221
|
+
readonly reset: "Reset";
|
|
222
|
+
readonly restore: "Restore";
|
|
223
|
+
readonly save: "Save";
|
|
224
|
+
readonly search: "Search";
|
|
225
|
+
readonly settings: "Settings";
|
|
226
|
+
readonly sort: "Sort";
|
|
227
|
+
readonly submit: "Submit";
|
|
228
|
+
readonly success: "Success";
|
|
229
|
+
readonly theme: "Theme";
|
|
230
|
+
readonly upload: "Upload";
|
|
231
|
+
readonly users: "Users";
|
|
232
|
+
readonly verify: "Verify";
|
|
233
|
+
readonly warning: "Warning";
|
|
234
|
+
};
|
|
235
|
+
/** Metadata registry keyed by icon name, derived from {@link GdsIcons}. */
|
|
236
|
+
declare const gdsIconRegistry: Record<GdsIconKey, GdsIconMetadata>;
|
|
237
|
+
/** Type guard: whether a string is a canonical {@link GdsIcons} key. */
|
|
238
|
+
declare function isGdsIconKey(value: string): value is GdsIconKey;
|
|
239
|
+
/** Returns every canonical icon key in the dictionary. */
|
|
240
|
+
declare function getGdsIconKeys(): GdsIconKey[];
|
|
241
|
+
/** Resolves an icon name (key, lowercase, or alias) to its metadata, falling back to the `Help` icon. */
|
|
242
|
+
declare function getGdsIconMetadata(name: GdsIconName | string): GdsIconMetadata;
|
|
243
|
+
/** Props for {@link GdsIcon}. */
|
|
244
|
+
interface GdsIconProps {
|
|
245
|
+
/** Icon to render (key, lowercase, or alias). */
|
|
246
|
+
icon?: GdsIconName;
|
|
247
|
+
/** Alternative to `icon`; used when `icon` is not provided. */
|
|
248
|
+
name?: GdsIconName;
|
|
249
|
+
/** Named size token, or an explicit number/string CSS size. Defaults to "md". */
|
|
250
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | number | string;
|
|
251
|
+
/** Accessible label; supplying it makes the icon informative rather than decorative. */
|
|
252
|
+
label?: string;
|
|
253
|
+
/** Forces decorative (aria-hidden) rendering. Defaults to true when no `label` is given. */
|
|
254
|
+
decorative?: boolean;
|
|
255
|
+
/** Stroke width passed to the underlying tabler icon. Defaults to 1.75. */
|
|
256
|
+
stroke?: number;
|
|
257
|
+
/** Semantic color tone. Defaults to "default" (inherited color). */
|
|
258
|
+
tone?: GdsIconTone;
|
|
259
|
+
}
|
|
260
|
+
/** Semantic color tone applied to an icon. */
|
|
261
|
+
type GdsIconTone = 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'muted';
|
|
262
|
+
/** Maps each icon tone to its CSS color variable (`undefined` inherits the current color). */
|
|
263
|
+
declare const gdsIconToneColor: Record<GdsIconTone, string | undefined>;
|
|
264
|
+
/** Returns the CSS color for a tone; defaults to the inherited `default` tone. */
|
|
265
|
+
declare function getGdsIconToneColor(tone?: GdsIconTone): string | undefined;
|
|
266
|
+
/**
|
|
267
|
+
* Renders a governed semantic icon from the {@link GdsIcons} dictionary, applying
|
|
268
|
+
* size and tone tokens and the correct decorative-vs-labelled accessibility
|
|
269
|
+
* attributes. Consumers must use this instead of importing tabler icons directly.
|
|
270
|
+
*/
|
|
271
|
+
declare function GdsIcon({ icon, name, size, label, decorative, stroke, tone, }: GdsIconProps): react.FunctionComponentElement<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* The pin balloon's path data, exported as the single source for every renderer that cannot
|
|
275
|
+
* compose the React component — issue 620's map markers build an engine-injected SVG string
|
|
276
|
+
* from exactly this path, so the marker on the map and `GdsBadgeShapePin` cannot drift apart.
|
|
277
|
+
* 24-unit canvas, head is an arc of radius 8 centred at (12, 11).
|
|
278
|
+
*/
|
|
279
|
+
declare const GDS_PIN_SILHOUETTE_PATH = "M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0";
|
|
280
|
+
/** Circle badge silhouette (Tabler `IconCircle` geometry). The neutral member of the set — suggested default for count badges and generic interests. */
|
|
281
|
+
declare const GdsBadgeShapeCircle: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
282
|
+
/** Squircle badge silhouette (Tabler `IconSquareRounded` geometry). Softer than the circle — suggested for persona badges. */
|
|
283
|
+
declare const GdsBadgeShapeSquircle: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
284
|
+
/** Hexagon badge silhouette (Tabler `IconHexagon` geometry). Reads "activity" before anyone reads the label — suggested for activity/interest badges. */
|
|
285
|
+
declare const GdsBadgeShapeHexagon: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
286
|
+
/** Shield badge silhouette (Tabler `IconShield` geometry). The claim-about-a-fact shape — suggested for verification badges, paired with the fixed success tone. */
|
|
287
|
+
declare const GdsBadgeShapeShield: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
288
|
+
/** Rosette badge silhouette (Tabler `IconRosette` geometry). The scalloped seal — suggested for certification and award badges. */
|
|
289
|
+
declare const GdsBadgeShapeRosette: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
290
|
+
/** Map-pin badge silhouette (Tabler `IconMapPin` balloon geometry, inner dot dropped so the head can host a composed icon). For badges placed on maps and location-anchored chips. */
|
|
291
|
+
declare const GdsBadgeShapePin: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
292
|
+
/**
|
|
293
|
+
* Badge shape dictionary, mirroring the `GdsIcons` pattern: closed, typechecked
|
|
294
|
+
* lookup from shape name to component, so consumers (and #489's `GdsBadge`
|
|
295
|
+
* `shape` prop) select shapes from a governed union instead of importing
|
|
296
|
+
* arbitrary silhouettes.
|
|
297
|
+
*/
|
|
298
|
+
declare const GdsBadgeShapes: {
|
|
299
|
+
circle: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
300
|
+
squircle: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
301
|
+
hexagon: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
302
|
+
shield: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
303
|
+
rosette: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
304
|
+
pin: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
305
|
+
};
|
|
306
|
+
/** Canonical name of a badge shape in the {@link GdsBadgeShapes} dictionary. */
|
|
307
|
+
type GdsBadgeShapeName = keyof typeof GdsBadgeShapes;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* GdsBadge (issue 489, part of epic #484): the unified, always-theme-aware
|
|
311
|
+
* static status/meaning label. Never interactive — removable tokens are
|
|
312
|
+
* `GdsRemovableTag`'s job, counts are `GdsCountBadge`'s.
|
|
313
|
+
*
|
|
314
|
+
* Color is a closed two-axis union, never a free string: a semantic `tone`
|
|
315
|
+
* mapped to the `--gds-state-*` role tokens every preset defines (WCAG-
|
|
316
|
+
* validated per preset by the #485 derivation), or a curated non-semantic
|
|
317
|
+
* `accent` name for categorization. The two axes are mutually exclusive at
|
|
318
|
+
* the type level. Meaning always lives in the required `label`, never in
|
|
319
|
+
* color alone (forced-colors flattens every badge to one pair).
|
|
320
|
+
*/
|
|
321
|
+
/** Semantic tone: maps to the `--gds-state-*` role tokens. */
|
|
322
|
+
type GdsBadgeTone = 'success' | 'warning' | 'danger' | 'info' | 'neutral';
|
|
323
|
+
/**
|
|
324
|
+
* Curated non-semantic accent palette for categorization (10 names, per the
|
|
325
|
+
* closed-union precedent of 9 of 11 surveyed design systems). Fixed sRGB
|
|
326
|
+
* values, all verified ≥ 4.5:1 against their white foreground via
|
|
327
|
+
* `pickGdsAutoForeground` — the palette is theme-independent so category
|
|
328
|
+
* colors stay stable across all 25 presets.
|
|
329
|
+
*/
|
|
330
|
+
type GdsBadgeAccentName = 'plum' | 'indigo' | 'ocean' | 'teal' | 'forest' | 'bronze' | 'terracotta' | 'magenta' | 'slate' | 'grape';
|
|
331
|
+
/**
|
|
332
|
+
* The accent palette values. Every entry's white foreground is verified
|
|
333
|
+
* ≥ 4.5:1 (WCAG AA normal) in badge tests via `pickGdsAutoForeground` — do
|
|
334
|
+
* not edit a hex without the test confirming the pair still passes.
|
|
335
|
+
*/
|
|
336
|
+
/**
|
|
337
|
+
* A within-accent differentiation step for {@link GdsMapPinBadge}'s `shade` prop (issue 502):
|
|
338
|
+
* related sub-categories that should read as "the same accent family" but stay individually
|
|
339
|
+
* distinguishable, without spending a second accent slot on each.
|
|
340
|
+
*
|
|
341
|
+
* **Darker-only, on purpose.** Lightening any accent — even slightly — drops some below the
|
|
342
|
+
* 4.5:1 bar the palette guarantees (`teal` fails first, at only +4 lightness). The accent axis
|
|
343
|
+
* enforces that direction now; this type is the vocabulary for it.
|
|
344
|
+
*/
|
|
345
|
+
type GdsBadgeAccentShade = 'base' | 'deep' | 'deeper' | 'deepest';
|
|
346
|
+
/**
|
|
347
|
+
* @deprecated Derived from the accent axis; read `var(--gds-accent-<name>-base)` instead so
|
|
348
|
+
* the value follows the active theme. Removed in 8.0.0.
|
|
349
|
+
*/
|
|
350
|
+
declare const gdsBadgeAccentColors: Record<GdsBadgeAccentName, string>;
|
|
351
|
+
/**
|
|
352
|
+
* @deprecated Derived from the accent axis; read `var(--gds-accent-<name>-<shade>)` instead.
|
|
353
|
+
* Removed in 8.0.0.
|
|
354
|
+
*/
|
|
355
|
+
declare const gdsBadgeAccentShades: Record<GdsBadgeAccentName, Record<GdsBadgeAccentShade, string>>;
|
|
356
|
+
interface GdsBadgeBaseProps extends Omit<BadgeProps, 'color' | 'children' | 'variant' | 'leftSection'> {
|
|
357
|
+
/** Badge text — the meaning carrier. Required: color is never the only signal. */
|
|
358
|
+
label: ReactNode;
|
|
359
|
+
/** Canonical `GdsIcons` key rendered decoratively ahead of the label. */
|
|
360
|
+
icon?: GdsIconKey;
|
|
361
|
+
/**
|
|
362
|
+
* Badge silhouette from the governed `GdsBadgeShapes` vocabulary, rendered
|
|
363
|
+
* as a leading currentColor mark (with `icon` composed inside it when both
|
|
364
|
+
* are given).
|
|
365
|
+
*/
|
|
366
|
+
shape?: GdsBadgeShapeName;
|
|
367
|
+
/**
|
|
368
|
+
* Emoji glyph rendered instead of `icon` when the effective badge glyph
|
|
369
|
+
* mode is `'emoji'` (issue 525) — see `iconStyle` and `GdsProvider`'s
|
|
370
|
+
* `defaultBadgeIconStyle`. Optional: a badge with no `emoji` simply keeps
|
|
371
|
+
* rendering its Tabler `icon` even in emoji mode — that fallback is the
|
|
372
|
+
* point, not a gap to close. Renders on a fixed neutral disc (never
|
|
373
|
+
* directly on the badge's own accent/tone color — emoji are OS-rendered
|
|
374
|
+
* color glyphs whose color can't be forced via CSS the way a Tabler
|
|
375
|
+
* `currentColor` icon can, so contrast against an arbitrary accent can't
|
|
376
|
+
* be guaranteed the same way), and is always `aria-hidden` — the
|
|
377
|
+
* required `label` carries meaning, exactly like `icon` today. Not
|
|
378
|
+
* currently composable with `shape`: a badge given both renders the
|
|
379
|
+
* emoji disc alone and ignores `shape`, with a dev-mode warning.
|
|
380
|
+
*/
|
|
381
|
+
emoji?: string;
|
|
382
|
+
/**
|
|
383
|
+
* Per-instance override for the ambient badge glyph mode (issue 525).
|
|
384
|
+
* Defaults to whatever `GdsProvider`'s `defaultBadgeIconStyle` resolves
|
|
385
|
+
* to (itself defaulting to `'tabler'`, today's only behavior). Rarely
|
|
386
|
+
* needed — most consumers set the mode once on `GdsProvider` and let
|
|
387
|
+
* every badge follow it.
|
|
388
|
+
*/
|
|
389
|
+
iconStyle?: GdsBadgeIconStyle;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Props for {@link GdsBadge}: the `tone` and `accent` axes are mutually
|
|
393
|
+
* exclusive at the type level (à la Fluent's narrowed unions), so an invalid
|
|
394
|
+
* combination fails to typecheck instead of shipping an ambiguous badge.
|
|
395
|
+
*/
|
|
396
|
+
type GdsBadgeProps = (GdsBadgeBaseProps & {
|
|
397
|
+
tone?: GdsBadgeTone;
|
|
398
|
+
accent?: never;
|
|
399
|
+
}) | (GdsBadgeBaseProps & {
|
|
400
|
+
accent: GdsBadgeAccentName;
|
|
401
|
+
tone?: never;
|
|
402
|
+
});
|
|
403
|
+
/**
|
|
404
|
+
* Static status/meaning label. `tone` renders theme-aware semantic color from
|
|
405
|
+
* the `--gds-state-*` role tokens; `accent` renders a fixed categorization
|
|
406
|
+
* color from the curated palette. Defaults to `tone="neutral"`. Renders
|
|
407
|
+
* `null` when `label` is empty.
|
|
408
|
+
*
|
|
409
|
+
* @example
|
|
410
|
+
* ```tsx
|
|
411
|
+
* <GdsBadge tone="success" icon="Success" label="Published" />
|
|
412
|
+
* <GdsBadge accent="teal" shape="hexagon" icon="Habit" label="Swimming" />
|
|
413
|
+
* ```
|
|
414
|
+
*/
|
|
415
|
+
declare function GdsBadge(props: GdsBadgeProps): react.JSX.Element | null;
|
|
416
|
+
|
|
417
|
+
export { getGdsIconKeys as A, getGdsIconMetadata as B, getGdsIconToneColor as C, isGdsIconKey as D, type GdsBadgeAccentShade as G, type GdsBadgeAccentName as a, type GdsIconKey as b, GDS_PIN_SILHOUETTE_PATH as c, GdsBadge as d, type GdsBadgeProps as e, GdsBadgeShapeCircle as f, GdsBadgeShapeHexagon as g, type GdsBadgeShapeName as h, GdsBadgeShapePin as i, GdsBadgeShapeRosette as j, GdsBadgeShapeShield as k, GdsBadgeShapeSquircle as l, GdsBadgeShapes as m, type GdsBadgeTone as n, GdsIcon as o, type GdsIconA11yMode as p, type GdsIconCategory as q, type GdsIconMetadata as r, type GdsIconName as s, type GdsIconProps as t, type GdsIconTone as u, GdsIcons as v, gdsBadgeAccentColors as w, gdsBadgeAccentShades as x, gdsIconRegistry as y, gdsIconToneColor as z };
|