@isi-ui7/corporate-themes 0.2.1 → 0.2.2

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,590 @@
1
+ .ui-shell__main {
2
+ overflow-y: auto !important;
3
+ }
4
+
5
+ :root {
6
+ color-scheme: light;
7
+ }
8
+
9
+ body {
10
+ margin: 0;
11
+ font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
12
+ font-size: 0.75rem;
13
+ }
14
+
15
+ .page {
16
+ padding: 0;
17
+ display: flex;
18
+ flex-direction: column;
19
+ flex: 1;
20
+ overflow: hidden;
21
+ }
22
+
23
+ .page__header {
24
+ flex-shrink: 0;
25
+ padding: 0.5rem 2rem;
26
+ display: flex;
27
+ justify-content: space-between;
28
+ align-items: flex-end;
29
+ gap: 1rem;
30
+ z-index: 100;
31
+ background: var(--cds-background, #fff);
32
+ border-bottom: 1px solid var(--cds-border-subtle-01, #e0e0e0);
33
+ min-height: 4rem;
34
+ }
35
+
36
+ .page__header > :first-child {
37
+ flex: 1;
38
+ min-width: 0;
39
+ }
40
+
41
+ .page__actions {
42
+ display: flex;
43
+ align-items: flex-end;
44
+ gap: 0.75rem;
45
+ }
46
+
47
+ .page__title {
48
+ font-size: 1.25rem;
49
+ font-weight: 600;
50
+ margin: 0;
51
+ }
52
+
53
+ .page__title-row {
54
+ display: flex;
55
+ align-items: center;
56
+ gap: 0.5rem;
57
+ }
58
+
59
+ .page__breadcrumb {
60
+ display: flex;
61
+ flex-wrap: nowrap;
62
+ gap: 0.375rem;
63
+ margin-bottom: 0.25rem;
64
+ font-size: 0.75rem;
65
+ line-height: 1rem;
66
+ color: var(--cds-link-primary, #0f62fe);
67
+ overflow: hidden;
68
+ white-space: nowrap;
69
+ }
70
+
71
+ .page__breadcrumb-segment {
72
+ display: inline-flex;
73
+ gap: 0.375rem;
74
+ align-items: center;
75
+ min-width: 0;
76
+ }
77
+
78
+ .page__breadcrumb-current {
79
+ color: var(--cds-link-primary, #0f62fe);
80
+ overflow: hidden;
81
+ text-overflow: ellipsis;
82
+ }
83
+
84
+ .page__subtitle {
85
+ font-size: 0.75rem;
86
+ color: var(--cds-text-secondary, #525252);
87
+ margin: 0.125rem 0 0;
88
+ }
89
+
90
+ .page__body {
91
+ padding: 0.75rem 2rem 1.5rem;
92
+ display: flex;
93
+ flex-direction: column;
94
+ gap: 0.75rem;
95
+ flex: 1;
96
+ min-height: 0;
97
+ overflow-y: auto;
98
+ }
99
+
100
+ .page__footer {
101
+ flex-shrink: 0;
102
+ display: flex;
103
+ align-items: center;
104
+ gap: 0.5rem;
105
+ padding: 0.75rem 2rem;
106
+ background: var(--cds-background, #fff);
107
+ border-top: 2px solid var(--cds-border-subtle-01, #e0e0e0);
108
+ }
109
+ .page__footer--spread > :first-child {
110
+ margin-right: auto;
111
+ }
112
+
113
+ .page__content {
114
+ flex: 1;
115
+ overflow: auto;
116
+ padding: 1.5rem 2rem;
117
+ }
118
+
119
+ .grid {
120
+ display: grid;
121
+ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
122
+ gap: 1rem;
123
+ }
124
+
125
+ .form-grid {
126
+ display: grid;
127
+ gap: 0.75rem;
128
+ grid-template-columns: 1fr;
129
+ }
130
+ .form-grid > * {
131
+ min-width: 0;
132
+ }
133
+ .form-grid--2col {
134
+ grid-template-columns: repeat(2, 1fr);
135
+ }
136
+ .form-grid--3col {
137
+ grid-template-columns: repeat(3, 1fr);
138
+ }
139
+ .form-grid--full {
140
+ grid-column: 1/-1;
141
+ }
142
+
143
+ .cds--date-picker--single,
144
+ .cds--date-picker--single .cds--date-picker-container,
145
+ .cds--date-picker--single .cds--date-picker-input__wrapper {
146
+ width: 100%;
147
+ }
148
+
149
+ .form-actions {
150
+ display: flex;
151
+ gap: 0.5rem;
152
+ align-items: center;
153
+ padding-top: 0.75rem;
154
+ border-top: 1px solid var(--cds-border-subtle-01, #e0e0e0);
155
+ }
156
+
157
+ .ui7-form-contract {
158
+ --ui7-form-label-gap: 6px;
159
+ --ui7-form-label-font-size: 12px;
160
+ --ui7-form-label-font-weight: 500;
161
+ --ui7-form-label-line-height: 16px;
162
+ --ui7-form-input-font-size: 14px;
163
+ --ui7-form-input-font-weight: 400;
164
+ --ui7-form-input-line-height: 20px;
165
+ --ui7-form-control-height: 40px;
166
+ --ui7-form-textarea-min-height: 88px;
167
+ --ui7-form-row-gap: 16px;
168
+ --ui7-form-section-gap: 24px;
169
+ --ui7-form-column-gap: 16px;
170
+ --ui7-form-density: compact;
171
+ --ui7-form-readonly-background: #f4f4f4;
172
+ --ui7-form-readonly-cursor: default;
173
+ }
174
+
175
+ .ui7-form-contract--density-compact {
176
+ --ui7-form-density: compact;
177
+ }
178
+
179
+ .ui7-form-contract--density-comfortable {
180
+ --ui7-form-density: comfortable;
181
+ }
182
+
183
+ .ui7-form-row {
184
+ display: grid;
185
+ column-gap: var(--ui7-form-column-gap);
186
+ row-gap: var(--ui7-form-row-gap);
187
+ align-items: start;
188
+ }
189
+
190
+ .ui7-form-section {
191
+ display: flex;
192
+ flex-direction: column;
193
+ gap: var(--ui7-form-section-gap);
194
+ }
195
+
196
+ .ui7-form-column {
197
+ min-width: 0;
198
+ }
199
+
200
+ .ui7-form-label {
201
+ display: flex;
202
+ align-items: baseline;
203
+ gap: var(--ui7-form-label-gap);
204
+ font-size: var(--ui7-form-label-font-size);
205
+ font-weight: var(--ui7-form-label-font-weight);
206
+ line-height: var(--ui7-form-label-line-height);
207
+ color: var(--cds-text-secondary, #525252);
208
+ }
209
+
210
+ .ui7-form-label__required {
211
+ color: var(--cds-support-error, #da1e28);
212
+ }
213
+
214
+ .ui7-form-control {
215
+ box-sizing: border-box;
216
+ min-height: var(--ui7-form-control-height);
217
+ font-size: var(--ui7-form-input-font-size);
218
+ font-weight: var(--ui7-form-input-font-weight);
219
+ line-height: var(--ui7-form-input-line-height);
220
+ }
221
+
222
+ .ui7-form-control :is(.cds--text-input,
223
+ .cds--number input,
224
+ .cds--select-input,
225
+ .cds--combo-box__input,
226
+ .cds--date-picker,
227
+ .cds--dropdown,
228
+ .cds--list-box) {
229
+ box-sizing: border-box;
230
+ min-height: var(--ui7-form-control-height);
231
+ font-size: var(--ui7-form-input-font-size);
232
+ line-height: var(--ui7-form-input-line-height);
233
+ }
234
+
235
+ .ui7-form-control :is(.cds--text-input, .cds--number input, .cds--select-input, .cds--combo-box__input) {
236
+ height: var(--ui7-form-control-height);
237
+ }
238
+
239
+ .ui7-form-control textarea,
240
+ .ui7-form-control .cds--text-area,
241
+ .ui7-form-control .cds--text-area__wrapper {
242
+ min-height: var(--ui7-form-textarea-min-height);
243
+ }
244
+
245
+ .ui7-form-control--readonly,
246
+ .ui7-form-contract--readonly .ui7-form-control,
247
+ .ui7-form-control--readonly :is(input, textarea, button, [role=combobox], .cds--text-input, .cds--number input) {
248
+ background: var(--ui7-form-readonly-background, #f4f4f4);
249
+ cursor: var(--ui7-form-readonly-cursor, default);
250
+ }
251
+
252
+ .ui7-form-readonly-value {
253
+ background: var(--ui7-form-readonly-background, #f4f4f4);
254
+ color: var(--cds-text-primary, #161616);
255
+ cursor: var(--ui7-form-readonly-cursor, default);
256
+ }
257
+
258
+ .ui7-form-contract--readonly .ui7-form-readonly-value {
259
+ background: var(--ui7-form-readonly-background, #f4f4f4);
260
+ }
261
+
262
+ .ui7-form-helper {
263
+ margin-block-start: 0.375rem;
264
+ font-size: 0.75rem;
265
+ line-height: 1rem;
266
+ color: var(--cds-text-secondary, #525252);
267
+ }
268
+
269
+ .page-tabs {
270
+ display: flex;
271
+ flex-direction: column;
272
+ gap: 0;
273
+ }
274
+ .page-tabs__panel {
275
+ display: none;
276
+ padding: 0.75rem 0;
277
+ }
278
+ .page-tabs__panel--active {
279
+ display: block;
280
+ }
281
+ .page-tabs__panel--table {
282
+ padding: 0;
283
+ }
284
+
285
+ .badge {
286
+ display: inline-flex;
287
+ align-items: center;
288
+ justify-content: center;
289
+ min-width: 1.25rem;
290
+ height: 1.25rem;
291
+ padding: 0 0.375rem;
292
+ background: var(--cds-background-inverse, #393939);
293
+ color: var(--cds-text-inverse, #fff);
294
+ border-radius: 0.75rem;
295
+ font-size: 0.6875rem;
296
+ font-weight: 600;
297
+ margin-left: 0.375rem;
298
+ line-height: 1;
299
+ }
300
+
301
+ .display-field {
302
+ display: flex;
303
+ flex-direction: column;
304
+ }
305
+
306
+ .display-field__label {
307
+ font-size: 0.75rem;
308
+ font-weight: 600;
309
+ color: var(--cds-text-secondary, #525252);
310
+ margin-bottom: 0.125rem;
311
+ }
312
+
313
+ .display-field__value {
314
+ font-size: 0.75rem;
315
+ min-height: 1.125rem;
316
+ color: var(--cds-text-primary, #000);
317
+ }
318
+
319
+ .modal-layout {
320
+ display: flex;
321
+ flex-direction: column;
322
+ width: 100%;
323
+ max-height: calc(90vh - 3.5rem);
324
+ }
325
+ .modal-layout--sm {
326
+ min-width: 24rem;
327
+ }
328
+ .modal-layout--md {
329
+ min-width: 28rem;
330
+ }
331
+ .modal-layout--lg {
332
+ min-width: 32rem;
333
+ }
334
+ .modal-layout--xl {
335
+ min-width: 36rem;
336
+ }
337
+
338
+ .modal-layout__body {
339
+ flex: 1 1 auto;
340
+ min-height: 0;
341
+ overflow-y: auto;
342
+ padding: 1rem 1.5rem 1.25rem;
343
+ display: flex;
344
+ flex-direction: column;
345
+ gap: 0.75rem;
346
+ }
347
+
348
+ .modal-layout__footer {
349
+ flex-shrink: 0;
350
+ display: flex;
351
+ gap: 0.5rem;
352
+ padding: 0.75rem 1.5rem;
353
+ border-top: 1px solid var(--cds-border-subtle-01, #e0e0e0);
354
+ background: var(--cds-background, #fff);
355
+ justify-content: flex-end;
356
+ }
357
+ .modal-layout__footer--spread {
358
+ justify-content: space-between;
359
+ }
360
+
361
+ .modal-shell {
362
+ background: var(--cds-background, #fff);
363
+ width: min(90vw, 480px);
364
+ display: flex;
365
+ flex-direction: column;
366
+ }
367
+ .modal-shell__header {
368
+ padding: 0.75rem 1.5rem;
369
+ border-bottom: 1px solid var(--cds-border-subtle-01, #e0e0e0);
370
+ }
371
+ .modal-shell__title {
372
+ font-size: 1rem;
373
+ font-weight: 600;
374
+ margin: 0;
375
+ }
376
+ .modal-shell__body {
377
+ padding: 1rem 1.5rem;
378
+ display: flex;
379
+ flex-direction: column;
380
+ gap: 0.75rem;
381
+ flex: 1;
382
+ overflow: auto;
383
+ }
384
+
385
+ .modal-actions {
386
+ display: flex;
387
+ gap: 0.5rem;
388
+ padding: 0.75rem 1.5rem;
389
+ border-top: 1px solid var(--cds-border-subtle-01, #e0e0e0);
390
+ justify-content: flex-end;
391
+ }
392
+
393
+ .wizard-actions {
394
+ display: flex;
395
+ gap: 0.5rem;
396
+ align-items: center;
397
+ padding-top: 0.75rem;
398
+ border-top: 1px solid var(--cds-border-subtle-01, #e0e0e0);
399
+ }
400
+ .wizard-actions > :first-child {
401
+ margin-right: auto;
402
+ }
403
+
404
+ .receipt-card {
405
+ border: 1px solid var(--cds-border-subtle-01, #e0e0e0);
406
+ background: var(--cds-layer-01, #f4f4f4);
407
+ padding: 1.5rem;
408
+ max-width: 480px;
409
+ }
410
+ .receipt-card__header {
411
+ display: flex;
412
+ align-items: center;
413
+ gap: 0.5rem;
414
+ margin-bottom: 1rem;
415
+ color: var(--cds-support-success, #198038);
416
+ font-weight: 600;
417
+ font-size: 1rem;
418
+ }
419
+ .receipt-card__row {
420
+ display: flex;
421
+ justify-content: space-between;
422
+ padding: 0.375rem 0;
423
+ border-bottom: 1px solid var(--cds-border-subtle-00, #e8e8e8);
424
+ font-size: 0.875rem;
425
+ }
426
+ .receipt-card__row:last-of-type {
427
+ border-bottom: none;
428
+ }
429
+ .receipt-card__label {
430
+ color: var(--cds-text-secondary, #525252);
431
+ }
432
+ .receipt-card__actions {
433
+ display: flex;
434
+ gap: 0.5rem;
435
+ margin-top: 1.5rem;
436
+ flex-wrap: wrap;
437
+ }
438
+
439
+ .profile-branch-section__label {
440
+ font-size: 0.6875rem;
441
+ font-weight: 600;
442
+ color: var(--cds-text-secondary, #525252);
443
+ text-transform: uppercase;
444
+ letter-spacing: 0.05em;
445
+ }
446
+
447
+ .profile-branch-dropdown__trigger {
448
+ display: flex;
449
+ align-items: center;
450
+ justify-content: space-between;
451
+ width: 100%;
452
+ padding: 0.625rem 1rem;
453
+ border: none;
454
+ background: transparent;
455
+ font-family: inherit;
456
+ text-align: left;
457
+ cursor: pointer;
458
+ transition: background-color 0.15s ease;
459
+ }
460
+ .profile-branch-dropdown__trigger:hover {
461
+ background: var(--cds-background-hover, #e8e8e8);
462
+ }
463
+ .profile-branch-dropdown__trigger:focus-visible {
464
+ outline: 2px solid var(--cds-focus, #0f62fe);
465
+ outline-offset: -2px;
466
+ }
467
+ .profile-branch-dropdown__current {
468
+ display: flex;
469
+ flex-direction: column;
470
+ gap: 0.125rem;
471
+ }
472
+ .profile-branch-dropdown__chevron {
473
+ font-size: 0.625rem;
474
+ color: var(--cds-text-secondary, #525252);
475
+ margin-left: 0.5rem;
476
+ flex-shrink: 0;
477
+ }
478
+ .profile-branch-dropdown__list {
479
+ border-top: 1px solid var(--cds-border-subtle-01, #e0e0e0);
480
+ background: var(--cds-layer-01, #f4f4f4);
481
+ max-height: 240px;
482
+ overflow-y: auto;
483
+ }
484
+
485
+ .profile-branch-item {
486
+ display: flex;
487
+ align-items: center;
488
+ width: 100%;
489
+ padding: 0.625rem 1rem 0.625rem 1.5rem;
490
+ border: none;
491
+ background: transparent;
492
+ font-family: inherit;
493
+ text-align: left;
494
+ cursor: pointer;
495
+ gap: 0.375rem;
496
+ transition: background-color 0.15s ease;
497
+ }
498
+ .profile-branch-item__code {
499
+ font-size: 0.875rem;
500
+ font-weight: 500;
501
+ color: var(--cds-text-primary, #161616);
502
+ flex: 1;
503
+ }
504
+ .profile-branch-item__name {
505
+ font-size: 0.75rem;
506
+ color: var(--cds-text-secondary, #525252);
507
+ }
508
+ .profile-branch-item__check {
509
+ font-size: 0.75rem;
510
+ font-weight: 700;
511
+ color: var(--cds-interactive, #0f62fe);
512
+ margin-left: auto;
513
+ }
514
+ .profile-branch-item--active {
515
+ background: var(--cds-layer-selected-01, rgba(0, 0, 0, 0.08));
516
+ cursor: default;
517
+ }
518
+ .profile-branch-item--active .profile-branch-item__code {
519
+ font-weight: 700;
520
+ }
521
+ .profile-branch-item:not(.profile-branch-item--active):hover {
522
+ background: var(--cds-background-hover, #e8e8e8);
523
+ }
524
+ .profile-branch-item:focus-visible {
525
+ outline: 2px solid var(--cds-focus, #0f62fe);
526
+ outline-offset: -2px;
527
+ }
528
+
529
+ .login-page {
530
+ display: flex;
531
+ align-items: center;
532
+ justify-content: center;
533
+ min-height: 100vh;
534
+ background: var(--cds-background, #f4f4f4);
535
+ }
536
+ .login-page__card {
537
+ background: var(--cds-layer-01, #ffffff);
538
+ padding: 3rem 2.5rem;
539
+ max-width: 400px;
540
+ width: 100%;
541
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
542
+ }
543
+ .login-page__card h1 {
544
+ font-size: 1.5rem;
545
+ font-weight: 600;
546
+ margin-bottom: 0.75rem;
547
+ color: var(--cds-text-primary, #161616);
548
+ }
549
+ .login-page__card p {
550
+ font-size: 0.875rem;
551
+ color: var(--cds-text-secondary, #525252);
552
+ margin-bottom: 1.5rem;
553
+ }
554
+
555
+ @media (max-width: 768px) {
556
+ .page__header {
557
+ padding: 0.5rem 1rem;
558
+ flex-wrap: wrap;
559
+ align-items: flex-start;
560
+ gap: 0.5rem;
561
+ }
562
+ .page__actions {
563
+ width: 100%;
564
+ justify-content: flex-end;
565
+ }
566
+ .page__body {
567
+ padding: 0.75rem 1rem 1.25rem;
568
+ }
569
+ .form-grid--2col {
570
+ grid-template-columns: 1fr;
571
+ }
572
+ .form-grid--3col {
573
+ grid-template-columns: 1fr;
574
+ }
575
+ .modal-shell {
576
+ width: 100vw;
577
+ max-height: 100dvh;
578
+ }
579
+ }
580
+ @media (max-width: 480px) {
581
+ .page__header {
582
+ padding: 0.5rem 0.75rem;
583
+ }
584
+ .page__body {
585
+ padding: 0.5rem 0.75rem 1rem;
586
+ }
587
+ .page__title {
588
+ font-size: 1rem;
589
+ }
590
+ }
@@ -0,0 +1,24 @@
1
+ import { Ui7FormDensity } from '@isi-ui7/bos7-shared/style-contract';
2
+
3
+ export declare function useFormVisualContract(): {
4
+ density: Ui7FormDensity;
5
+ densityClassName: "ui7-form-contract--density-compact" | "ui7-form-contract--density-comfortable";
6
+ scopeClassName: string;
7
+ classNames: {
8
+ readonly scope: "ui7-form-contract";
9
+ readonly densityCompact: "ui7-form-contract--density-compact";
10
+ readonly densityComfortable: "ui7-form-contract--density-comfortable";
11
+ readonly readonly: "ui7-form-contract--readonly";
12
+ readonly row: "ui7-form-row";
13
+ readonly section: "ui7-form-section";
14
+ readonly column: "ui7-form-column";
15
+ readonly label: "ui7-form-label";
16
+ readonly labelRequired: "ui7-form-label__required";
17
+ readonly control: "ui7-form-control";
18
+ readonly controlReadonly: "ui7-form-control--readonly";
19
+ readonly helper: "ui7-form-helper";
20
+ readonly readonlyValue: "ui7-form-readonly-value";
21
+ };
22
+ tokens: import('@isi-ui7/bos7-shared/style-contract').Ui7FormVisualTokens;
23
+ };
24
+ export type { Ui7FormDensity };
package/dist/index.d.ts CHANGED
@@ -12,3 +12,4 @@ export { useBrandColors } from './hooks/useBrandColors';
12
12
  export { useThemeVariant } from './hooks/useThemeVariant';
13
13
  export { useCorporateFeatures } from './hooks/useCorporateFeatures';
14
14
  export { useDensity } from './hooks/useDensity';
15
+ export { useFormVisualContract } from './hooks/useFormVisualContract';