@aeris-ui/core 22.0.0-alpha.1 → 22.0.0-alpha.10
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 +200 -191
- package/fesm2022/aeris-ui-core-accordion.mjs +646 -255
- package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +284 -103
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-complete.mjs +1228 -446
- package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-focus.mjs +111 -61
- package/fesm2022/aeris-ui-core-auto-focus.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-avatar.mjs +383 -101
- package/fesm2022/aeris-ui-core-avatar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-badge.mjs +562 -115
- package/fesm2022/aeris-ui-core-badge.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-block-ui.mjs +209 -101
- package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-breadcrumb.mjs +581 -189
- package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button-group.mjs +153 -38
- package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button.mjs +741 -139
- package/fesm2022/aeris-ui-core-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-card.mjs +371 -101
- package/fesm2022/aeris-ui-core-card.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-carousel.mjs +773 -369
- package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-cascade-select.mjs +1171 -521
- package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chart.mjs +455 -258
- package/fesm2022/aeris-ui-core-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-checkbox.mjs +440 -140
- package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chip.mjs +430 -117
- package/fesm2022/aeris-ui-core-chip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-class-names.mjs +87 -65
- package/fesm2022/aeris-ui-core-class-names.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-code-block.mjs +637 -0
- package/fesm2022/aeris-ui-core-code-block.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-color-picker.mjs +1340 -700
- package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-compare.mjs +823 -318
- package/fesm2022/aeris-ui-core-compare.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs +1404 -555
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-popup.mjs +1471 -740
- package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-context-menu.mjs +918 -443
- package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-date-picker.mjs +1942 -1123
- package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dialog.mjs +1079 -346
- package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-divider.mjs +204 -43
- package/fesm2022/aeris-ui-core-divider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-drawer.mjs +1015 -322
- package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +410 -254
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-editor.mjs +967 -587
- package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-file-upload.mjs +1379 -522
- package/fesm2022/aeris-ui-core-file-upload.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-filter-service.mjs +258 -301
- package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-fluid.mjs +68 -21
- package/fesm2022/aeris-ui-core-fluid.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-focus-trap.mjs +206 -182
- package/fesm2022/aeris-ui-core-focus-trap.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-form-field.mjs +688 -0
- package/fesm2022/aeris-ui-core-form-field.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-galleria.mjs +2446 -1117
- package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-glass.mjs +110 -33
- package/fesm2022/aeris-ui-core-glass.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-icon-field.mjs +426 -98
- package/fesm2022/aeris-ui-core-icon-field.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-inplace.mjs +452 -130
- package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-group.mjs +413 -107
- package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-mask.mjs +658 -255
- package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-number.mjs +926 -291
- package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-otp.mjs +678 -264
- package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-text.mjs +625 -158
- package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-key-filter.mjs +263 -201
- package/fesm2022/aeris-ui-core-key-filter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-mega-menu.mjs +613 -382
- package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menu.mjs +1062 -472
- package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menubar.mjs +994 -393
- package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-message.mjs +477 -145
- package/fesm2022/aeris-ui-core-message.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-meter-group.mjs +623 -230
- package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-multi-select.mjs +1598 -561
- package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-order-list.mjs +592 -220
- package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-organization-chart.mjs +485 -199
- package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-paginator.mjs +428 -123
- package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-panel.mjs +596 -196
- package/fesm2022/aeris-ui-core-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-password.mjs +925 -249
- package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-pick-list.mjs +1280 -659
- package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-popover.mjs +912 -375
- package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-bar.mjs +549 -176
- package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-spinner.mjs +410 -133
- package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-radio-button.mjs +394 -124
- package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-rating.mjs +506 -231
- package/fesm2022/aeris-ui-core-rating.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-panel.mjs +457 -154
- package/fesm2022/aeris-ui-core-scroll-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-top.mjs +226 -63
- package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-select.mjs +1845 -648
- package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-skeleton.mjs +149 -45
- package/fesm2022/aeris-ui-core-skeleton.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-slider.mjs +884 -430
- package/fesm2022/aeris-ui-core-slider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-speed-dial.mjs +861 -337
- package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-split-button.mjs +955 -266
- package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-splitter.mjs +812 -352
- package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-stepper.mjs +697 -254
- package/fesm2022/aeris-ui-core-stepper.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-style-class.mjs +587 -342
- package/fesm2022/aeris-ui-core-style-class.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-table.mjs +2034 -869
- package/fesm2022/aeris-ui-core-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tabs.mjs +789 -279
- package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-textarea.mjs +856 -219
- package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theme-builder.mjs +1284 -1399
- package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theming.mjs +132 -144
- package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tiered-menu.mjs +909 -441
- package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-timeline.mjs +407 -131
- package/fesm2022/aeris-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toast.mjs +1076 -384
- package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toggle-switch.mjs +398 -132
- package/fesm2022/aeris-ui-core-toggle-switch.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toolbar.mjs +458 -121
- package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tooltip.mjs +625 -330
- package/fesm2022/aeris-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-select.mjs +1453 -621
- package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-table.mjs +2019 -940
- package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree.mjs +1107 -658
- package/fesm2022/aeris-ui-core-tree.mjs.map +1 -1
- package/fesm2022/aeris-ui-core.mjs +985 -316
- package/fesm2022/aeris-ui-core.mjs.map +1 -1
- package/package.json +20 -8
- package/schematics/ng-add/schema.json +1 -1
- package/schematics/runtime/schematics/ng-add/options.js +4 -4
- package/schematics/runtime/schematics/ng-add/options.js.map +1 -1
- package/schematics/runtime/schematics/ng-add/workspace.js +1 -1
- package/schematics/runtime/schematics/ng-add/workspace.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-contrast.js +6 -17
- package/schematics/runtime/theme-builder/aeris-contrast.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-foundation.js +10 -4
- package/schematics/runtime/theme-builder/aeris-foundation.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js +28 -5
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-generator.js +2 -2
- package/schematics/runtime/theme-builder/aeris-theme-generator.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js +22 -8
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js +12 -4
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-validation.js +7 -1
- package/schematics/runtime/theme-builder/aeris-theme-validation.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme.js +49 -33
- package/schematics/runtime/theme-builder/aeris-theme.js.map +1 -1
- package/styles/_fallback-colors.scss +10 -0
- package/styles/_mobile.scss +16 -0
- package/styles/_tokens.scss +5 -5
- package/styles/aeris.css +412 -125
- package/styles/controls.css +61 -29
- package/tools/aeris-theme.mjs +2 -2
- package/tools/aeris-theme.schema.json +5 -2
- package/types/aeris-ui-core-accordion.d.ts +167 -93
- package/types/aeris-ui-core-animate-on-scroll.d.ts +72 -31
- package/types/aeris-ui-core-auto-complete.d.ts +327 -140
- package/types/aeris-ui-core-auto-focus.d.ts +24 -16
- package/types/aeris-ui-core-avatar.d.ts +112 -42
- package/types/aeris-ui-core-badge.d.ts +160 -46
- package/types/aeris-ui-core-block-ui.d.ts +47 -27
- package/types/aeris-ui-core-breadcrumb.d.ts +163 -92
- package/types/aeris-ui-core-button-group.d.ts +37 -16
- package/types/aeris-ui-core-button.d.ts +226 -67
- package/types/aeris-ui-core-card.d.ts +74 -37
- package/types/aeris-ui-core-carousel.d.ts +201 -117
- package/types/aeris-ui-core-cascade-select.d.ts +257 -123
- package/types/aeris-ui-core-chart.d.ts +134 -84
- package/types/aeris-ui-core-checkbox.d.ts +139 -54
- package/types/aeris-ui-core-chip.d.ts +116 -51
- package/types/aeris-ui-core-class-names.d.ts +22 -20
- package/types/aeris-ui-core-code-block.d.ts +188 -0
- package/types/aeris-ui-core-color-picker.d.ts +348 -143
- package/types/aeris-ui-core-compare.d.ts +224 -102
- package/types/aeris-ui-core-confirm-dialog.d.ts +442 -245
- package/types/aeris-ui-core-confirm-popup.d.ts +442 -263
- package/types/aeris-ui-core-context-menu.d.ts +264 -146
- package/types/aeris-ui-core-date-picker.d.ts +489 -217
- package/types/aeris-ui-core-dialog.d.ts +288 -117
- package/types/aeris-ui-core-divider.d.ts +58 -20
- package/types/aeris-ui-core-drawer.d.ts +273 -112
- package/types/aeris-ui-core-dynamic-dialog.d.ts +158 -137
- package/types/aeris-ui-core-editor.d.ts +250 -123
- package/types/aeris-ui-core-file-upload.d.ts +367 -197
- package/types/aeris-ui-core-filter-service.d.ts +48 -52
- package/types/aeris-ui-core-fluid.d.ts +12 -9
- package/types/aeris-ui-core-focus-trap.d.ts +39 -31
- package/types/aeris-ui-core-form-field.d.ts +163 -0
- package/types/aeris-ui-core-galleria.d.ts +588 -256
- package/types/aeris-ui-core-glass.d.ts +24 -11
- package/types/aeris-ui-core-icon-field.d.ts +94 -32
- package/types/aeris-ui-core-inplace.d.ts +123 -62
- package/types/aeris-ui-core-input-group.d.ts +84 -33
- package/types/aeris-ui-core-input-mask.d.ts +194 -69
- package/types/aeris-ui-core-input-number.d.ts +272 -87
- package/types/aeris-ui-core-input-otp.d.ts +191 -81
- package/types/aeris-ui-core-input-text.d.ts +185 -60
- package/types/aeris-ui-core-key-filter.d.ts +53 -39
- package/types/aeris-ui-core-mega-menu.d.ts +175 -121
- package/types/aeris-ui-core-menu.d.ts +277 -168
- package/types/aeris-ui-core-menubar.d.ts +273 -135
- package/types/aeris-ui-core-message.d.ts +132 -60
- package/types/aeris-ui-core-meter-group.d.ts +163 -90
- package/types/aeris-ui-core-multi-select.d.ts +439 -180
- package/types/aeris-ui-core-order-list.d.ts +144 -66
- package/types/aeris-ui-core-organization-chart.d.ts +133 -77
- package/types/aeris-ui-core-paginator.d.ts +93 -38
- package/types/aeris-ui-core-panel.d.ts +149 -78
- package/types/aeris-ui-core-password.d.ts +258 -102
- package/types/aeris-ui-core-pick-list.d.ts +374 -179
- package/types/aeris-ui-core-popover.d.ts +219 -105
- package/types/aeris-ui-core-progress-bar.d.ts +157 -73
- package/types/aeris-ui-core-progress-spinner.d.ts +110 -48
- package/types/aeris-ui-core-radio-button.d.ts +124 -50
- package/types/aeris-ui-core-rating.d.ts +149 -76
- package/types/aeris-ui-core-scroll-panel.d.ts +142 -64
- package/types/aeris-ui-core-scroll-top.d.ts +66 -29
- package/types/aeris-ui-core-select.d.ts +475 -217
- package/types/aeris-ui-core-skeleton.d.ts +39 -17
- package/types/aeris-ui-core-slider.d.ts +270 -115
- package/types/aeris-ui-core-speed-dial.d.ts +241 -111
- package/types/aeris-ui-core-split-button.d.ts +267 -113
- package/types/aeris-ui-core-splitter.d.ts +225 -106
- package/types/aeris-ui-core-stepper.d.ts +184 -91
- package/types/aeris-ui-core-style-class.d.ts +141 -71
- package/types/aeris-ui-core-table.d.ts +596 -304
- package/types/aeris-ui-core-tabs.d.ts +181 -76
- package/types/aeris-ui-core-textarea.d.ts +261 -78
- package/types/aeris-ui-core-theme-builder.d.ts +472 -450
- package/types/aeris-ui-core-theming.d.ts +42 -45
- package/types/aeris-ui-core-tiered-menu.d.ts +251 -142
- package/types/aeris-ui-core-timeline.d.ts +109 -71
- package/types/aeris-ui-core-toast.d.ts +225 -115
- package/types/aeris-ui-core-toggle-switch.d.ts +125 -51
- package/types/aeris-ui-core-toolbar.d.ts +98 -41
- package/types/aeris-ui-core-tooltip.d.ts +157 -88
- package/types/aeris-ui-core-tree-select.d.ts +364 -171
- package/types/aeris-ui-core-tree-table.d.ts +566 -286
- package/types/aeris-ui-core-tree.d.ts +270 -165
- package/types/aeris-ui-core.d.ts +197 -72
|
@@ -1,514 +1,775 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { NG_VALUE_ACCESSOR } from
|
|
4
|
-
import { aerisInternalCreateFrameScheduler,
|
|
5
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, ElementRef, Injector, afterNextRender, booleanAttribute, computed, effect, forwardRef, inject, input, model, output, signal, viewChild } from "@angular/core";
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
4
|
+
import { aerisInternalClampOverlayPoint, aerisInternalCreateFrameScheduler, ɵAerisAppendTo, ɵaerisDisplayInvalid } from "@aeris-ui/core";
|
|
6
5
|
let colorPickerId = 0;
|
|
7
|
-
class AerisColorPicker {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
6
|
+
var AerisColorPicker = class AerisColorPicker {
|
|
7
|
+
dismissOverlay = () => {
|
|
8
|
+
this.close(true);
|
|
9
|
+
return true;
|
|
10
|
+
};
|
|
11
|
+
host = inject(ElementRef);
|
|
12
|
+
repositionFrame = aerisInternalCreateFrameScheduler(() => this.positionPanel());
|
|
13
|
+
injector = inject(Injector);
|
|
14
|
+
pickerPanel = viewChild("pickerPanel", ...ngDevMode ? [{ debugName: "pickerPanel" }] : /* istanbul ignore next */ []);
|
|
15
|
+
panelPortal = viewChild(ɵAerisAppendTo, ...ngDevMode ? [{ debugName: "panelPortal" }] : /* istanbul ignore next */ []);
|
|
16
|
+
colorPlane = viewChild("colorPlane", ...ngDevMode ? [{ debugName: "colorPlane" }] : /* istanbul ignore next */ []);
|
|
17
|
+
triggerButton = viewChild("triggerButton", ...ngDevMode ? [{ debugName: "triggerButton" }] : /* istanbul ignore next */ []);
|
|
18
|
+
generatedId = `aeris-color-picker-${++colorPickerId}`;
|
|
19
|
+
formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
|
|
20
|
+
textDraft = signal("", ...ngDevMode ? [{ debugName: "textDraft" }] : /* istanbul ignore next */ []);
|
|
21
|
+
planeDragging = signal(false, ...ngDevMode ? [{ debugName: "planeDragging" }] : /* istanbul ignore next */ []);
|
|
22
|
+
hsvDraft = signal(null, ...ngDevMode ? [{ debugName: "hsvDraft" }] : /* istanbul ignore next */ []);
|
|
23
|
+
panelPointerInteraction = false;
|
|
24
|
+
eyeDropperAbortController = null;
|
|
25
|
+
onChange = () => void 0;
|
|
26
|
+
onTouched = () => void 0;
|
|
27
|
+
panelId = `${this.generatedId}-panel`;
|
|
28
|
+
value = model("#2c694b", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
29
|
+
format = model("hex", ...ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []);
|
|
30
|
+
inputId = input("", ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
|
|
31
|
+
name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
32
|
+
formats = input([
|
|
33
|
+
"hex",
|
|
34
|
+
"rgb",
|
|
35
|
+
"hsl"
|
|
36
|
+
], ...ngDevMode ? [{ debugName: "formats" }] : /* istanbul ignore next */ []);
|
|
37
|
+
appendTo = input(...ngDevMode ? [void 0, { debugName: "appendTo" }] : /* istanbul ignore next */ []);
|
|
38
|
+
viewportMargin = input(8, ...ngDevMode ? [{ debugName: "viewportMargin" }] : /* istanbul ignore next */ []);
|
|
39
|
+
placeholder = input("Enter color", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
40
|
+
ariaLabel = input(...ngDevMode ? [void 0, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
41
|
+
ariaLabelledBy = input(...ngDevMode ? [void 0, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
|
|
42
|
+
ariaDescribedBy = input(...ngDevMode ? [void 0, { debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []);
|
|
43
|
+
triggerAriaLabel = input("Choose color", ...ngDevMode ? [{ debugName: "triggerAriaLabel" }] : /* istanbul ignore next */ []);
|
|
44
|
+
nativeAriaLabel = input("Color picker", ...ngDevMode ? [{ debugName: "nativeAriaLabel" }] : /* istanbul ignore next */ []);
|
|
45
|
+
panelAriaLabel = input("", ...ngDevMode ? [{ debugName: "panelAriaLabel" }] : /* istanbul ignore next */ []);
|
|
46
|
+
textAriaLabel = input("Color value", ...ngDevMode ? [{ debugName: "textAriaLabel" }] : /* istanbul ignore next */ []);
|
|
47
|
+
formatAriaLabel = input("Color format", ...ngDevMode ? [{ debugName: "formatAriaLabel" }] : /* istanbul ignore next */ []);
|
|
48
|
+
hueAriaLabel = input("Hue", ...ngDevMode ? [{ debugName: "hueAriaLabel" }] : /* istanbul ignore next */ []);
|
|
49
|
+
planeAriaLabel = input("Saturation and brightness", ...ngDevMode ? [{ debugName: "planeAriaLabel" }] : /* istanbul ignore next */ []);
|
|
50
|
+
presetsAriaLabel = input("Preset colors", ...ngDevMode ? [{ debugName: "presetsAriaLabel" }] : /* istanbul ignore next */ []);
|
|
51
|
+
presetsLabel = input("Presets", ...ngDevMode ? [{ debugName: "presetsLabel" }] : /* istanbul ignore next */ []);
|
|
52
|
+
emptyLabel = input("No color", ...ngDevMode ? [{ debugName: "emptyLabel" }] : /* istanbul ignore next */ []);
|
|
53
|
+
clearButtonAriaLabel = input("Clear color", ...ngDevMode ? [{ debugName: "clearButtonAriaLabel" }] : /* istanbul ignore next */ []);
|
|
54
|
+
closeButtonAriaLabel = input("Close color picker", ...ngDevMode ? [{ debugName: "closeButtonAriaLabel" }] : /* istanbul ignore next */ []);
|
|
55
|
+
eyeDropperAriaLabel = input("Pick a color from the screen", ...ngDevMode ? [{ debugName: "eyeDropperAriaLabel" }] : /* istanbul ignore next */ []);
|
|
56
|
+
size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
57
|
+
appearance = input("outline", ...ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []);
|
|
58
|
+
presets = input([], ...ngDevMode ? [{ debugName: "presets" }] : /* istanbul ignore next */ []);
|
|
59
|
+
showInput = input(true, {
|
|
60
|
+
...ngDevMode ? { debugName: "showInput" } : /* istanbul ignore next */ {},
|
|
61
|
+
transform: booleanAttribute
|
|
62
|
+
});
|
|
63
|
+
showValue = input(true, {
|
|
64
|
+
...ngDevMode ? { debugName: "showValue" } : /* istanbul ignore next */ {},
|
|
65
|
+
transform: booleanAttribute
|
|
66
|
+
});
|
|
67
|
+
showFormat = input(true, {
|
|
68
|
+
...ngDevMode ? { debugName: "showFormat" } : /* istanbul ignore next */ {},
|
|
69
|
+
transform: booleanAttribute
|
|
70
|
+
});
|
|
71
|
+
showEyeDropper = input(true, {
|
|
72
|
+
...ngDevMode ? { debugName: "showEyeDropper" } : /* istanbul ignore next */ {},
|
|
73
|
+
transform: booleanAttribute
|
|
74
|
+
});
|
|
75
|
+
clearable = input(false, {
|
|
76
|
+
...ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {},
|
|
77
|
+
transform: booleanAttribute
|
|
78
|
+
});
|
|
79
|
+
disabled = input(false, {
|
|
80
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
81
|
+
transform: booleanAttribute
|
|
82
|
+
});
|
|
83
|
+
readonly = input(false, {
|
|
84
|
+
...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
|
|
85
|
+
transform: booleanAttribute
|
|
86
|
+
});
|
|
87
|
+
required = input(false, {
|
|
88
|
+
...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
|
|
89
|
+
transform: booleanAttribute
|
|
90
|
+
});
|
|
91
|
+
invalid = input(false, {
|
|
92
|
+
...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
|
|
93
|
+
transform: booleanAttribute
|
|
94
|
+
});
|
|
95
|
+
touched = input(null, ...ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []);
|
|
96
|
+
displayInvalid = computed(() => ɵaerisDisplayInvalid(this.invalid(), this.touched()), ...ngDevMode ? [{ debugName: "displayInvalid" }] : /* istanbul ignore next */ []);
|
|
97
|
+
fluid = input(false, {
|
|
98
|
+
...ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {},
|
|
99
|
+
transform: booleanAttribute
|
|
100
|
+
});
|
|
101
|
+
changed = output();
|
|
102
|
+
focused = output();
|
|
103
|
+
blurred = output();
|
|
104
|
+
touch = output();
|
|
105
|
+
cleared = output();
|
|
106
|
+
opened = output();
|
|
107
|
+
closed = output();
|
|
108
|
+
isOpen = signal(false, ...ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []);
|
|
109
|
+
panelPositioned = signal(false, ...ngDevMode ? [{ debugName: "panelPositioned" }] : /* istanbul ignore next */ []);
|
|
110
|
+
panelTop = signal(0, ...ngDevMode ? [{ debugName: "panelTop" }] : /* istanbul ignore next */ []);
|
|
111
|
+
panelLeft = signal(0, ...ngDevMode ? [{ debugName: "panelLeft" }] : /* istanbul ignore next */ []);
|
|
112
|
+
eyeDropperAvailable = signal(false, ...ngDevMode ? [{ debugName: "eyeDropperAvailable" }] : /* istanbul ignore next */ []);
|
|
113
|
+
eyeDropperActive = signal(false, ...ngDevMode ? [{ debugName: "eyeDropperActive" }] : /* istanbul ignore next */ []);
|
|
114
|
+
resolvedInputId = computed(() => this.inputId() || this.generatedId, ...ngDevMode ? [{ debugName: "resolvedInputId" }] : /* istanbul ignore next */ []);
|
|
115
|
+
resolvedPanelAriaLabel = computed(() => this.panelAriaLabel() || this.nativeAriaLabel(), ...ngDevMode ? [{ debugName: "resolvedPanelAriaLabel" }] : /* istanbul ignore next */ []);
|
|
116
|
+
effectiveDisabled = computed(() => this.disabled() || this.formDisabled(), ...ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []);
|
|
117
|
+
parsedValue = computed(() => parseColor(this.value()), ...ngDevMode ? [{ debugName: "parsedValue" }] : /* istanbul ignore next */ []);
|
|
118
|
+
hexValue = computed(() => this.parsedValue()?.hex ?? "#000000", ...ngDevMode ? [{ debugName: "hexValue" }] : /* istanbul ignore next */ []);
|
|
119
|
+
hsvValue = computed(() => {
|
|
120
|
+
const parsed = this.parsedValue();
|
|
121
|
+
const draft = this.hsvDraft();
|
|
122
|
+
if (parsed && draft && rgbToHex(hsvToRgb(draft)) === parsed.hex) return draft;
|
|
123
|
+
return rgbToHsv(parsed?.rgb ?? {
|
|
124
|
+
r: 0,
|
|
125
|
+
g: 0,
|
|
126
|
+
b: 0
|
|
127
|
+
});
|
|
128
|
+
}, ...ngDevMode ? [{ debugName: "hsvValue" }] : /* istanbul ignore next */ []);
|
|
129
|
+
hueColor = computed(() => `hsl(${this.hsvValue().h}, 100%, 50%)`, ...ngDevMode ? [{ debugName: "hueColor" }] : /* istanbul ignore next */ []);
|
|
130
|
+
planeAriaValue = computed(() => `Saturation ${this.hsvValue().s}%, brightness ${this.hsvValue().v}%`, ...ngDevMode ? [{ debugName: "planeAriaValue" }] : /* istanbul ignore next */ []);
|
|
131
|
+
textValue = computed(() => this.textDraft() || this.value(), ...ngDevMode ? [{ debugName: "textValue" }] : /* istanbul ignore next */ []);
|
|
132
|
+
textInvalid = computed(() => Boolean(this.textDraft()) && !parseColor(this.textDraft()), ...ngDevMode ? [{ debugName: "textInvalid" }] : /* istanbul ignore next */ []);
|
|
133
|
+
normalizedFormats = computed(() => {
|
|
134
|
+
const configuredFormats = [...new Set(this.formats().filter(isColorFormat))];
|
|
135
|
+
return configuredFormats.includes(this.format()) ? configuredFormats : [...configuredFormats, this.format()];
|
|
136
|
+
}, ...ngDevMode ? [{ debugName: "normalizedFormats" }] : /* istanbul ignore next */ []);
|
|
137
|
+
normalizedPresets = computed(() => [...new Set(this.presets().map((preset) => parseColor(preset)?.hex).filter((preset) => Boolean(preset)))], ...ngDevMode ? [{ debugName: "normalizedPresets" }] : /* istanbul ignore next */ []);
|
|
138
|
+
closeUnavailablePanel = effect(() => {
|
|
139
|
+
if ((this.effectiveDisabled() || this.readonly()) && this.isOpen()) this.close(false);
|
|
140
|
+
}, ...ngDevMode ? [{ debugName: "closeUnavailablePanel" }] : /* istanbul ignore next */ []);
|
|
141
|
+
constructor() {
|
|
142
|
+
afterNextRender({ write: () => this.eyeDropperAvailable.set(Boolean(getEyeDropperConstructor())) });
|
|
143
|
+
effect((onCleanup) => {
|
|
144
|
+
if (!this.isOpen()) return;
|
|
145
|
+
const view = this.host.nativeElement.ownerDocument.defaultView;
|
|
146
|
+
const reposition = this.repositionFrame.schedule;
|
|
147
|
+
const endPointerInteraction = () => this.endPanelPointerInteraction();
|
|
148
|
+
view?.addEventListener("resize", reposition);
|
|
149
|
+
view?.addEventListener("scroll", reposition);
|
|
150
|
+
view?.addEventListener("pointerup", endPointerInteraction);
|
|
151
|
+
view?.addEventListener("pointercancel", endPointerInteraction);
|
|
152
|
+
onCleanup(() => {
|
|
153
|
+
view?.removeEventListener("resize", reposition);
|
|
154
|
+
view?.removeEventListener("scroll", reposition);
|
|
155
|
+
view?.removeEventListener("pointerup", endPointerInteraction);
|
|
156
|
+
view?.removeEventListener("pointercancel", endPointerInteraction);
|
|
157
|
+
this.repositionFrame.cancel();
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
writeValue(value) {
|
|
162
|
+
this.value.set(this.coerceValue(value));
|
|
163
|
+
this.textDraft.set("");
|
|
164
|
+
}
|
|
165
|
+
registerOnChange(callback) {
|
|
166
|
+
this.onChange = callback;
|
|
167
|
+
}
|
|
168
|
+
registerOnTouched(callback) {
|
|
169
|
+
this.onTouched = callback;
|
|
170
|
+
}
|
|
171
|
+
setDisabledState(disabled) {
|
|
172
|
+
this.formDisabled.set(disabled);
|
|
173
|
+
if (disabled) this.close(false);
|
|
174
|
+
}
|
|
175
|
+
focus(options) {
|
|
176
|
+
this.triggerButton()?.nativeElement.focus(options);
|
|
177
|
+
}
|
|
178
|
+
open() {
|
|
179
|
+
if (this.effectiveDisabled() || this.readonly() || this.isOpen()) return;
|
|
180
|
+
this.panelPositioned.set(false);
|
|
181
|
+
this.isOpen.set(true);
|
|
182
|
+
this.opened.emit();
|
|
183
|
+
afterNextRender({
|
|
184
|
+
earlyRead: () => this.calculatePanelPosition(),
|
|
185
|
+
write: (position) => {
|
|
186
|
+
this.applyPanelPosition(position);
|
|
187
|
+
this.colorPlane()?.nativeElement.focus();
|
|
188
|
+
}
|
|
189
|
+
}, { injector: this.injector });
|
|
190
|
+
}
|
|
191
|
+
close(restoreFocus = false) {
|
|
192
|
+
if (!this.isOpen()) return;
|
|
193
|
+
this.panelPortal()?.restore();
|
|
194
|
+
this.isOpen.set(false);
|
|
195
|
+
this.panelPositioned.set(false);
|
|
196
|
+
this.planeDragging.set(false);
|
|
197
|
+
this.panelPointerInteraction = false;
|
|
198
|
+
this.textDraft.set("");
|
|
199
|
+
this.eyeDropperAbortController?.abort();
|
|
200
|
+
this.eyeDropperAbortController = null;
|
|
201
|
+
this.eyeDropperActive.set(false);
|
|
202
|
+
this.closed.emit();
|
|
203
|
+
if (restoreFocus) queueMicrotask(() => this.focus());
|
|
204
|
+
}
|
|
205
|
+
toggle() {
|
|
206
|
+
if (this.isOpen()) this.close(false);
|
|
207
|
+
else this.open();
|
|
208
|
+
}
|
|
209
|
+
reset() {
|
|
210
|
+
if (this.effectiveDisabled() || this.readonly()) return;
|
|
211
|
+
this.setFromHex("#2c694b");
|
|
212
|
+
this.textDraft.set("");
|
|
213
|
+
}
|
|
214
|
+
clear() {
|
|
215
|
+
if (this.effectiveDisabled() || this.readonly()) return;
|
|
216
|
+
this.setValue("");
|
|
217
|
+
this.textDraft.set("");
|
|
218
|
+
this.cleared.emit();
|
|
219
|
+
this.focus();
|
|
220
|
+
}
|
|
221
|
+
positionPanel() {
|
|
222
|
+
this.applyPanelPosition(this.calculatePanelPosition());
|
|
223
|
+
}
|
|
224
|
+
openEyeDropper(event) {
|
|
225
|
+
if (this.effectiveDisabled() || this.readonly() || this.eyeDropperActive()) return;
|
|
226
|
+
const EyeDropper = getEyeDropperConstructor();
|
|
227
|
+
if (!EyeDropper) return;
|
|
228
|
+
const controller = new AbortController();
|
|
229
|
+
this.eyeDropperAbortController = controller;
|
|
230
|
+
this.eyeDropperActive.set(true);
|
|
231
|
+
new EyeDropper().open({ signal: controller.signal }).then(({ sRGBHex }) => {
|
|
232
|
+
if (controller.signal.aborted) return;
|
|
233
|
+
this.setFromHex(sRGBHex);
|
|
234
|
+
this.emitCommitted(event);
|
|
235
|
+
}).catch(() => void 0).finally(() => {
|
|
236
|
+
if (this.eyeDropperAbortController !== controller) return;
|
|
237
|
+
this.eyeDropperAbortController = null;
|
|
238
|
+
this.eyeDropperActive.set(false);
|
|
239
|
+
if (this.isOpen()) queueMicrotask(() => this.colorPlane()?.nativeElement.focus());
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
calculatePanelPosition() {
|
|
243
|
+
if (!this.isOpen()) return null;
|
|
244
|
+
const trigger = this.triggerButton()?.nativeElement;
|
|
245
|
+
const panel = this.pickerPanel()?.nativeElement;
|
|
246
|
+
if (!trigger || !panel) return null;
|
|
247
|
+
const triggerRect = trigger.getBoundingClientRect();
|
|
248
|
+
const panelRect = panel.getBoundingClientRect();
|
|
249
|
+
const viewportWidth = document.documentElement.clientWidth;
|
|
250
|
+
const viewportHeight = document.documentElement.clientHeight;
|
|
251
|
+
const margin = 8;
|
|
252
|
+
const gap = 8;
|
|
253
|
+
const below = triggerRect.bottom + gap;
|
|
254
|
+
const above = triggerRect.top - panelRect.height - gap;
|
|
255
|
+
const top = below + panelRect.height <= viewportHeight - margin ? below : Math.max(margin, above);
|
|
256
|
+
const position = aerisInternalClampOverlayPoint({
|
|
257
|
+
x: triggerRect.left,
|
|
258
|
+
y: top
|
|
259
|
+
}, panelRect.width, panelRect.height, viewportWidth, viewportHeight, margin);
|
|
260
|
+
return {
|
|
261
|
+
left: Math.round(position.x),
|
|
262
|
+
top: Math.round(position.y)
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
applyPanelPosition(position) {
|
|
266
|
+
if (!position || !this.isOpen()) return;
|
|
267
|
+
this.panelLeft.set(position.left);
|
|
268
|
+
this.panelTop.set(position.top);
|
|
269
|
+
this.panelPositioned.set(true);
|
|
270
|
+
}
|
|
271
|
+
handleTriggerKeydown(event) {
|
|
272
|
+
if (event.key === "ArrowDown") {
|
|
273
|
+
event.preventDefault();
|
|
274
|
+
this.open();
|
|
275
|
+
} else if (event.key === "Escape" && this.isOpen()) {
|
|
276
|
+
event.preventDefault();
|
|
277
|
+
this.close(false);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
handlePanelKeydown(event) {
|
|
281
|
+
if (event.key !== "Escape") return;
|
|
282
|
+
event.preventDefault();
|
|
283
|
+
event.stopPropagation();
|
|
284
|
+
this.close(true);
|
|
285
|
+
}
|
|
286
|
+
handlePanelPointerDown() {
|
|
287
|
+
this.panelPointerInteraction = true;
|
|
288
|
+
}
|
|
289
|
+
endPanelPointerInteraction() {
|
|
290
|
+
this.panelPointerInteraction = false;
|
|
291
|
+
}
|
|
292
|
+
handlePlanePointerDown(event) {
|
|
293
|
+
if (event.button !== 0) return;
|
|
294
|
+
event.preventDefault();
|
|
295
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
296
|
+
this.planeDragging.set(true);
|
|
297
|
+
this.updateFromPlanePointer(event);
|
|
298
|
+
}
|
|
299
|
+
handlePlanePointerMove(event) {
|
|
300
|
+
if (!this.planeDragging()) return;
|
|
301
|
+
this.updateFromPlanePointer(event);
|
|
302
|
+
}
|
|
303
|
+
handlePlanePointerUp(event) {
|
|
304
|
+
if (!this.planeDragging()) return;
|
|
305
|
+
this.updateFromPlanePointer(event);
|
|
306
|
+
this.planeDragging.set(false);
|
|
307
|
+
const plane = event.currentTarget;
|
|
308
|
+
if (plane.hasPointerCapture(event.pointerId)) plane.releasePointerCapture(event.pointerId);
|
|
309
|
+
this.emitCommitted(event);
|
|
310
|
+
}
|
|
311
|
+
handlePlanePointerCancel(event) {
|
|
312
|
+
this.planeDragging.set(false);
|
|
313
|
+
const plane = event.currentTarget;
|
|
314
|
+
if (plane.hasPointerCapture(event.pointerId)) plane.releasePointerCapture(event.pointerId);
|
|
315
|
+
}
|
|
316
|
+
handlePlaneKeydown(event) {
|
|
317
|
+
const current = this.hsvValue();
|
|
318
|
+
const step = event.shiftKey ? 10 : 1;
|
|
319
|
+
let saturation = current.s;
|
|
320
|
+
let brightness = current.v;
|
|
321
|
+
if (event.key === "ArrowLeft") saturation -= step;
|
|
322
|
+
else if (event.key === "ArrowRight") saturation += step;
|
|
323
|
+
else if (event.key === "ArrowUp") brightness += step;
|
|
324
|
+
else if (event.key === "ArrowDown") brightness -= step;
|
|
325
|
+
else if (event.key === "Home") saturation = 0;
|
|
326
|
+
else if (event.key === "End") saturation = 100;
|
|
327
|
+
else if (event.key === "PageUp") brightness += 10;
|
|
328
|
+
else if (event.key === "PageDown") brightness -= 10;
|
|
329
|
+
else return;
|
|
330
|
+
event.preventDefault();
|
|
331
|
+
this.setFromHsv({
|
|
332
|
+
h: current.h,
|
|
333
|
+
s: clamp(saturation, 0, 100),
|
|
334
|
+
v: clamp(brightness, 0, 100)
|
|
335
|
+
});
|
|
336
|
+
this.emitCommitted(event);
|
|
337
|
+
}
|
|
338
|
+
handleHueInput(event) {
|
|
339
|
+
const hue = Number(event.target.value);
|
|
340
|
+
const current = this.hsvValue();
|
|
341
|
+
this.setFromHsv({
|
|
342
|
+
...current,
|
|
343
|
+
h: hue
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
handleTextInput(event) {
|
|
347
|
+
if (this.effectiveDisabled() || this.readonly()) return;
|
|
348
|
+
const draft = event.target.value;
|
|
349
|
+
this.textDraft.set(draft);
|
|
350
|
+
const parsed = parseColor(draft);
|
|
351
|
+
if (parsed && isContinuousCommitValue(draft)) {
|
|
352
|
+
this.setValue(formatColor(parsed.rgb, this.format()));
|
|
353
|
+
this.textDraft.set("");
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
handleTextChange(event) {
|
|
357
|
+
this.commitText(event.target.value, event);
|
|
358
|
+
}
|
|
359
|
+
handleTextKeydown(event) {
|
|
360
|
+
if (event.key === "Enter") {
|
|
361
|
+
event.preventDefault();
|
|
362
|
+
this.commitText(event.target.value, event);
|
|
363
|
+
} else if (event.key === "Escape" && !this.isOpen()) this.textDraft.set("");
|
|
364
|
+
}
|
|
365
|
+
handleBlur(event) {
|
|
366
|
+
this.blurred.emit(event);
|
|
367
|
+
}
|
|
368
|
+
handleFocusOut(event) {
|
|
369
|
+
const nextTarget = event.relatedTarget;
|
|
370
|
+
if (nextTarget instanceof Node && this.host.nativeElement.contains(nextTarget)) return;
|
|
371
|
+
if (this.eyeDropperActive() || this.panelPointerInteraction) return;
|
|
372
|
+
if (this.isOpen() && nextTarget === null) return;
|
|
373
|
+
this.close(false);
|
|
374
|
+
this.onTouched();
|
|
375
|
+
this.touch.emit();
|
|
376
|
+
}
|
|
377
|
+
selectFormat(nextFormat, event) {
|
|
378
|
+
if (this.format() === nextFormat) return;
|
|
379
|
+
const parsed = this.parsedValue();
|
|
380
|
+
this.format.set(nextFormat);
|
|
381
|
+
if (parsed) this.setValue(formatColor(parsed.rgb, nextFormat));
|
|
382
|
+
this.textDraft.set("");
|
|
383
|
+
this.emitCommitted(event);
|
|
384
|
+
}
|
|
385
|
+
selectPreset(hex, event) {
|
|
386
|
+
this.setFromHex(hex);
|
|
387
|
+
this.emitCommitted(event);
|
|
388
|
+
}
|
|
389
|
+
emitCommitted(event) {
|
|
390
|
+
const parsed = this.parsedValue();
|
|
391
|
+
if (!parsed) return;
|
|
392
|
+
this.changed.emit({
|
|
393
|
+
originalEvent: event,
|
|
394
|
+
value: this.value(),
|
|
395
|
+
hex: parsed.hex
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
updateFromPlanePointer(event) {
|
|
399
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
400
|
+
if (!rect.width || !rect.height) return;
|
|
401
|
+
const saturation = clamp((event.clientX - rect.left) / rect.width * 100, 0, 100);
|
|
402
|
+
const brightness = clamp((1 - (event.clientY - rect.top) / rect.height) * 100, 0, 100);
|
|
403
|
+
this.setFromHsv({
|
|
404
|
+
h: this.hsvValue().h,
|
|
405
|
+
s: Math.round(saturation),
|
|
406
|
+
v: Math.round(brightness)
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
commitText(draft, event) {
|
|
410
|
+
const parsed = parseColor(draft);
|
|
411
|
+
if (!parsed) return;
|
|
412
|
+
this.setValue(formatColor(parsed.rgb, this.format()));
|
|
413
|
+
this.textDraft.set("");
|
|
414
|
+
this.emitCommitted(event);
|
|
415
|
+
}
|
|
416
|
+
setFromHex(hex) {
|
|
417
|
+
const parsed = parseColor(hex);
|
|
418
|
+
if (!parsed) return;
|
|
419
|
+
this.setValue(formatColor(parsed.rgb, this.format()));
|
|
420
|
+
}
|
|
421
|
+
setFromHsv(color) {
|
|
422
|
+
this.hsvDraft.set(color);
|
|
423
|
+
this.setValue(formatColor(hsvToRgb(color), this.format()));
|
|
424
|
+
}
|
|
425
|
+
setValue(value) {
|
|
426
|
+
if (this.value() === value) return;
|
|
427
|
+
this.value.set(value);
|
|
428
|
+
this.onChange(value);
|
|
429
|
+
}
|
|
430
|
+
coerceValue(value) {
|
|
431
|
+
if (typeof value !== "string") return "";
|
|
432
|
+
const parsed = parseColor(value);
|
|
433
|
+
return parsed ? formatColor(parsed.rgb, this.format()) : value;
|
|
434
|
+
}
|
|
435
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
436
|
+
minVersion: "12.0.0",
|
|
437
|
+
version: "22.2.2",
|
|
438
|
+
ngImport: i0,
|
|
439
|
+
type: AerisColorPicker,
|
|
440
|
+
deps: [],
|
|
441
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
442
|
+
});
|
|
443
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
444
|
+
minVersion: "17.0.0",
|
|
445
|
+
version: "22.2.2",
|
|
446
|
+
type: AerisColorPicker,
|
|
447
|
+
isStandalone: true,
|
|
448
|
+
selector: "aeris-color-picker",
|
|
449
|
+
inputs: {
|
|
450
|
+
value: {
|
|
451
|
+
classPropertyName: "value",
|
|
452
|
+
publicName: "value",
|
|
453
|
+
isSignal: true,
|
|
454
|
+
isRequired: false,
|
|
455
|
+
transformFunction: null
|
|
456
|
+
},
|
|
457
|
+
format: {
|
|
458
|
+
classPropertyName: "format",
|
|
459
|
+
publicName: "format",
|
|
460
|
+
isSignal: true,
|
|
461
|
+
isRequired: false,
|
|
462
|
+
transformFunction: null
|
|
463
|
+
},
|
|
464
|
+
inputId: {
|
|
465
|
+
classPropertyName: "inputId",
|
|
466
|
+
publicName: "inputId",
|
|
467
|
+
isSignal: true,
|
|
468
|
+
isRequired: false,
|
|
469
|
+
transformFunction: null
|
|
470
|
+
},
|
|
471
|
+
name: {
|
|
472
|
+
classPropertyName: "name",
|
|
473
|
+
publicName: "name",
|
|
474
|
+
isSignal: true,
|
|
475
|
+
isRequired: false,
|
|
476
|
+
transformFunction: null
|
|
477
|
+
},
|
|
478
|
+
formats: {
|
|
479
|
+
classPropertyName: "formats",
|
|
480
|
+
publicName: "formats",
|
|
481
|
+
isSignal: true,
|
|
482
|
+
isRequired: false,
|
|
483
|
+
transformFunction: null
|
|
484
|
+
},
|
|
485
|
+
appendTo: {
|
|
486
|
+
classPropertyName: "appendTo",
|
|
487
|
+
publicName: "appendTo",
|
|
488
|
+
isSignal: true,
|
|
489
|
+
isRequired: false,
|
|
490
|
+
transformFunction: null
|
|
491
|
+
},
|
|
492
|
+
viewportMargin: {
|
|
493
|
+
classPropertyName: "viewportMargin",
|
|
494
|
+
publicName: "viewportMargin",
|
|
495
|
+
isSignal: true,
|
|
496
|
+
isRequired: false,
|
|
497
|
+
transformFunction: null
|
|
498
|
+
},
|
|
499
|
+
placeholder: {
|
|
500
|
+
classPropertyName: "placeholder",
|
|
501
|
+
publicName: "placeholder",
|
|
502
|
+
isSignal: true,
|
|
503
|
+
isRequired: false,
|
|
504
|
+
transformFunction: null
|
|
505
|
+
},
|
|
506
|
+
ariaLabel: {
|
|
507
|
+
classPropertyName: "ariaLabel",
|
|
508
|
+
publicName: "ariaLabel",
|
|
509
|
+
isSignal: true,
|
|
510
|
+
isRequired: false,
|
|
511
|
+
transformFunction: null
|
|
512
|
+
},
|
|
513
|
+
ariaLabelledBy: {
|
|
514
|
+
classPropertyName: "ariaLabelledBy",
|
|
515
|
+
publicName: "ariaLabelledBy",
|
|
516
|
+
isSignal: true,
|
|
517
|
+
isRequired: false,
|
|
518
|
+
transformFunction: null
|
|
519
|
+
},
|
|
520
|
+
ariaDescribedBy: {
|
|
521
|
+
classPropertyName: "ariaDescribedBy",
|
|
522
|
+
publicName: "ariaDescribedBy",
|
|
523
|
+
isSignal: true,
|
|
524
|
+
isRequired: false,
|
|
525
|
+
transformFunction: null
|
|
526
|
+
},
|
|
527
|
+
triggerAriaLabel: {
|
|
528
|
+
classPropertyName: "triggerAriaLabel",
|
|
529
|
+
publicName: "triggerAriaLabel",
|
|
530
|
+
isSignal: true,
|
|
531
|
+
isRequired: false,
|
|
532
|
+
transformFunction: null
|
|
533
|
+
},
|
|
534
|
+
nativeAriaLabel: {
|
|
535
|
+
classPropertyName: "nativeAriaLabel",
|
|
536
|
+
publicName: "nativeAriaLabel",
|
|
537
|
+
isSignal: true,
|
|
538
|
+
isRequired: false,
|
|
539
|
+
transformFunction: null
|
|
540
|
+
},
|
|
541
|
+
panelAriaLabel: {
|
|
542
|
+
classPropertyName: "panelAriaLabel",
|
|
543
|
+
publicName: "panelAriaLabel",
|
|
544
|
+
isSignal: true,
|
|
545
|
+
isRequired: false,
|
|
546
|
+
transformFunction: null
|
|
547
|
+
},
|
|
548
|
+
textAriaLabel: {
|
|
549
|
+
classPropertyName: "textAriaLabel",
|
|
550
|
+
publicName: "textAriaLabel",
|
|
551
|
+
isSignal: true,
|
|
552
|
+
isRequired: false,
|
|
553
|
+
transformFunction: null
|
|
554
|
+
},
|
|
555
|
+
formatAriaLabel: {
|
|
556
|
+
classPropertyName: "formatAriaLabel",
|
|
557
|
+
publicName: "formatAriaLabel",
|
|
558
|
+
isSignal: true,
|
|
559
|
+
isRequired: false,
|
|
560
|
+
transformFunction: null
|
|
561
|
+
},
|
|
562
|
+
hueAriaLabel: {
|
|
563
|
+
classPropertyName: "hueAriaLabel",
|
|
564
|
+
publicName: "hueAriaLabel",
|
|
565
|
+
isSignal: true,
|
|
566
|
+
isRequired: false,
|
|
567
|
+
transformFunction: null
|
|
568
|
+
},
|
|
569
|
+
planeAriaLabel: {
|
|
570
|
+
classPropertyName: "planeAriaLabel",
|
|
571
|
+
publicName: "planeAriaLabel",
|
|
572
|
+
isSignal: true,
|
|
573
|
+
isRequired: false,
|
|
574
|
+
transformFunction: null
|
|
575
|
+
},
|
|
576
|
+
presetsAriaLabel: {
|
|
577
|
+
classPropertyName: "presetsAriaLabel",
|
|
578
|
+
publicName: "presetsAriaLabel",
|
|
579
|
+
isSignal: true,
|
|
580
|
+
isRequired: false,
|
|
581
|
+
transformFunction: null
|
|
582
|
+
},
|
|
583
|
+
presetsLabel: {
|
|
584
|
+
classPropertyName: "presetsLabel",
|
|
585
|
+
publicName: "presetsLabel",
|
|
586
|
+
isSignal: true,
|
|
587
|
+
isRequired: false,
|
|
588
|
+
transformFunction: null
|
|
589
|
+
},
|
|
590
|
+
emptyLabel: {
|
|
591
|
+
classPropertyName: "emptyLabel",
|
|
592
|
+
publicName: "emptyLabel",
|
|
593
|
+
isSignal: true,
|
|
594
|
+
isRequired: false,
|
|
595
|
+
transformFunction: null
|
|
596
|
+
},
|
|
597
|
+
clearButtonAriaLabel: {
|
|
598
|
+
classPropertyName: "clearButtonAriaLabel",
|
|
599
|
+
publicName: "clearButtonAriaLabel",
|
|
600
|
+
isSignal: true,
|
|
601
|
+
isRequired: false,
|
|
602
|
+
transformFunction: null
|
|
603
|
+
},
|
|
604
|
+
closeButtonAriaLabel: {
|
|
605
|
+
classPropertyName: "closeButtonAriaLabel",
|
|
606
|
+
publicName: "closeButtonAriaLabel",
|
|
607
|
+
isSignal: true,
|
|
608
|
+
isRequired: false,
|
|
609
|
+
transformFunction: null
|
|
610
|
+
},
|
|
611
|
+
eyeDropperAriaLabel: {
|
|
612
|
+
classPropertyName: "eyeDropperAriaLabel",
|
|
613
|
+
publicName: "eyeDropperAriaLabel",
|
|
614
|
+
isSignal: true,
|
|
615
|
+
isRequired: false,
|
|
616
|
+
transformFunction: null
|
|
617
|
+
},
|
|
618
|
+
size: {
|
|
619
|
+
classPropertyName: "size",
|
|
620
|
+
publicName: "size",
|
|
621
|
+
isSignal: true,
|
|
622
|
+
isRequired: false,
|
|
623
|
+
transformFunction: null
|
|
624
|
+
},
|
|
625
|
+
appearance: {
|
|
626
|
+
classPropertyName: "appearance",
|
|
627
|
+
publicName: "appearance",
|
|
628
|
+
isSignal: true,
|
|
629
|
+
isRequired: false,
|
|
630
|
+
transformFunction: null
|
|
631
|
+
},
|
|
632
|
+
presets: {
|
|
633
|
+
classPropertyName: "presets",
|
|
634
|
+
publicName: "presets",
|
|
635
|
+
isSignal: true,
|
|
636
|
+
isRequired: false,
|
|
637
|
+
transformFunction: null
|
|
638
|
+
},
|
|
639
|
+
showInput: {
|
|
640
|
+
classPropertyName: "showInput",
|
|
641
|
+
publicName: "showInput",
|
|
642
|
+
isSignal: true,
|
|
643
|
+
isRequired: false,
|
|
644
|
+
transformFunction: null
|
|
645
|
+
},
|
|
646
|
+
showValue: {
|
|
647
|
+
classPropertyName: "showValue",
|
|
648
|
+
publicName: "showValue",
|
|
649
|
+
isSignal: true,
|
|
650
|
+
isRequired: false,
|
|
651
|
+
transformFunction: null
|
|
652
|
+
},
|
|
653
|
+
showFormat: {
|
|
654
|
+
classPropertyName: "showFormat",
|
|
655
|
+
publicName: "showFormat",
|
|
656
|
+
isSignal: true,
|
|
657
|
+
isRequired: false,
|
|
658
|
+
transformFunction: null
|
|
659
|
+
},
|
|
660
|
+
showEyeDropper: {
|
|
661
|
+
classPropertyName: "showEyeDropper",
|
|
662
|
+
publicName: "showEyeDropper",
|
|
663
|
+
isSignal: true,
|
|
664
|
+
isRequired: false,
|
|
665
|
+
transformFunction: null
|
|
666
|
+
},
|
|
667
|
+
clearable: {
|
|
668
|
+
classPropertyName: "clearable",
|
|
669
|
+
publicName: "clearable",
|
|
670
|
+
isSignal: true,
|
|
671
|
+
isRequired: false,
|
|
672
|
+
transformFunction: null
|
|
673
|
+
},
|
|
674
|
+
disabled: {
|
|
675
|
+
classPropertyName: "disabled",
|
|
676
|
+
publicName: "disabled",
|
|
677
|
+
isSignal: true,
|
|
678
|
+
isRequired: false,
|
|
679
|
+
transformFunction: null
|
|
680
|
+
},
|
|
681
|
+
readonly: {
|
|
682
|
+
classPropertyName: "readonly",
|
|
683
|
+
publicName: "readonly",
|
|
684
|
+
isSignal: true,
|
|
685
|
+
isRequired: false,
|
|
686
|
+
transformFunction: null
|
|
687
|
+
},
|
|
688
|
+
required: {
|
|
689
|
+
classPropertyName: "required",
|
|
690
|
+
publicName: "required",
|
|
691
|
+
isSignal: true,
|
|
692
|
+
isRequired: false,
|
|
693
|
+
transformFunction: null
|
|
694
|
+
},
|
|
695
|
+
invalid: {
|
|
696
|
+
classPropertyName: "invalid",
|
|
697
|
+
publicName: "invalid",
|
|
698
|
+
isSignal: true,
|
|
699
|
+
isRequired: false,
|
|
700
|
+
transformFunction: null
|
|
701
|
+
},
|
|
702
|
+
touched: {
|
|
703
|
+
classPropertyName: "touched",
|
|
704
|
+
publicName: "touched",
|
|
705
|
+
isSignal: true,
|
|
706
|
+
isRequired: false,
|
|
707
|
+
transformFunction: null
|
|
708
|
+
},
|
|
709
|
+
fluid: {
|
|
710
|
+
classPropertyName: "fluid",
|
|
711
|
+
publicName: "fluid",
|
|
712
|
+
isSignal: true,
|
|
713
|
+
isRequired: false,
|
|
714
|
+
transformFunction: null
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
outputs: {
|
|
718
|
+
value: "valueChange",
|
|
719
|
+
format: "formatChange",
|
|
720
|
+
changed: "changed",
|
|
721
|
+
focused: "focused",
|
|
722
|
+
blurred: "blurred",
|
|
723
|
+
touch: "touch",
|
|
724
|
+
cleared: "cleared",
|
|
725
|
+
opened: "opened",
|
|
726
|
+
closed: "closed"
|
|
727
|
+
},
|
|
728
|
+
host: { properties: { "attr.data-fluid": "fluid() || null" } },
|
|
729
|
+
providers: [{
|
|
730
|
+
provide: NG_VALUE_ACCESSOR,
|
|
731
|
+
useExisting: forwardRef(() => AerisColorPicker),
|
|
732
|
+
multi: true
|
|
733
|
+
}],
|
|
734
|
+
viewQueries: [
|
|
735
|
+
{
|
|
736
|
+
propertyName: "pickerPanel",
|
|
737
|
+
first: true,
|
|
738
|
+
predicate: ["pickerPanel"],
|
|
739
|
+
descendants: true,
|
|
740
|
+
isSignal: true
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
propertyName: "panelPortal",
|
|
744
|
+
first: true,
|
|
745
|
+
predicate: ɵAerisAppendTo,
|
|
746
|
+
descendants: true,
|
|
747
|
+
isSignal: true
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
propertyName: "colorPlane",
|
|
751
|
+
first: true,
|
|
752
|
+
predicate: ["colorPlane"],
|
|
753
|
+
descendants: true,
|
|
754
|
+
isSignal: true
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
propertyName: "triggerButton",
|
|
758
|
+
first: true,
|
|
759
|
+
predicate: ["triggerButton"],
|
|
760
|
+
descendants: true,
|
|
761
|
+
isSignal: true
|
|
762
|
+
}
|
|
763
|
+
],
|
|
764
|
+
ngImport: i0,
|
|
765
|
+
template: `
|
|
505
766
|
<div
|
|
506
767
|
class="aeris-color-picker"
|
|
507
768
|
[attr.data-size]="size()"
|
|
508
769
|
[attr.data-appearance]="appearance()"
|
|
509
770
|
[attr.data-disabled]="effectiveDisabled() || null"
|
|
510
771
|
[attr.data-readonly]="readonly() || null"
|
|
511
|
-
[attr.data-invalid]="
|
|
772
|
+
[attr.data-invalid]="displayInvalid() || null"
|
|
512
773
|
[attr.data-fluid]="fluid() || null"
|
|
513
774
|
[attr.data-open]="isOpen() || null"
|
|
514
775
|
(focusout)="handleFocusOut($event)"
|
|
@@ -524,9 +785,9 @@ class AerisColorPicker {
|
|
|
524
785
|
[id]="resolvedInputId()"
|
|
525
786
|
[disabled]="effectiveDisabled() || readonly()"
|
|
526
787
|
[attr.aria-label]="ariaLabel() || triggerAriaLabel()"
|
|
527
|
-
[attr.aria-labelledby]="
|
|
528
|
-
[attr.aria-describedby]="
|
|
529
|
-
[attr.aria-invalid]="
|
|
788
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
789
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
790
|
+
[attr.aria-invalid]="displayInvalid() || null"
|
|
530
791
|
[attr.aria-required]="required() || null"
|
|
531
792
|
[attr.aria-expanded]="isOpen()"
|
|
532
793
|
[attr.aria-controls]="panelId"
|
|
@@ -558,8 +819,8 @@ class AerisColorPicker {
|
|
|
558
819
|
[readOnly]="readonly()"
|
|
559
820
|
[required]="required()"
|
|
560
821
|
[attr.aria-label]="textAriaLabel()"
|
|
561
|
-
[attr.aria-describedby]="
|
|
562
|
-
[attr.aria-invalid]="
|
|
822
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
823
|
+
[attr.aria-invalid]="displayInvalid() || textInvalid() || null"
|
|
563
824
|
autocomplete="off"
|
|
564
825
|
spellcheck="false"
|
|
565
826
|
(input)="handleTextInput($event)"
|
|
@@ -583,16 +844,14 @@ class AerisColorPicker {
|
|
|
583
844
|
}
|
|
584
845
|
|
|
585
846
|
@if (isOpen()) {
|
|
586
|
-
<button
|
|
587
|
-
class="aeris-color-picker__dismiss"
|
|
588
|
-
type="button"
|
|
589
|
-
tabindex="-1"
|
|
590
|
-
[attr.aria-label]="closeButtonAriaLabel()"
|
|
591
|
-
(click)="close(true)"
|
|
592
|
-
></button>
|
|
593
847
|
<section
|
|
594
848
|
#pickerPanel
|
|
595
849
|
class="aeris-color-picker__panel"
|
|
850
|
+
[aerisInternalAppendTo]="appendTo()"
|
|
851
|
+
[aerisInternalAppendToDismiss]="dismissOverlay"
|
|
852
|
+
[aerisInternalAppendToAnchor]="this.triggerButton()?.nativeElement ?? null"
|
|
853
|
+
[aerisInternalAppendToCollisionPadding]="viewportMargin()"
|
|
854
|
+
(aerisInternalAppendToOutside)="close(false)"
|
|
596
855
|
role="dialog"
|
|
597
856
|
[id]="panelId"
|
|
598
857
|
[attr.aria-label]="resolvedPanelAriaLabel()"
|
|
@@ -741,18 +1000,47 @@ class AerisColorPicker {
|
|
|
741
1000
|
</section>
|
|
742
1001
|
}
|
|
743
1002
|
</div>
|
|
744
|
-
`, isInline: true, styles: [":host{--_aeris-color-picker-chevron-mask: var( --aeris-icon-chevron, url(data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20d=%27M7%209.5%2012%2014.5%2017%209.5%27%20fill=%27none%27%20stroke=%27black%27%20stroke-width=%272.4%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27/%3E%3C/svg%3E) );--_aeris-color-picker-eyedropper-mask: var( --aeris-icon-eyedropper, url(data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20d=%27m13.7%205.2%205.1%205.1M15.6%203.3l5.1%205.1-3%203-1.5-1.5-7.7%207.7-3.5%201%201-3.5%207.7-7.7-1.5-1.5%203-3Z%27%20fill=%27none%27%20stroke=%27black%27%20stroke-width=%272%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27/%3E%3C/svg%3E) );display:inline-block;max-width:100%;vertical-align:middle}:host([data-fluid]){width:100%}.aeris-color-picker{--aeris-color-picker-height: var(--aeris-control-height, 2.5rem);--aeris-color-picker-font-size: .9375rem;--aeris-color-picker-panel-width: 20rem;--aeris-color-picker-panel-background: var(--aeris-surface, #fff);--aeris-color-picker-panel-border: var(--aeris-border, #deddd7);--aeris-color-picker-panel-radius: min(var(--aeris-radius-lg, .875rem), 1rem);--aeris-color-picker-panel-shadow: 0 1.25rem 3.5rem rgb(31 35 27 / 22%);--aeris-color-picker-panel-padding: calc(var(--aeris-density-gap, .5rem) + .375rem);display:inline-grid;grid-template-columns:minmax(0,auto) minmax(8rem,1fr) auto;align-items:center;gap:.5rem;max-width:100%;color:var(--aeris-text, #222222);font-size:var(--aeris-color-picker-font-size)}.aeris-color-picker,.aeris-color-picker *,.aeris-color-picker *:before,.aeris-color-picker *:after{box-sizing:border-box}.aeris-color-picker[data-fluid]{width:100%}.aeris-color-picker[data-size=xs]{--aeris-color-picker-height: 1.875rem;--aeris-color-picker-font-size: .75rem}.aeris-color-picker[data-size=sm]{--aeris-color-picker-height: 2.1875rem;--aeris-color-picker-font-size: .8125rem}.aeris-color-picker[data-size=lg]{--aeris-color-picker-height: 2.875rem;--aeris-color-picker-font-size: 1rem}.aeris-color-picker button,.aeris-color-picker input{font:inherit}.aeris-color-picker__trigger,.aeris-color-picker__text{min-height:var(--aeris-color-picker-height);border:1px solid var(--aeris-border-strong, #c7c9c0);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:var(--aeris-surface, #fff);color:inherit}.aeris-color-picker[data-appearance=filled] .aeris-color-picker__trigger,.aeris-color-picker[data-appearance=filled] .aeris-color-picker__text{border-color:transparent;background:var(--aeris-surface-2, #f2f0ec)}.aeris-color-picker__trigger{display:inline-flex;align-items:center;gap:.55rem;min-width:8rem;padding:0 .625rem;text-align:start;cursor:pointer}.aeris-color-picker__trigger[data-swatch-only]{width:var(--aeris-color-picker-height);min-width:var(--aeris-color-picker-height);justify-content:center;padding:0}.aeris-color-picker__swatch{width:calc(var(--aeris-color-picker-height) - .85rem);height:calc(var(--aeris-color-picker-height) - .85rem);flex:0 0 auto;border:0;border-radius:min(var(--aeris-radius-sm, .5rem),.35rem);box-shadow:0 0 0 1px var(--aeris-border-strong, #c7c9c0)}.aeris-color-picker__value{min-width:0;flex:1;overflow:hidden;color:var(--aeris-text-2, #555555);font-weight:650;text-overflow:ellipsis;white-space:nowrap}.aeris-color-picker__indicator{position:relative;width:1rem;height:1rem;flex:0 0 auto;color:var(--aeris-text-2, #555555)}.aeris-color-picker__indicator:before{position:absolute;top:50%;left:50%;width:1rem;height:1rem;background:currentColor;content:\"\";transform:translate(-50%,-50%);transition:transform .16s ease;-webkit-mask:var(--_aeris-color-picker-chevron-mask) center/100% 100% no-repeat;mask:var(--_aeris-color-picker-chevron-mask) center/100% 100% no-repeat}.aeris-color-picker__trigger[data-swatch-only] .aeris-color-picker__indicator{display:none}.aeris-color-picker[data-open] .aeris-color-picker__indicator:before{transform:translate(-50%,-50%) rotate(180deg)}.aeris-color-picker__text{width:100%;min-width:0;padding:0 .75rem}.aeris-color-picker__text::placeholder,.aeris-color-picker__panel-value input::placeholder{color:var(--aeris-text-2, #555555);opacity:.72}.aeris-color-picker__clear,.aeris-color-picker__close,.aeris-color-picker__eyedropper{display:grid;place-items:center;padding:0;border:1px solid var(--aeris-border, #deddd7);background:var(--aeris-surface, #fff);color:var(--aeris-text-2, #555555);cursor:pointer}.aeris-color-picker__clear{width:var(--aeris-color-picker-height);height:var(--aeris-color-picker-height);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem))}.aeris-color-picker__close,.aeris-color-picker__eyedropper{width:2rem;height:2rem;border-color:transparent;border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:transparent}.aeris-color-picker__clear span,.aeris-color-picker__close span{width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem);background:currentColor;-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}.aeris-color-picker__eyedropper span{width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem);background:currentColor;-webkit-mask:var(--_aeris-color-picker-eyedropper-mask) center/100% 100% no-repeat;mask:var(--_aeris-color-picker-eyedropper-mask) center/100% 100% no-repeat}.aeris-color-picker__dismiss{position:fixed;z-index:var(--aeris-color-picker-dismiss-z-index, 999);inset:0;width:100vw;height:100vh;height:100dvh;padding:0;border:0;border-radius:0;background:transparent;cursor:default}.aeris-color-picker__panel{position:fixed;z-index:var(--aeris-color-picker-panel-z-index, 1000);width:min(var(--aeris-color-picker-panel-width),100vw - 1rem);max-height:calc(100vh - 1rem);max-height:calc(100dvh - 1rem);padding:var(--aeris-color-picker-panel-padding);border:1px solid var(--aeris-color-picker-panel-border);border-radius:var(--aeris-color-picker-panel-radius);background:var(--aeris-color-picker-panel-background);box-shadow:var(--aeris-color-picker-panel-shadow);overflow:auto;overscroll-behavior:contain;scrollbar-color:var(--aeris-border-strong, #c7c9c0) transparent;scrollbar-width:thin;visibility:hidden}.aeris-color-picker__panel::-webkit-scrollbar{width:.75rem;height:.75rem}.aeris-color-picker__panel::-webkit-scrollbar-track,.aeris-color-picker__panel::-webkit-scrollbar-corner{background:transparent}.aeris-color-picker__panel::-webkit-scrollbar-thumb{border:3px solid transparent;border-radius:var(--aeris-radius-pill, 999px);background:var(--aeris-border-strong, #c7c9c0);background-clip:content-box}.aeris-color-picker__panel[data-positioned]{animation:aeris-color-picker-panel-in .16s ease-out;visibility:visible}.aeris-color-picker__panel-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.625rem;margin-bottom:.75rem}.aeris-color-picker__panel-actions{display:flex;align-items:center;gap:.125rem;margin-inline-start:auto}.aeris-color-picker__preview{width:2.25rem;height:2.25rem;border:0;border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));box-shadow:0 0 0 1px var(--aeris-border-strong, #c7c9c0)}.aeris-color-picker__panel-header>span:nth-child(2){min-width:0;display:grid;gap:.125rem}.aeris-color-picker__panel-header strong,.aeris-color-picker__panel-header small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aeris-color-picker__panel-header strong{color:var(--aeris-text, #222222);font-size:.8125rem}.aeris-color-picker__panel-header small{color:var(--aeris-text-2, #555555);font-size:.6875rem}.aeris-color-picker__plane{position:relative;height:11rem;border:1px solid color-mix(in srgb,var(--aeris-border-strong, #c7c9c0) 72%,#000);border-radius:calc(var(--aeris-color-picker-panel-radius) - .25rem);background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,var(--aeris-color-picker-plane-hue));box-shadow:inset 0 0 0 1px #ffffff2e;cursor:crosshair;touch-action:none}.aeris-color-picker__plane-thumb{position:absolute;width:.875rem;height:.875rem;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #000000b8,0 .125rem .4rem #00000059;transform:translate(-50%,-50%);pointer-events:none}.aeris-color-picker__hue{display:grid;gap:.375rem;margin-top:.75rem}.aeris-color-picker__hue>span,.aeris-color-picker__panel-value>span,.aeris-color-picker__preset-section>span{display:flex;justify-content:space-between;color:var(--aeris-text-2, #555555);font-size:.6875rem;font-weight:700}.aeris-color-picker__hue output{color:var(--aeris-text, #222222);font:inherit}.aeris-color-picker__hue input[type=range]{width:100%;height:1.25rem;margin:0;padding:0;border:0;background:transparent;direction:ltr;appearance:none;cursor:pointer}.aeris-color-picker__hue input[type=range]::-webkit-slider-runnable-track{height:.625rem;border:1px solid rgba(0,0,0,.16);border-radius:999px;background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.aeris-color-picker__hue input[type=range]::-moz-range-track{height:.625rem;border:1px solid rgba(0,0,0,.16);border-radius:999px;background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.aeris-color-picker__hue input[type=range]::-webkit-slider-thumb{width:1.125rem;height:1.125rem;margin-top:-.3125rem;border:2px solid #fff;border-radius:50%;background:var(--aeris-color-picker-hue-color);box-shadow:0 0 0 1px #00000047,0 .125rem .35rem #0000003d;appearance:none}.aeris-color-picker__hue input[type=range]::-moz-range-thumb{width:.875rem;height:.875rem;border:2px solid #fff;border-radius:50%;background:var(--aeris-color-picker-hue-color);box-shadow:0 0 0 1px #00000047,0 .125rem .35rem #0000003d}.aeris-color-picker__formats{display:flex;gap:.25rem;margin-top:.75rem;padding:.25rem;border:1px solid var(--aeris-border, #deddd7);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:var(--aeris-surface-2, #f2f0ec)}.aeris-color-picker__formats button{min-width:0;flex:1;min-height:1.875rem;padding:0 .5rem;border:0;border-radius:max(.25rem,var(--aeris-radius-control, .5rem) - .2rem);background:transparent;color:var(--aeris-text-2, #555555);font-size:.6875rem;font-weight:750;cursor:pointer}.aeris-color-picker__formats button[aria-pressed=true]{background:var(--aeris-surface, #fff);color:var(--aeris-text, #222222);box-shadow:0 .125rem .4rem #1f231b1a}.aeris-color-picker__panel-value{display:grid;gap:.375rem;margin-top:.75rem}.aeris-color-picker__panel-value input{width:100%;min-height:2.25rem;padding:0 .625rem;border:1px solid var(--aeris-border-strong, #c7c9c0);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:var(--aeris-surface, #fff);color:var(--aeris-text, #222222);font-size:.8125rem}.aeris-color-picker__preset-section{display:grid;gap:.5rem;margin-top:.75rem}.aeris-color-picker__presets{display:flex;flex-wrap:wrap;gap:.45rem}.aeris-color-picker__presets button{width:1.75rem;height:1.75rem;padding:0;border:0;border-radius:min(var(--aeris-radius-sm, .5rem),.45rem);box-shadow:0 0 0 1px var(--aeris-border-strong, #c7c9c0);cursor:pointer}.aeris-color-picker__presets button[aria-pressed=true]{outline:2px solid var(--aeris-focus, #536437);outline-offset:2px}.aeris-color-picker__trigger:hover,.aeris-color-picker__clear:hover,.aeris-color-picker__panel-value input:hover{border-color:var(--aeris-primary, #879566)}.aeris-color-picker__presets button:hover{box-shadow:0 0 0 1px var(--aeris-primary, #879566)}.aeris-color-picker__close:hover,.aeris-color-picker__eyedropper:hover,.aeris-color-picker__formats button:hover{background:var(--aeris-surface-2, #f2f0ec);color:var(--aeris-text, #222222)}.aeris-color-picker__trigger:focus-visible,.aeris-color-picker__text:focus,.aeris-color-picker__clear:focus-visible,.aeris-color-picker__close:focus-visible,.aeris-color-picker__eyedropper:focus-visible,.aeris-color-picker__formats button:focus-visible,.aeris-color-picker__panel-value input:focus,.aeris-color-picker__presets button:focus-visible,.aeris-color-picker__plane:focus-visible,.aeris-color-picker__hue input:focus-visible{border-color:var(--aeris-focus, #536437);outline:3px solid color-mix(in srgb,var(--aeris-focus, #536437) 24%,transparent);outline-offset:1px}.aeris-color-picker__eyedropper:disabled{cursor:wait;opacity:.64}.aeris-color-picker[data-invalid] .aeris-color-picker__trigger,.aeris-color-picker[data-invalid] .aeris-color-picker__text,.aeris-color-picker__text[aria-invalid=true],.aeris-color-picker__panel-value input[aria-invalid=true]{border-color:var(--aeris-danger, #c81e2a)}.aeris-color-picker[data-disabled],.aeris-color-picker[data-readonly]{opacity:.72}.aeris-color-picker[data-disabled] .aeris-color-picker__trigger,.aeris-color-picker[data-disabled] .aeris-color-picker__text,.aeris-color-picker[data-disabled] .aeris-color-picker__clear,.aeris-color-picker[data-readonly] .aeris-color-picker__trigger,.aeris-color-picker[data-readonly] .aeris-color-picker__text,.aeris-color-picker[data-readonly] .aeris-color-picker__clear{cursor:not-allowed}@keyframes aeris-color-picker-panel-in{0%{opacity:0;transform:translateY(-.25rem) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}@media(max-width:36rem){.aeris-color-picker{grid-template-columns:1fr auto}.aeris-color-picker__text{grid-column:1/-1}.aeris-color-picker__trigger:not([data-swatch-only]){grid-column:1/-1}}@media(prefers-reduced-motion:reduce){.aeris-color-picker__indicator:before{transition:none}.aeris-color-picker__panel{animation:none}}\n"] });
|
|
745
|
-
|
|
746
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisColorPicker, decorators: [{
|
|
747
|
-
|
|
748
|
-
|
|
1003
|
+
`,
|
|
1004
|
+
isInline: true,
|
|
1005
|
+
styles: [":host{--_aeris-color-picker-chevron-mask: var( --aeris-icon-chevron, url(data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20d=%27M7%209.5%2012%2014.5%2017%209.5%27%20fill=%27none%27%20stroke=%27black%27%20stroke-width=%272.4%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27/%3E%3C/svg%3E) );--_aeris-color-picker-eyedropper-mask: var( --aeris-icon-eyedropper, url(data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20d=%27m13.7%205.2%205.1%205.1M15.6%203.3l5.1%205.1-3%203-1.5-1.5-7.7%207.7-3.5%201%201-3.5%207.7-7.7-1.5-1.5%203-3Z%27%20fill=%27none%27%20stroke=%27black%27%20stroke-width=%272%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27/%3E%3C/svg%3E) );display:inline-block;max-width:100%;vertical-align:middle}:host([data-fluid]){width:100%}.aeris-color-picker{--aeris-color-picker-height: var(--aeris-control-height, 2.625rem);--aeris-color-picker-font-size: var(--aeris-font-size-lg, .875rem);--aeris-color-picker-panel-width: 20rem;--aeris-color-picker-panel-background: var(--aeris-surface, #fff);--aeris-color-picker-panel-border: var(--aeris-border, var(--aeris-border, #efefef));--aeris-color-picker-panel-radius: var(--aeris-radius-overlay, var(--aeris-radius-md, .6875rem));--aeris-color-picker-panel-shadow: 0 1.25rem 3.5rem rgb(31 35 27 / 22%);--aeris-color-picker-panel-padding: calc(var(--aeris-density-gap, .5rem) + .375rem);display:inline-grid;grid-template-columns:minmax(0,auto) minmax(8rem,1fr) auto;align-items:center;gap:.5rem;max-width:100%;color:var(--aeris-text, #111111);font-size:var(--aeris-color-picker-font-size)}.aeris-color-picker,.aeris-color-picker *,.aeris-color-picker *:before,.aeris-color-picker *:after{box-sizing:border-box}.aeris-color-picker[data-fluid]{width:100%}.aeris-color-picker[data-size=xs]{--aeris-color-picker-height: calc(var(--aeris-control-height, 2.625rem) - .875rem);--aeris-color-picker-font-size: var(--aeris-font-size-sm, .75rem)}.aeris-color-picker[data-size=sm]{--aeris-color-picker-height: calc(var(--aeris-control-height, 2.625rem) - .5rem);--aeris-color-picker-font-size: var(--aeris-font-size-md, .8125rem)}.aeris-color-picker[data-size=lg]{--aeris-color-picker-height: calc(var(--aeris-control-height, 2.625rem) + .5rem);--aeris-color-picker-font-size: var(--aeris-font-size-2xl, 1rem)}.aeris-color-picker button,.aeris-color-picker input{font:inherit}.aeris-color-picker__trigger,.aeris-color-picker__text{min-height:var(--aeris-color-picker-height);border:1px solid var(--aeris-border, #efefef);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:var(--aeris-surface, #fff);color:inherit}.aeris-color-picker[data-appearance=filled] .aeris-color-picker__trigger,.aeris-color-picker[data-appearance=filled] .aeris-color-picker__text{border-color:transparent;background:var(--aeris-surface-2, #f3f3f3)}.aeris-color-picker__trigger{display:inline-flex;align-items:center;gap:.55rem;min-width:8rem;padding:0 .625rem;text-align:start;cursor:pointer}.aeris-color-picker__trigger[data-swatch-only]{width:var(--aeris-color-picker-height);min-width:var(--aeris-color-picker-height);justify-content:center;padding:0}.aeris-color-picker__swatch{width:calc(var(--aeris-color-picker-height) - .85rem);height:calc(var(--aeris-color-picker-height) - .85rem);flex:0 0 auto;border:0;border-radius:min(var(--aeris-radius-sm, .5rem),.35rem);box-shadow:0 0 0 1px var(--aeris-border, #efefef)}.aeris-color-picker__value{min-width:0;flex:1;overflow:hidden;color:var(--aeris-text-2, #454545);font-weight:var(--aeris-font-weight-bold, 700);text-overflow:ellipsis;white-space:nowrap}.aeris-color-picker__indicator{position:relative;width:1rem;height:1rem;flex:0 0 auto;color:var(--aeris-text-2, #454545)}.aeris-color-picker__indicator:before{position:absolute;top:50%;left:50%;width:1rem;height:1rem;background:currentColor;content:\"\";transform:translate(-50%,-50%);transition:transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease);-webkit-mask:var(--_aeris-color-picker-chevron-mask) center/100% 100% no-repeat;mask:var(--_aeris-color-picker-chevron-mask) center/100% 100% no-repeat}.aeris-color-picker__trigger[data-swatch-only] .aeris-color-picker__indicator{display:none}.aeris-color-picker[data-open] .aeris-color-picker__indicator:before{transform:translate(-50%,-50%) rotate(180deg)}.aeris-color-picker__text{width:100%;min-width:0;padding:0 .75rem;box-shadow:none}.aeris-color-picker__text::placeholder,.aeris-color-picker__panel-value input::placeholder{color:var(--aeris-text-2, #454545);opacity:.72}.aeris-color-picker__clear,.aeris-color-picker__close,.aeris-color-picker__eyedropper{display:grid;place-items:center;padding:0;border:1px solid var(--aeris-border, #efefef);background:var(--aeris-surface, #fff);color:var(--aeris-text-2, #454545);cursor:pointer}.aeris-color-picker__clear{width:1.5rem;height:1.5rem;border:0;border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:transparent}.aeris-color-picker__close,.aeris-color-picker__eyedropper{width:2rem;height:2rem;border-color:transparent;border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:transparent}.aeris-color-picker__clear span,.aeris-color-picker__close span{width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem);background:currentColor;-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}.aeris-color-picker__eyedropper span{width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem);background:currentColor;-webkit-mask:var(--_aeris-color-picker-eyedropper-mask) center/100% 100% no-repeat;mask:var(--_aeris-color-picker-eyedropper-mask) center/100% 100% no-repeat}.aeris-color-picker__panel{position:fixed;z-index:var(--aeris-color-picker-panel-z-index, 1000);width:min(var(--aeris-color-picker-panel-width),100vw - 1rem);max-height:calc(100vh - 1rem);max-height:calc(100dvh - 1rem);padding:var(--aeris-color-picker-panel-padding);border:1px solid var(--aeris-color-picker-panel-border);border-radius:var(--aeris-color-picker-panel-radius);background:var(--aeris-color-picker-panel-background);box-shadow:var(--aeris-color-picker-panel-shadow);overflow:auto;overscroll-behavior:contain;scrollbar-color:var(--aeris-border, #efefef) transparent;scrollbar-width:thin;visibility:hidden}.aeris-color-picker__panel::-webkit-scrollbar{width:.75rem;height:.75rem}.aeris-color-picker__panel::-webkit-scrollbar-track,.aeris-color-picker__panel::-webkit-scrollbar-corner{background:transparent}.aeris-color-picker__panel::-webkit-scrollbar-thumb{border:3px solid transparent;border-radius:var(--aeris-radius-pill, 999px);background:var(--aeris-border, #efefef);background-clip:content-box}.aeris-color-picker__panel[data-positioned]{visibility:visible}.aeris-color-picker__panel-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.625rem;margin-bottom:.75rem}.aeris-color-picker__panel-actions{display:flex;align-items:center;gap:.125rem;margin-inline-start:auto}.aeris-color-picker__preview{width:2.25rem;height:2.25rem;border:0;border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));box-shadow:0 0 0 1px var(--aeris-border, #efefef)}.aeris-color-picker__panel-header>span:nth-child(2){min-width:0;display:grid;gap:.125rem}.aeris-color-picker__panel-header strong,.aeris-color-picker__panel-header small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aeris-color-picker__panel-header strong{color:var(--aeris-text, #111111);font-size:var(--aeris-font-size-md, .8125rem)}.aeris-color-picker__panel-header small{color:var(--aeris-text-2, #454545);font-size:var(--aeris-font-size-xs, .6875rem)}.aeris-color-picker__plane{position:relative;height:11rem;border:1px solid color-mix(in srgb,var(--aeris-border, #efefef) 72%,#000);border-radius:calc(var(--aeris-color-picker-panel-radius) - .25rem);background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,var(--aeris-color-picker-plane-hue));box-shadow:inset 0 0 0 1px #ffffff2e;cursor:crosshair;touch-action:none}.aeris-color-picker__plane-thumb{position:absolute;width:.875rem;height:.875rem;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #000000b8,0 .125rem .4rem #00000059;transform:translate(-50%,-50%);pointer-events:none}.aeris-color-picker__hue{display:grid;gap:.375rem;margin-top:.75rem}.aeris-color-picker__hue>span,.aeris-color-picker__panel-value>span,.aeris-color-picker__preset-section>span{display:flex;justify-content:space-between;color:var(--aeris-text-2, #454545);font-size:var(--aeris-font-size-xs, .6875rem);font-weight:var(--aeris-font-weight-bold, 700)}.aeris-color-picker__hue output{color:var(--aeris-text, #111111);font:inherit}.aeris-color-picker__hue input[type=range]{width:100%;height:1.25rem;margin:0;padding:0;border:0;background:transparent;direction:ltr;appearance:none;cursor:pointer}.aeris-color-picker__hue input[type=range]::-webkit-slider-runnable-track{height:.625rem;border:1px solid rgba(0,0,0,.16);border-radius:var(--aeris-radius-pill, 999px);background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.aeris-color-picker__hue input[type=range]::-moz-range-track{height:.625rem;border:1px solid rgba(0,0,0,.16);border-radius:var(--aeris-radius-pill, 999px);background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.aeris-color-picker__hue input[type=range]::-webkit-slider-thumb{width:1.125rem;height:1.125rem;margin-top:-.3125rem;border:2px solid #fff;border-radius:50%;background:var(--aeris-color-picker-hue-color);box-shadow:0 0 0 1px #00000047,0 .125rem .35rem #0000003d;appearance:none}.aeris-color-picker__hue input[type=range]::-moz-range-thumb{width:.875rem;height:.875rem;border:2px solid #fff;border-radius:50%;background:var(--aeris-color-picker-hue-color);box-shadow:0 0 0 1px #00000047,0 .125rem .35rem #0000003d}.aeris-color-picker__formats{display:flex;gap:.25rem;margin-top:.75rem;padding:.25rem;border:1px solid var(--aeris-border, #efefef);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:var(--aeris-surface-2, #f3f3f3)}.aeris-color-picker__formats button{min-width:0;flex:1;min-height:1.875rem;padding:0 .5rem;border:0;border-radius:var(--aeris-radius-item, var(--aeris-radius-sm, .4375rem));background:transparent;color:var(--aeris-text-2, #454545);font-size:var(--aeris-font-size-xs, .6875rem);font-weight:var(--aeris-font-weight-bold, 700);cursor:pointer}.aeris-color-picker__formats button[aria-pressed=true]{background:var(--aeris-surface, #fff);color:var(--aeris-text, #111111);box-shadow:0 .125rem .4rem #1f231b1a}.aeris-color-picker__panel-value{display:grid;gap:.375rem;margin-top:.75rem}.aeris-color-picker__panel-value input{width:100%;min-height:2.25rem;padding:0 .625rem;border:1px solid var(--aeris-border, #efefef);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:var(--aeris-surface, #fff);color:var(--aeris-text, #111111);font-size:var(--aeris-font-size-md, .8125rem)}.aeris-color-picker__preset-section{display:grid;gap:.5rem;margin-top:.75rem}.aeris-color-picker__presets{display:flex;flex-wrap:wrap;gap:.45rem}.aeris-color-picker__presets button{width:1.75rem;height:1.75rem;padding:0;border:0;border-radius:min(var(--aeris-radius-sm, .5rem),.45rem);box-shadow:0 0 0 1px var(--aeris-border, #efefef);cursor:pointer}.aeris-color-picker__presets button[aria-pressed=true]{outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-focus, #111111);outline-offset:var(--aeris-focus-ring-offset, 2px)}@media(hover:hover){.aeris-color-picker__trigger:hover,.aeris-color-picker__panel-value input:hover{border-color:var(--aeris-control-hover-border, var(--aeris-primary, #111111))}}.aeris-color-picker__clear:focus-visible{background:var(--aeris-surface-2, #f3f3f3);color:var(--aeris-text, #111111)}@media(hover:hover){.aeris-color-picker__clear:hover{background:var(--aeris-surface-2, #f3f3f3);color:var(--aeris-text, #111111)}}.aeris-color-picker__clear:focus-visible{outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-focus, #111111);outline-offset:1px}@media(hover:hover){.aeris-color-picker__presets button:hover{box-shadow:0 0 0 1px var(--aeris-primary, #111111)}}@media(hover:hover){.aeris-color-picker__close:hover,.aeris-color-picker__eyedropper:hover,.aeris-color-picker__formats button:hover{background:var(--aeris-surface-2, #f3f3f3);color:var(--aeris-text, #111111)}}.aeris-color-picker__close:focus-visible,.aeris-color-picker__eyedropper:focus-visible,.aeris-color-picker__formats button:focus-visible,.aeris-color-picker__presets button:focus-visible,.aeris-color-picker__plane:focus-visible,.aeris-color-picker__hue input:focus-visible{outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-focus-ring-color, transparent);outline-offset:var(--aeris-focus-ring-offset, 2px)}.aeris-color-picker__trigger:focus-visible,.aeris-color-picker__text:focus,.aeris-color-picker__panel-value input:focus{border-color:var(--aeris-control-focus-border, var(--aeris-focus, #111111));outline:0;box-shadow:0 0 0 var(--aeris-focus-ring-width, 3px) var(--aeris-control-focus-ring-color, var(--aeris-focus-ring-color, transparent))}.aeris-color-picker__eyedropper:disabled{cursor:wait;opacity:.64}.aeris-color-picker[data-invalid] .aeris-color-picker__trigger,.aeris-color-picker[data-invalid] .aeris-color-picker__text,.aeris-color-picker__text:user-invalid,.aeris-color-picker__text[aria-invalid=true],.aeris-color-picker__panel-value input[aria-invalid=true]{border-color:var(--aeris-control-invalid-border, var(--aeris-danger, #c81e2a))}.aeris-color-picker[data-invalid] .aeris-color-picker__trigger:focus-visible,.aeris-color-picker[data-invalid] .aeris-color-picker__text:focus,.aeris-color-picker__text:user-invalid:focus,.aeris-color-picker__text[aria-invalid=true]:focus,.aeris-color-picker__panel-value input[aria-invalid=true]:focus{box-shadow:0 0 0 var(--aeris-focus-ring-width, 3px) var(--aeris-control-invalid-focus-ring-color, transparent)}.aeris-color-picker[data-disabled],.aeris-color-picker[data-readonly]{opacity:.72}.aeris-color-picker[data-disabled] .aeris-color-picker__trigger,.aeris-color-picker[data-disabled] .aeris-color-picker__text,.aeris-color-picker[data-disabled] .aeris-color-picker__clear,.aeris-color-picker[data-readonly] .aeris-color-picker__trigger,.aeris-color-picker[data-readonly] .aeris-color-picker__text,.aeris-color-picker[data-readonly] .aeris-color-picker__clear{cursor:not-allowed}@media(max-width:36rem){.aeris-color-picker{grid-template-columns:1fr auto}.aeris-color-picker__text{grid-column:1/-1}.aeris-color-picker__trigger:not([data-swatch-only]){grid-column:1/-1}}@media(prefers-reduced-motion:reduce){.aeris-color-picker__indicator:before{transition:none}.aeris-color-picker__panel{animation:none}}@media(pointer:coarse){input{font-size:var(--aeris-mobile-input-font-size, 1rem)}}\n"],
|
|
1006
|
+
dependencies: [{
|
|
1007
|
+
kind: "directive",
|
|
1008
|
+
type: ɵAerisAppendTo,
|
|
1009
|
+
selector: "[aerisInternalAppendTo]",
|
|
1010
|
+
inputs: [
|
|
1011
|
+
"aerisInternalAppendTo",
|
|
1012
|
+
"aerisInternalAppendToDefault",
|
|
1013
|
+
"aerisInternalAppendToAnchor",
|
|
1014
|
+
"aerisInternalAppendToOffset",
|
|
1015
|
+
"aerisInternalAppendToMatchWidth",
|
|
1016
|
+
"aerisInternalAppendToPlacement",
|
|
1017
|
+
"aerisInternalAppendToAlignment",
|
|
1018
|
+
"aerisInternalAppendToCollisionPadding",
|
|
1019
|
+
"aerisInternalAppendToPositionSelf",
|
|
1020
|
+
"aerisInternalAppendToDismiss"
|
|
1021
|
+
],
|
|
1022
|
+
outputs: ["aerisInternalAppendToOutside"]
|
|
1023
|
+
}]
|
|
1024
|
+
});
|
|
1025
|
+
};
|
|
1026
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1027
|
+
minVersion: "12.0.0",
|
|
1028
|
+
version: "22.2.2",
|
|
1029
|
+
ngImport: i0,
|
|
1030
|
+
type: AerisColorPicker,
|
|
1031
|
+
decorators: [{
|
|
1032
|
+
type: Component,
|
|
1033
|
+
args: [{
|
|
1034
|
+
selector: "aeris-color-picker",
|
|
1035
|
+
imports: [ɵAerisAppendTo],
|
|
1036
|
+
template: `
|
|
749
1037
|
<div
|
|
750
1038
|
class="aeris-color-picker"
|
|
751
1039
|
[attr.data-size]="size()"
|
|
752
1040
|
[attr.data-appearance]="appearance()"
|
|
753
1041
|
[attr.data-disabled]="effectiveDisabled() || null"
|
|
754
1042
|
[attr.data-readonly]="readonly() || null"
|
|
755
|
-
[attr.data-invalid]="
|
|
1043
|
+
[attr.data-invalid]="displayInvalid() || null"
|
|
756
1044
|
[attr.data-fluid]="fluid() || null"
|
|
757
1045
|
[attr.data-open]="isOpen() || null"
|
|
758
1046
|
(focusout)="handleFocusOut($event)"
|
|
@@ -768,9 +1056,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
768
1056
|
[id]="resolvedInputId()"
|
|
769
1057
|
[disabled]="effectiveDisabled() || readonly()"
|
|
770
1058
|
[attr.aria-label]="ariaLabel() || triggerAriaLabel()"
|
|
771
|
-
[attr.aria-labelledby]="
|
|
772
|
-
[attr.aria-describedby]="
|
|
773
|
-
[attr.aria-invalid]="
|
|
1059
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1060
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
1061
|
+
[attr.aria-invalid]="displayInvalid() || null"
|
|
774
1062
|
[attr.aria-required]="required() || null"
|
|
775
1063
|
[attr.aria-expanded]="isOpen()"
|
|
776
1064
|
[attr.aria-controls]="panelId"
|
|
@@ -802,8 +1090,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
802
1090
|
[readOnly]="readonly()"
|
|
803
1091
|
[required]="required()"
|
|
804
1092
|
[attr.aria-label]="textAriaLabel()"
|
|
805
|
-
[attr.aria-describedby]="
|
|
806
|
-
[attr.aria-invalid]="
|
|
1093
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
1094
|
+
[attr.aria-invalid]="displayInvalid() || textInvalid() || null"
|
|
807
1095
|
autocomplete="off"
|
|
808
1096
|
spellcheck="false"
|
|
809
1097
|
(input)="handleTextInput($event)"
|
|
@@ -827,16 +1115,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
827
1115
|
}
|
|
828
1116
|
|
|
829
1117
|
@if (isOpen()) {
|
|
830
|
-
<button
|
|
831
|
-
class="aeris-color-picker__dismiss"
|
|
832
|
-
type="button"
|
|
833
|
-
tabindex="-1"
|
|
834
|
-
[attr.aria-label]="closeButtonAriaLabel()"
|
|
835
|
-
(click)="close(true)"
|
|
836
|
-
></button>
|
|
837
1118
|
<section
|
|
838
1119
|
#pickerPanel
|
|
839
1120
|
class="aeris-color-picker__panel"
|
|
1121
|
+
[aerisInternalAppendTo]="appendTo()"
|
|
1122
|
+
[aerisInternalAppendToDismiss]="dismissOverlay"
|
|
1123
|
+
[aerisInternalAppendToAnchor]="this.triggerButton()?.nativeElement ?? null"
|
|
1124
|
+
[aerisInternalAppendToCollisionPadding]="viewportMargin()"
|
|
1125
|
+
(aerisInternalAppendToOutside)="close(false)"
|
|
840
1126
|
role="dialog"
|
|
841
1127
|
[id]="panelId"
|
|
842
1128
|
[attr.aria-label]="resolvedPanelAriaLabel()"
|
|
@@ -985,208 +1271,562 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
985
1271
|
</section>
|
|
986
1272
|
}
|
|
987
1273
|
</div>
|
|
988
|
-
`,
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
'[attr.data-fluid]': 'fluid() || null',
|
|
996
|
-
}, styles: [":host{--_aeris-color-picker-chevron-mask: var( --aeris-icon-chevron, url(data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20d=%27M7%209.5%2012%2014.5%2017%209.5%27%20fill=%27none%27%20stroke=%27black%27%20stroke-width=%272.4%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27/%3E%3C/svg%3E) );--_aeris-color-picker-eyedropper-mask: var( --aeris-icon-eyedropper, url(data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20d=%27m13.7%205.2%205.1%205.1M15.6%203.3l5.1%205.1-3%203-1.5-1.5-7.7%207.7-3.5%201%201-3.5%207.7-7.7-1.5-1.5%203-3Z%27%20fill=%27none%27%20stroke=%27black%27%20stroke-width=%272%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27/%3E%3C/svg%3E) );display:inline-block;max-width:100%;vertical-align:middle}:host([data-fluid]){width:100%}.aeris-color-picker{--aeris-color-picker-height: var(--aeris-control-height, 2.5rem);--aeris-color-picker-font-size: .9375rem;--aeris-color-picker-panel-width: 20rem;--aeris-color-picker-panel-background: var(--aeris-surface, #fff);--aeris-color-picker-panel-border: var(--aeris-border, #deddd7);--aeris-color-picker-panel-radius: min(var(--aeris-radius-lg, .875rem), 1rem);--aeris-color-picker-panel-shadow: 0 1.25rem 3.5rem rgb(31 35 27 / 22%);--aeris-color-picker-panel-padding: calc(var(--aeris-density-gap, .5rem) + .375rem);display:inline-grid;grid-template-columns:minmax(0,auto) minmax(8rem,1fr) auto;align-items:center;gap:.5rem;max-width:100%;color:var(--aeris-text, #222222);font-size:var(--aeris-color-picker-font-size)}.aeris-color-picker,.aeris-color-picker *,.aeris-color-picker *:before,.aeris-color-picker *:after{box-sizing:border-box}.aeris-color-picker[data-fluid]{width:100%}.aeris-color-picker[data-size=xs]{--aeris-color-picker-height: 1.875rem;--aeris-color-picker-font-size: .75rem}.aeris-color-picker[data-size=sm]{--aeris-color-picker-height: 2.1875rem;--aeris-color-picker-font-size: .8125rem}.aeris-color-picker[data-size=lg]{--aeris-color-picker-height: 2.875rem;--aeris-color-picker-font-size: 1rem}.aeris-color-picker button,.aeris-color-picker input{font:inherit}.aeris-color-picker__trigger,.aeris-color-picker__text{min-height:var(--aeris-color-picker-height);border:1px solid var(--aeris-border-strong, #c7c9c0);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:var(--aeris-surface, #fff);color:inherit}.aeris-color-picker[data-appearance=filled] .aeris-color-picker__trigger,.aeris-color-picker[data-appearance=filled] .aeris-color-picker__text{border-color:transparent;background:var(--aeris-surface-2, #f2f0ec)}.aeris-color-picker__trigger{display:inline-flex;align-items:center;gap:.55rem;min-width:8rem;padding:0 .625rem;text-align:start;cursor:pointer}.aeris-color-picker__trigger[data-swatch-only]{width:var(--aeris-color-picker-height);min-width:var(--aeris-color-picker-height);justify-content:center;padding:0}.aeris-color-picker__swatch{width:calc(var(--aeris-color-picker-height) - .85rem);height:calc(var(--aeris-color-picker-height) - .85rem);flex:0 0 auto;border:0;border-radius:min(var(--aeris-radius-sm, .5rem),.35rem);box-shadow:0 0 0 1px var(--aeris-border-strong, #c7c9c0)}.aeris-color-picker__value{min-width:0;flex:1;overflow:hidden;color:var(--aeris-text-2, #555555);font-weight:650;text-overflow:ellipsis;white-space:nowrap}.aeris-color-picker__indicator{position:relative;width:1rem;height:1rem;flex:0 0 auto;color:var(--aeris-text-2, #555555)}.aeris-color-picker__indicator:before{position:absolute;top:50%;left:50%;width:1rem;height:1rem;background:currentColor;content:\"\";transform:translate(-50%,-50%);transition:transform .16s ease;-webkit-mask:var(--_aeris-color-picker-chevron-mask) center/100% 100% no-repeat;mask:var(--_aeris-color-picker-chevron-mask) center/100% 100% no-repeat}.aeris-color-picker__trigger[data-swatch-only] .aeris-color-picker__indicator{display:none}.aeris-color-picker[data-open] .aeris-color-picker__indicator:before{transform:translate(-50%,-50%) rotate(180deg)}.aeris-color-picker__text{width:100%;min-width:0;padding:0 .75rem}.aeris-color-picker__text::placeholder,.aeris-color-picker__panel-value input::placeholder{color:var(--aeris-text-2, #555555);opacity:.72}.aeris-color-picker__clear,.aeris-color-picker__close,.aeris-color-picker__eyedropper{display:grid;place-items:center;padding:0;border:1px solid var(--aeris-border, #deddd7);background:var(--aeris-surface, #fff);color:var(--aeris-text-2, #555555);cursor:pointer}.aeris-color-picker__clear{width:var(--aeris-color-picker-height);height:var(--aeris-color-picker-height);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem))}.aeris-color-picker__close,.aeris-color-picker__eyedropper{width:2rem;height:2rem;border-color:transparent;border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:transparent}.aeris-color-picker__clear span,.aeris-color-picker__close span{width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem);background:currentColor;-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}.aeris-color-picker__eyedropper span{width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem);background:currentColor;-webkit-mask:var(--_aeris-color-picker-eyedropper-mask) center/100% 100% no-repeat;mask:var(--_aeris-color-picker-eyedropper-mask) center/100% 100% no-repeat}.aeris-color-picker__dismiss{position:fixed;z-index:var(--aeris-color-picker-dismiss-z-index, 999);inset:0;width:100vw;height:100vh;height:100dvh;padding:0;border:0;border-radius:0;background:transparent;cursor:default}.aeris-color-picker__panel{position:fixed;z-index:var(--aeris-color-picker-panel-z-index, 1000);width:min(var(--aeris-color-picker-panel-width),100vw - 1rem);max-height:calc(100vh - 1rem);max-height:calc(100dvh - 1rem);padding:var(--aeris-color-picker-panel-padding);border:1px solid var(--aeris-color-picker-panel-border);border-radius:var(--aeris-color-picker-panel-radius);background:var(--aeris-color-picker-panel-background);box-shadow:var(--aeris-color-picker-panel-shadow);overflow:auto;overscroll-behavior:contain;scrollbar-color:var(--aeris-border-strong, #c7c9c0) transparent;scrollbar-width:thin;visibility:hidden}.aeris-color-picker__panel::-webkit-scrollbar{width:.75rem;height:.75rem}.aeris-color-picker__panel::-webkit-scrollbar-track,.aeris-color-picker__panel::-webkit-scrollbar-corner{background:transparent}.aeris-color-picker__panel::-webkit-scrollbar-thumb{border:3px solid transparent;border-radius:var(--aeris-radius-pill, 999px);background:var(--aeris-border-strong, #c7c9c0);background-clip:content-box}.aeris-color-picker__panel[data-positioned]{animation:aeris-color-picker-panel-in .16s ease-out;visibility:visible}.aeris-color-picker__panel-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.625rem;margin-bottom:.75rem}.aeris-color-picker__panel-actions{display:flex;align-items:center;gap:.125rem;margin-inline-start:auto}.aeris-color-picker__preview{width:2.25rem;height:2.25rem;border:0;border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));box-shadow:0 0 0 1px var(--aeris-border-strong, #c7c9c0)}.aeris-color-picker__panel-header>span:nth-child(2){min-width:0;display:grid;gap:.125rem}.aeris-color-picker__panel-header strong,.aeris-color-picker__panel-header small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aeris-color-picker__panel-header strong{color:var(--aeris-text, #222222);font-size:.8125rem}.aeris-color-picker__panel-header small{color:var(--aeris-text-2, #555555);font-size:.6875rem}.aeris-color-picker__plane{position:relative;height:11rem;border:1px solid color-mix(in srgb,var(--aeris-border-strong, #c7c9c0) 72%,#000);border-radius:calc(var(--aeris-color-picker-panel-radius) - .25rem);background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,var(--aeris-color-picker-plane-hue));box-shadow:inset 0 0 0 1px #ffffff2e;cursor:crosshair;touch-action:none}.aeris-color-picker__plane-thumb{position:absolute;width:.875rem;height:.875rem;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #000000b8,0 .125rem .4rem #00000059;transform:translate(-50%,-50%);pointer-events:none}.aeris-color-picker__hue{display:grid;gap:.375rem;margin-top:.75rem}.aeris-color-picker__hue>span,.aeris-color-picker__panel-value>span,.aeris-color-picker__preset-section>span{display:flex;justify-content:space-between;color:var(--aeris-text-2, #555555);font-size:.6875rem;font-weight:700}.aeris-color-picker__hue output{color:var(--aeris-text, #222222);font:inherit}.aeris-color-picker__hue input[type=range]{width:100%;height:1.25rem;margin:0;padding:0;border:0;background:transparent;direction:ltr;appearance:none;cursor:pointer}.aeris-color-picker__hue input[type=range]::-webkit-slider-runnable-track{height:.625rem;border:1px solid rgba(0,0,0,.16);border-radius:999px;background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.aeris-color-picker__hue input[type=range]::-moz-range-track{height:.625rem;border:1px solid rgba(0,0,0,.16);border-radius:999px;background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.aeris-color-picker__hue input[type=range]::-webkit-slider-thumb{width:1.125rem;height:1.125rem;margin-top:-.3125rem;border:2px solid #fff;border-radius:50%;background:var(--aeris-color-picker-hue-color);box-shadow:0 0 0 1px #00000047,0 .125rem .35rem #0000003d;appearance:none}.aeris-color-picker__hue input[type=range]::-moz-range-thumb{width:.875rem;height:.875rem;border:2px solid #fff;border-radius:50%;background:var(--aeris-color-picker-hue-color);box-shadow:0 0 0 1px #00000047,0 .125rem .35rem #0000003d}.aeris-color-picker__formats{display:flex;gap:.25rem;margin-top:.75rem;padding:.25rem;border:1px solid var(--aeris-border, #deddd7);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:var(--aeris-surface-2, #f2f0ec)}.aeris-color-picker__formats button{min-width:0;flex:1;min-height:1.875rem;padding:0 .5rem;border:0;border-radius:max(.25rem,var(--aeris-radius-control, .5rem) - .2rem);background:transparent;color:var(--aeris-text-2, #555555);font-size:.6875rem;font-weight:750;cursor:pointer}.aeris-color-picker__formats button[aria-pressed=true]{background:var(--aeris-surface, #fff);color:var(--aeris-text, #222222);box-shadow:0 .125rem .4rem #1f231b1a}.aeris-color-picker__panel-value{display:grid;gap:.375rem;margin-top:.75rem}.aeris-color-picker__panel-value input{width:100%;min-height:2.25rem;padding:0 .625rem;border:1px solid var(--aeris-border-strong, #c7c9c0);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:var(--aeris-surface, #fff);color:var(--aeris-text, #222222);font-size:.8125rem}.aeris-color-picker__preset-section{display:grid;gap:.5rem;margin-top:.75rem}.aeris-color-picker__presets{display:flex;flex-wrap:wrap;gap:.45rem}.aeris-color-picker__presets button{width:1.75rem;height:1.75rem;padding:0;border:0;border-radius:min(var(--aeris-radius-sm, .5rem),.45rem);box-shadow:0 0 0 1px var(--aeris-border-strong, #c7c9c0);cursor:pointer}.aeris-color-picker__presets button[aria-pressed=true]{outline:2px solid var(--aeris-focus, #536437);outline-offset:2px}.aeris-color-picker__trigger:hover,.aeris-color-picker__clear:hover,.aeris-color-picker__panel-value input:hover{border-color:var(--aeris-primary, #879566)}.aeris-color-picker__presets button:hover{box-shadow:0 0 0 1px var(--aeris-primary, #879566)}.aeris-color-picker__close:hover,.aeris-color-picker__eyedropper:hover,.aeris-color-picker__formats button:hover{background:var(--aeris-surface-2, #f2f0ec);color:var(--aeris-text, #222222)}.aeris-color-picker__trigger:focus-visible,.aeris-color-picker__text:focus,.aeris-color-picker__clear:focus-visible,.aeris-color-picker__close:focus-visible,.aeris-color-picker__eyedropper:focus-visible,.aeris-color-picker__formats button:focus-visible,.aeris-color-picker__panel-value input:focus,.aeris-color-picker__presets button:focus-visible,.aeris-color-picker__plane:focus-visible,.aeris-color-picker__hue input:focus-visible{border-color:var(--aeris-focus, #536437);outline:3px solid color-mix(in srgb,var(--aeris-focus, #536437) 24%,transparent);outline-offset:1px}.aeris-color-picker__eyedropper:disabled{cursor:wait;opacity:.64}.aeris-color-picker[data-invalid] .aeris-color-picker__trigger,.aeris-color-picker[data-invalid] .aeris-color-picker__text,.aeris-color-picker__text[aria-invalid=true],.aeris-color-picker__panel-value input[aria-invalid=true]{border-color:var(--aeris-danger, #c81e2a)}.aeris-color-picker[data-disabled],.aeris-color-picker[data-readonly]{opacity:.72}.aeris-color-picker[data-disabled] .aeris-color-picker__trigger,.aeris-color-picker[data-disabled] .aeris-color-picker__text,.aeris-color-picker[data-disabled] .aeris-color-picker__clear,.aeris-color-picker[data-readonly] .aeris-color-picker__trigger,.aeris-color-picker[data-readonly] .aeris-color-picker__text,.aeris-color-picker[data-readonly] .aeris-color-picker__clear{cursor:not-allowed}@keyframes aeris-color-picker-panel-in{0%{opacity:0;transform:translateY(-.25rem) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}@media(max-width:36rem){.aeris-color-picker{grid-template-columns:1fr auto}.aeris-color-picker__text{grid-column:1/-1}.aeris-color-picker__trigger:not([data-swatch-only]){grid-column:1/-1}}@media(prefers-reduced-motion:reduce){.aeris-color-picker__indicator:before{transition:none}.aeris-color-picker__panel{animation:none}}\n"] }]
|
|
997
|
-
|
|
1274
|
+
`,
|
|
1275
|
+
providers: [{
|
|
1276
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1277
|
+
useExisting: forwardRef(() => AerisColorPicker),
|
|
1278
|
+
multi: true
|
|
1279
|
+
}],
|
|
1280
|
+
host: { "[attr.data-fluid]": "fluid() || null" },
|
|
1281
|
+
styles: [":host{--_aeris-color-picker-chevron-mask: var( --aeris-icon-chevron, url(data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20d=%27M7%209.5%2012%2014.5%2017%209.5%27%20fill=%27none%27%20stroke=%27black%27%20stroke-width=%272.4%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27/%3E%3C/svg%3E) );--_aeris-color-picker-eyedropper-mask: var( --aeris-icon-eyedropper, url(data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20d=%27m13.7%205.2%205.1%205.1M15.6%203.3l5.1%205.1-3%203-1.5-1.5-7.7%207.7-3.5%201%201-3.5%207.7-7.7-1.5-1.5%203-3Z%27%20fill=%27none%27%20stroke=%27black%27%20stroke-width=%272%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27/%3E%3C/svg%3E) );display:inline-block;max-width:100%;vertical-align:middle}:host([data-fluid]){width:100%}.aeris-color-picker{--aeris-color-picker-height: var(--aeris-control-height, 2.625rem);--aeris-color-picker-font-size: var(--aeris-font-size-lg, .875rem);--aeris-color-picker-panel-width: 20rem;--aeris-color-picker-panel-background: var(--aeris-surface, #fff);--aeris-color-picker-panel-border: var(--aeris-border, var(--aeris-border, #efefef));--aeris-color-picker-panel-radius: var(--aeris-radius-overlay, var(--aeris-radius-md, .6875rem));--aeris-color-picker-panel-shadow: 0 1.25rem 3.5rem rgb(31 35 27 / 22%);--aeris-color-picker-panel-padding: calc(var(--aeris-density-gap, .5rem) + .375rem);display:inline-grid;grid-template-columns:minmax(0,auto) minmax(8rem,1fr) auto;align-items:center;gap:.5rem;max-width:100%;color:var(--aeris-text, #111111);font-size:var(--aeris-color-picker-font-size)}.aeris-color-picker,.aeris-color-picker *,.aeris-color-picker *:before,.aeris-color-picker *:after{box-sizing:border-box}.aeris-color-picker[data-fluid]{width:100%}.aeris-color-picker[data-size=xs]{--aeris-color-picker-height: calc(var(--aeris-control-height, 2.625rem) - .875rem);--aeris-color-picker-font-size: var(--aeris-font-size-sm, .75rem)}.aeris-color-picker[data-size=sm]{--aeris-color-picker-height: calc(var(--aeris-control-height, 2.625rem) - .5rem);--aeris-color-picker-font-size: var(--aeris-font-size-md, .8125rem)}.aeris-color-picker[data-size=lg]{--aeris-color-picker-height: calc(var(--aeris-control-height, 2.625rem) + .5rem);--aeris-color-picker-font-size: var(--aeris-font-size-2xl, 1rem)}.aeris-color-picker button,.aeris-color-picker input{font:inherit}.aeris-color-picker__trigger,.aeris-color-picker__text{min-height:var(--aeris-color-picker-height);border:1px solid var(--aeris-border, #efefef);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:var(--aeris-surface, #fff);color:inherit}.aeris-color-picker[data-appearance=filled] .aeris-color-picker__trigger,.aeris-color-picker[data-appearance=filled] .aeris-color-picker__text{border-color:transparent;background:var(--aeris-surface-2, #f3f3f3)}.aeris-color-picker__trigger{display:inline-flex;align-items:center;gap:.55rem;min-width:8rem;padding:0 .625rem;text-align:start;cursor:pointer}.aeris-color-picker__trigger[data-swatch-only]{width:var(--aeris-color-picker-height);min-width:var(--aeris-color-picker-height);justify-content:center;padding:0}.aeris-color-picker__swatch{width:calc(var(--aeris-color-picker-height) - .85rem);height:calc(var(--aeris-color-picker-height) - .85rem);flex:0 0 auto;border:0;border-radius:min(var(--aeris-radius-sm, .5rem),.35rem);box-shadow:0 0 0 1px var(--aeris-border, #efefef)}.aeris-color-picker__value{min-width:0;flex:1;overflow:hidden;color:var(--aeris-text-2, #454545);font-weight:var(--aeris-font-weight-bold, 700);text-overflow:ellipsis;white-space:nowrap}.aeris-color-picker__indicator{position:relative;width:1rem;height:1rem;flex:0 0 auto;color:var(--aeris-text-2, #454545)}.aeris-color-picker__indicator:before{position:absolute;top:50%;left:50%;width:1rem;height:1rem;background:currentColor;content:\"\";transform:translate(-50%,-50%);transition:transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease);-webkit-mask:var(--_aeris-color-picker-chevron-mask) center/100% 100% no-repeat;mask:var(--_aeris-color-picker-chevron-mask) center/100% 100% no-repeat}.aeris-color-picker__trigger[data-swatch-only] .aeris-color-picker__indicator{display:none}.aeris-color-picker[data-open] .aeris-color-picker__indicator:before{transform:translate(-50%,-50%) rotate(180deg)}.aeris-color-picker__text{width:100%;min-width:0;padding:0 .75rem;box-shadow:none}.aeris-color-picker__text::placeholder,.aeris-color-picker__panel-value input::placeholder{color:var(--aeris-text-2, #454545);opacity:.72}.aeris-color-picker__clear,.aeris-color-picker__close,.aeris-color-picker__eyedropper{display:grid;place-items:center;padding:0;border:1px solid var(--aeris-border, #efefef);background:var(--aeris-surface, #fff);color:var(--aeris-text-2, #454545);cursor:pointer}.aeris-color-picker__clear{width:1.5rem;height:1.5rem;border:0;border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:transparent}.aeris-color-picker__close,.aeris-color-picker__eyedropper{width:2rem;height:2rem;border-color:transparent;border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:transparent}.aeris-color-picker__clear span,.aeris-color-picker__close span{width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem);background:currentColor;-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}.aeris-color-picker__eyedropper span{width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem);background:currentColor;-webkit-mask:var(--_aeris-color-picker-eyedropper-mask) center/100% 100% no-repeat;mask:var(--_aeris-color-picker-eyedropper-mask) center/100% 100% no-repeat}.aeris-color-picker__panel{position:fixed;z-index:var(--aeris-color-picker-panel-z-index, 1000);width:min(var(--aeris-color-picker-panel-width),100vw - 1rem);max-height:calc(100vh - 1rem);max-height:calc(100dvh - 1rem);padding:var(--aeris-color-picker-panel-padding);border:1px solid var(--aeris-color-picker-panel-border);border-radius:var(--aeris-color-picker-panel-radius);background:var(--aeris-color-picker-panel-background);box-shadow:var(--aeris-color-picker-panel-shadow);overflow:auto;overscroll-behavior:contain;scrollbar-color:var(--aeris-border, #efefef) transparent;scrollbar-width:thin;visibility:hidden}.aeris-color-picker__panel::-webkit-scrollbar{width:.75rem;height:.75rem}.aeris-color-picker__panel::-webkit-scrollbar-track,.aeris-color-picker__panel::-webkit-scrollbar-corner{background:transparent}.aeris-color-picker__panel::-webkit-scrollbar-thumb{border:3px solid transparent;border-radius:var(--aeris-radius-pill, 999px);background:var(--aeris-border, #efefef);background-clip:content-box}.aeris-color-picker__panel[data-positioned]{visibility:visible}.aeris-color-picker__panel-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.625rem;margin-bottom:.75rem}.aeris-color-picker__panel-actions{display:flex;align-items:center;gap:.125rem;margin-inline-start:auto}.aeris-color-picker__preview{width:2.25rem;height:2.25rem;border:0;border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));box-shadow:0 0 0 1px var(--aeris-border, #efefef)}.aeris-color-picker__panel-header>span:nth-child(2){min-width:0;display:grid;gap:.125rem}.aeris-color-picker__panel-header strong,.aeris-color-picker__panel-header small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aeris-color-picker__panel-header strong{color:var(--aeris-text, #111111);font-size:var(--aeris-font-size-md, .8125rem)}.aeris-color-picker__panel-header small{color:var(--aeris-text-2, #454545);font-size:var(--aeris-font-size-xs, .6875rem)}.aeris-color-picker__plane{position:relative;height:11rem;border:1px solid color-mix(in srgb,var(--aeris-border, #efefef) 72%,#000);border-radius:calc(var(--aeris-color-picker-panel-radius) - .25rem);background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,var(--aeris-color-picker-plane-hue));box-shadow:inset 0 0 0 1px #ffffff2e;cursor:crosshair;touch-action:none}.aeris-color-picker__plane-thumb{position:absolute;width:.875rem;height:.875rem;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #000000b8,0 .125rem .4rem #00000059;transform:translate(-50%,-50%);pointer-events:none}.aeris-color-picker__hue{display:grid;gap:.375rem;margin-top:.75rem}.aeris-color-picker__hue>span,.aeris-color-picker__panel-value>span,.aeris-color-picker__preset-section>span{display:flex;justify-content:space-between;color:var(--aeris-text-2, #454545);font-size:var(--aeris-font-size-xs, .6875rem);font-weight:var(--aeris-font-weight-bold, 700)}.aeris-color-picker__hue output{color:var(--aeris-text, #111111);font:inherit}.aeris-color-picker__hue input[type=range]{width:100%;height:1.25rem;margin:0;padding:0;border:0;background:transparent;direction:ltr;appearance:none;cursor:pointer}.aeris-color-picker__hue input[type=range]::-webkit-slider-runnable-track{height:.625rem;border:1px solid rgba(0,0,0,.16);border-radius:var(--aeris-radius-pill, 999px);background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.aeris-color-picker__hue input[type=range]::-moz-range-track{height:.625rem;border:1px solid rgba(0,0,0,.16);border-radius:var(--aeris-radius-pill, 999px);background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.aeris-color-picker__hue input[type=range]::-webkit-slider-thumb{width:1.125rem;height:1.125rem;margin-top:-.3125rem;border:2px solid #fff;border-radius:50%;background:var(--aeris-color-picker-hue-color);box-shadow:0 0 0 1px #00000047,0 .125rem .35rem #0000003d;appearance:none}.aeris-color-picker__hue input[type=range]::-moz-range-thumb{width:.875rem;height:.875rem;border:2px solid #fff;border-radius:50%;background:var(--aeris-color-picker-hue-color);box-shadow:0 0 0 1px #00000047,0 .125rem .35rem #0000003d}.aeris-color-picker__formats{display:flex;gap:.25rem;margin-top:.75rem;padding:.25rem;border:1px solid var(--aeris-border, #efefef);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:var(--aeris-surface-2, #f3f3f3)}.aeris-color-picker__formats button{min-width:0;flex:1;min-height:1.875rem;padding:0 .5rem;border:0;border-radius:var(--aeris-radius-item, var(--aeris-radius-sm, .4375rem));background:transparent;color:var(--aeris-text-2, #454545);font-size:var(--aeris-font-size-xs, .6875rem);font-weight:var(--aeris-font-weight-bold, 700);cursor:pointer}.aeris-color-picker__formats button[aria-pressed=true]{background:var(--aeris-surface, #fff);color:var(--aeris-text, #111111);box-shadow:0 .125rem .4rem #1f231b1a}.aeris-color-picker__panel-value{display:grid;gap:.375rem;margin-top:.75rem}.aeris-color-picker__panel-value input{width:100%;min-height:2.25rem;padding:0 .625rem;border:1px solid var(--aeris-border, #efefef);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .5rem));background:var(--aeris-surface, #fff);color:var(--aeris-text, #111111);font-size:var(--aeris-font-size-md, .8125rem)}.aeris-color-picker__preset-section{display:grid;gap:.5rem;margin-top:.75rem}.aeris-color-picker__presets{display:flex;flex-wrap:wrap;gap:.45rem}.aeris-color-picker__presets button{width:1.75rem;height:1.75rem;padding:0;border:0;border-radius:min(var(--aeris-radius-sm, .5rem),.45rem);box-shadow:0 0 0 1px var(--aeris-border, #efefef);cursor:pointer}.aeris-color-picker__presets button[aria-pressed=true]{outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-focus, #111111);outline-offset:var(--aeris-focus-ring-offset, 2px)}@media(hover:hover){.aeris-color-picker__trigger:hover,.aeris-color-picker__panel-value input:hover{border-color:var(--aeris-control-hover-border, var(--aeris-primary, #111111))}}.aeris-color-picker__clear:focus-visible{background:var(--aeris-surface-2, #f3f3f3);color:var(--aeris-text, #111111)}@media(hover:hover){.aeris-color-picker__clear:hover{background:var(--aeris-surface-2, #f3f3f3);color:var(--aeris-text, #111111)}}.aeris-color-picker__clear:focus-visible{outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-focus, #111111);outline-offset:1px}@media(hover:hover){.aeris-color-picker__presets button:hover{box-shadow:0 0 0 1px var(--aeris-primary, #111111)}}@media(hover:hover){.aeris-color-picker__close:hover,.aeris-color-picker__eyedropper:hover,.aeris-color-picker__formats button:hover{background:var(--aeris-surface-2, #f3f3f3);color:var(--aeris-text, #111111)}}.aeris-color-picker__close:focus-visible,.aeris-color-picker__eyedropper:focus-visible,.aeris-color-picker__formats button:focus-visible,.aeris-color-picker__presets button:focus-visible,.aeris-color-picker__plane:focus-visible,.aeris-color-picker__hue input:focus-visible{outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-focus-ring-color, transparent);outline-offset:var(--aeris-focus-ring-offset, 2px)}.aeris-color-picker__trigger:focus-visible,.aeris-color-picker__text:focus,.aeris-color-picker__panel-value input:focus{border-color:var(--aeris-control-focus-border, var(--aeris-focus, #111111));outline:0;box-shadow:0 0 0 var(--aeris-focus-ring-width, 3px) var(--aeris-control-focus-ring-color, var(--aeris-focus-ring-color, transparent))}.aeris-color-picker__eyedropper:disabled{cursor:wait;opacity:.64}.aeris-color-picker[data-invalid] .aeris-color-picker__trigger,.aeris-color-picker[data-invalid] .aeris-color-picker__text,.aeris-color-picker__text:user-invalid,.aeris-color-picker__text[aria-invalid=true],.aeris-color-picker__panel-value input[aria-invalid=true]{border-color:var(--aeris-control-invalid-border, var(--aeris-danger, #c81e2a))}.aeris-color-picker[data-invalid] .aeris-color-picker__trigger:focus-visible,.aeris-color-picker[data-invalid] .aeris-color-picker__text:focus,.aeris-color-picker__text:user-invalid:focus,.aeris-color-picker__text[aria-invalid=true]:focus,.aeris-color-picker__panel-value input[aria-invalid=true]:focus{box-shadow:0 0 0 var(--aeris-focus-ring-width, 3px) var(--aeris-control-invalid-focus-ring-color, transparent)}.aeris-color-picker[data-disabled],.aeris-color-picker[data-readonly]{opacity:.72}.aeris-color-picker[data-disabled] .aeris-color-picker__trigger,.aeris-color-picker[data-disabled] .aeris-color-picker__text,.aeris-color-picker[data-disabled] .aeris-color-picker__clear,.aeris-color-picker[data-readonly] .aeris-color-picker__trigger,.aeris-color-picker[data-readonly] .aeris-color-picker__text,.aeris-color-picker[data-readonly] .aeris-color-picker__clear{cursor:not-allowed}@media(max-width:36rem){.aeris-color-picker{grid-template-columns:1fr auto}.aeris-color-picker__text{grid-column:1/-1}.aeris-color-picker__trigger:not([data-swatch-only]){grid-column:1/-1}}@media(prefers-reduced-motion:reduce){.aeris-color-picker__indicator:before{transition:none}.aeris-color-picker__panel{animation:none}}@media(pointer:coarse){input{font-size:var(--aeris-mobile-input-font-size, 1rem)}}\n"]
|
|
1282
|
+
}]
|
|
1283
|
+
}],
|
|
1284
|
+
ctorParameters: () => [],
|
|
1285
|
+
propDecorators: {
|
|
1286
|
+
pickerPanel: [{
|
|
1287
|
+
type: i0.ViewChild,
|
|
1288
|
+
args: ["pickerPanel", { isSignal: true }]
|
|
1289
|
+
}],
|
|
1290
|
+
panelPortal: [{
|
|
1291
|
+
type: i0.ViewChild,
|
|
1292
|
+
args: [i0.forwardRef(() => ɵAerisAppendTo), { isSignal: true }]
|
|
1293
|
+
}],
|
|
1294
|
+
colorPlane: [{
|
|
1295
|
+
type: i0.ViewChild,
|
|
1296
|
+
args: ["colorPlane", { isSignal: true }]
|
|
1297
|
+
}],
|
|
1298
|
+
triggerButton: [{
|
|
1299
|
+
type: i0.ViewChild,
|
|
1300
|
+
args: ["triggerButton", { isSignal: true }]
|
|
1301
|
+
}],
|
|
1302
|
+
value: [{
|
|
1303
|
+
type: i0.Input,
|
|
1304
|
+
args: [{
|
|
1305
|
+
isSignal: true,
|
|
1306
|
+
alias: "value",
|
|
1307
|
+
required: false
|
|
1308
|
+
}]
|
|
1309
|
+
}, {
|
|
1310
|
+
type: i0.Output,
|
|
1311
|
+
args: ["valueChange"]
|
|
1312
|
+
}],
|
|
1313
|
+
format: [{
|
|
1314
|
+
type: i0.Input,
|
|
1315
|
+
args: [{
|
|
1316
|
+
isSignal: true,
|
|
1317
|
+
alias: "format",
|
|
1318
|
+
required: false
|
|
1319
|
+
}]
|
|
1320
|
+
}, {
|
|
1321
|
+
type: i0.Output,
|
|
1322
|
+
args: ["formatChange"]
|
|
1323
|
+
}],
|
|
1324
|
+
inputId: [{
|
|
1325
|
+
type: i0.Input,
|
|
1326
|
+
args: [{
|
|
1327
|
+
isSignal: true,
|
|
1328
|
+
alias: "inputId",
|
|
1329
|
+
required: false
|
|
1330
|
+
}]
|
|
1331
|
+
}],
|
|
1332
|
+
name: [{
|
|
1333
|
+
type: i0.Input,
|
|
1334
|
+
args: [{
|
|
1335
|
+
isSignal: true,
|
|
1336
|
+
alias: "name",
|
|
1337
|
+
required: false
|
|
1338
|
+
}]
|
|
1339
|
+
}],
|
|
1340
|
+
formats: [{
|
|
1341
|
+
type: i0.Input,
|
|
1342
|
+
args: [{
|
|
1343
|
+
isSignal: true,
|
|
1344
|
+
alias: "formats",
|
|
1345
|
+
required: false
|
|
1346
|
+
}]
|
|
1347
|
+
}],
|
|
1348
|
+
appendTo: [{
|
|
1349
|
+
type: i0.Input,
|
|
1350
|
+
args: [{
|
|
1351
|
+
isSignal: true,
|
|
1352
|
+
alias: "appendTo",
|
|
1353
|
+
required: false
|
|
1354
|
+
}]
|
|
1355
|
+
}],
|
|
1356
|
+
viewportMargin: [{
|
|
1357
|
+
type: i0.Input,
|
|
1358
|
+
args: [{
|
|
1359
|
+
isSignal: true,
|
|
1360
|
+
alias: "viewportMargin",
|
|
1361
|
+
required: false
|
|
1362
|
+
}]
|
|
1363
|
+
}],
|
|
1364
|
+
placeholder: [{
|
|
1365
|
+
type: i0.Input,
|
|
1366
|
+
args: [{
|
|
1367
|
+
isSignal: true,
|
|
1368
|
+
alias: "placeholder",
|
|
1369
|
+
required: false
|
|
1370
|
+
}]
|
|
1371
|
+
}],
|
|
1372
|
+
ariaLabel: [{
|
|
1373
|
+
type: i0.Input,
|
|
1374
|
+
args: [{
|
|
1375
|
+
isSignal: true,
|
|
1376
|
+
alias: "ariaLabel",
|
|
1377
|
+
required: false
|
|
1378
|
+
}]
|
|
1379
|
+
}],
|
|
1380
|
+
ariaLabelledBy: [{
|
|
1381
|
+
type: i0.Input,
|
|
1382
|
+
args: [{
|
|
1383
|
+
isSignal: true,
|
|
1384
|
+
alias: "ariaLabelledBy",
|
|
1385
|
+
required: false
|
|
1386
|
+
}]
|
|
1387
|
+
}],
|
|
1388
|
+
ariaDescribedBy: [{
|
|
1389
|
+
type: i0.Input,
|
|
1390
|
+
args: [{
|
|
1391
|
+
isSignal: true,
|
|
1392
|
+
alias: "ariaDescribedBy",
|
|
1393
|
+
required: false
|
|
1394
|
+
}]
|
|
1395
|
+
}],
|
|
1396
|
+
triggerAriaLabel: [{
|
|
1397
|
+
type: i0.Input,
|
|
1398
|
+
args: [{
|
|
1399
|
+
isSignal: true,
|
|
1400
|
+
alias: "triggerAriaLabel",
|
|
1401
|
+
required: false
|
|
1402
|
+
}]
|
|
1403
|
+
}],
|
|
1404
|
+
nativeAriaLabel: [{
|
|
1405
|
+
type: i0.Input,
|
|
1406
|
+
args: [{
|
|
1407
|
+
isSignal: true,
|
|
1408
|
+
alias: "nativeAriaLabel",
|
|
1409
|
+
required: false
|
|
1410
|
+
}]
|
|
1411
|
+
}],
|
|
1412
|
+
panelAriaLabel: [{
|
|
1413
|
+
type: i0.Input,
|
|
1414
|
+
args: [{
|
|
1415
|
+
isSignal: true,
|
|
1416
|
+
alias: "panelAriaLabel",
|
|
1417
|
+
required: false
|
|
1418
|
+
}]
|
|
1419
|
+
}],
|
|
1420
|
+
textAriaLabel: [{
|
|
1421
|
+
type: i0.Input,
|
|
1422
|
+
args: [{
|
|
1423
|
+
isSignal: true,
|
|
1424
|
+
alias: "textAriaLabel",
|
|
1425
|
+
required: false
|
|
1426
|
+
}]
|
|
1427
|
+
}],
|
|
1428
|
+
formatAriaLabel: [{
|
|
1429
|
+
type: i0.Input,
|
|
1430
|
+
args: [{
|
|
1431
|
+
isSignal: true,
|
|
1432
|
+
alias: "formatAriaLabel",
|
|
1433
|
+
required: false
|
|
1434
|
+
}]
|
|
1435
|
+
}],
|
|
1436
|
+
hueAriaLabel: [{
|
|
1437
|
+
type: i0.Input,
|
|
1438
|
+
args: [{
|
|
1439
|
+
isSignal: true,
|
|
1440
|
+
alias: "hueAriaLabel",
|
|
1441
|
+
required: false
|
|
1442
|
+
}]
|
|
1443
|
+
}],
|
|
1444
|
+
planeAriaLabel: [{
|
|
1445
|
+
type: i0.Input,
|
|
1446
|
+
args: [{
|
|
1447
|
+
isSignal: true,
|
|
1448
|
+
alias: "planeAriaLabel",
|
|
1449
|
+
required: false
|
|
1450
|
+
}]
|
|
1451
|
+
}],
|
|
1452
|
+
presetsAriaLabel: [{
|
|
1453
|
+
type: i0.Input,
|
|
1454
|
+
args: [{
|
|
1455
|
+
isSignal: true,
|
|
1456
|
+
alias: "presetsAriaLabel",
|
|
1457
|
+
required: false
|
|
1458
|
+
}]
|
|
1459
|
+
}],
|
|
1460
|
+
presetsLabel: [{
|
|
1461
|
+
type: i0.Input,
|
|
1462
|
+
args: [{
|
|
1463
|
+
isSignal: true,
|
|
1464
|
+
alias: "presetsLabel",
|
|
1465
|
+
required: false
|
|
1466
|
+
}]
|
|
1467
|
+
}],
|
|
1468
|
+
emptyLabel: [{
|
|
1469
|
+
type: i0.Input,
|
|
1470
|
+
args: [{
|
|
1471
|
+
isSignal: true,
|
|
1472
|
+
alias: "emptyLabel",
|
|
1473
|
+
required: false
|
|
1474
|
+
}]
|
|
1475
|
+
}],
|
|
1476
|
+
clearButtonAriaLabel: [{
|
|
1477
|
+
type: i0.Input,
|
|
1478
|
+
args: [{
|
|
1479
|
+
isSignal: true,
|
|
1480
|
+
alias: "clearButtonAriaLabel",
|
|
1481
|
+
required: false
|
|
1482
|
+
}]
|
|
1483
|
+
}],
|
|
1484
|
+
closeButtonAriaLabel: [{
|
|
1485
|
+
type: i0.Input,
|
|
1486
|
+
args: [{
|
|
1487
|
+
isSignal: true,
|
|
1488
|
+
alias: "closeButtonAriaLabel",
|
|
1489
|
+
required: false
|
|
1490
|
+
}]
|
|
1491
|
+
}],
|
|
1492
|
+
eyeDropperAriaLabel: [{
|
|
1493
|
+
type: i0.Input,
|
|
1494
|
+
args: [{
|
|
1495
|
+
isSignal: true,
|
|
1496
|
+
alias: "eyeDropperAriaLabel",
|
|
1497
|
+
required: false
|
|
1498
|
+
}]
|
|
1499
|
+
}],
|
|
1500
|
+
size: [{
|
|
1501
|
+
type: i0.Input,
|
|
1502
|
+
args: [{
|
|
1503
|
+
isSignal: true,
|
|
1504
|
+
alias: "size",
|
|
1505
|
+
required: false
|
|
1506
|
+
}]
|
|
1507
|
+
}],
|
|
1508
|
+
appearance: [{
|
|
1509
|
+
type: i0.Input,
|
|
1510
|
+
args: [{
|
|
1511
|
+
isSignal: true,
|
|
1512
|
+
alias: "appearance",
|
|
1513
|
+
required: false
|
|
1514
|
+
}]
|
|
1515
|
+
}],
|
|
1516
|
+
presets: [{
|
|
1517
|
+
type: i0.Input,
|
|
1518
|
+
args: [{
|
|
1519
|
+
isSignal: true,
|
|
1520
|
+
alias: "presets",
|
|
1521
|
+
required: false
|
|
1522
|
+
}]
|
|
1523
|
+
}],
|
|
1524
|
+
showInput: [{
|
|
1525
|
+
type: i0.Input,
|
|
1526
|
+
args: [{
|
|
1527
|
+
isSignal: true,
|
|
1528
|
+
alias: "showInput",
|
|
1529
|
+
required: false
|
|
1530
|
+
}]
|
|
1531
|
+
}],
|
|
1532
|
+
showValue: [{
|
|
1533
|
+
type: i0.Input,
|
|
1534
|
+
args: [{
|
|
1535
|
+
isSignal: true,
|
|
1536
|
+
alias: "showValue",
|
|
1537
|
+
required: false
|
|
1538
|
+
}]
|
|
1539
|
+
}],
|
|
1540
|
+
showFormat: [{
|
|
1541
|
+
type: i0.Input,
|
|
1542
|
+
args: [{
|
|
1543
|
+
isSignal: true,
|
|
1544
|
+
alias: "showFormat",
|
|
1545
|
+
required: false
|
|
1546
|
+
}]
|
|
1547
|
+
}],
|
|
1548
|
+
showEyeDropper: [{
|
|
1549
|
+
type: i0.Input,
|
|
1550
|
+
args: [{
|
|
1551
|
+
isSignal: true,
|
|
1552
|
+
alias: "showEyeDropper",
|
|
1553
|
+
required: false
|
|
1554
|
+
}]
|
|
1555
|
+
}],
|
|
1556
|
+
clearable: [{
|
|
1557
|
+
type: i0.Input,
|
|
1558
|
+
args: [{
|
|
1559
|
+
isSignal: true,
|
|
1560
|
+
alias: "clearable",
|
|
1561
|
+
required: false
|
|
1562
|
+
}]
|
|
1563
|
+
}],
|
|
1564
|
+
disabled: [{
|
|
1565
|
+
type: i0.Input,
|
|
1566
|
+
args: [{
|
|
1567
|
+
isSignal: true,
|
|
1568
|
+
alias: "disabled",
|
|
1569
|
+
required: false
|
|
1570
|
+
}]
|
|
1571
|
+
}],
|
|
1572
|
+
readonly: [{
|
|
1573
|
+
type: i0.Input,
|
|
1574
|
+
args: [{
|
|
1575
|
+
isSignal: true,
|
|
1576
|
+
alias: "readonly",
|
|
1577
|
+
required: false
|
|
1578
|
+
}]
|
|
1579
|
+
}],
|
|
1580
|
+
required: [{
|
|
1581
|
+
type: i0.Input,
|
|
1582
|
+
args: [{
|
|
1583
|
+
isSignal: true,
|
|
1584
|
+
alias: "required",
|
|
1585
|
+
required: false
|
|
1586
|
+
}]
|
|
1587
|
+
}],
|
|
1588
|
+
invalid: [{
|
|
1589
|
+
type: i0.Input,
|
|
1590
|
+
args: [{
|
|
1591
|
+
isSignal: true,
|
|
1592
|
+
alias: "invalid",
|
|
1593
|
+
required: false
|
|
1594
|
+
}]
|
|
1595
|
+
}],
|
|
1596
|
+
touched: [{
|
|
1597
|
+
type: i0.Input,
|
|
1598
|
+
args: [{
|
|
1599
|
+
isSignal: true,
|
|
1600
|
+
alias: "touched",
|
|
1601
|
+
required: false
|
|
1602
|
+
}]
|
|
1603
|
+
}],
|
|
1604
|
+
fluid: [{
|
|
1605
|
+
type: i0.Input,
|
|
1606
|
+
args: [{
|
|
1607
|
+
isSignal: true,
|
|
1608
|
+
alias: "fluid",
|
|
1609
|
+
required: false
|
|
1610
|
+
}]
|
|
1611
|
+
}],
|
|
1612
|
+
changed: [{
|
|
1613
|
+
type: i0.Output,
|
|
1614
|
+
args: ["changed"]
|
|
1615
|
+
}],
|
|
1616
|
+
focused: [{
|
|
1617
|
+
type: i0.Output,
|
|
1618
|
+
args: ["focused"]
|
|
1619
|
+
}],
|
|
1620
|
+
blurred: [{
|
|
1621
|
+
type: i0.Output,
|
|
1622
|
+
args: ["blurred"]
|
|
1623
|
+
}],
|
|
1624
|
+
touch: [{
|
|
1625
|
+
type: i0.Output,
|
|
1626
|
+
args: ["touch"]
|
|
1627
|
+
}],
|
|
1628
|
+
cleared: [{
|
|
1629
|
+
type: i0.Output,
|
|
1630
|
+
args: ["cleared"]
|
|
1631
|
+
}],
|
|
1632
|
+
opened: [{
|
|
1633
|
+
type: i0.Output,
|
|
1634
|
+
args: ["opened"]
|
|
1635
|
+
}],
|
|
1636
|
+
closed: [{
|
|
1637
|
+
type: i0.Output,
|
|
1638
|
+
args: ["closed"]
|
|
1639
|
+
}]
|
|
1640
|
+
}
|
|
1641
|
+
});
|
|
998
1642
|
function isColorFormat(value) {
|
|
999
|
-
|
|
1643
|
+
return value === "hex" || value === "rgb" || value === "hsl";
|
|
1000
1644
|
}
|
|
1001
1645
|
function getEyeDropperConstructor() {
|
|
1002
|
-
|
|
1646
|
+
return globalThis.EyeDropper;
|
|
1003
1647
|
}
|
|
1004
1648
|
function isContinuousCommitValue(value) {
|
|
1005
|
-
|
|
1006
|
-
|
|
1649
|
+
const trimmed = value.trim();
|
|
1650
|
+
return /^#?[\da-f]{6}$/i.test(trimmed) || /^rgb\(/i.test(trimmed) || /^hsl\(/i.test(trimmed);
|
|
1007
1651
|
}
|
|
1008
1652
|
function parseColor(value) {
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1653
|
+
const trimmed = value.trim();
|
|
1654
|
+
if (!trimmed) return null;
|
|
1655
|
+
const hex = parseHex(trimmed);
|
|
1656
|
+
if (hex) return {
|
|
1657
|
+
hex,
|
|
1658
|
+
rgb: hexToRgb(hex)
|
|
1659
|
+
};
|
|
1660
|
+
const rgb = parseRgb(trimmed) ?? parseHsl(trimmed);
|
|
1661
|
+
return rgb ? {
|
|
1662
|
+
hex: rgbToHex(rgb),
|
|
1663
|
+
rgb
|
|
1664
|
+
} : null;
|
|
1017
1665
|
}
|
|
1018
1666
|
function parseHex(value) {
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
return `#${raw[0]}${raw[0]}${raw[1]}${raw[1]}${raw[2]}${raw[2]}`.toLowerCase();
|
|
1025
|
-
}
|
|
1026
|
-
return `#${raw}`.toLowerCase();
|
|
1667
|
+
const match = /^#?([\da-f]{3}|[\da-f]{6})$/i.exec(value);
|
|
1668
|
+
if (!match) return null;
|
|
1669
|
+
const raw = match[1] ?? "";
|
|
1670
|
+
if (raw.length === 3) return `#${raw[0]}${raw[0]}${raw[1]}${raw[1]}${raw[2]}${raw[2]}`.toLowerCase();
|
|
1671
|
+
return `#${raw}`.toLowerCase();
|
|
1027
1672
|
}
|
|
1028
1673
|
function parseRgb(value) {
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
return isRgb(rgb) ? rgb : null;
|
|
1674
|
+
const match = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(value);
|
|
1675
|
+
if (!match) return null;
|
|
1676
|
+
const rgb = {
|
|
1677
|
+
r: Number(match[1]),
|
|
1678
|
+
g: Number(match[2]),
|
|
1679
|
+
b: Number(match[3])
|
|
1680
|
+
};
|
|
1681
|
+
return isRgb(rgb) ? rgb : null;
|
|
1038
1682
|
}
|
|
1039
1683
|
function parseHsl(value) {
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
return hslToRgb(Number(match[1]), Number(match[2]), Number(match[3]));
|
|
1684
|
+
const match = /^hsl\(\s*(-?(?:\d{1,3}(?:\.\d+)?|\.\d+))\s*,\s*((?:\d{1,3}(?:\.\d+)?|\.\d+))%\s*,\s*((?:\d{1,3}(?:\.\d+)?|\.\d+))%\s*\)$/i.exec(value);
|
|
1685
|
+
if (!match) return null;
|
|
1686
|
+
return hslToRgb(Number(match[1]), Number(match[2]), Number(match[3]));
|
|
1044
1687
|
}
|
|
1045
1688
|
function isRgb(value) {
|
|
1046
|
-
|
|
1689
|
+
return [
|
|
1690
|
+
value.r,
|
|
1691
|
+
value.g,
|
|
1692
|
+
value.b
|
|
1693
|
+
].every((item) => Number.isInteger(item) && item >= 0 && item <= 255);
|
|
1047
1694
|
}
|
|
1048
1695
|
function hexToRgb(hex) {
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1696
|
+
return {
|
|
1697
|
+
r: Number.parseInt(hex.slice(1, 3), 16),
|
|
1698
|
+
g: Number.parseInt(hex.slice(3, 5), 16),
|
|
1699
|
+
b: Number.parseInt(hex.slice(5, 7), 16)
|
|
1700
|
+
};
|
|
1054
1701
|
}
|
|
1055
1702
|
function rgbToHex(color) {
|
|
1056
|
-
|
|
1703
|
+
return `#${toHex(color.r)}${toHex(color.g)}${toHex(color.b)}`;
|
|
1057
1704
|
}
|
|
1058
1705
|
function toHex(value) {
|
|
1059
|
-
|
|
1706
|
+
return Math.round(value).toString(16).padStart(2, "0");
|
|
1060
1707
|
}
|
|
1061
1708
|
function formatColor(color, format) {
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
return rgbToHex(color);
|
|
1709
|
+
if (format === "rgb") return `rgb(${color.r}, ${color.g}, ${color.b})`;
|
|
1710
|
+
if (format === "hsl") {
|
|
1711
|
+
const hsl = rgbToHsl(color);
|
|
1712
|
+
return `hsl(${hsl.h}, ${hsl.s}%, ${hsl.l}%)`;
|
|
1713
|
+
}
|
|
1714
|
+
return rgbToHex(color);
|
|
1069
1715
|
}
|
|
1070
1716
|
function rgbToHsl(color) {
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
l: roundColorValue(l * 100),
|
|
1090
|
-
};
|
|
1717
|
+
const r = color.r / 255;
|
|
1718
|
+
const g = color.g / 255;
|
|
1719
|
+
const b = color.b / 255;
|
|
1720
|
+
const max = Math.max(r, g, b);
|
|
1721
|
+
const min = Math.min(r, g, b);
|
|
1722
|
+
const l = (max + min) / 2;
|
|
1723
|
+
if (max === min) return {
|
|
1724
|
+
h: 0,
|
|
1725
|
+
s: 0,
|
|
1726
|
+
l: roundColorValue(l * 100)
|
|
1727
|
+
};
|
|
1728
|
+
const delta = max - min;
|
|
1729
|
+
const s = l > .5 ? delta / (2 - max - min) : delta / (max + min);
|
|
1730
|
+
return {
|
|
1731
|
+
h: roundColorValue((max === r ? (g - b) / delta + (g < b ? 6 : 0) : max === g ? (b - r) / delta + 2 : (r - g) / delta + 4) * 60),
|
|
1732
|
+
s: roundColorValue(s * 100),
|
|
1733
|
+
l: roundColorValue(l * 100)
|
|
1734
|
+
};
|
|
1091
1735
|
}
|
|
1092
1736
|
function roundColorValue(value) {
|
|
1093
|
-
|
|
1737
|
+
return Math.round(value * 100) / 100;
|
|
1094
1738
|
}
|
|
1095
1739
|
function rgbToHsv(color) {
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
return {
|
|
1114
|
-
h: Math.round(hue) % 360,
|
|
1115
|
-
s: Math.round((max === 0 ? 0 : delta / max) * 100),
|
|
1116
|
-
v: Math.round(max * 100),
|
|
1117
|
-
};
|
|
1740
|
+
const r = color.r / 255;
|
|
1741
|
+
const g = color.g / 255;
|
|
1742
|
+
const b = color.b / 255;
|
|
1743
|
+
const max = Math.max(r, g, b);
|
|
1744
|
+
const delta = max - Math.min(r, g, b);
|
|
1745
|
+
let hue = 0;
|
|
1746
|
+
if (delta) {
|
|
1747
|
+
if (max === r) hue = 60 * ((g - b) / delta % 6);
|
|
1748
|
+
else if (max === g) hue = 60 * ((b - r) / delta + 2);
|
|
1749
|
+
else hue = 60 * ((r - g) / delta + 4);
|
|
1750
|
+
}
|
|
1751
|
+
if (hue < 0) hue += 360;
|
|
1752
|
+
return {
|
|
1753
|
+
h: Math.round(hue) % 360,
|
|
1754
|
+
s: Math.round((max === 0 ? 0 : delta / max) * 100),
|
|
1755
|
+
v: Math.round(max * 100)
|
|
1756
|
+
};
|
|
1118
1757
|
}
|
|
1119
1758
|
function hsvToRgb(color) {
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1759
|
+
const hue = (color.h % 360 + 360) % 360;
|
|
1760
|
+
const saturation = clamp(color.s, 0, 100) / 100;
|
|
1761
|
+
const value = clamp(color.v, 0, 100) / 100;
|
|
1762
|
+
const chroma = value * saturation;
|
|
1763
|
+
const segment = hue / 60;
|
|
1764
|
+
const secondary = chroma * (1 - Math.abs(segment % 2 - 1));
|
|
1765
|
+
const offset = value - chroma;
|
|
1766
|
+
const [r, g, b] = segment < 1 ? [
|
|
1767
|
+
chroma,
|
|
1768
|
+
secondary,
|
|
1769
|
+
0
|
|
1770
|
+
] : segment < 2 ? [
|
|
1771
|
+
secondary,
|
|
1772
|
+
chroma,
|
|
1773
|
+
0
|
|
1774
|
+
] : segment < 3 ? [
|
|
1775
|
+
0,
|
|
1776
|
+
chroma,
|
|
1777
|
+
secondary
|
|
1778
|
+
] : segment < 4 ? [
|
|
1779
|
+
0,
|
|
1780
|
+
secondary,
|
|
1781
|
+
chroma
|
|
1782
|
+
] : segment < 5 ? [
|
|
1783
|
+
secondary,
|
|
1784
|
+
0,
|
|
1785
|
+
chroma
|
|
1786
|
+
] : [
|
|
1787
|
+
chroma,
|
|
1788
|
+
0,
|
|
1789
|
+
secondary
|
|
1790
|
+
];
|
|
1791
|
+
return {
|
|
1792
|
+
r: Math.round((r + offset) * 255),
|
|
1793
|
+
g: Math.round((g + offset) * 255),
|
|
1794
|
+
b: Math.round((b + offset) * 255)
|
|
1795
|
+
};
|
|
1143
1796
|
}
|
|
1144
1797
|
function hslToRgb(hue, saturation, lightness) {
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
r: Math.round(hueToRgb(p, q, h + 1 / 3) * 255),
|
|
1165
|
-
g: Math.round(hueToRgb(p, q, h) * 255),
|
|
1166
|
-
b: Math.round(hueToRgb(p, q, h - 1 / 3) * 255),
|
|
1167
|
-
};
|
|
1798
|
+
if (!Number.isFinite(hue) || !Number.isFinite(saturation) || !Number.isFinite(lightness) || saturation < 0 || saturation > 100 || lightness < 0 || lightness > 100) return null;
|
|
1799
|
+
const h = (hue % 360 + 360) % 360 / 360;
|
|
1800
|
+
const s = saturation / 100;
|
|
1801
|
+
const l = lightness / 100;
|
|
1802
|
+
if (s === 0) {
|
|
1803
|
+
const gray = Math.round(l * 255);
|
|
1804
|
+
return {
|
|
1805
|
+
r: gray,
|
|
1806
|
+
g: gray,
|
|
1807
|
+
b: gray
|
|
1808
|
+
};
|
|
1809
|
+
}
|
|
1810
|
+
const q = l < .5 ? l * (1 + s) : l + s - l * s;
|
|
1811
|
+
const p = 2 * l - q;
|
|
1812
|
+
return {
|
|
1813
|
+
r: Math.round(hueToRgb(p, q, h + 1 / 3) * 255),
|
|
1814
|
+
g: Math.round(hueToRgb(p, q, h) * 255),
|
|
1815
|
+
b: Math.round(hueToRgb(p, q, h - 1 / 3) * 255)
|
|
1816
|
+
};
|
|
1168
1817
|
}
|
|
1169
1818
|
function hueToRgb(p, q, t) {
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
if (next < 1 / 2)
|
|
1178
|
-
return q;
|
|
1179
|
-
if (next < 2 / 3)
|
|
1180
|
-
return p + (q - p) * (2 / 3 - next) * 6;
|
|
1181
|
-
return p;
|
|
1819
|
+
let next = t;
|
|
1820
|
+
if (next < 0) next += 1;
|
|
1821
|
+
if (next > 1) next -= 1;
|
|
1822
|
+
if (next < 1 / 6) return p + (q - p) * 6 * next;
|
|
1823
|
+
if (next < 1 / 2) return q;
|
|
1824
|
+
if (next < 2 / 3) return p + (q - p) * (2 / 3 - next) * 6;
|
|
1825
|
+
return p;
|
|
1182
1826
|
}
|
|
1183
1827
|
function clamp(value, minimum, maximum) {
|
|
1184
|
-
|
|
1828
|
+
return Math.min(maximum, Math.max(minimum, value));
|
|
1185
1829
|
}
|
|
1186
|
-
|
|
1187
|
-
/**
|
|
1188
|
-
* Generated bundle index. Do not edit.
|
|
1189
|
-
*/
|
|
1190
|
-
|
|
1191
1830
|
export { AerisColorPicker };
|
|
1192
|
-
|
|
1831
|
+
|
|
1832
|
+
//# sourceMappingURL=aeris-ui-core-color-picker.mjs.map
|