@360crewing/ui 0.1.3

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.
Files changed (106) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/LICENSE +21 -0
  3. package/README.md +46 -0
  4. package/dist/components/Avatar.d.ts +20 -0
  5. package/dist/components/Avatar.js +17 -0
  6. package/dist/components/Badge.d.ts +19 -0
  7. package/dist/components/Badge.js +10 -0
  8. package/dist/components/Breadcrumbs.d.ts +19 -0
  9. package/dist/components/Breadcrumbs.js +12 -0
  10. package/dist/components/Button.d.ts +38 -0
  11. package/dist/components/Button.js +50 -0
  12. package/dist/components/Card.d.ts +12 -0
  13. package/dist/components/Card.js +6 -0
  14. package/dist/components/Checkbox.d.ts +14 -0
  15. package/dist/components/Checkbox.js +9 -0
  16. package/dist/components/CheckboxField.d.ts +16 -0
  17. package/dist/components/CheckboxField.js +17 -0
  18. package/dist/components/CollapsibleFields.d.ts +9 -0
  19. package/dist/components/CollapsibleFields.js +8 -0
  20. package/dist/components/ContentLoader.d.ts +8 -0
  21. package/dist/components/ContentLoader.js +14 -0
  22. package/dist/components/Delimeter.d.ts +3 -0
  23. package/dist/components/Delimeter.js +6 -0
  24. package/dist/components/DetailItem.d.ts +8 -0
  25. package/dist/components/DetailItem.js +6 -0
  26. package/dist/components/DropdownButton.d.ts +15 -0
  27. package/dist/components/DropdownButton.js +29 -0
  28. package/dist/components/FileUpload.d.ts +32 -0
  29. package/dist/components/FileUpload.js +75 -0
  30. package/dist/components/FormActionButtons.d.ts +18 -0
  31. package/dist/components/FormActionButtons.js +10 -0
  32. package/dist/components/Icon.d.ts +20 -0
  33. package/dist/components/Icon.js +11 -0
  34. package/dist/components/IconButton.d.ts +14 -0
  35. package/dist/components/IconButton.js +9 -0
  36. package/dist/components/InformationPanel.d.ts +14 -0
  37. package/dist/components/InformationPanel.js +6 -0
  38. package/dist/components/LayoutBlock.d.ts +6 -0
  39. package/dist/components/LayoutBlock.js +5 -0
  40. package/dist/components/Page.d.ts +12 -0
  41. package/dist/components/Page.js +6 -0
  42. package/dist/components/Pagination.d.ts +19 -0
  43. package/dist/components/Pagination.js +35 -0
  44. package/dist/components/Popover.d.ts +27 -0
  45. package/dist/components/Popover.js +130 -0
  46. package/dist/components/SearchInput.d.ts +27 -0
  47. package/dist/components/SearchInput.js +44 -0
  48. package/dist/components/ShadowedBlock.d.ts +9 -0
  49. package/dist/components/ShadowedBlock.js +6 -0
  50. package/dist/components/SidebarMenu.d.ts +27 -0
  51. package/dist/components/SidebarMenu.js +16 -0
  52. package/dist/components/SkeletonLoader.d.ts +4 -0
  53. package/dist/components/SkeletonLoader.js +7 -0
  54. package/dist/components/StatusBadge.d.ts +20 -0
  55. package/dist/components/StatusBadge.js +11 -0
  56. package/dist/components/Table.d.ts +39 -0
  57. package/dist/components/Table.js +24 -0
  58. package/dist/components/Tabs.d.ts +34 -0
  59. package/dist/components/Tabs.js +95 -0
  60. package/dist/components/Tag.d.ts +20 -0
  61. package/dist/components/Tag.js +11 -0
  62. package/dist/components/TextField.d.ts +45 -0
  63. package/dist/components/TextField.js +53 -0
  64. package/dist/components/TextareaField.d.ts +18 -0
  65. package/dist/components/TextareaField.js +11 -0
  66. package/dist/components/Toggle.d.ts +10 -0
  67. package/dist/components/Toggle.js +9 -0
  68. package/dist/components/ToggleField.d.ts +16 -0
  69. package/dist/components/ToggleField.js +17 -0
  70. package/dist/components/Tooltip.d.ts +25 -0
  71. package/dist/components/Tooltip.js +128 -0
  72. package/dist/index.d.ts +64 -0
  73. package/dist/index.js +35 -0
  74. package/dist/styles/Avatar.css +47 -0
  75. package/dist/styles/Badge.css +172 -0
  76. package/dist/styles/Breadcrumbs.css +54 -0
  77. package/dist/styles/Button.css +416 -0
  78. package/dist/styles/Card.css +34 -0
  79. package/dist/styles/Checkbox.css +102 -0
  80. package/dist/styles/CheckboxField.css +75 -0
  81. package/dist/styles/CollapsibleFields.css +53 -0
  82. package/dist/styles/Delimeter.css +7 -0
  83. package/dist/styles/DetailItem.css +18 -0
  84. package/dist/styles/DropdownButton.css +82 -0
  85. package/dist/styles/Error.css +14 -0
  86. package/dist/styles/FileUpload.css +113 -0
  87. package/dist/styles/Icon.css +12 -0
  88. package/dist/styles/IconButton.css +68 -0
  89. package/dist/styles/InformationPanel.css +84 -0
  90. package/dist/styles/Page.css +46 -0
  91. package/dist/styles/Pagination.css +150 -0
  92. package/dist/styles/Popover.css +28 -0
  93. package/dist/styles/ShadowedBlock.css +13 -0
  94. package/dist/styles/SidebarMenu.css +151 -0
  95. package/dist/styles/StatusBadge.css +63 -0
  96. package/dist/styles/Table.css +126 -0
  97. package/dist/styles/Tabs.css +193 -0
  98. package/dist/styles/Tag.css +110 -0
  99. package/dist/styles/TextField.css +276 -0
  100. package/dist/styles/Toggle.css +105 -0
  101. package/dist/styles/ToggleField.css +73 -0
  102. package/dist/styles/Tooltip.css +30 -0
  103. package/dist/styles/tokens.css +361 -0
  104. package/dist/styles/typography.css +169 -0
  105. package/dist/styles.css +33 -0
  106. package/package.json +50 -0
