@hotelfriendag/design-tokens 0.3.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.
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema-version": 1,
3
+ "$description": "Domain → semantic mapping for .status-{domain}-{state} CSS classes. Read by generate-tokens.cjs --target=status-css. Each entry: '{domain}.{state}' → semantic status slot name (matches tokens.figma.json semantic.color.status.*).",
4
+ "$note": "Phase 2A externalization of the hardcoded block previously in pre-built/components.css per RFC-0002 §Q7. Keeping this file authoritative ensures: (1) one source of truth, (2) AI agents reading the bundle see the mapping in JSON not buried in CSS, (3) tests can validate completeness vs the status pill spec.",
5
+
6
+ "booking": {
7
+ "new": "warning",
8
+ "offer": "violet",
9
+ "confirmed": "info",
10
+ "check-in": "olive",
11
+ "check-out": "coral",
12
+ "no-show": "error",
13
+ "due-in": "success",
14
+ "due-out": "orange-deep",
15
+ "canceled": "cancel",
16
+ "canceled-by-hotel": "cancel",
17
+ "canceled-by-guest": "cancel",
18
+ "canceled-by-hf": "cancel"
19
+ },
20
+ "order": {
21
+ "waiting": "warning",
22
+ "confirmed": "info",
23
+ "completed": "success",
24
+ "in-progress": "coral",
25
+ "action-required": "error",
26
+ "canceled": "cancel",
27
+ "canceled-by-hotel": "cancel",
28
+ "canceled-by-guest": "cancel",
29
+ "canceled-by-pos": "cancel"
30
+ },
31
+ "front-desk": {
32
+ "quota-free": "success",
33
+ "quota-busy": "error",
34
+ "out-of-order": "warning-strong"
35
+ },
36
+ "room-item-cleaning": {
37
+ "clean": "success",
38
+ "cleaning": "info",
39
+ "dirty": "error",
40
+ "inspected": "violet",
41
+ "out-of-service": "cancel"
42
+ },
43
+ "_orphan": {
44
+ "$description": "Standalone classes that are not per-domain — emitted as .status-{key} (no domain prefix).",
45
+ "deleted": "cancel"
46
+ }
47
+ }
@@ -0,0 +1,230 @@
1
+ {
2
+ "$themes": [],
3
+ "$metadata": {
4
+ "tokenSetOrder": ["global"],
5
+ "version": "0.2.0",
6
+ "note": "Three-tier architecture per RFC-0002. `primitive` = raw values (palette ramps), `semantic` = role tokens (used by app code), non-color tokens stay flat at root. App code should reference SEMANTIC tokens; primitives are an implementation detail (themable layer)."
7
+ },
8
+ "global": {
9
+ "primitive": {
10
+ "color": {
11
+ "blue": {
12
+ "50": { "value": "#E9F6FC", "type": "color", "description": "Light tint — active-state bg" },
13
+ "100": { "value": "#EFF6FF", "type": "color", "description": "Faint tint — reset-filters bg" },
14
+ "500": { "value": "#24AFE8", "type": "color", "description": "Canonical primary anchor (portal legacy SCSS still uses #26ADE4 — pending consolidation)" },
15
+ "600": { "value": "#149AD1", "type": "color", "description": "Primary hover" }
16
+ },
17
+ "gray": {
18
+ "25": { "value": "#FBFBFC", "type": "color", "description": "Page background top" },
19
+ "50": { "value": "#F6F7FB", "type": "color", "description": "Section backgrounds" },
20
+ "100": { "value": "#F1F3F6", "type": "color", "description": "Inputs bg, hover-bg, header bars" },
21
+ "200": { "value": "#E4E8EF", "type": "color", "description": "Border-light, dividers" },
22
+ "300": { "value": "#D1D6DD", "type": "color", "description": "Default border" },
23
+ "400": { "value": "#AEBCCF", "type": "color", "description": "Placeholder + disabled text — portal $dark__Grey" },
24
+ "500": { "value": "#99A1B7", "type": "color", "description": "Placeholder legacy / soft helper" },
25
+ "550": { "value": "#7E8EA6", "type": "color", "description": "Helper text on light bg" },
26
+ "600": { "value": "#50627E", "type": "color", "description": "Cancel-button text, ink-muted" },
27
+ "700": { "value": "#485B78", "type": "color", "description": "Steel-blue (tab/nav inactive) — Phase 2 component-tier" },
28
+ "800": { "value": "#4B5675", "type": "color", "description": "Secondary text" },
29
+ "900": { "value": "#2B2B2B", "type": "color", "description": "Body text, headings" },
30
+ "950": { "value": "#252F4A", "type": "color", "description": "Deepest ink (pagination active text) — Phase 2 component-tier" }
31
+ },
32
+ "green": {
33
+ "500": { "value": "#59B59D", "type": "color", "description": "Success / mint" }
34
+ },
35
+ "amber": {
36
+ "400": { "value": "#FFBD5A", "type": "color", "description": "Warning / buttermilk" },
37
+ "600": { "value": "#FFC900", "type": "color", "description": "Strong yellow — frontdesk OOO" }
38
+ },
39
+ "red": {
40
+ "400": { "value": "#EA6565", "type": "color", "description": "Error / rouge" },
41
+ "500": { "value": "#FB5A56", "type": "color", "description": "Cancel-red, deleted — between rouge and crimson" },
42
+ "700": { "value": "#D9534F", "type": "color", "description": "Deeper red — btn-danger" }
43
+ },
44
+ "orange": {
45
+ "500": { "value": "#F87921", "type": "color", "description": "Coral / peach" },
46
+ "700": { "value": "#A55505", "type": "color", "description": "Due-out brown" }
47
+ },
48
+ "violet": {
49
+ "500": { "value": "#5761D8", "type": "color", "description": "Offer, inspected" }
50
+ },
51
+ "slate": {
52
+ "500": { "value": "#7F8FA4", "type": "color", "description": "Canceled, deleted, OOS — cloud-gray" }
53
+ },
54
+ "olive": {
55
+ "700": { "value": "#5B7A02", "type": "color", "description": "Check-in (rare dark olive)" }
56
+ },
57
+ "white": { "value": "#FFFFFF", "type": "color" },
58
+ "black": { "value": "#000000", "type": "color" }
59
+ }
60
+ },
61
+ "semantic": {
62
+ "color": {
63
+ "accent": {
64
+ "default": { "value": "{primitive.color.blue.500}", "type": "color", "description": "Brand primary — links, primary buttons, focus" },
65
+ "hover": { "value": "{primitive.color.blue.600}", "type": "color", "description": "Primary button hover" },
66
+ "subtle": { "value": "{primitive.color.blue.50}", "type": "color", "description": "Accent tint — selected nav, active row" },
67
+ "subtler": { "value": "{primitive.color.blue.100}", "type": "color", "description": "Even softer accent — reset-filters bg" }
68
+ },
69
+ "on-accent": { "value": "{primitive.color.white}", "type": "color", "description": "Text/icons ON accent bg (Radix-style foreground pair)" },
70
+ "bg": {
71
+ "page": { "value": "{primitive.color.gray.25}", "type": "color", "description": "Page background (outermost)" },
72
+ "section": { "value": "{primitive.color.gray.50}", "type": "color", "description": "Section bg, table header" },
73
+ "muted": { "value": "{primitive.color.gray.100}", "type": "color", "description": "Input bg / hover bg / muted surface" },
74
+ "surface": { "value": "{primitive.color.white}", "type": "color", "description": "Card / modal / popover surface" }
75
+ },
76
+ "fg": {
77
+ "default": { "value": "{primitive.color.gray.900}", "type": "color", "description": "Default text / heading color" },
78
+ "muted": { "value": "{primitive.color.gray.800}", "type": "color", "description": "Secondary text, descriptions" },
79
+ "subtle": { "value": "{primitive.color.gray.550}", "type": "color", "description": "Helper / hint text" },
80
+ "faint": { "value": "{primitive.color.gray.400}", "type": "color", "description": "Placeholder + disabled input text" }
81
+ },
82
+ "border": {
83
+ "default": { "value": "{primitive.color.gray.300}", "type": "color", "description": "Default 1px border (buttons, inputs, chips)" },
84
+ "subtle": { "value": "{primitive.color.gray.200}", "type": "color", "description": "Faint dividers, light borders" },
85
+ "strong": { "value": "{primitive.color.gray.400}", "type": "color", "description": "Hover/focus border" }
86
+ },
87
+ "_component-tier-comment": {
88
+ "$description": "Component-tier tokens (RFC-0002 §3.3) — used when a single component needs a value that doesn't fit a generic semantic slot. Phase 2B promotes 4 portal-specific values out of components.css bare hex into addressable tokens. Naming: `{component}.{slot}` under semantic.color so Tailwind utilities work (text-hf-tab-fg-inactive etc.)."
89
+ },
90
+ "tab": {
91
+ "fg-inactive": { "value": "{primitive.color.gray.700}", "type": "color", "description": "Tab / nav-item text when NOT selected (.hf-tab, .hf-pill-tab default)" },
92
+ "count-fg": { "value": "{primitive.color.gray.700}", "type": "color", "description": "Count-badge text inside an inactive tab" }
93
+ },
94
+ "pagination": {
95
+ "fg-inactive": { "value": "{primitive.color.gray.700}", "type": "color", "description": "Pagination item text when not active" },
96
+ "fg-active": { "value": "{primitive.color.gray.950}", "type": "color", "description": "Pagination item text on the subtle-gray ACTIVE bg" }
97
+ },
98
+ "input": {
99
+ "border": { "value": "#DBDFE9", "type": "color", "description": "Input + checkbox/radio border — between gray-200 (#E4E8EF) and gray-300 (#D1D6DD); portal-exact, doesn't fit a primitive step" }
100
+ },
101
+ "menu": {
102
+ "bg-hover": { "value": "#F5F5F5", "type": "color", "description": "Dropdown item hover bg — slightly warmer than bg-muted; portal $table__hover" }
103
+ },
104
+ "status": {
105
+ "success": { "value": "{primitive.color.green.500}", "type": "color", "description": "Success, due-in, clean" },
106
+ "success-bg": { "value": "rgba(89,181,157,0.15)", "type": "color", "description": "Success @15% — pill bg" },
107
+ "warning": { "value": "{primitive.color.amber.400}", "type": "color", "description": "Warning, waiting, new" },
108
+ "warning-bg": { "value": "rgba(255,189,90,0.15)", "type": "color" },
109
+ "warning-strong": { "value": "{primitive.color.amber.600}", "type": "color", "description": "Frontdesk out-of-order — more saturated yellow" },
110
+ "warning-strong-bg": { "value": "rgba(255,201,0,0.15)", "type": "color" },
111
+ "error": { "value": "{primitive.color.red.400}", "type": "color", "description": "Error, no-show, dirty, action-required" },
112
+ "error-bg": { "value": "rgba(234,101,101,0.15)", "type": "color" },
113
+ "error-strong": { "value": "{primitive.color.red.700}", "type": "color", "description": "btn-danger" },
114
+ "error-alt": { "value": "{primitive.color.red.500}", "type": "color", "description": "btn-cancel-red, deleted variant" },
115
+ "info": { "value": "{semantic.color.accent.default}", "type": "color", "description": "Info = accent" },
116
+ "info-bg": { "value": "rgba(36,175,232,0.15)", "type": "color" },
117
+ "cancel": { "value": "{primitive.color.slate.500}", "type": "color", "description": "Cancellations, deleted, out-of-service" },
118
+ "cancel-bg": { "value": "rgba(127,143,164,0.15)", "type": "color" },
119
+ "coral": { "value": "{primitive.color.orange.500}", "type": "color", "description": "Check-out, in-progress" },
120
+ "coral-bg": { "value": "rgba(248,121,33,0.15)", "type": "color" },
121
+ "violet": { "value": "{primitive.color.violet.500}", "type": "color", "description": "Offer, inspected" },
122
+ "violet-bg": { "value": "rgba(87,97,216,0.15)", "type": "color" },
123
+ "olive": { "value": "{primitive.color.olive.700}", "type": "color", "description": "Check-in (rare deep olive)" },
124
+ "olive-bg": { "value": "rgba(91,122,2,0.15)", "type": "color" },
125
+ "orange-deep": { "value": "{primitive.color.orange.700}", "type": "color", "description": "Due-out brown" },
126
+ "orange-deep-bg": { "value": "rgba(165,85,5,0.15)", "type": "color" }
127
+ }
128
+ }
129
+ },
130
+
131
+ "fontFamily": {
132
+ "primary": { "value": "Roboto", "type": "fontFamilies" }
133
+ },
134
+ "fontWeight": {
135
+ "regular": { "value": "400", "type": "fontWeights" },
136
+ "medium": { "value": "500", "type": "fontWeights" },
137
+ "semibold": { "value": "600", "type": "fontWeights" }
138
+ },
139
+ "fontSize": {
140
+ "xs": { "value": "11px", "type": "fontSizes", "description": "Tag labels, uppercase captions" },
141
+ "sm": { "value": "13px", "type": "fontSizes", "description": "Grid headers, chips, sm buttons" },
142
+ "base": { "value": "14px", "type": "fontSizes", "description": "Body, labels (most common — 218 occurrences)" },
143
+ "md": { "value": "15px", "type": "fontSizes", "description": "Primary buttons" },
144
+ "lg": { "value": "16px", "type": "fontSizes", "description": "Modal titles, large tabs" },
145
+ "xl": { "value": "18px", "type": "fontSizes", "description": "Info-block titles, modal title" },
146
+ "2xl": { "value": "20px", "type": "fontSizes", "description": "Section heading" },
147
+ "h2": { "value": "24px", "type": "fontSizes" },
148
+ "page": { "value": "26px", "type": "fontSizes", "description": "Page title" },
149
+ "hero": { "value": "30px", "type": "fontSizes", "description": "Dashboard stat numbers" }
150
+ },
151
+ "lineHeight": {
152
+ "headings": { "value": "1.2", "type": "lineHeights" },
153
+ "body": { "value": "1.5", "type": "lineHeights" },
154
+ "tight": { "value": "1", "type": "lineHeights" }
155
+ },
156
+ "typography": {
157
+ "pageTitle": { "value": { "fontFamily": "{fontFamily.primary}", "fontWeight": "{fontWeight.semibold}", "fontSize": "{fontSize.page}", "lineHeight": "{lineHeight.headings}" }, "type": "typography" },
158
+ "btn": { "value": { "fontFamily": "{fontFamily.primary}", "fontWeight": "{fontWeight.semibold}", "fontSize": "{fontSize.md}", "lineHeight": "{lineHeight.body}" }, "type": "typography" },
159
+ "body": { "value": { "fontFamily": "{fontFamily.primary}", "fontWeight": "{fontWeight.regular}", "fontSize": "{fontSize.base}", "lineHeight": "{lineHeight.body}" }, "type": "typography" },
160
+ "label": { "value": { "fontFamily": "{fontFamily.primary}", "fontWeight": "{fontWeight.medium}", "fontSize": "{fontSize.base}", "lineHeight": "{lineHeight.body}" }, "type": "typography" },
161
+ "gridHeader": { "value": { "fontFamily": "{fontFamily.primary}", "fontWeight": "{fontWeight.medium}", "fontSize": "{fontSize.sm}", "lineHeight": "{lineHeight.body}" }, "type": "typography" },
162
+ "tagLabel": { "value": { "fontFamily": "{fontFamily.primary}", "fontWeight": "{fontWeight.medium}", "fontSize": "{fontSize.xs}", "lineHeight": "{lineHeight.headings}" }, "type": "typography", "description": "Uppercase, letter-spacing 0.05em" }
163
+ },
164
+
165
+ "spacing": {
166
+ "0": { "value": "0px", "type": "spacing" },
167
+ "1": { "value": "4px", "type": "spacing" },
168
+ "2": { "value": "8px", "type": "spacing" },
169
+ "3": { "value": "12px", "type": "spacing" },
170
+ "4": { "value": "16px", "type": "spacing" },
171
+ "5": { "value": "20px", "type": "spacing", "description": "Default section gap" },
172
+ "6": { "value": "24px", "type": "spacing" },
173
+ "7": { "value": "30px", "type": "spacing" },
174
+ "8": { "value": "32px", "type": "spacing" }
175
+ },
176
+
177
+ "radius": {
178
+ "sm": { "value": "6px", "type": "borderRadius", "description": "Buttons, inputs, status pills, modals (portal-exact)" },
179
+ "md": { "value": "8px", "type": "borderRadius", "description": "Pagination items" },
180
+ "lg": { "value": "9px", "type": "borderRadius", "description": "Dropdowns, toasts, pill-tabs" },
181
+ "xl": { "value": "12px", "type": "borderRadius", "description": "Large elevated cards" },
182
+ "pill": { "value": "99px", "type": "borderRadius", "description": "Rounded pill (rare — most status pills are 6px square)" }
183
+ },
184
+
185
+ "shadow": {
186
+ "default": { "value": { "x": "0", "y": "1", "blur": "8", "spread": "0", "color": "rgba(0,0,0,0.1)", "type": "dropShadow" }, "type": "boxShadow", "description": "Default elevation — buttons, sticky bars" },
187
+ "subtle": { "value": { "x": "0", "y": "2", "blur": "4", "spread": "0", "color": "rgba(0,0,0,0.05)", "type": "dropShadow" }, "type": "boxShadow", "description": "Portal .dashboard-card — very faint elevation" },
188
+ "wrapper": { "value": { "x": "0", "y": "3", "blur": "4", "spread": "0", "color": "rgba(0,0,0,0.03)", "type": "dropShadow" }, "type": "boxShadow", "description": "Card frame (legacy)" },
189
+ "card": { "value": { "x": "0", "y": "12","blur": "24", "spread": "0", "color": "rgba(26,26,30,0.06)","type": "dropShadow" }, "type": "boxShadow", "description": "Elevated card / large surface" },
190
+ "modal": { "value": { "x": "0", "y": "6", "blur": "18", "spread": "0", "color": "rgba(0,0,0,0.1)", "type": "dropShadow" }, "type": "boxShadow", "description": "Modal / dropdown / popover floating UI" },
191
+ "outline": { "value": { "x": "0", "y": "1", "blur": "2", "spread": "0", "color": "rgba(72,91,120,0.18)","type": "dropShadow" }, "type": "boxShadow", "description": "Outline button micro-elevation" },
192
+ "hover": { "value": { "x": "0", "y": "2", "blur": "3", "spread": "0", "color": "rgba(0,0,0,0.06)", "type": "dropShadow" }, "type": "boxShadow", "description": "Hover lift" }
193
+ },
194
+
195
+ "opacity": {
196
+ "disabled": { "value": "0.6", "type": "opacity", "description": "Disabled state" },
197
+ "tint": { "value": "0.15", "type": "opacity", "description": "Status badge bg alpha" }
198
+ },
199
+
200
+ "size": {
201
+ "sidebarExpanded": { "value": "215px", "type": "sizing" },
202
+ "sidebarCollapsed": { "value": "80px", "type": "sizing" },
203
+ "headerHeight": { "value": "60px", "type": "sizing" },
204
+ "contentMax": { "value": "1440px","type": "sizing" },
205
+ "btnDefault": { "value": "40px", "type": "sizing", "description": "Primary button height" },
206
+ "btnSm": { "value": "32px", "type": "sizing" },
207
+ "btnSearch": { "value": "38px", "type": "sizing", "description": "Inline filter/search submit height" },
208
+ "inputDefault": { "value": "39px", "type": "sizing", "description": "Form-control input height" },
209
+ "tapTarget": { "value": "44px", "type": "sizing", "description": "Mobile minimum tap target" }
210
+ },
211
+
212
+ "zIndex": {
213
+ "sidebar": { "value": "1000", "type": "other" },
214
+ "dropdown": { "value": "1001", "type": "other" },
215
+ "datepicker": { "value": "3000", "type": "other" },
216
+ "stickyTopbar": { "value": "4000", "type": "other" },
217
+ "modalBackdrop": { "value": "10050", "type": "other" },
218
+ "modalDialog": { "value": "10051", "type": "other" },
219
+ "preloader": { "value": "99999", "type": "other" },
220
+ "topmostOverlay": { "value": "1000001","type": "other", "description": "Above all" }
221
+ },
222
+
223
+ "motion": {
224
+ "fast": { "value": "0.1s", "type": "other" },
225
+ "default": { "value": "0.2s ease-in-out", "type": "other", "description": "Canonical transition" },
226
+ "slow": { "value": "0.3s", "type": "other", "description": "Most common in legacy CSS — being normalized down to 0.2s" },
227
+ "bouncy": { "value": "0.4s cubic-bezier(0.88, -0.99, 0, 1.81)", "type": "other" }
228
+ }
229
+ }
230
+ }