@swiftwc/ui 0.0.0-dev.64 → 0.0.0-dev.66
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/generated/client/index.js +2 -2
- package/generated/components/picker-view.d.ts +1 -0
- package/generated/components/picker-view.js +13 -5
- package/generated/css/index.css +85 -0
- package/package.json +1 -1
- package/scss/colors/_index.scss +55 -0
- package/scss/mixins/_index.scss +1 -0
- package/scss/utils/_index.scss +6 -1
- package/web-components.html-data/en.json +24 -0
|
@@ -113,7 +113,7 @@ const handleHelp = ({ target, relatedTarget }) => {
|
|
|
113
113
|
const trigger = target.closest('[help]');
|
|
114
114
|
if (!trigger)
|
|
115
115
|
return;
|
|
116
|
-
if ('PICKER-VIEW'
|
|
116
|
+
if (['PICKER-VIEW'].includes(trigger.tagName))
|
|
117
117
|
return;
|
|
118
118
|
if (relatedTarget instanceof HTMLElement && trigger.contains(relatedTarget))
|
|
119
119
|
return;
|
|
@@ -132,7 +132,7 @@ const handleHelp = ({ target, relatedTarget }) => {
|
|
|
132
132
|
const trigger = target.closest('[help]');
|
|
133
133
|
if (!trigger)
|
|
134
134
|
return;
|
|
135
|
-
if ('PICKER-VIEW'
|
|
135
|
+
if (['PICKER-VIEW'].includes(trigger.tagName))
|
|
136
136
|
return;
|
|
137
137
|
if (relatedTarget instanceof HTMLElement && trigger.contains(relatedTarget))
|
|
138
138
|
return;
|
|
@@ -128,6 +128,7 @@ export class PickerView extends FormAssociatedBase {
|
|
|
128
128
|
CURRENT_VALUE_ICON: 'current-value-icon',
|
|
129
129
|
TRIGGER_HELP: 'help',
|
|
130
130
|
DICTIONARY: 'dictionary',
|
|
131
|
+
REQUIRED: 'required',
|
|
131
132
|
};
|
|
132
133
|
}
|
|
133
134
|
static get observedAttributes() {
|
|
@@ -367,6 +368,8 @@ export class PickerView extends FormAssociatedBase {
|
|
|
367
368
|
el.remove();
|
|
368
369
|
CleanupRegistry.unregister(this, 'trigger');
|
|
369
370
|
CleanupRegistry.register(this, onoff('click', this.#handleTriggerClick, currentValueLabel).on(), 'trigger');
|
|
371
|
+
if (this.hasAttribute(this.constructor.ATTR.TRIGGER_HELP))
|
|
372
|
+
currentValueLabel?.setAttribute(this.constructor.ATTR.TRIGGER_HELP, this.getAttribute(this.constructor.ATTR.TRIGGER_HELP) ?? '');
|
|
370
373
|
// rebuild snapshot(tree)
|
|
371
374
|
if (!this.#spawn)
|
|
372
375
|
break;
|
|
@@ -400,8 +403,8 @@ export class PickerView extends FormAssociatedBase {
|
|
|
400
403
|
// renderLabelIcon(currentValueLabel, 'dots-three') // overwritten
|
|
401
404
|
// renderLabelTitle(currentValueLabel, this.#currentValueLabel) // overwritten
|
|
402
405
|
// }
|
|
403
|
-
if (this.hasAttribute(
|
|
404
|
-
currentValueLabel?.setAttribute(
|
|
406
|
+
if (this.hasAttribute(this.constructor.ATTR.TRIGGER_HELP))
|
|
407
|
+
currentValueLabel?.setAttribute(this.constructor.ATTR.TRIGGER_HELP, this.getAttribute(this.constructor.ATTR.TRIGGER_HELP) ?? '');
|
|
405
408
|
_a.#reflectButtons(input.source, menu);
|
|
406
409
|
break;
|
|
407
410
|
}
|
|
@@ -617,6 +620,11 @@ export class PickerView extends FormAssociatedBase {
|
|
|
617
620
|
break;
|
|
618
621
|
this.#renderDictionary(parseDictionary(newValue));
|
|
619
622
|
break;
|
|
623
|
+
case this.constructor.ATTR.REQUIRED:
|
|
624
|
+
if (oldValue === newValue)
|
|
625
|
+
break;
|
|
626
|
+
this.#sendValueToForm(false);
|
|
627
|
+
break;
|
|
620
628
|
case this.constructor.ATTR.SELECTION:
|
|
621
629
|
// nothing happens
|
|
622
630
|
break;
|
|
@@ -949,10 +957,10 @@ export class PickerView extends FormAssociatedBase {
|
|
|
949
957
|
//udnefined
|
|
950
958
|
}
|
|
951
959
|
}
|
|
952
|
-
if (this.hasAttribute(
|
|
953
|
-
trigger?.setAttribute(
|
|
960
|
+
if (this.hasAttribute(this.constructor.ATTR.TRIGGER_HELP))
|
|
961
|
+
trigger?.setAttribute(this.constructor.ATTR.TRIGGER_HELP, this.getAttribute(this.constructor.ATTR.TRIGGER_HELP) ?? '');
|
|
954
962
|
else
|
|
955
|
-
trigger?.removeAttribute(
|
|
963
|
+
trigger?.removeAttribute(this.constructor.ATTR.TRIGGER_HELP);
|
|
956
964
|
}
|
|
957
965
|
// Optional: form participation properties
|
|
958
966
|
get name() {
|
package/generated/css/index.css
CHANGED
|
@@ -843,6 +843,7 @@
|
|
|
843
843
|
--red: var(--itemtext);
|
|
844
844
|
--green: var(--itemtext);
|
|
845
845
|
--orange: var(--itemtext);
|
|
846
|
+
--purple: var(--itemtext);
|
|
846
847
|
--accentColor: var(--itemtext);
|
|
847
848
|
--accentColorEffective: var(--itemtext);
|
|
848
849
|
}
|
|
@@ -871,6 +872,7 @@
|
|
|
871
872
|
--red: var(--itemtext);
|
|
872
873
|
--green: var(--itemtext);
|
|
873
874
|
--orange: var(--itemtext);
|
|
875
|
+
--purple: var(--itemtext);
|
|
874
876
|
--accentColor: var(--itemtext);
|
|
875
877
|
--accentColorEffective: var(--itemtext);
|
|
876
878
|
}
|
|
@@ -897,6 +899,7 @@
|
|
|
897
899
|
--red: var(--itemtext);
|
|
898
900
|
--green: var(--itemtext);
|
|
899
901
|
--orange: var(--itemtext);
|
|
902
|
+
--purple: var(--itemtext);
|
|
900
903
|
--accentColor: var(--itemtext);
|
|
901
904
|
--accentColorEffective: var(--itemtext);
|
|
902
905
|
}
|
|
@@ -2414,6 +2417,7 @@
|
|
|
2414
2417
|
--red: var(--btntext);
|
|
2415
2418
|
--green: var(--btntext);
|
|
2416
2419
|
--orange: var(--btntext);
|
|
2420
|
+
--purple: var(--btntext);
|
|
2417
2421
|
--accentColor: var(--btntext);
|
|
2418
2422
|
--accentColorEffective: var(--btntext);
|
|
2419
2423
|
}
|
|
@@ -2541,6 +2545,7 @@
|
|
|
2541
2545
|
--red: var(--btntext);
|
|
2542
2546
|
--green: var(--btntext);
|
|
2543
2547
|
--orange: var(--btntext);
|
|
2548
|
+
--purple: var(--btntext);
|
|
2544
2549
|
--accentColor: var(--btntext);
|
|
2545
2550
|
--accentColorEffective: var(--btntext);
|
|
2546
2551
|
}
|
|
@@ -3364,6 +3369,7 @@
|
|
|
3364
3369
|
--red: var(--menuitemtext);
|
|
3365
3370
|
--green: var(--menuitemtext);
|
|
3366
3371
|
--orange: var(--menuitemtext);
|
|
3372
|
+
--purple: var(--menuitemtext);
|
|
3367
3373
|
--accentColor: var(--menuitemtext);
|
|
3368
3374
|
--accentColorEffective: var(--menuitemtext);
|
|
3369
3375
|
}
|
|
@@ -3378,6 +3384,7 @@
|
|
|
3378
3384
|
--red: var(--menuitemtext);
|
|
3379
3385
|
--green: var(--menuitemtext);
|
|
3380
3386
|
--orange: var(--menuitemtext);
|
|
3387
|
+
--purple: var(--menuitemtext);
|
|
3381
3388
|
--accentColor: var(--menuitemtext);
|
|
3382
3389
|
--accentColorEffective: var(--menuitemtext);
|
|
3383
3390
|
}
|
|
@@ -3393,6 +3400,7 @@
|
|
|
3393
3400
|
--red: var(--menuitemtext);
|
|
3394
3401
|
--green: var(--menuitemtext);
|
|
3395
3402
|
--orange: var(--menuitemtext);
|
|
3403
|
+
--purple: var(--menuitemtext);
|
|
3396
3404
|
--accentColor: var(--menuitemtext);
|
|
3397
3405
|
--accentColorEffective: var(--menuitemtext);
|
|
3398
3406
|
}
|
|
@@ -3405,6 +3413,7 @@
|
|
|
3405
3413
|
--red: var(--menuitemtext);
|
|
3406
3414
|
--green: var(--menuitemtext);
|
|
3407
3415
|
--orange: var(--menuitemtext);
|
|
3416
|
+
--purple: var(--menuitemtext);
|
|
3408
3417
|
--accentColor: var(--menuitemtext);
|
|
3409
3418
|
--accentColorEffective: var(--menuitemtext);
|
|
3410
3419
|
}
|
|
@@ -5541,6 +5550,9 @@
|
|
|
5541
5550
|
:where([foreground=orange]) {
|
|
5542
5551
|
color: var(--orange);
|
|
5543
5552
|
}
|
|
5553
|
+
:where([foreground=purple]) {
|
|
5554
|
+
color: var(--purple);
|
|
5555
|
+
}
|
|
5544
5556
|
:where([foreground="blue.secondary"]) {
|
|
5545
5557
|
color: var(--blue2);
|
|
5546
5558
|
}
|
|
@@ -5553,6 +5565,9 @@
|
|
|
5553
5565
|
:where([foreground="orange.secondary"]) {
|
|
5554
5566
|
color: var(--orange2);
|
|
5555
5567
|
}
|
|
5568
|
+
:where([foreground="purple.secondary"]) {
|
|
5569
|
+
color: var(--purple2);
|
|
5570
|
+
}
|
|
5556
5571
|
:where([foreground="blue.tertiary"]) {
|
|
5557
5572
|
color: var(--blue3);
|
|
5558
5573
|
}
|
|
@@ -5565,6 +5580,9 @@
|
|
|
5565
5580
|
:where([foreground="orange.tertiary"]) {
|
|
5566
5581
|
color: var(--orange3);
|
|
5567
5582
|
}
|
|
5583
|
+
:where([foreground="purple.tertiary"]) {
|
|
5584
|
+
color: var(--purple3);
|
|
5585
|
+
}
|
|
5568
5586
|
:where([foreground="blue.quaternary"]) {
|
|
5569
5587
|
color: var(--blue4);
|
|
5570
5588
|
}
|
|
@@ -5577,6 +5595,9 @@
|
|
|
5577
5595
|
:where([foreground="orange.quaternary"]) {
|
|
5578
5596
|
color: var(--orange4);
|
|
5579
5597
|
}
|
|
5598
|
+
:where([foreground="purple.quaternary"]) {
|
|
5599
|
+
color: var(--purple4);
|
|
5600
|
+
}
|
|
5580
5601
|
:where([foreground="blue.quinary"]) {
|
|
5581
5602
|
color: var(--blue5);
|
|
5582
5603
|
}
|
|
@@ -5589,6 +5610,9 @@
|
|
|
5589
5610
|
:where([foreground="orange.quinary"]) {
|
|
5590
5611
|
color: var(--orange5);
|
|
5591
5612
|
}
|
|
5613
|
+
:where([foreground="purple.quinary"]) {
|
|
5614
|
+
color: var(--purple5);
|
|
5615
|
+
}
|
|
5592
5616
|
:where([tint=gray],
|
|
5593
5617
|
[list-item-tint=gray]) {
|
|
5594
5618
|
--accentColorEffective: var(--gray);
|
|
@@ -8127,6 +8151,66 @@
|
|
|
8127
8151
|
inherits: true;
|
|
8128
8152
|
}
|
|
8129
8153
|
}
|
|
8154
|
+
@property --purple {
|
|
8155
|
+
syntax: "<color>";
|
|
8156
|
+
initial-value: oklch(61.67% 0.2607 326deg);
|
|
8157
|
+
inherits: true;
|
|
8158
|
+
}
|
|
8159
|
+
@media (prefers-color-scheme: dark) {
|
|
8160
|
+
@property --purple {
|
|
8161
|
+
syntax: "<color>";
|
|
8162
|
+
initial-value: oklch(65.86% 0.2795 325.94deg);
|
|
8163
|
+
inherits: true;
|
|
8164
|
+
}
|
|
8165
|
+
}
|
|
8166
|
+
@property --purple2 {
|
|
8167
|
+
syntax: "<color>";
|
|
8168
|
+
initial-value: oklch(78.07% 0.1464 325.64deg);
|
|
8169
|
+
inherits: true;
|
|
8170
|
+
}
|
|
8171
|
+
@media (prefers-color-scheme: dark) {
|
|
8172
|
+
@property --purple2 {
|
|
8173
|
+
syntax: "<color>";
|
|
8174
|
+
initial-value: oklch(44.3% 0.1667 326.12deg);
|
|
8175
|
+
inherits: true;
|
|
8176
|
+
}
|
|
8177
|
+
}
|
|
8178
|
+
@property --purple3 {
|
|
8179
|
+
syntax: "<color>";
|
|
8180
|
+
initial-value: oklch(88.73% 0.0728 324.7deg);
|
|
8181
|
+
inherits: true;
|
|
8182
|
+
}
|
|
8183
|
+
@media (prefers-color-scheme: dark) {
|
|
8184
|
+
@property --purple3 {
|
|
8185
|
+
syntax: "<color>";
|
|
8186
|
+
initial-value: oklch(32.88% 0.0959 325.84deg);
|
|
8187
|
+
inherits: true;
|
|
8188
|
+
}
|
|
8189
|
+
}
|
|
8190
|
+
@property --purple4 {
|
|
8191
|
+
syntax: "<color>";
|
|
8192
|
+
initial-value: oklch(91.84% 0.0518 323.99deg);
|
|
8193
|
+
inherits: true;
|
|
8194
|
+
}
|
|
8195
|
+
@media (prefers-color-scheme: dark) {
|
|
8196
|
+
@property --purple4 {
|
|
8197
|
+
syntax: "<color>";
|
|
8198
|
+
initial-value: oklch(29.81% 0.0724 325.02deg);
|
|
8199
|
+
inherits: true;
|
|
8200
|
+
}
|
|
8201
|
+
}
|
|
8202
|
+
@property --purple5 {
|
|
8203
|
+
syntax: "<color>";
|
|
8204
|
+
initial-value: oklch(94.55% 0.0358 323.99deg);
|
|
8205
|
+
inherits: true;
|
|
8206
|
+
}
|
|
8207
|
+
@media (prefers-color-scheme: dark) {
|
|
8208
|
+
@property --purple5 {
|
|
8209
|
+
syntax: "<color>";
|
|
8210
|
+
initial-value: oklch(24.54% 0.0522 323.99deg);
|
|
8211
|
+
inherits: true;
|
|
8212
|
+
}
|
|
8213
|
+
}
|
|
8130
8214
|
@property --canvas {
|
|
8131
8215
|
syntax: "<color>";
|
|
8132
8216
|
initial-value: oklch(100% 0 0deg);
|
|
@@ -8616,6 +8700,7 @@
|
|
|
8616
8700
|
--red: var(--toolbaritemtext);
|
|
8617
8701
|
--green: var(--toolbaritemtext);
|
|
8618
8702
|
--orange: var(--toolbaritemtext);
|
|
8703
|
+
--purple: var(--toolbaritemtext);
|
|
8619
8704
|
--accentColor: var(--toolbaritemtext);
|
|
8620
8705
|
--accentColorEffective: var(--toolbaritemtext);
|
|
8621
8706
|
}
|
package/package.json
CHANGED
package/scss/colors/_index.scss
CHANGED
|
@@ -365,6 +365,61 @@ $color-tokens: (
|
|
|
365
365
|
),
|
|
366
366
|
),
|
|
367
367
|
),
|
|
368
|
+
purple: (
|
|
369
|
+
props: (
|
|
370
|
+
inherits: true,
|
|
371
|
+
),
|
|
372
|
+
media: (
|
|
373
|
+
base: (
|
|
374
|
+
light: oklch(0.6167 0.2607 326),
|
|
375
|
+
dark: oklch(0.6586 0.2795 325.94),
|
|
376
|
+
),
|
|
377
|
+
),
|
|
378
|
+
),
|
|
379
|
+
purple2: (
|
|
380
|
+
props: (
|
|
381
|
+
inherits: true,
|
|
382
|
+
),
|
|
383
|
+
media: (
|
|
384
|
+
base: (
|
|
385
|
+
light: oklch(0.7807 0.1464 325.64),
|
|
386
|
+
dark: oklch(0.443 0.1667 326.12),
|
|
387
|
+
),
|
|
388
|
+
),
|
|
389
|
+
),
|
|
390
|
+
purple3: (
|
|
391
|
+
props: (
|
|
392
|
+
inherits: true,
|
|
393
|
+
),
|
|
394
|
+
media: (
|
|
395
|
+
base: (
|
|
396
|
+
light: oklch(0.8873 0.0728 324.7),
|
|
397
|
+
dark: oklch(0.3288 0.0959 325.84),
|
|
398
|
+
),
|
|
399
|
+
),
|
|
400
|
+
),
|
|
401
|
+
purple4: (
|
|
402
|
+
props: (
|
|
403
|
+
inherits: true,
|
|
404
|
+
),
|
|
405
|
+
media: (
|
|
406
|
+
base: (
|
|
407
|
+
light: oklch(0.9184 0.0518 323.99),
|
|
408
|
+
dark: oklch(0.2981 0.0724 325.02),
|
|
409
|
+
),
|
|
410
|
+
),
|
|
411
|
+
),
|
|
412
|
+
purple5: (
|
|
413
|
+
props: (
|
|
414
|
+
inherits: true,
|
|
415
|
+
),
|
|
416
|
+
media: (
|
|
417
|
+
base: (
|
|
418
|
+
light: oklch(0.9455 0.0358 323.99),
|
|
419
|
+
dark: oklch(0.2454 0.0522 323.99),
|
|
420
|
+
),
|
|
421
|
+
),
|
|
422
|
+
),
|
|
368
423
|
//orangeemphasis light: oklch(0.6414 0.157 55.97) dark: oklch(0.83 0.1633 79.36)
|
|
369
424
|
// SECTION: SystemColor
|
|
370
425
|
canvas: (
|
package/scss/mixins/_index.scss
CHANGED
package/scss/utils/_index.scss
CHANGED
|
@@ -33,22 +33,27 @@
|
|
|
33
33
|
red: --red,
|
|
34
34
|
green: --green,
|
|
35
35
|
orange: --orange,
|
|
36
|
+
purple: --purple,
|
|
36
37
|
'blue.secondary': --blue2,
|
|
37
38
|
'red.secondary': --red2,
|
|
38
39
|
'green.secondary': --green2,
|
|
39
40
|
'orange.secondary': --orange2,
|
|
41
|
+
'purple.secondary': --purple2,
|
|
40
42
|
'blue.tertiary': --blue3,
|
|
41
43
|
'red.tertiary': --red3,
|
|
42
44
|
'green.tertiary': --green3,
|
|
43
45
|
'orange.tertiary': --orange3,
|
|
46
|
+
'purple.tertiary': --purple3,
|
|
44
47
|
'blue.quaternary': --blue4,
|
|
45
48
|
'red.quaternary': --red4,
|
|
46
49
|
'green.quaternary': --green4,
|
|
47
50
|
'orange.quaternary': --orange4,
|
|
51
|
+
'purple.quaternary': --purple4,
|
|
48
52
|
'blue.quinary': --blue5,
|
|
49
53
|
'red.quinary': --red5,
|
|
50
54
|
'green.quinary': --green5,
|
|
51
|
-
'orange.quinary': --orange5
|
|
55
|
+
'orange.quinary': --orange5,
|
|
56
|
+
'purple.quinary': --purple5
|
|
52
57
|
)
|
|
53
58
|
{
|
|
54
59
|
:where([foreground='#{"" + $k}']) {
|
|
@@ -655,6 +655,10 @@
|
|
|
655
655
|
{
|
|
656
656
|
"name": "orange",
|
|
657
657
|
"description": "system orange color"
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
"name": "purple",
|
|
661
|
+
"description": "system purple color"
|
|
658
662
|
}
|
|
659
663
|
]
|
|
660
664
|
},
|
|
@@ -672,6 +676,26 @@
|
|
|
672
676
|
{
|
|
673
677
|
"name": "blue.secondary",
|
|
674
678
|
"description": "system secondary blue color"
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"name": "gray",
|
|
682
|
+
"description": "system gray color"
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
"name": "red",
|
|
686
|
+
"description": "system red color"
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
"name": "green",
|
|
690
|
+
"description": "system green color"
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"name": "orange",
|
|
694
|
+
"description": "system orange color"
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
"name": "purple",
|
|
698
|
+
"description": "system purple color"
|
|
675
699
|
}
|
|
676
700
|
]
|
|
677
701
|
},
|