@@ -0,0 +1,73 @@
1
+ .toggle-field {
2
+ display: flex;
3
+ gap: 12px;
4
+ justify-content: space-between;
5
+ height: 24px;
6
+ line-height: 24px;
7
+ align-items: center;
8
+ outline: none;
9
+ width: 100%;
10
+
11
+ input {
12
+ appearance: none;
13
+ position: relative;
14
+ width: 33px;
15
+ height: 19px;
16
+ border-radius: 100px;
17
+ border: none;
18
+ background-color: #ECEFF1;
19
+ cursor: pointer;
20
+ margin: 0;
21
+ flex-shrink: 0;
22
+ outline: none;
23
+ transition: all 0.2s;
24
+
25
+ &::after {
26
+ content: "";
27
+ position: absolute;
28
+ top: 50%;
29
+ left: 0;
30
+ transform: translate(0%, -50%);
31
+ width: 21px;
32
+ height: 22px;
33
+ overflow: hidden;
34
+ border-radius: 50%;
35
+ background-color: #F2F5F8;
36
+ box-shadow: 0px 1px 2px 0px #94A1AC80;
37
+ transition: all 0.2s;
38
+ }
39
+
40
+ &:checked {
41
+ background-color: var(--text-brand);
42
+
43
+ &::after {
44
+ transform: translate(75%, -50%);
45
+ }
46
+ }
47
+
48
+ &:disabled {
49
+ cursor: not-allowed;
50
+ background-color: var(--deactivate-grey-color);
51
+ }
52
+ }
53
+
54
+ .label {
55
+ font-size: 12px;
56
+ font-weight: 400;
57
+ text-align: left;
58
+ color: var(--default-black-color);
59
+ white-space: wrap;
60
+ max-width: 202px;
61
+ }
62
+
63
+ &.table-checkbox {
64
+ margin-left: 0;
65
+ justify-content: center;
66
+ }
67
+ }
68
+
69
+ .checkbox-field.error {
70
+ input {
71
+ border-color: red;
72
+ }
73
+ }
@@ -0,0 +1,30 @@
1
+ /* =====================================================================
2
+ * DS Tooltip — short on-hover/focus hint.
3
+ * Positioned absolutely on document.body in scroll-window coordinates.
4
+ * ===================================================================== */
5
+
6
+ .ds-tooltip {
7
+ position: absolute;
8
+ z-index: var(--z-tooltip);
9
+ max-width: 280px;
10
+ padding: var(--space-6) var(--space-10);
11
+ background: var(--color-neutral-900);
12
+ color: var(--color-neutral-0);
13
+ font-family: var(--font-family-base);
14
+ font-size: var(--font-size-xs);
15
+ font-weight: var(--font-weight-medium);
16
+ line-height: var(--line-height-tight);
17
+ border-radius: var(--radius-md);
18
+ box-shadow: var(--shadow-md);
19
+ pointer-events: none;
20
+ animation: ds-tooltip-in var(--duration-fast) var(--easing-standard);
21
+ }
22
+
23
+ @keyframes ds-tooltip-in {
24
+ from { opacity: 0; transform: translateY(2px); }
25
+ to { opacity: 1; transform: translateY(0); }
26
+ }
27
+
28
+ @media (prefers-reduced-motion: reduce) {
29
+ .ds-tooltip { animation: none; }
30
+ }
@@ -0,0 +1,361 @@
1
+ /* =====================================================================
2
+ * 360crewing Design Tokens
3
+ * ---------------------------------------------------------------------
4
+ * Single source of truth for color, type, spacing, radius, shadow,
5
+ * z-index, motion and breakpoints across host, marketplace SDK and
6
+ * mobile (Capacitor) builds.
7
+ *
8
+ * Architecture (3 tiers — same approach as Carbon, Polaris, Material 3):
9
+ * 1. PRIMITIVES — raw color scales and base units. Never used directly
10
+ * in component CSS; only referenced from semantic aliases below.
11
+ * 2. SEMANTIC — purpose-named aliases (`--surface-brand`,
12
+ * `--text-primary`, …). Components MUST consume these.
13
+ * 3. COMPONENT — per-component overrides exposed as `--ds-<part>`
14
+ * vars so consumers can theme without forking CSS.
15
+ *
16
+ * Dark mode: structure ready, palette TBD. Toggle via `[data-theme="dark"]`.
17
+ * Density: scale exposed via `--ds-density` (1 = comfortable, 0.875 = compact).
18
+ * ===================================================================== */
19
+
20
+ :root {
21
+ /* ============================================================
22
+ * 1. PRIMITIVE COLOR SCALES
23
+ * ============================================================ */
24
+
25
+ /* Indigo — brand */
26
+ --color-indigo-50: #eef0ff;
27
+ --color-indigo-100: #d9deff;
28
+ --color-indigo-200: #b6bdf0;
29
+ --color-indigo-300: #8a96e8;
30
+ --color-indigo-400: #5d6cd6;
31
+ --color-indigo-500: #3949ab;
32
+ --color-indigo-600: #293896;
33
+ --color-indigo-700: #1f2c80;
34
+ --color-indigo-800: #1a237e;
35
+ --color-indigo-900: #131a5e;
36
+
37
+ /* Cyan — accent */
38
+ --color-cyan-50: #e3feff;
39
+ --color-cyan-100: #b3f9fc;
40
+ --color-cyan-300: #4dd5dc;
41
+ --color-cyan-500: #20bec6;
42
+ --color-cyan-700: #178e94;
43
+
44
+ /* Neutral — gray scale */
45
+ --color-neutral-0: #ffffff;
46
+ --color-neutral-25: #f7f9fa;
47
+ --color-neutral-50: #f2f5f8;
48
+ --color-neutral-75: #eceff1;
49
+ --color-neutral-100: #e4eaef;
50
+ --color-neutral-150: #cfd8dc;
51
+ --color-neutral-300: #b1bbc2;
52
+ --color-neutral-500: #90a4ae;
53
+ --color-neutral-700: #607d8b;
54
+ --color-neutral-900: #26292b;
55
+ --color-neutral-1000: #000000;
56
+
57
+ /* Success — green */
58
+ --color-green-50: #e8f5e9;
59
+ --color-green-500: #2e7d32;
60
+ --color-green-700: #1b5e20;
61
+
62
+ /* Warning — amber */
63
+ --color-amber-50: #fffde7;
64
+ --color-amber-500: #f9a825;
65
+ --color-amber-700: #c17900;
66
+
67
+ /* Danger — red */
68
+ --color-red-50: #feebee;
69
+ --color-red-100: #ffebee;
70
+ --color-red-500: #e53935;
71
+ --color-red-700: #c62828;
72
+
73
+ /* ============================================================
74
+ * 2. SEMANTIC COLOR ALIASES
75
+ * Components reference these (never the primitives directly).
76
+ * ============================================================ */
77
+
78
+ /* Text */
79
+ --text-primary: var(--color-neutral-1000);
80
+ --text-secondary: var(--color-neutral-500);
81
+ --text-tertiary: var(--color-neutral-0);
82
+ --text-disabled: var(--color-neutral-300);
83
+ --text-placeholder: var(--color-neutral-300);
84
+ --text-brand: var(--color-indigo-600);
85
+ --text-accent: var(--color-cyan-500);
86
+ --text-success: var(--color-green-500);
87
+ --text-warning: var(--color-amber-700);
88
+ --text-error: var(--color-red-500);
89
+ --text-link: var(--color-indigo-600);
90
+
91
+ /* Surface (backgrounds) */
92
+ --surface-primary: var(--color-neutral-0);
93
+ --surface-secondary: var(--color-neutral-75);
94
+ --surface-secondary-light: var(--color-neutral-50);
95
+ --surface-tertiary: var(--color-neutral-100);
96
+ --surface-brand: var(--color-indigo-600);
97
+ --surface-brand-light: var(--color-indigo-500);
98
+ --surface-brand-dark: var(--color-indigo-800);
99
+ --surface-brand-minimal: var(--color-indigo-100);
100
+ --surface-accent: var(--color-cyan-500);
101
+ --surface-accent-minimal: var(--color-cyan-50);
102
+ --surface-success: var(--color-green-500);
103
+ --surface-success-light: var(--color-green-50);
104
+ --surface-warning: var(--color-amber-500);
105
+ --surface-warning-light: var(--color-amber-50);
106
+ --surface-error: var(--color-red-500);
107
+ --surface-error-minimal: var(--color-red-50);
108
+ --surface-disabled: var(--color-neutral-50);
109
+
110
+ /* Overlay (modal/drawer scrim) */
111
+ --surface-overlay: rgba(38, 41, 43, 0.5);
112
+ --surface-overlay-light: rgba(38, 41, 43, 0.25);
113
+
114
+ /* Border */
115
+ --border-primary: var(--color-neutral-150);
116
+ --border-secondary: var(--color-neutral-75);
117
+ --border-tertiary: var(--color-neutral-100);
118
+ --border-strong: var(--color-neutral-300);
119
+ --border-brand: var(--color-indigo-600);
120
+ --border-accent: var(--color-cyan-500);
121
+ --border-success: var(--color-green-500);
122
+ --border-warning: var(--color-amber-500);
123
+ --border-error: var(--color-red-500);
124
+ --border-disabled: var(--color-neutral-100);
125
+
126
+ /* Icon */
127
+ --icon-primary: var(--color-neutral-500);
128
+ --icon-secondary: var(--color-neutral-0);
129
+ --icon-contrast: var(--color-neutral-1000);
130
+ --icon-disabled: var(--color-neutral-300);
131
+ --icon-brand: var(--color-indigo-600);
132
+ --icon-accent: var(--color-cyan-500);
133
+ --icon-success: var(--color-green-500);
134
+ --icon-warning: var(--color-amber-500);
135
+ --icon-error: var(--color-red-500);
136
+
137
+ /* Status — domain-specific (certificate validity).
138
+ * Used by Badge / StatusDot / DocumentChip throughout the app. */
139
+ --status-valid-bg: var(--color-green-50);
140
+ --status-valid-fg: var(--color-green-700);
141
+ --status-valid-border: var(--color-green-500);
142
+ --status-expiring-bg: var(--color-amber-50);
143
+ --status-expiring-fg: var(--color-amber-700);
144
+ --status-expiring-border: var(--color-amber-500);
145
+ --status-expired-bg: var(--color-red-50);
146
+ --status-expired-fg: var(--color-red-700);
147
+ --status-expired-border: var(--color-red-500);
148
+ --status-unlimited-bg: var(--color-indigo-100);
149
+ --status-unlimited-fg: var(--color-indigo-700);
150
+ --status-unlimited-border: var(--color-indigo-500);
151
+
152
+ /* ============================================================
153
+ * 3. TYPOGRAPHY
154
+ * Mirrors Figma Crewman/{Device}/{Style}/{Weight} text styles.
155
+ * ============================================================ */
156
+
157
+ /* Family */
158
+ --font-family-base:
159
+ "Montserrat",
160
+ -apple-system,
161
+ BlinkMacSystemFont,
162
+ "Segoe UI",
163
+ Roboto,
164
+ "Helvetica Neue",
165
+ Arial,
166
+ sans-serif;
167
+ --font-family-mono:
168
+ ui-monospace,
169
+ SFMono-Regular,
170
+ "SF Mono",
171
+ Menlo,
172
+ Consolas,
173
+ monospace;
174
+
175
+ /* Weight */
176
+ --font-weight-regular: 400;
177
+ --font-weight-medium: 500;
178
+ --font-weight-semibold: 600;
179
+ --font-weight-bold: 700;
180
+
181
+ /* Size scale (pixel-precise to match Figma mockups; rem-friendly when base = 16px) */
182
+ --font-size-2xs: 10px; /* mobile bottom tab label */
183
+ --font-size-xs: 11px; /* tablet tab / mobile caption-2 */
184
+ --font-size-sm: 12px; /* caption-1 / button label (medium) */
185
+ --font-size-md: 13px; /* tablet caption-2 */
186
+ --font-size-base: 14px; /* body */
187
+ --font-size-lg: 16px;
188
+ --font-size-xl: 18px; /* h5 desktop / tablet body */
189
+ --font-size-2xl: 20px;
190
+ --font-size-3xl: 22px;
191
+ --font-size-4xl: 26px; /* h3 desktop */
192
+ --font-size-5xl: 32px;
193
+ --font-size-6xl: 40px;
194
+
195
+ /* Line height */
196
+ --line-height-tight: 1.2;
197
+ --line-height-default: 1.3;
198
+ --line-height-relaxed: 1.5;
199
+
200
+ /* Letter spacing */
201
+ --letter-spacing-tight: -0.01em;
202
+ --letter-spacing-normal: 0;
203
+ --letter-spacing-wide: 0.02em;
204
+ --letter-spacing-uppercase: 0.06em;
205
+
206
+ /* ============================================================
207
+ * 4. SPACING — 4-pt grid
208
+ * ============================================================ */
209
+ --space-0: 0;
210
+ --space-1: 2px;
211
+ --space-2: 4px;
212
+ --space-3: 6px;
213
+ --space-4: 8px;
214
+ --space-5: 10px;
215
+ --space-6: 12px;
216
+ --space-7: 14px;
217
+ --space-8: 16px;
218
+ --space-10: 20px;
219
+ --space-12: 24px;
220
+ --space-14: 28px;
221
+ --space-16: 32px;
222
+ --space-20: 40px;
223
+ --space-24: 48px;
224
+ --space-32: 64px;
225
+ --space-40: 80px;
226
+ --space-48: 96px;
227
+ --space-64: 128px;
228
+
229
+ /* ============================================================
230
+ * 5. RADIUS
231
+ * ============================================================ */
232
+ --radius-none: 0;
233
+ --radius-xs: 2px;
234
+ --radius-sm: 4px;
235
+ --radius-md: 6px;
236
+ --radius-lg: 8px;
237
+ --radius-xl: 12px;
238
+ --radius-2xl: 16px;
239
+ --radius-3xl: 20px;
240
+ --radius-pill: 9999px;
241
+
242
+ /* ============================================================
243
+ * 6. SHADOWS
244
+ * ============================================================ */
245
+ --shadow-none: none;
246
+ --shadow-xs: 0 1px 2px rgba(38, 41, 43, 0.06);
247
+ --shadow-sm: 0 2px 4px rgba(38, 41, 43, 0.08);
248
+ --shadow-md: 0 4px 12px rgba(139, 153, 160, 0.18);
249
+ --shadow-lg: 0 4px 20px rgba(139, 153, 160, 0.30); /* Figma "crewman/grey shadow" */
250
+ --shadow-xl: 0 8px 32px rgba(38, 41, 43, 0.18);
251
+ --shadow-focus-brand: 0 0 0 3px rgba(41, 56, 150, 0.32);
252
+ --shadow-focus-error: 0 0 0 3px rgba(229, 57, 53, 0.32);
253
+
254
+ /* ============================================================
255
+ * 7. Z-INDEX
256
+ * Predefined layering — never use arbitrary z-index values.
257
+ * ============================================================ */
258
+ --z-base: 0;
259
+ --z-content: 1;
260
+ --z-sticky: 100;
261
+ --z-dropdown: 1000;
262
+ --z-overlay: 1100;
263
+ --z-modal: 1200;
264
+ --z-popover: 1300;
265
+ --z-toast: 1400;
266
+ --z-tooltip: 1500;
267
+
268
+ /* ============================================================
269
+ * 8. BREAKPOINTS
270
+ * For JS read; CSS @media queries use the raw values directly.
271
+ * mobile : 0 – 767px
272
+ * tablet : 768 – 1279px
273
+ * desktop : 1280 – 1439px
274
+ * wide : ≥ 1440px
275
+ * ============================================================ */
276
+ --breakpoint-mobile: 375px;
277
+ --breakpoint-tablet: 768px;
278
+ --breakpoint-desktop: 1280px;
279
+ --breakpoint-wide: 1440px;
280
+
281
+ /* ============================================================
282
+ * 9. MOTION
283
+ * ============================================================ */
284
+ --duration-instant: 60ms;
285
+ --duration-fast: 120ms;
286
+ --duration-base: 200ms;
287
+ --duration-slow: 320ms;
288
+ --easing-standard: cubic-bezier(0.2, 0.0, 0.0, 1.0);
289
+ --easing-emphasized: cubic-bezier(0.3, 0.0, 0.0, 1.0);
290
+ --easing-decelerate: cubic-bezier(0.0, 0.0, 0.0, 1.0);
291
+ --easing-accelerate: cubic-bezier(0.4, 0.0, 1.0, 1.0);
292
+
293
+ /* ============================================================
294
+ * 10. COMPONENT-LEVEL TOKENS
295
+ * ============================================================ */
296
+
297
+ /* Touch — WCAG 2.5.5 minimum 44 px on touch devices */
298
+ --touch-target-min: 44px;
299
+
300
+ /* Control heights (Button, Input, Select, …) */
301
+ --control-height-xs: 24px;
302
+ --control-height-sm: 28px;
303
+ --control-height-md: 36px;
304
+ --control-height-lg: 44px;
305
+ --control-height-xl: 52px;
306
+
307
+ /* Layout */
308
+ --layout-width: 1314px;
309
+ --layout-content-padding: 24px;
310
+
311
+ /* Page horizontal padding by device */
312
+ --page-padding-x-mobile: 16px;
313
+ --page-padding-x-tablet: 24px;
314
+ --page-padding-x-desktop: 32px;
315
+
316
+ /* Focus ring */
317
+ --focus-ring-width: 2px;
318
+ --focus-ring-offset: 2px;
319
+ --focus-ring-color: var(--color-indigo-500);
320
+
321
+ /* Density scale (1 = comfortable, 0.875 = compact). Components that
322
+ * support density multiply their internal paddings by this value. */
323
+ --ds-density: 1;
324
+
325
+ /* Safe-area insets (iOS Capacitor). Fall back to 0 in browsers. */
326
+ --safe-area-top: env(safe-area-inset-top, 0px);
327
+ --safe-area-bottom: env(safe-area-inset-bottom, 0px);
328
+ --safe-area-left: env(safe-area-inset-left, 0px);
329
+ --safe-area-right: env(safe-area-inset-right, 0px);
330
+ }
331
+
332
+ /* ============================================================
333
+ * DARK MODE — placeholder; palette TBD.
334
+ * Activate by setting `data-theme="dark"` on <html> or any ancestor.
335
+ * ============================================================ */
336
+ [data-theme="dark"] {
337
+ /* TODO: dark palette. Keeping selector reserved so consumers can
338
+ * already write theme-aware CSS without churning later. */
339
+ }
340
+
341
+ /* ============================================================
342
+ * REDUCED MOTION — respect user preference.
343
+ * ============================================================ */
344
+ @media (prefers-reduced-motion: reduce) {
345
+ :root {
346
+ --duration-instant: 0ms;
347
+ --duration-fast: 0ms;
348
+ --duration-base: 0ms;
349
+ --duration-slow: 0ms;
350
+ }
351
+ }
352
+
353
+ /* ============================================================
354
+ * COMPACT DENSITY — opt-in via data attribute.
355
+ * ============================================================ */
356
+ [data-density="compact"] {
357
+ --ds-density: 0.875;
358
+ --control-height-sm: 24px;
359
+ --control-height-md: 32px;
360
+ --control-height-lg: 40px;
361
+ }
@@ -0,0 +1,169 @@
1
+ /* =====================================================================
2
+ * Typography utility classes — mirror Figma `Crewman/{Device}/{Style}/{Weight}`
3
+ * text styles. Components either use a `.ds-text-*` class directly or
4
+ * compose `font-size` / `line-height` / `font-weight` tokens manually.
5
+ *
6
+ * Naming: `.ds-text-{role}-{size}-{weight}`. Examples:
7
+ * .ds-text-display — large hero numbers / titles
8
+ * .ds-text-h3 — section heading (Desktop/H3/Semibold, 26px)
9
+ * .ds-text-h5 — card heading (Desktop/H5/Semibold, 18px)
10
+ * .ds-text-body — base body 14px
11
+ * .ds-text-caption-1 — 12px caption
12
+ * .ds-text-caption-2 — 11px caption (mobile)
13
+ * .ds-text-tab — 10–11px tab label
14
+ * ===================================================================== */
15
+
16
+ .ds-text-display {
17
+ font-family: var(--font-family-base);
18
+ font-size: var(--font-size-5xl);
19
+ line-height: var(--line-height-tight);
20
+ font-weight: var(--font-weight-semibold);
21
+ }
22
+
23
+ .ds-text-h1 {
24
+ font-family: var(--font-family-base);
25
+ font-size: var(--font-size-6xl);
26
+ line-height: var(--line-height-tight);
27
+ font-weight: var(--font-weight-semibold);
28
+ }
29
+
30
+ .ds-text-h2 {
31
+ font-family: var(--font-family-base);
32
+ font-size: var(--font-size-5xl);
33
+ line-height: var(--line-height-tight);
34
+ font-weight: var(--font-weight-semibold);
35
+ }
36
+
37
+ .ds-text-h3 {
38
+ font-family: var(--font-family-base);
39
+ font-size: var(--font-size-4xl);
40
+ line-height: var(--line-height-default);
41
+ font-weight: var(--font-weight-semibold);
42
+ }
43
+
44
+ .ds-text-h4 {
45
+ font-family: var(--font-family-base);
46
+ font-size: var(--font-size-3xl);
47
+ line-height: var(--line-height-default);
48
+ font-weight: var(--font-weight-semibold);
49
+ }
50
+
51
+ .ds-text-h5 {
52
+ font-family: var(--font-family-base);
53
+ font-size: var(--font-size-xl);
54
+ line-height: var(--line-height-default);
55
+ font-weight: var(--font-weight-semibold);
56
+ }
57
+
58
+ .ds-text-h6 {
59
+ font-family: var(--font-family-base);
60
+ font-size: var(--font-size-lg);
61
+ line-height: var(--line-height-default);
62
+ font-weight: var(--font-weight-semibold);
63
+ }
64
+
65
+ /* Body 14 */
66
+ .ds-text-body {
67
+ font-family: var(--font-family-base);
68
+ font-size: var(--font-size-base);
69
+ line-height: var(--line-height-tight);
70
+ font-weight: var(--font-weight-regular);
71
+ }
72
+ .ds-text-body-medium {
73
+ font-family: var(--font-family-base);
74
+ font-size: var(--font-size-base);
75
+ line-height: var(--line-height-tight);
76
+ font-weight: var(--font-weight-medium);
77
+ }
78
+ .ds-text-body-semibold {
79
+ font-family: var(--font-family-base);
80
+ font-size: var(--font-size-base);
81
+ line-height: var(--line-height-tight);
82
+ font-weight: var(--font-weight-semibold);
83
+ }
84
+
85
+ /* Caption 1 — 12 */
86
+ .ds-text-caption-1 {
87
+ font-family: var(--font-family-base);
88
+ font-size: var(--font-size-sm);
89
+ line-height: var(--line-height-tight);
90
+ font-weight: var(--font-weight-regular);
91
+ }
92
+ .ds-text-caption-1-semibold {
93
+ font-family: var(--font-family-base);
94
+ font-size: var(--font-size-sm);
95
+ line-height: var(--line-height-tight);
96
+ font-weight: var(--font-weight-semibold);
97
+ }
98
+
99
+ /* Caption 2 — 11 */
100
+ .ds-text-caption-2 {
101
+ font-family: var(--font-family-base);
102
+ font-size: var(--font-size-xs);
103
+ line-height: var(--line-height-tight);
104
+ font-weight: var(--font-weight-regular);
105
+ }
106
+ .ds-text-caption-2-semibold {
107
+ font-family: var(--font-family-base);
108
+ font-size: var(--font-size-xs);
109
+ line-height: var(--line-height-tight);
110
+ font-weight: var(--font-weight-semibold);
111
+ }
112
+
113
+ /* Tab label — 10–11 */
114
+ .ds-text-tab {
115
+ font-family: var(--font-family-base);
116
+ font-size: var(--font-size-2xs);
117
+ line-height: 1;
118
+ font-weight: var(--font-weight-regular);
119
+ }
120
+ .ds-text-tab-semibold {
121
+ font-family: var(--font-family-base);
122
+ font-size: var(--font-size-xs);
123
+ line-height: var(--line-height-default);
124
+ font-weight: var(--font-weight-semibold);
125
+ }
126
+
127
+ /* Overline — uppercase utility label */
128
+ .ds-text-overline {
129
+ font-family: var(--font-family-base);
130
+ font-size: var(--font-size-xs);
131
+ line-height: var(--line-height-tight);
132
+ font-weight: var(--font-weight-semibold);
133
+ letter-spacing: var(--letter-spacing-uppercase);
134
+ text-transform: uppercase;
135
+ }
136
+
137
+ /* Code / monospace */
138
+ .ds-text-code {
139
+ font-family: var(--font-family-mono);
140
+ font-size: var(--font-size-sm);
141
+ line-height: var(--line-height-tight);
142
+ }
143
+
144
+ /* Color helpers — chain with any size class above */
145
+ .ds-text-color-primary { color: var(--text-primary); }
146
+ .ds-text-color-secondary { color: var(--text-secondary); }
147
+ .ds-text-color-tertiary { color: var(--text-tertiary); }
148
+ .ds-text-color-disabled { color: var(--text-disabled); }
149
+ .ds-text-color-brand { color: var(--text-brand); }
150
+ .ds-text-color-accent { color: var(--text-accent); }
151
+ .ds-text-color-success { color: var(--text-success); }
152
+ .ds-text-color-warning { color: var(--text-warning); }
153
+ .ds-text-color-error { color: var(--text-error); }
154
+
155
+ /* Truncate single line */
156
+ .ds-text-truncate {
157
+ overflow: hidden;
158
+ text-overflow: ellipsis;
159
+ white-space: nowrap;
160
+ }
161
+
162
+ /* Clamp N lines (set --ds-clamp-lines inline) */
163
+ .ds-text-clamp {
164
+ display: -webkit-box;
165
+ -webkit-box-orient: vertical;
166
+ -webkit-line-clamp: var(--ds-clamp-lines, 2);
167
+ line-clamp: var(--ds-clamp-lines, 2);
168
+ overflow: hidden;
169
+ }
@@ -0,0 +1,33 @@
1
+ /* Foundations — must load before components so CSS vars are defined. */
2
+ @import "./styles/tokens.css";
3
+ @import "./styles/typography.css";
4
+
5
+ /* Components */
6
+ @import "./styles/Button.css";
7
+ @import "./styles/TextField.css";
8
+ @import "./styles/CheckboxField.css";
9
+ @import "./styles/ToggleField.css";
10
+ @import "./styles/Icon.css";
11
+ @import "./styles/Card.css";
12
+ @import "./styles/Page.css";
13
+ @import "./styles/Badge.css";
14
+ @import "./styles/StatusBadge.css";
15
+ @import "./styles/Checkbox.css";
16
+ @import "./styles/Toggle.css";
17
+ @import "./styles/Tag.css";
18
+ @import "./styles/Avatar.css";
19
+ @import "./styles/IconButton.css";
20
+ @import "./styles/Breadcrumbs.css";
21
+ @import "./styles/SidebarMenu.css";
22
+ @import "./styles/Delimeter.css";
23
+ @import "./styles/ShadowedBlock.css";
24
+ @import "./styles/DetailItem.css";
25
+ @import "./styles/InformationPanel.css";
26
+ @import "./styles/DropdownButton.css";
27
+ @import "./styles/CollapsibleFields.css";
28
+ @import "./styles/Pagination.css";
29
+ @import "./styles/Tabs.css";
30
+ @import "./styles/Tooltip.css";
31
+ @import "./styles/Popover.css";
32
+ @import "./styles/FileUpload.css";
33
+ @import "./styles/Error.css";