@gravionlabs/helix-ui 22.2.5 → 22.2.7
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 +21 -1
- package/chart/package.json +4 -0
- package/core.css +4082 -0
- package/fesm2022/gravionlabs-helix-ui-chart.mjs +446 -0
- package/fesm2022/gravionlabs-helix-ui-chart.mjs.map +1 -0
- package/fesm2022/gravionlabs-helix-ui.mjs +4194 -823
- package/fesm2022/gravionlabs-helix-ui.mjs.map +1 -1
- package/package.json +6 -1
- package/styles.css +521 -0
- package/types/gravionlabs-helix-ui-chart.d.ts +134 -0
- package/types/gravionlabs-helix-ui.d.ts +1111 -295
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravionlabs/helix-ui",
|
|
3
|
-
"version": "22.2.
|
|
3
|
+
"version": "22.2.7",
|
|
4
4
|
"description": "Helix UI: vanilla Angular components on the Helix design tokens — plain CSS, no runtime styling engine.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -47,11 +47,16 @@
|
|
|
47
47
|
"types": "./types/gravionlabs-helix-ui.d.ts",
|
|
48
48
|
"default": "./fesm2022/gravionlabs-helix-ui.mjs"
|
|
49
49
|
},
|
|
50
|
+
"./chart": {
|
|
51
|
+
"types": "./types/gravionlabs-helix-ui-chart.d.ts",
|
|
52
|
+
"default": "./fesm2022/gravionlabs-helix-ui-chart.mjs"
|
|
53
|
+
},
|
|
50
54
|
"./validators": {
|
|
51
55
|
"types": "./types/gravionlabs-helix-ui-validators.d.ts",
|
|
52
56
|
"default": "./fesm2022/gravionlabs-helix-ui-validators.mjs"
|
|
53
57
|
},
|
|
54
58
|
"./styles.css": "./styles.css",
|
|
59
|
+
"./core.css": "./core.css",
|
|
55
60
|
"./tokens.css": "./tokens.css"
|
|
56
61
|
},
|
|
57
62
|
"type": "module"
|
package/styles.css
CHANGED
|
@@ -1753,6 +1753,26 @@
|
|
|
1753
1753
|
height: 2.5rem;
|
|
1754
1754
|
}
|
|
1755
1755
|
|
|
1756
|
+
/* a header with extra content: the label (or sort button) and the content side by side */
|
|
1757
|
+
.hx-data-table-header-content {
|
|
1758
|
+
display: flex;
|
|
1759
|
+
align-items: center;
|
|
1760
|
+
gap: var(--h-datatable-header-cell-gap);
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
.hx-data-table-header-content > .hx-data-table-sort {
|
|
1764
|
+
flex: 1 1 auto;
|
|
1765
|
+
width: auto;
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
.hx-data-table-align-center .hx-data-table-header-content {
|
|
1769
|
+
justify-content: center;
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
.hx-data-table-align-right .hx-data-table-header-content {
|
|
1773
|
+
justify-content: flex-end;
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1756
1776
|
/* sortable headers: a button that fills the header cell */
|
|
1757
1777
|
.hx-data-table-sort {
|
|
1758
1778
|
display: inline-flex;
|
|
@@ -2268,6 +2288,260 @@
|
|
|
2268
2288
|
outline: var(--h-datepicker-date-focus-ring-width) var(--h-datepicker-date-focus-ring-style) var(--h-datepicker-date-focus-ring-color);
|
|
2269
2289
|
}
|
|
2270
2290
|
|
|
2291
|
+
/* date-time-picker */
|
|
2292
|
+
/*
|
|
2293
|
+
* DateTimePicker: `<hx-date-time-picker>`. The field, button and popup of the date picker with the calendar and a
|
|
2294
|
+
* time row inside; styled by `date-picker.scss` (`hx-date-picker-*`) and `time-row.scss`. Every colour and size comes from the
|
|
2295
|
+
* `--h-datepicker-*` and `--h-inputtext-*` tokens.
|
|
2296
|
+
*/
|
|
2297
|
+
.hx-date-time-picker {
|
|
2298
|
+
display: inline-block;
|
|
2299
|
+
}
|
|
2300
|
+
|
|
2301
|
+
.hx-date-time-picker:not(.hx-date-time-picker-inline) {
|
|
2302
|
+
position: relative;
|
|
2303
|
+
display: inline-flex;
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
.hx-date-time-picker-field {
|
|
2307
|
+
display: flex;
|
|
2308
|
+
flex: 1 1 auto;
|
|
2309
|
+
min-width: 0;
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
.hx-date-time-picker-panel {
|
|
2313
|
+
box-sizing: border-box;
|
|
2314
|
+
min-width: 17rem;
|
|
2315
|
+
padding: var(--h-datepicker-panel-padding);
|
|
2316
|
+
border: 1px solid var(--h-datepicker-panel-border-color);
|
|
2317
|
+
border-radius: var(--h-datepicker-panel-border-radius);
|
|
2318
|
+
background: var(--h-datepicker-panel-background);
|
|
2319
|
+
color: var(--h-datepicker-panel-color);
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2322
|
+
.hx-date-time-picker-popup .hx-date-time-picker-panel {
|
|
2323
|
+
border-radius: var(--h-datepicker-panel-border-radius) var(--h-datepicker-panel-border-radius) 0 0;
|
|
2324
|
+
}
|
|
2325
|
+
|
|
2326
|
+
.hx-date-time-picker-popup .hx-date-time-picker-panel:last-child {
|
|
2327
|
+
border-radius: var(--h-datepicker-panel-border-radius);
|
|
2328
|
+
}
|
|
2329
|
+
|
|
2330
|
+
.hx-date-time-picker-input {
|
|
2331
|
+
box-sizing: border-box;
|
|
2332
|
+
flex: 1 1 auto;
|
|
2333
|
+
min-width: 0;
|
|
2334
|
+
padding: var(--h-inputtext-padding-y) var(--h-inputtext-padding-x);
|
|
2335
|
+
border: 1px solid var(--h-inputtext-border-color);
|
|
2336
|
+
border-radius: var(--h-inputtext-border-radius);
|
|
2337
|
+
background: var(--h-inputtext-background);
|
|
2338
|
+
color: var(--h-inputtext-color);
|
|
2339
|
+
box-shadow: var(--h-inputtext-shadow);
|
|
2340
|
+
font: inherit;
|
|
2341
|
+
font-size: 1rem;
|
|
2342
|
+
outline: 0 none;
|
|
2343
|
+
transition: border-color var(--h-datepicker-transition-duration), box-shadow var(--h-datepicker-transition-duration);
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
.hx-date-time-picker-input::placeholder {
|
|
2347
|
+
color: var(--h-inputtext-placeholder-color);
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
.hx-date-time-picker-input:enabled:hover {
|
|
2351
|
+
border-color: var(--h-inputtext-hover-border-color);
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2354
|
+
.hx-date-time-picker-input:enabled:focus,
|
|
2355
|
+
.hx-date-time-picker-open .hx-date-time-picker-input {
|
|
2356
|
+
border-color: var(--h-inputtext-focus-border-color);
|
|
2357
|
+
outline: var(--h-inputtext-focus-ring-width) var(--h-inputtext-focus-ring-style) var(--h-inputtext-focus-ring-color);
|
|
2358
|
+
outline-offset: var(--h-inputtext-focus-ring-offset);
|
|
2359
|
+
box-shadow: var(--h-inputtext-focus-ring-shadow);
|
|
2360
|
+
}
|
|
2361
|
+
|
|
2362
|
+
.hx-date-time-picker-input:disabled {
|
|
2363
|
+
background: var(--h-inputtext-disabled-background);
|
|
2364
|
+
color: var(--h-inputtext-disabled-color);
|
|
2365
|
+
}
|
|
2366
|
+
|
|
2367
|
+
.hx-date-time-picker-invalid .hx-date-time-picker-input,
|
|
2368
|
+
.hx-date-time-picker.ng-invalid.ng-touched .hx-date-time-picker-input,
|
|
2369
|
+
.hx-date-time-picker-input[aria-invalid=true] {
|
|
2370
|
+
border-color: var(--h-inputtext-invalid-border-color);
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
.hx-date-time-picker-invalid .hx-date-time-picker-panel,
|
|
2374
|
+
.hx-date-time-picker.ng-invalid.ng-touched .hx-date-time-picker-panel {
|
|
2375
|
+
border-color: var(--h-form-field-invalid-border-color);
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2378
|
+
.hx-date-time-picker-has-icon .hx-date-time-picker-input {
|
|
2379
|
+
border-start-end-radius: 0;
|
|
2380
|
+
border-end-end-radius: 0;
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
.hx-date-time-picker-disabled {
|
|
2384
|
+
opacity: 0.6;
|
|
2385
|
+
}
|
|
2386
|
+
|
|
2387
|
+
.hx-date-time-picker-trigger {
|
|
2388
|
+
display: inline-flex;
|
|
2389
|
+
flex: none;
|
|
2390
|
+
align-items: center;
|
|
2391
|
+
justify-content: center;
|
|
2392
|
+
width: var(--h-datepicker-dropdown-width);
|
|
2393
|
+
border: 1px solid var(--h-datepicker-dropdown-border-color);
|
|
2394
|
+
border-inline-start: 0;
|
|
2395
|
+
border-start-end-radius: var(--h-datepicker-dropdown-border-radius);
|
|
2396
|
+
border-end-end-radius: var(--h-datepicker-dropdown-border-radius);
|
|
2397
|
+
background: var(--h-datepicker-dropdown-background);
|
|
2398
|
+
color: var(--h-datepicker-dropdown-color);
|
|
2399
|
+
cursor: pointer;
|
|
2400
|
+
outline: 0 none;
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2403
|
+
.hx-date-time-picker-trigger:not(:disabled):hover {
|
|
2404
|
+
border-color: var(--h-datepicker-dropdown-hover-border-color);
|
|
2405
|
+
background: var(--h-datepicker-dropdown-hover-background);
|
|
2406
|
+
color: var(--h-datepicker-dropdown-hover-color);
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2409
|
+
.hx-date-time-picker-trigger:focus-visible {
|
|
2410
|
+
outline: var(--h-datepicker-dropdown-focus-ring-width) var(--h-datepicker-dropdown-focus-ring-style) var(--h-datepicker-dropdown-focus-ring-color);
|
|
2411
|
+
outline-offset: var(--h-datepicker-dropdown-focus-ring-offset);
|
|
2412
|
+
box-shadow: var(--h-datepicker-dropdown-focus-ring-shadow);
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2415
|
+
.hx-date-time-picker-trigger-icon {
|
|
2416
|
+
display: inline-block;
|
|
2417
|
+
flex: none;
|
|
2418
|
+
width: 1rem;
|
|
2419
|
+
height: 1rem;
|
|
2420
|
+
background: currentcolor;
|
|
2421
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6h14a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1ZM4 10.5h16M8.5 3.5v4M15.5 3.5v4'/%3E%3C/svg%3E") center/contain no-repeat;
|
|
2422
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6h14a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1ZM4 10.5h16M8.5 3.5v4M15.5 3.5v4'/%3E%3C/svg%3E") center/contain no-repeat;
|
|
2423
|
+
}
|
|
2424
|
+
|
|
2425
|
+
.hx-date-time-picker-popup {
|
|
2426
|
+
box-shadow: var(--h-datepicker-panel-shadow);
|
|
2427
|
+
border-radius: var(--h-datepicker-panel-border-radius);
|
|
2428
|
+
background: var(--h-datepicker-panel-background);
|
|
2429
|
+
color: var(--h-datepicker-panel-color);
|
|
2430
|
+
font-size: 1rem;
|
|
2431
|
+
}
|
|
2432
|
+
|
|
2433
|
+
.hx-date-time-picker-buttonbar {
|
|
2434
|
+
display: flex;
|
|
2435
|
+
justify-content: space-between;
|
|
2436
|
+
padding: var(--h-datepicker-buttonbar-padding);
|
|
2437
|
+
border: 1px solid var(--h-datepicker-buttonbar-border-color);
|
|
2438
|
+
border-top: 0;
|
|
2439
|
+
border-radius: 0 0 var(--h-datepicker-panel-border-radius) var(--h-datepicker-panel-border-radius);
|
|
2440
|
+
}
|
|
2441
|
+
|
|
2442
|
+
.hx-date-time-picker-button {
|
|
2443
|
+
padding: var(--h-datepicker-select-month-padding);
|
|
2444
|
+
border: 0;
|
|
2445
|
+
border-radius: var(--h-datepicker-select-month-border-radius);
|
|
2446
|
+
background: transparent;
|
|
2447
|
+
color: var(--h-datepicker-select-month-color);
|
|
2448
|
+
font: inherit;
|
|
2449
|
+
cursor: pointer;
|
|
2450
|
+
}
|
|
2451
|
+
|
|
2452
|
+
.hx-date-time-picker-button:hover {
|
|
2453
|
+
background: var(--h-datepicker-select-month-hover-background);
|
|
2454
|
+
}
|
|
2455
|
+
|
|
2456
|
+
/* date-time-range-picker */
|
|
2457
|
+
/*
|
|
2458
|
+
* DateTimeRangePicker: `<hx-date-time-range-picker>`. One read-only field with a button (styled by `date-picker.scss`)
|
|
2459
|
+
* and a popup with one calendar for the range and an inline `hx-time-picker` for each end; every colour and size comes from the
|
|
2460
|
+
* date picker and input tokens.
|
|
2461
|
+
*/
|
|
2462
|
+
.hx-date-time-range-picker {
|
|
2463
|
+
display: block;
|
|
2464
|
+
position: relative;
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
.hx-date-time-range-picker .hx-date-time-range-picker-control {
|
|
2468
|
+
display: flex;
|
|
2469
|
+
width: 100%;
|
|
2470
|
+
}
|
|
2471
|
+
|
|
2472
|
+
.hx-date-time-range-picker-popup {
|
|
2473
|
+
max-width: calc(100vw - 2rem);
|
|
2474
|
+
overflow: auto;
|
|
2475
|
+
/* the presets row and the body sit inside the popup, so the popup carries the outer border */
|
|
2476
|
+
border: 1px solid var(--h-datepicker-panel-border-color);
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2479
|
+
/* the popup border already closes the button bar */
|
|
2480
|
+
.hx-date-time-range-picker-popup .hx-date-picker-buttonbar {
|
|
2481
|
+
border: 0;
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
.hx-date-time-range-picker-body {
|
|
2485
|
+
display: flex;
|
|
2486
|
+
flex-direction: column;
|
|
2487
|
+
gap: var(--h-datepicker-title-gap);
|
|
2488
|
+
padding: var(--h-datepicker-panel-padding);
|
|
2489
|
+
}
|
|
2490
|
+
|
|
2491
|
+
.hx-date-time-range-picker-times {
|
|
2492
|
+
display: flex;
|
|
2493
|
+
flex-wrap: wrap;
|
|
2494
|
+
justify-content: space-around;
|
|
2495
|
+
gap: var(--h-datepicker-title-gap);
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2498
|
+
/* from and to side by side: the name above the time, the arrows beside the value */
|
|
2499
|
+
.hx-date-time-range-picker-time {
|
|
2500
|
+
display: flex;
|
|
2501
|
+
flex-direction: column;
|
|
2502
|
+
align-items: center;
|
|
2503
|
+
gap: var(--h-datepicker-title-gap);
|
|
2504
|
+
}
|
|
2505
|
+
|
|
2506
|
+
.hx-date-time-range-picker-caption {
|
|
2507
|
+
font-weight: var(--h-datepicker-title-font-weight);
|
|
2508
|
+
}
|
|
2509
|
+
|
|
2510
|
+
.hx-date-time-range-picker-popup .hx-date-picker-time {
|
|
2511
|
+
padding: 0;
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
.hx-date-time-range-picker-popup .hx-date-picker-time-column {
|
|
2515
|
+
flex-direction: row-reverse;
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
.hx-date-time-range-picker-popup .hx-date-picker-time-up-icon {
|
|
2519
|
+
transform: rotate(90deg);
|
|
2520
|
+
}
|
|
2521
|
+
|
|
2522
|
+
.hx-date-time-range-picker-popup .hx-date-picker-time-down-icon {
|
|
2523
|
+
transform: rotate(90deg);
|
|
2524
|
+
}
|
|
2525
|
+
|
|
2526
|
+
.hx-date-time-range-picker-spacer {
|
|
2527
|
+
flex: 1 1 auto;
|
|
2528
|
+
}
|
|
2529
|
+
|
|
2530
|
+
.hx-date-time-range-picker-footer {
|
|
2531
|
+
gap: var(--h-datepicker-title-gap);
|
|
2532
|
+
}
|
|
2533
|
+
|
|
2534
|
+
.hx-date-time-range-picker-submit {
|
|
2535
|
+
font-weight: var(--h-datepicker-title-font-weight);
|
|
2536
|
+
}
|
|
2537
|
+
|
|
2538
|
+
.hx-date-time-range-picker-presets {
|
|
2539
|
+
display: flex;
|
|
2540
|
+
flex-wrap: wrap;
|
|
2541
|
+
gap: var(--h-datepicker-title-gap);
|
|
2542
|
+
padding: var(--h-datepicker-panel-padding) var(--h-datepicker-panel-padding) 0;
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2271
2545
|
/* dialog */
|
|
2272
2546
|
/*
|
|
2273
2547
|
* Dialog: `<hx-dialog>` and the dialogs of `HxDialogService`. The box (`.hx-dialog`) is a grid of the title, the
|
|
@@ -6904,6 +7178,253 @@
|
|
|
6904
7178
|
font-size: var(--h-tag-icon-size);
|
|
6905
7179
|
}
|
|
6906
7180
|
|
|
7181
|
+
/* time-picker */
|
|
7182
|
+
/*
|
|
7183
|
+
* TimePicker: `<hx-time-picker>`. The field, button and popup of the date picker with a time row inside; the
|
|
7184
|
+
* columns are styled by `time-row.scss` (`hx-date-picker-time-*`). Every colour and size comes from the
|
|
7185
|
+
* `--h-datepicker-*` and `--h-inputtext-*` tokens.
|
|
7186
|
+
*/
|
|
7187
|
+
.hx-time-picker {
|
|
7188
|
+
display: inline-block;
|
|
7189
|
+
}
|
|
7190
|
+
|
|
7191
|
+
.hx-time-picker:not(.hx-time-picker-inline) {
|
|
7192
|
+
position: relative;
|
|
7193
|
+
display: inline-flex;
|
|
7194
|
+
}
|
|
7195
|
+
|
|
7196
|
+
.hx-time-picker-field {
|
|
7197
|
+
display: flex;
|
|
7198
|
+
flex: 1 1 auto;
|
|
7199
|
+
min-width: 0;
|
|
7200
|
+
}
|
|
7201
|
+
|
|
7202
|
+
.hx-time-picker-panel {
|
|
7203
|
+
box-sizing: border-box;
|
|
7204
|
+
padding: var(--h-datepicker-panel-padding);
|
|
7205
|
+
border: 1px solid var(--h-datepicker-panel-border-color);
|
|
7206
|
+
border-radius: var(--h-datepicker-panel-border-radius);
|
|
7207
|
+
background: var(--h-datepicker-panel-background);
|
|
7208
|
+
color: var(--h-datepicker-panel-color);
|
|
7209
|
+
}
|
|
7210
|
+
|
|
7211
|
+
.hx-time-picker-popup .hx-time-picker-panel {
|
|
7212
|
+
border-radius: var(--h-datepicker-panel-border-radius) var(--h-datepicker-panel-border-radius) 0 0;
|
|
7213
|
+
}
|
|
7214
|
+
|
|
7215
|
+
.hx-time-picker-popup .hx-time-picker-panel:last-child {
|
|
7216
|
+
border-radius: var(--h-datepicker-panel-border-radius);
|
|
7217
|
+
}
|
|
7218
|
+
|
|
7219
|
+
.hx-time-picker-input {
|
|
7220
|
+
box-sizing: border-box;
|
|
7221
|
+
flex: 1 1 auto;
|
|
7222
|
+
min-width: 0;
|
|
7223
|
+
padding: var(--h-inputtext-padding-y) var(--h-inputtext-padding-x);
|
|
7224
|
+
border: 1px solid var(--h-inputtext-border-color);
|
|
7225
|
+
border-radius: var(--h-inputtext-border-radius);
|
|
7226
|
+
background: var(--h-inputtext-background);
|
|
7227
|
+
color: var(--h-inputtext-color);
|
|
7228
|
+
box-shadow: var(--h-inputtext-shadow);
|
|
7229
|
+
font: inherit;
|
|
7230
|
+
font-size: 1rem;
|
|
7231
|
+
outline: 0 none;
|
|
7232
|
+
transition: border-color var(--h-datepicker-transition-duration), box-shadow var(--h-datepicker-transition-duration);
|
|
7233
|
+
}
|
|
7234
|
+
|
|
7235
|
+
.hx-time-picker-input::placeholder {
|
|
7236
|
+
color: var(--h-inputtext-placeholder-color);
|
|
7237
|
+
}
|
|
7238
|
+
|
|
7239
|
+
.hx-time-picker-input:enabled:hover {
|
|
7240
|
+
border-color: var(--h-inputtext-hover-border-color);
|
|
7241
|
+
}
|
|
7242
|
+
|
|
7243
|
+
.hx-time-picker-input:enabled:focus,
|
|
7244
|
+
.hx-time-picker-open .hx-time-picker-input {
|
|
7245
|
+
border-color: var(--h-inputtext-focus-border-color);
|
|
7246
|
+
outline: var(--h-inputtext-focus-ring-width) var(--h-inputtext-focus-ring-style) var(--h-inputtext-focus-ring-color);
|
|
7247
|
+
outline-offset: var(--h-inputtext-focus-ring-offset);
|
|
7248
|
+
box-shadow: var(--h-inputtext-focus-ring-shadow);
|
|
7249
|
+
}
|
|
7250
|
+
|
|
7251
|
+
.hx-time-picker-input:disabled {
|
|
7252
|
+
background: var(--h-inputtext-disabled-background);
|
|
7253
|
+
color: var(--h-inputtext-disabled-color);
|
|
7254
|
+
}
|
|
7255
|
+
|
|
7256
|
+
.hx-time-picker-invalid .hx-time-picker-input,
|
|
7257
|
+
.hx-time-picker.ng-invalid.ng-touched .hx-time-picker-input,
|
|
7258
|
+
.hx-time-picker-input[aria-invalid=true] {
|
|
7259
|
+
border-color: var(--h-inputtext-invalid-border-color);
|
|
7260
|
+
}
|
|
7261
|
+
|
|
7262
|
+
.hx-time-picker-invalid .hx-time-picker-panel,
|
|
7263
|
+
.hx-time-picker.ng-invalid.ng-touched .hx-time-picker-panel {
|
|
7264
|
+
border-color: var(--h-form-field-invalid-border-color);
|
|
7265
|
+
}
|
|
7266
|
+
|
|
7267
|
+
.hx-time-picker-has-icon .hx-time-picker-input {
|
|
7268
|
+
border-start-end-radius: 0;
|
|
7269
|
+
border-end-end-radius: 0;
|
|
7270
|
+
}
|
|
7271
|
+
|
|
7272
|
+
.hx-time-picker-disabled {
|
|
7273
|
+
opacity: 0.6;
|
|
7274
|
+
}
|
|
7275
|
+
|
|
7276
|
+
.hx-time-picker-disabled .hx-date-picker-time-button {
|
|
7277
|
+
cursor: default;
|
|
7278
|
+
}
|
|
7279
|
+
|
|
7280
|
+
.hx-time-picker-trigger {
|
|
7281
|
+
display: inline-flex;
|
|
7282
|
+
flex: none;
|
|
7283
|
+
align-items: center;
|
|
7284
|
+
justify-content: center;
|
|
7285
|
+
width: var(--h-datepicker-dropdown-width);
|
|
7286
|
+
border: 1px solid var(--h-datepicker-dropdown-border-color);
|
|
7287
|
+
border-inline-start: 0;
|
|
7288
|
+
border-start-end-radius: var(--h-datepicker-dropdown-border-radius);
|
|
7289
|
+
border-end-end-radius: var(--h-datepicker-dropdown-border-radius);
|
|
7290
|
+
background: var(--h-datepicker-dropdown-background);
|
|
7291
|
+
color: var(--h-datepicker-dropdown-color);
|
|
7292
|
+
cursor: pointer;
|
|
7293
|
+
outline: 0 none;
|
|
7294
|
+
}
|
|
7295
|
+
|
|
7296
|
+
.hx-time-picker-trigger:not(:disabled):hover {
|
|
7297
|
+
border-color: var(--h-datepicker-dropdown-hover-border-color);
|
|
7298
|
+
background: var(--h-datepicker-dropdown-hover-background);
|
|
7299
|
+
color: var(--h-datepicker-dropdown-hover-color);
|
|
7300
|
+
}
|
|
7301
|
+
|
|
7302
|
+
.hx-time-picker-trigger:focus-visible {
|
|
7303
|
+
outline: var(--h-datepicker-dropdown-focus-ring-width) var(--h-datepicker-dropdown-focus-ring-style) var(--h-datepicker-dropdown-focus-ring-color);
|
|
7304
|
+
outline-offset: var(--h-datepicker-dropdown-focus-ring-offset);
|
|
7305
|
+
box-shadow: var(--h-datepicker-dropdown-focus-ring-shadow);
|
|
7306
|
+
}
|
|
7307
|
+
|
|
7308
|
+
.hx-time-picker-trigger-icon {
|
|
7309
|
+
display: inline-block;
|
|
7310
|
+
flex: none;
|
|
7311
|
+
width: 1rem;
|
|
7312
|
+
height: 1rem;
|
|
7313
|
+
background: currentcolor;
|
|
7314
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17ZM12 7.5V12l3 2'/%3E%3C/svg%3E") center/contain no-repeat;
|
|
7315
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17ZM12 7.5V12l3 2'/%3E%3C/svg%3E") center/contain no-repeat;
|
|
7316
|
+
}
|
|
7317
|
+
|
|
7318
|
+
.hx-time-picker-popup {
|
|
7319
|
+
box-shadow: var(--h-datepicker-panel-shadow);
|
|
7320
|
+
border-radius: var(--h-datepicker-panel-border-radius);
|
|
7321
|
+
background: var(--h-datepicker-panel-background);
|
|
7322
|
+
color: var(--h-datepicker-panel-color);
|
|
7323
|
+
font-size: 1rem;
|
|
7324
|
+
}
|
|
7325
|
+
|
|
7326
|
+
.hx-time-picker-buttonbar {
|
|
7327
|
+
display: flex;
|
|
7328
|
+
justify-content: space-between;
|
|
7329
|
+
padding: var(--h-datepicker-buttonbar-padding);
|
|
7330
|
+
border: 1px solid var(--h-datepicker-buttonbar-border-color);
|
|
7331
|
+
border-top: 0;
|
|
7332
|
+
border-radius: 0 0 var(--h-datepicker-panel-border-radius) var(--h-datepicker-panel-border-radius);
|
|
7333
|
+
}
|
|
7334
|
+
|
|
7335
|
+
.hx-time-picker-button {
|
|
7336
|
+
padding: var(--h-datepicker-select-month-padding);
|
|
7337
|
+
border: 0;
|
|
7338
|
+
border-radius: var(--h-datepicker-select-month-border-radius);
|
|
7339
|
+
background: transparent;
|
|
7340
|
+
color: var(--h-datepicker-select-month-color);
|
|
7341
|
+
font: inherit;
|
|
7342
|
+
cursor: pointer;
|
|
7343
|
+
}
|
|
7344
|
+
|
|
7345
|
+
.hx-time-picker-button:hover {
|
|
7346
|
+
background: var(--h-datepicker-select-month-hover-background);
|
|
7347
|
+
}
|
|
7348
|
+
|
|
7349
|
+
/* time-row */
|
|
7350
|
+
/*
|
|
7351
|
+
* Time row: the columns of `<hx-time-row>` (hour, minute, second, AM/PM) inside the time picker, the date-time
|
|
7352
|
+
* picker and the date-time range picker. Every colour and size comes from the `--h-datepicker-*` tokens.
|
|
7353
|
+
*/
|
|
7354
|
+
.hx-date-picker-time {
|
|
7355
|
+
display: flex;
|
|
7356
|
+
align-items: center;
|
|
7357
|
+
justify-content: center;
|
|
7358
|
+
gap: var(--h-datepicker-title-gap);
|
|
7359
|
+
padding: var(--h-datepicker-header-padding);
|
|
7360
|
+
}
|
|
7361
|
+
|
|
7362
|
+
.hx-date-picker-time-column {
|
|
7363
|
+
display: flex;
|
|
7364
|
+
flex-direction: column;
|
|
7365
|
+
align-items: center;
|
|
7366
|
+
}
|
|
7367
|
+
|
|
7368
|
+
.hx-date-picker-time-button,
|
|
7369
|
+
.hx-date-picker-time-spin {
|
|
7370
|
+
display: inline-flex;
|
|
7371
|
+
align-items: center;
|
|
7372
|
+
justify-content: center;
|
|
7373
|
+
min-width: var(--h-datepicker-date-width);
|
|
7374
|
+
height: var(--h-datepicker-date-height);
|
|
7375
|
+
border: 0;
|
|
7376
|
+
border-radius: var(--h-datepicker-date-border-radius);
|
|
7377
|
+
background: transparent;
|
|
7378
|
+
color: inherit;
|
|
7379
|
+
font: inherit;
|
|
7380
|
+
outline: 0 none;
|
|
7381
|
+
}
|
|
7382
|
+
|
|
7383
|
+
.hx-date-picker-time-button {
|
|
7384
|
+
cursor: pointer;
|
|
7385
|
+
}
|
|
7386
|
+
|
|
7387
|
+
.hx-date-picker-time-spin {
|
|
7388
|
+
font-variant-numeric: tabular-nums;
|
|
7389
|
+
}
|
|
7390
|
+
|
|
7391
|
+
.hx-date-picker-time-button:not(:disabled):hover {
|
|
7392
|
+
background: var(--h-datepicker-date-hover-background);
|
|
7393
|
+
color: var(--h-datepicker-date-hover-color);
|
|
7394
|
+
}
|
|
7395
|
+
|
|
7396
|
+
.hx-date-picker-time-button:focus-visible,
|
|
7397
|
+
.hx-date-picker-time-spin:focus-visible {
|
|
7398
|
+
outline: var(--h-datepicker-date-focus-ring-width) var(--h-datepicker-date-focus-ring-style) var(--h-datepicker-date-focus-ring-color);
|
|
7399
|
+
outline-offset: var(--h-datepicker-date-focus-ring-offset);
|
|
7400
|
+
box-shadow: var(--h-datepicker-date-focus-ring-shadow);
|
|
7401
|
+
}
|
|
7402
|
+
|
|
7403
|
+
.hx-date-picker-time-up-icon {
|
|
7404
|
+
display: inline-block;
|
|
7405
|
+
flex: none;
|
|
7406
|
+
width: 1rem;
|
|
7407
|
+
height: 1rem;
|
|
7408
|
+
background: currentcolor;
|
|
7409
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 15 6-6 6 6'/%3E%3C/svg%3E") center/contain no-repeat;
|
|
7410
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 15 6-6 6 6'/%3E%3C/svg%3E") center/contain no-repeat;
|
|
7411
|
+
}
|
|
7412
|
+
|
|
7413
|
+
.hx-date-picker-time-down-icon {
|
|
7414
|
+
display: inline-block;
|
|
7415
|
+
flex: none;
|
|
7416
|
+
width: 1rem;
|
|
7417
|
+
height: 1rem;
|
|
7418
|
+
background: currentcolor;
|
|
7419
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
|
|
7420
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
|
|
7421
|
+
}
|
|
7422
|
+
|
|
7423
|
+
.hx-date-picker-disabled .hx-date-picker-time-button,
|
|
7424
|
+
.hx-date-time-picker-disabled .hx-date-picker-time-button {
|
|
7425
|
+
cursor: default;
|
|
7426
|
+
}
|
|
7427
|
+
|
|
6907
7428
|
/* timeline */
|
|
6908
7429
|
/*
|
|
6909
7430
|
* Timeline: `<hx-timeline>`. Events in an ordered list, each a row (vertical) or column (horizontal) of the opposite
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { InjectionToken } from "@angular/core";
|
|
3
|
+
type HxChartType = 'bar' | 'line' | 'scatter' | 'bubble' | 'pie' | 'doughnut' | 'polarArea' | 'radar';
|
|
4
|
+
/** What `(dataSelect)` carries: the click and what chart.js found under it. */
|
|
5
|
+
interface HxChartSelectEvent {
|
|
6
|
+
originalEvent: Event;
|
|
7
|
+
/** The nearest element under the pointer (chart.js `{ datasetIndex, index, element }`). */
|
|
8
|
+
element: unknown;
|
|
9
|
+
/** The elements of that dataset. */
|
|
10
|
+
dataset: unknown[];
|
|
11
|
+
}
|
|
12
|
+
/** The part of chart.js this component uses; the real module is `chart.js/auto`. */
|
|
13
|
+
interface HxChartModule {
|
|
14
|
+
default: new (canvas: HTMLCanvasElement, config: unknown) => HxChartInstance;
|
|
15
|
+
}
|
|
16
|
+
interface HxChartInstance {
|
|
17
|
+
data: unknown;
|
|
18
|
+
options: unknown;
|
|
19
|
+
update(mode?: string): void;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
getElementsAtEventForMode(event: Event, mode: string, options: object, useFinalPosition: boolean): unknown[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Loads chart.js. The default is a dynamic `import('chart.js/auto')`, so chart.js is only fetched by apps that show
|
|
25
|
+
* a chart; provide another function to register a smaller set of chart.js parts or to replace it in tests.
|
|
26
|
+
*/
|
|
27
|
+
export declare const HX_CHART_LOADER: InjectionToken<() => Promise<HxChartModule>>;
|
|
28
|
+
type Json = Record<string, unknown>;
|
|
29
|
+
/** The parts of chart.js data and datasets that are read here; everything else is passed on untouched. */
|
|
30
|
+
interface ChartDataLike extends Json {
|
|
31
|
+
datasets?: unknown;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A chart.js chart whose colours, grid and font come from the Helix tokens.
|
|
35
|
+
*
|
|
36
|
+
* ```html
|
|
37
|
+
* <hx-chart type="bar" [data]="data" [options]="options" height="20rem" ariaLabel="Sales per month">
|
|
38
|
+
* <table hxChartFallback>…the same numbers as text…</table>
|
|
39
|
+
* </hx-chart>
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* chart.js is an optional peer dependency, loaded with a dynamic import (see `HX_CHART_LOADER`) the first time a
|
|
43
|
+
* chart is shown. Datasets without colours get the Helix palette; text, grid and legend colours come from
|
|
44
|
+
* `--h-text-muted-color` and `--h-content-border-color` of the element. Your `options` win over these defaults.
|
|
45
|
+
* The chart is redrawn when `class` or `style` of `<html>` change (dark mode, the primary colour).
|
|
46
|
+
*
|
|
47
|
+
* The canvas is an `img` named by `ariaLabel` / `ariaLabelledBy`; content marked `hxChartFallback` becomes the
|
|
48
|
+
* canvas fallback content, which assistive technology reads: put the numbers there as text or as a table.
|
|
49
|
+
*/
|
|
50
|
+
export declare class HxChart {
|
|
51
|
+
#private;
|
|
52
|
+
private readonly canvas;
|
|
53
|
+
readonly type: import("@angular/core").InputSignal<HxChartType>;
|
|
54
|
+
/** chart.js data: `{ labels, datasets }`. Pass a new object to update the chart. */
|
|
55
|
+
readonly data: import("@angular/core").InputSignal<ChartDataLike>;
|
|
56
|
+
/** chart.js options, on top of the token defaults. Pass a new object to update the chart. */
|
|
57
|
+
readonly options: import("@angular/core").InputSignal<Json>;
|
|
58
|
+
/** Extra chart.js plugins for this chart. */
|
|
59
|
+
readonly plugins: import("@angular/core").InputSignal<readonly unknown[]>;
|
|
60
|
+
/** CSS width of the frame, e.g. `30rem`; the chart fills its container by default. */
|
|
61
|
+
readonly width: import("@angular/core").InputSignal<string | undefined>;
|
|
62
|
+
/** CSS height of the frame; without it chart.js keeps its aspect ratio. */
|
|
63
|
+
readonly height: import("@angular/core").InputSignal<string | undefined>;
|
|
64
|
+
/** Resize with the container. */
|
|
65
|
+
readonly responsive: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
66
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
67
|
+
readonly ariaLabelledBy: import("@angular/core").InputSignal<string | undefined>;
|
|
68
|
+
/** Delay of a redraw after the theme changed, in ms; the style change is usually followed by more. */
|
|
69
|
+
readonly themeDelay: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
70
|
+
/** A data point or dataset was clicked. */
|
|
71
|
+
readonly dataSelect: import("@angular/core").OutputEmitterRef<HxChartSelectEvent>;
|
|
72
|
+
constructor();
|
|
73
|
+
/** The chart.js instance, once it exists; `undefined` before chart.js has loaded. */
|
|
74
|
+
get chart(): HxChartInstance | undefined;
|
|
75
|
+
/** Redraws the chart, e.g. after the theme changed in a way the component cannot see. */
|
|
76
|
+
refresh(): void;
|
|
77
|
+
protected onClick(event: MouseEvent): void;
|
|
78
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HxChart, never>;
|
|
79
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HxChart, "hx-chart", never, {
|
|
80
|
+
"type": {
|
|
81
|
+
"alias": "type";
|
|
82
|
+
"required": false;
|
|
83
|
+
"isSignal": true;
|
|
84
|
+
};
|
|
85
|
+
"data": {
|
|
86
|
+
"alias": "data";
|
|
87
|
+
"required": false;
|
|
88
|
+
"isSignal": true;
|
|
89
|
+
};
|
|
90
|
+
"options": {
|
|
91
|
+
"alias": "options";
|
|
92
|
+
"required": false;
|
|
93
|
+
"isSignal": true;
|
|
94
|
+
};
|
|
95
|
+
"plugins": {
|
|
96
|
+
"alias": "plugins";
|
|
97
|
+
"required": false;
|
|
98
|
+
"isSignal": true;
|
|
99
|
+
};
|
|
100
|
+
"width": {
|
|
101
|
+
"alias": "width";
|
|
102
|
+
"required": false;
|
|
103
|
+
"isSignal": true;
|
|
104
|
+
};
|
|
105
|
+
"height": {
|
|
106
|
+
"alias": "height";
|
|
107
|
+
"required": false;
|
|
108
|
+
"isSignal": true;
|
|
109
|
+
};
|
|
110
|
+
"responsive": {
|
|
111
|
+
"alias": "responsive";
|
|
112
|
+
"required": false;
|
|
113
|
+
"isSignal": true;
|
|
114
|
+
};
|
|
115
|
+
"ariaLabel": {
|
|
116
|
+
"alias": "ariaLabel";
|
|
117
|
+
"required": false;
|
|
118
|
+
"isSignal": true;
|
|
119
|
+
};
|
|
120
|
+
"ariaLabelledBy": {
|
|
121
|
+
"alias": "ariaLabelledBy";
|
|
122
|
+
"required": false;
|
|
123
|
+
"isSignal": true;
|
|
124
|
+
};
|
|
125
|
+
"themeDelay": {
|
|
126
|
+
"alias": "themeDelay";
|
|
127
|
+
"required": false;
|
|
128
|
+
"isSignal": true;
|
|
129
|
+
};
|
|
130
|
+
}, {
|
|
131
|
+
"dataSelect": "dataSelect";
|
|
132
|
+
}, never, ["[hxChartFallback]"], true, never>;
|
|
133
|
+
}
|
|
134
|
+
export type { HxChartInstance, HxChartModule, HxChartSelectEvent, HxChartType };
|