@fusion.dev/helix 0.47.1 → 0.48.0
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/custom-elements.json
CHANGED
|
@@ -24904,6 +24904,36 @@
|
|
|
24904
24904
|
"module": "src/color-picker/root/color-picker-root.ts"
|
|
24905
24905
|
}
|
|
24906
24906
|
},
|
|
24907
|
+
{
|
|
24908
|
+
"kind": "field",
|
|
24909
|
+
"name": "readOnly",
|
|
24910
|
+
"type": {
|
|
24911
|
+
"text": "boolean"
|
|
24912
|
+
},
|
|
24913
|
+
"default": "false",
|
|
24914
|
+
"description": "Whether the control refuses changes while still submitting its value.\n\n**Enforced by refusing every request in one place**, which is the seam this\ncomponent already has: `requestValue` is what every path here comes through,\nand gating it once is what stops the next call site from being written\nwithout the check.\n\nNot `disabled`, which is the confusion worth naming: a disabled control\nsubmits nothing and leaves the tab order, and a read-only one submits its\nvalue and stays reachable, which is what a form showing a color somebody\nelse set needs.\n\n**One gate is not enough here, and the second is `move`.** This picker\nholds a model beside its value, which Date Picker and Time Picker do not:\n`moved` is the HSB the square is drawn from, and it is written before the\nvalue is requested. Gating only the request would leave the square under\nthe reader's pointer and the value where it was, which is a control that\nrefuses and looks like it accepted.",
|
|
24915
|
+
"attribute": "readonly",
|
|
24916
|
+
"reflects": true,
|
|
24917
|
+
"inheritedFrom": {
|
|
24918
|
+
"name": "HelixHeadlessColorPicker",
|
|
24919
|
+
"module": "src/color-picker/root/color-picker-root.ts"
|
|
24920
|
+
}
|
|
24921
|
+
},
|
|
24922
|
+
{
|
|
24923
|
+
"kind": "field",
|
|
24924
|
+
"name": "required",
|
|
24925
|
+
"type": {
|
|
24926
|
+
"text": "boolean"
|
|
24927
|
+
},
|
|
24928
|
+
"default": "false",
|
|
24929
|
+
"description": "Whether the form refuses to submit while no color is chosen.\n\n**A color is exactly as requirable as a date**, which is the comparison\nthat settles it: this element extends `HelixFormElement`, carries `name`\nand reports its value, so a consumer writing\n`<helix-color-picker name=\"brand\" required>` inside a form has every reason\nto expect the form to refuse an empty one. Its two siblings in the same\ncomposition position, Date Picker and Time Picker, both check it.\n\nWritten out rather than taken from `MixinField`, for the reason those two\nrecord: the mixin brings a label, a hint and a feedback region, and this is\na panel composed *into* a field that already has all three, so taking it\nwould give one control two of each. What is left is the validity call and\nthe anchor the browser points its bubble at.\n\n**Emptiness is the only fault reported, and bad input deliberately is\nnot.** The value row is typed into a character at a time and every\nkeystroke reaches `requestValue`, so `#0`, `#00` and `#00f` would each be a\nreported fault on the way to `#00ff00`. Date Picker and Time Picker can\nreport bad input because their value moves only on a commit. Color Input\nreports it for this family instead, once, against the field the reader\ntyped into.",
|
|
24930
|
+
"attribute": "required",
|
|
24931
|
+
"reflects": true,
|
|
24932
|
+
"inheritedFrom": {
|
|
24933
|
+
"name": "HelixHeadlessColorPicker",
|
|
24934
|
+
"module": "src/color-picker/root/color-picker-root.ts"
|
|
24935
|
+
}
|
|
24936
|
+
},
|
|
24907
24937
|
{
|
|
24908
24938
|
"kind": "field",
|
|
24909
24939
|
"name": "swatches",
|
|
@@ -25101,7 +25131,22 @@
|
|
|
25101
25131
|
"text": "void"
|
|
25102
25132
|
}
|
|
25103
25133
|
},
|
|
25104
|
-
"description": "Reports the color to the form.\n\n**The one thing a form-associated element owes, and this element owed it\nfrom the start without paying.** It extends `HelixFormElement`, takes\n`MixinControllerValue` and carries `name`, so a consumer writing\n`<helix-color-picker name=\"brand\">` inside a form has every reason to\nexpect an entry, and the form carried none: no error, nothing in the\nmarkup to look at, and a field silently missing from the submission. Its\ntwo siblings in the same composition position, Color Input and Slider,\nboth report.\n\n`null` rather than an empty string where there is no color, which is the\ndifference between a control that submits nothing and one that submits a\nblank
|
|
25134
|
+
"description": "Reports the color to the form.\n\n**The one thing a form-associated element owes, and this element owed it\nfrom the start without paying.** It extends `HelixFormElement`, takes\n`MixinControllerValue` and carries `name`, so a consumer writing\n`<helix-color-picker name=\"brand\">` inside a form has every reason to\nexpect an entry, and the form carried none: no error, nothing in the\nmarkup to look at, and a field silently missing from the submission. Its\ntwo siblings in the same composition position, Color Input and Slider,\nboth report.\n\n`null` rather than an empty string where there is no color, which is the\ndifference between a control that submits nothing and one that submits a\nblank.\n\nThe verdict goes beside it, because `required` is this element's own claim\nand nothing else can answer it: a picker standing on a page has no field\naround it to check on its behalf. What it is *not* is a second opinion on\neverything else, which is why bad input is left to Color Input. See\n`required`.",
|
|
25135
|
+
"inheritedFrom": {
|
|
25136
|
+
"name": "HelixHeadlessColorPicker",
|
|
25137
|
+
"module": "src/color-picker/root/color-picker-root.ts"
|
|
25138
|
+
}
|
|
25139
|
+
},
|
|
25140
|
+
{
|
|
25141
|
+
"kind": "method",
|
|
25142
|
+
"name": "reportRequired",
|
|
25143
|
+
"privacy": "private",
|
|
25144
|
+
"return": {
|
|
25145
|
+
"type": {
|
|
25146
|
+
"text": "void"
|
|
25147
|
+
}
|
|
25148
|
+
},
|
|
25149
|
+
"description": "Reports \"required and empty\", or clears it.\n\nAnchored on the square, which is where a reader would go to answer: it is\nthe first control in the panel and the one `focus` puts the keyboard on, so\nthe browser's bubble points at the thing to do rather than at the row that\nstates the result.",
|
|
25105
25150
|
"inheritedFrom": {
|
|
25106
25151
|
"name": "HelixHeadlessColorPicker",
|
|
25107
25152
|
"module": "src/color-picker/root/color-picker-root.ts"
|
|
@@ -25203,6 +25248,35 @@
|
|
|
25203
25248
|
"module": "src/color-picker/root/color-picker-root.ts"
|
|
25204
25249
|
}
|
|
25205
25250
|
},
|
|
25251
|
+
{
|
|
25252
|
+
"kind": "method",
|
|
25253
|
+
"name": "putBack",
|
|
25254
|
+
"privacy": "private",
|
|
25255
|
+
"return": {
|
|
25256
|
+
"type": {
|
|
25257
|
+
"text": "void"
|
|
25258
|
+
}
|
|
25259
|
+
},
|
|
25260
|
+
"parameters": [
|
|
25261
|
+
{
|
|
25262
|
+
"name": "control",
|
|
25263
|
+
"type": {
|
|
25264
|
+
"text": "{ value: string }"
|
|
25265
|
+
}
|
|
25266
|
+
},
|
|
25267
|
+
{
|
|
25268
|
+
"name": "at",
|
|
25269
|
+
"type": {
|
|
25270
|
+
"text": "number"
|
|
25271
|
+
}
|
|
25272
|
+
}
|
|
25273
|
+
],
|
|
25274
|
+
"description": "Returns a control that moved itself to what the model still holds.\n\n**A refusal has to undo something, and here it is a handle.** Every other\ncontrol in this picker is drawn from the model, so refusing the change\nleaves the picture right on its own. The two area ranges and the two\nchannel sliders are not: each moved before it announced, and each is bound\nwith `.value`, which lit dirty-checks against the value it last committed.\nThe model never changed, so that binding writes nothing and the handle\nstays where the reader dragged it, on a control that refused. Carousel\nsettles the same question the same way: a refusal puts the track back on\nthe slide the index still holds.",
|
|
25275
|
+
"inheritedFrom": {
|
|
25276
|
+
"name": "HelixHeadlessColorPicker",
|
|
25277
|
+
"module": "src/color-picker/root/color-picker-root.ts"
|
|
25278
|
+
}
|
|
25279
|
+
},
|
|
25206
25280
|
{
|
|
25207
25281
|
"kind": "method",
|
|
25208
25282
|
"name": "takeChannel",
|
|
@@ -25888,6 +25962,32 @@
|
|
|
25888
25962
|
"module": "src/color-picker/root/color-picker-root.ts"
|
|
25889
25963
|
}
|
|
25890
25964
|
},
|
|
25965
|
+
{
|
|
25966
|
+
"name": "readonly",
|
|
25967
|
+
"type": {
|
|
25968
|
+
"text": "boolean"
|
|
25969
|
+
},
|
|
25970
|
+
"default": "false",
|
|
25971
|
+
"description": "Whether the control refuses changes while still submitting its value.\n\n**Enforced by refusing every request in one place**, which is the seam this\ncomponent already has: `requestValue` is what every path here comes through,\nand gating it once is what stops the next call site from being written\nwithout the check.\n\nNot `disabled`, which is the confusion worth naming: a disabled control\nsubmits nothing and leaves the tab order, and a read-only one submits its\nvalue and stays reachable, which is what a form showing a color somebody\nelse set needs.\n\n**One gate is not enough here, and the second is `move`.** This picker\nholds a model beside its value, which Date Picker and Time Picker do not:\n`moved` is the HSB the square is drawn from, and it is written before the\nvalue is requested. Gating only the request would leave the square under\nthe reader's pointer and the value where it was, which is a control that\nrefuses and looks like it accepted.",
|
|
25972
|
+
"fieldName": "readOnly",
|
|
25973
|
+
"inheritedFrom": {
|
|
25974
|
+
"name": "HelixHeadlessColorPicker",
|
|
25975
|
+
"module": "src/color-picker/root/color-picker-root.ts"
|
|
25976
|
+
}
|
|
25977
|
+
},
|
|
25978
|
+
{
|
|
25979
|
+
"name": "required",
|
|
25980
|
+
"type": {
|
|
25981
|
+
"text": "boolean"
|
|
25982
|
+
},
|
|
25983
|
+
"default": "false",
|
|
25984
|
+
"description": "Whether the form refuses to submit while no color is chosen.\n\n**A color is exactly as requirable as a date**, which is the comparison\nthat settles it: this element extends `HelixFormElement`, carries `name`\nand reports its value, so a consumer writing\n`<helix-color-picker name=\"brand\" required>` inside a form has every reason\nto expect the form to refuse an empty one. Its two siblings in the same\ncomposition position, Date Picker and Time Picker, both check it.\n\nWritten out rather than taken from `MixinField`, for the reason those two\nrecord: the mixin brings a label, a hint and a feedback region, and this is\na panel composed *into* a field that already has all three, so taking it\nwould give one control two of each. What is left is the validity call and\nthe anchor the browser points its bubble at.\n\n**Emptiness is the only fault reported, and bad input deliberately is\nnot.** The value row is typed into a character at a time and every\nkeystroke reaches `requestValue`, so `#0`, `#00` and `#00f` would each be a\nreported fault on the way to `#00ff00`. Date Picker and Time Picker can\nreport bad input because their value moves only on a commit. Color Input\nreports it for this family instead, once, against the field the reader\ntyped into.",
|
|
25985
|
+
"fieldName": "required",
|
|
25986
|
+
"inheritedFrom": {
|
|
25987
|
+
"name": "HelixHeadlessColorPicker",
|
|
25988
|
+
"module": "src/color-picker/root/color-picker-root.ts"
|
|
25989
|
+
}
|
|
25990
|
+
},
|
|
25891
25991
|
{
|
|
25892
25992
|
"name": "swatches",
|
|
25893
25993
|
"type": {
|
|
@@ -90846,7 +90946,7 @@
|
|
|
90846
90946
|
}
|
|
90847
90947
|
},
|
|
90848
90948
|
{
|
|
90849
|
-
"description": "
|
|
90949
|
+
"description": "Which step along the row a target is, counting from one, whatever `min` leaves open.",
|
|
90850
90950
|
"name": "--rating-step",
|
|
90851
90951
|
"inheritedFrom": {
|
|
90852
90952
|
"name": "HelixHeadlessRating",
|
|
@@ -90854,7 +90954,7 @@
|
|
|
90854
90954
|
}
|
|
90855
90955
|
},
|
|
90856
90956
|
{
|
|
90857
|
-
"description": "How many steps
|
|
90957
|
+
"description": "How many steps the whole row holds, which is `max` over `step`.",
|
|
90858
90958
|
"name": "--rating-steps",
|
|
90859
90959
|
"inheritedFrom": {
|
|
90860
90960
|
"name": "HelixHeadlessRating",
|
|
@@ -91262,7 +91362,7 @@
|
|
|
91262
91362
|
"text": "number"
|
|
91263
91363
|
},
|
|
91264
91364
|
"default": "0",
|
|
91265
|
-
"description": "The lowest score a reader can give, which is what clearing returns to.\n\nZero rather than one, because \"no rating\" and \"the worst rating\" are\ndifferent answers and a control that cannot express the first has to\npretend the second. A survey that requires an answer says so with\n`required`, not by making one unreachable.",
|
|
91365
|
+
"description": "The lowest score a reader can give, which is what clearing returns to.\n\nZero rather than one, because \"no rating\" and \"the worst rating\" are\ndifferent answers and a control that cannot express the first has to\npretend the second. A survey that requires an answer says so with\n`required`, not by making one unreachable.\n\n**It is the floor of the scale, and every edge follows from that.**\n\n*Clearing* returns the row to it. An empty rating, a value nothing can\nparse, and a form reset with nothing declared are all the same situation,\nand all three draw `min` filled: at the default of zero that is the empty\nrow this always drew, and at `min=\"2\"` it is two marks, the way an empty\n`Slider` sits at its own minimum rather than at zero. The value is still\n`\"\"` through all of it, so `required` still refuses it and `valueAsNumber`\nis still `NaN`: what the row shows is the bottom of the scale, not an\nanswer somebody gave.\n\n*The steps* are the scores from `step` up to `max` that are not below it,\nso `min=\"2\"` on five marks offers 2 to 5 and leaves the first two marks\nfilled and unpressable. At zero nothing is dropped, which is why the\ndefault row is unchanged.\n\n*The keyboard* moves through those steps and no others. `wrap` is already\nfalse here, so arrowing down from the lowest one holds its ground rather\nthan reaching a score this property forbids, and the tab stop an unrated\nrating carries sits on the lowest score offered rather than on the first\nmark.\n\n*A `min` between two steps* is a floor and not a step: `min=\"1.5\"` with\nwhole marks clamps the value at 1.5 and offers 2 upward, since 1.5 is not\nsomewhere the row can be pressed. That is a real thing to ask for and is\nleft to mean what it says.\n\n*A `min` outside the marks is refused rather than obeyed*, and says so\nonce on the console. Below zero and anything that is not a number are read\nas zero, there being no mark to draw for a negative score; above `max` is\nread as `max`, which collapses the scale to its top score rather than\nleaving a rating with nothing to press. A property that silently accepts\nnonsense is the fault this pays off, so neither case is quietly ignored.",
|
|
91266
91366
|
"attribute": "min",
|
|
91267
91367
|
"inheritedFrom": {
|
|
91268
91368
|
"name": "HelixHeadlessRating",
|
|
@@ -91380,6 +91480,20 @@
|
|
|
91380
91480
|
"module": "src/rating/root/rating-root.ts"
|
|
91381
91481
|
}
|
|
91382
91482
|
},
|
|
91483
|
+
{
|
|
91484
|
+
"kind": "field",
|
|
91485
|
+
"name": "floor",
|
|
91486
|
+
"type": {
|
|
91487
|
+
"text": "number"
|
|
91488
|
+
},
|
|
91489
|
+
"privacy": "private",
|
|
91490
|
+
"description": "The floor the row actually uses, which is `min` where `min` is one.\n\nBetween zero and `max`, and zero for anything that is not a number, per\nthe note on `min`. Derived on read rather than corrected into the property,\nso `rating.min` still reports what the consumer set and the warning below\ncan tell the two apart.",
|
|
91491
|
+
"readonly": true,
|
|
91492
|
+
"inheritedFrom": {
|
|
91493
|
+
"name": "HelixHeadlessRating",
|
|
91494
|
+
"module": "src/rating/root/rating-root.ts"
|
|
91495
|
+
}
|
|
91496
|
+
},
|
|
91383
91497
|
{
|
|
91384
91498
|
"kind": "field",
|
|
91385
91499
|
"name": "score",
|
|
@@ -91393,6 +91507,20 @@
|
|
|
91393
91507
|
"module": "src/rating/root/rating-root.ts"
|
|
91394
91508
|
}
|
|
91395
91509
|
},
|
|
91510
|
+
{
|
|
91511
|
+
"kind": "field",
|
|
91512
|
+
"name": "positions",
|
|
91513
|
+
"type": {
|
|
91514
|
+
"text": "number[]"
|
|
91515
|
+
},
|
|
91516
|
+
"privacy": "private",
|
|
91517
|
+
"description": "Every score the marks can show, which is `max / step` of them.\n\nThe whole row rather than the part `min` leaves open, because this is what\nthe stylesheet lays the targets out against: `--rating-steps` is the pitch\nand a step's own place in this list is where it sits along the row. Counted\nfrom the part a reader can press instead, a floor above zero would widen\nevery target and slide the row left.",
|
|
91518
|
+
"readonly": true,
|
|
91519
|
+
"inheritedFrom": {
|
|
91520
|
+
"name": "HelixHeadlessRating",
|
|
91521
|
+
"module": "src/rating/root/rating-root.ts"
|
|
91522
|
+
}
|
|
91523
|
+
},
|
|
91396
91524
|
{
|
|
91397
91525
|
"kind": "field",
|
|
91398
91526
|
"name": "steps",
|
|
@@ -91400,7 +91528,7 @@
|
|
|
91400
91528
|
"text": "number[]"
|
|
91401
91529
|
},
|
|
91402
91530
|
"privacy": "private",
|
|
91403
|
-
"description": "Every score a reader can choose, which is
|
|
91531
|
+
"description": "Every score a reader can choose, which is the positions `min` leaves open.",
|
|
91404
91532
|
"readonly": true,
|
|
91405
91533
|
"inheritedFrom": {
|
|
91406
91534
|
"name": "HelixHeadlessRating",
|
|
@@ -91559,7 +91687,7 @@
|
|
|
91559
91687
|
"text": "void"
|
|
91560
91688
|
}
|
|
91561
91689
|
},
|
|
91562
|
-
"description": "Reports the value, and whether the form may go without one.\n\n**`required` arrives from the mixin, so it prints on the reference page\nwhether or not anything here enforces it.** Without a `setValidity` call a\nform holding an unrated required rating submits, `:valid` true and the\nentry present but empty. `reportRequired` is what makes the property real.\n\n**Empty is `value === ''` rather than a score
|
|
91690
|
+
"description": "Reports the value, and whether the form may go without one.\n\n**`required` arrives from the mixin, so it prints on the reference page\nwhether or not anything here enforces it.** Without a `setValidity` call a\nform holding an unrated required rating submits, `:valid` true and the\nentry present but empty. `reportRequired` is what makes the property real.\n\n**Empty is `value === ''` rather than a score at the floor**, and the two\nare not the same thing: an unanswered row draws `min`, per the note on that\nproperty, so a control that read its own picture would call every rating\nwith `min=\"2\"` answered the moment it rendered. What `required` asks is\nwhether the reader answered at all, which only the value knows. A consumer\nwho writes `value=\"0\"` has answered, and is not refused.\n\n`Slider` is deliberately not given the same treatment: a native\n`<input type=\"range\" required>` is always valid, because a range always\nholds a number, and matching the platform there is the point.",
|
|
91563
91691
|
"inheritedFrom": {
|
|
91564
91692
|
"name": "HelixHeadlessRating",
|
|
91565
91693
|
"module": "src/rating/root/rating-root.ts"
|
|
@@ -91595,6 +91723,20 @@
|
|
|
91595
91723
|
"module": "src/rating/root/rating-root.ts"
|
|
91596
91724
|
}
|
|
91597
91725
|
},
|
|
91726
|
+
{
|
|
91727
|
+
"kind": "field",
|
|
91728
|
+
"name": "warned",
|
|
91729
|
+
"type": {
|
|
91730
|
+
"text": "boolean"
|
|
91731
|
+
},
|
|
91732
|
+
"privacy": "private",
|
|
91733
|
+
"default": "false",
|
|
91734
|
+
"description": "Whether the console has already been told about a `min` off the scale.",
|
|
91735
|
+
"inheritedFrom": {
|
|
91736
|
+
"name": "HelixHeadlessRating",
|
|
91737
|
+
"module": "src/rating/root/rating-root.ts"
|
|
91738
|
+
}
|
|
91739
|
+
},
|
|
91598
91740
|
{
|
|
91599
91741
|
"kind": "field",
|
|
91600
91742
|
"name": "valueAsNumber",
|
|
@@ -92193,7 +92335,7 @@
|
|
|
92193
92335
|
"text": "number"
|
|
92194
92336
|
},
|
|
92195
92337
|
"default": "0",
|
|
92196
|
-
"description": "The lowest score a reader can give, which is what clearing returns to.\n\nZero rather than one, because \"no rating\" and \"the worst rating\" are\ndifferent answers and a control that cannot express the first has to\npretend the second. A survey that requires an answer says so with\n`required`, not by making one unreachable.",
|
|
92338
|
+
"description": "The lowest score a reader can give, which is what clearing returns to.\n\nZero rather than one, because \"no rating\" and \"the worst rating\" are\ndifferent answers and a control that cannot express the first has to\npretend the second. A survey that requires an answer says so with\n`required`, not by making one unreachable.\n\n**It is the floor of the scale, and every edge follows from that.**\n\n*Clearing* returns the row to it. An empty rating, a value nothing can\nparse, and a form reset with nothing declared are all the same situation,\nand all three draw `min` filled: at the default of zero that is the empty\nrow this always drew, and at `min=\"2\"` it is two marks, the way an empty\n`Slider` sits at its own minimum rather than at zero. The value is still\n`\"\"` through all of it, so `required` still refuses it and `valueAsNumber`\nis still `NaN`: what the row shows is the bottom of the scale, not an\nanswer somebody gave.\n\n*The steps* are the scores from `step` up to `max` that are not below it,\nso `min=\"2\"` on five marks offers 2 to 5 and leaves the first two marks\nfilled and unpressable. At zero nothing is dropped, which is why the\ndefault row is unchanged.\n\n*The keyboard* moves through those steps and no others. `wrap` is already\nfalse here, so arrowing down from the lowest one holds its ground rather\nthan reaching a score this property forbids, and the tab stop an unrated\nrating carries sits on the lowest score offered rather than on the first\nmark.\n\n*A `min` between two steps* is a floor and not a step: `min=\"1.5\"` with\nwhole marks clamps the value at 1.5 and offers 2 upward, since 1.5 is not\nsomewhere the row can be pressed. That is a real thing to ask for and is\nleft to mean what it says.\n\n*A `min` outside the marks is refused rather than obeyed*, and says so\nonce on the console. Below zero and anything that is not a number are read\nas zero, there being no mark to draw for a negative score; above `max` is\nread as `max`, which collapses the scale to its top score rather than\nleaving a rating with nothing to press. A property that silently accepts\nnonsense is the fault this pays off, so neither case is quietly ignored.",
|
|
92197
92339
|
"fieldName": "min",
|
|
92198
92340
|
"inheritedFrom": {
|
|
92199
92341
|
"name": "HelixHeadlessRating",
|
|
@@ -92348,6 +92490,14 @@
|
|
|
92348
92490
|
"module": "src/rating/root/rating-root.ts"
|
|
92349
92491
|
}
|
|
92350
92492
|
},
|
|
92493
|
+
{
|
|
92494
|
+
"description": "The row: the marks, and the score beside them.",
|
|
92495
|
+
"name": "field",
|
|
92496
|
+
"inheritedFrom": {
|
|
92497
|
+
"name": "HelixHeadlessRating",
|
|
92498
|
+
"module": "src/rating/root/rating-root.ts"
|
|
92499
|
+
}
|
|
92500
|
+
},
|
|
92351
92501
|
{
|
|
92352
92502
|
"description": "The filled marks, clipped to the score.",
|
|
92353
92503
|
"name": "fill",
|
|
@@ -4,6 +4,12 @@ export const styles = createSheet(`:host {
|
|
|
4
4
|
--_rating-mark-size: var(--rating-size, var(--helix-size-icon-md));
|
|
5
5
|
--_rating-mark-gap: var(--rating-gap, var(--helix-space-2xs));
|
|
6
6
|
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
gap: var(--helix-space-2xs);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
[part="field"] {
|
|
7
13
|
align-items: center;
|
|
8
14
|
display: inline-flex;
|
|
9
15
|
gap: var(--rating-gap, var(--helix-space-xs));
|
|
@@ -7,9 +7,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { customElement } from '@fusion.dev/helix-core';
|
|
8
8
|
import { HelixHeadlessRating } from '@fusion.dev/helix-headless/rating';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
|
+
import { styles as fieldStyles } from '../../shared/field/field.css.js';
|
|
11
|
+
import { styles as fieldStackedStyles } from '../../shared/field/field-stacked.css.js';
|
|
10
12
|
import { styles } from './rating-root.css.js';
|
|
11
13
|
let HelixRating = class HelixRating extends HelixHeadlessRating {
|
|
12
|
-
static { this.styles = styles; }
|
|
14
|
+
static { this.styles = [fieldStyles, fieldStackedStyles, styles]; }
|
|
13
15
|
};
|
|
14
16
|
__decorate([
|
|
15
17
|
property({ reflect: true })
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix",
|
|
3
3
|
"description": "Styled component tier. Extends the headless tier with token-driven presentation.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.48.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
},
|
|
48
48
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@fusion.dev/helix-core": "0.
|
|
51
|
-
"@fusion.dev/helix-headless": "0.
|
|
52
|
-
"@fusion.dev/helix-styles": "0.
|
|
50
|
+
"@fusion.dev/helix-core": "0.48.0",
|
|
51
|
+
"@fusion.dev/helix-headless": "0.48.0",
|
|
52
|
+
"@fusion.dev/helix-styles": "0.48.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
56
|
-
"@fusion.dev/helix-cem": "0.
|
|
57
|
-
"@fusion.dev/helix-testing": "0.
|
|
56
|
+
"@fusion.dev/helix-cem": "0.48.0",
|
|
57
|
+
"@fusion.dev/helix-testing": "0.48.0",
|
|
58
58
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
59
59
|
"@happy-dom/global-registrator": "^20.0.0",
|
|
60
60
|
"@lit-labs/ssr": "^4.1.0",
|
package/types/jsx.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ import type {
|
|
|
69
69
|
HelixFilterMenu,
|
|
70
70
|
HelixFilterOperator,
|
|
71
71
|
HelixFlex,
|
|
72
|
+
HelixFormElement,
|
|
72
73
|
HelixFormatDate,
|
|
73
74
|
HelixGrid,
|
|
74
75
|
HelixHeadlessFilterField,
|
|
@@ -4330,6 +4331,67 @@ answer to which one is authoritative or which has the caret. Do not close it
|
|
|
4330
4331
|
the other way round, with Color Input dropping its own field: the value
|
|
4331
4332
|
would then be unreadable and unpasteable without opening a panel. */
|
|
4332
4333
|
noValue?: (HelixColorPicker["noValue"]) | undefined;
|
|
4334
|
+
/** Whether the control refuses changes while still submitting its value.
|
|
4335
|
+
|
|
4336
|
+
**Enforced by refusing every request in one place**, which is the seam this
|
|
4337
|
+
component already has: `requestValue` is what every path here comes through,
|
|
4338
|
+
and gating it once is what stops the next call site from being written
|
|
4339
|
+
without the check.
|
|
4340
|
+
|
|
4341
|
+
Not `disabled`, which is the confusion worth naming: a disabled control
|
|
4342
|
+
submits nothing and leaves the tab order, and a read-only one submits its
|
|
4343
|
+
value and stays reachable, which is what a form showing a color somebody
|
|
4344
|
+
else set needs.
|
|
4345
|
+
|
|
4346
|
+
**One gate is not enough here, and the second is `move`.** This picker
|
|
4347
|
+
holds a model beside its value, which Date Picker and Time Picker do not:
|
|
4348
|
+
`moved` is the HSB the square is drawn from, and it is written before the
|
|
4349
|
+
value is requested. Gating only the request would leave the square under
|
|
4350
|
+
the reader's pointer and the value where it was, which is a control that
|
|
4351
|
+
refuses and looks like it accepted. */
|
|
4352
|
+
readonly?: (HelixColorPicker["readOnly"]) | undefined;
|
|
4353
|
+
/** Whether the control refuses changes while still submitting its value.
|
|
4354
|
+
|
|
4355
|
+
**Enforced by refusing every request in one place**, which is the seam this
|
|
4356
|
+
component already has: `requestValue` is what every path here comes through,
|
|
4357
|
+
and gating it once is what stops the next call site from being written
|
|
4358
|
+
without the check.
|
|
4359
|
+
|
|
4360
|
+
Not `disabled`, which is the confusion worth naming: a disabled control
|
|
4361
|
+
submits nothing and leaves the tab order, and a read-only one submits its
|
|
4362
|
+
value and stays reachable, which is what a form showing a color somebody
|
|
4363
|
+
else set needs.
|
|
4364
|
+
|
|
4365
|
+
**One gate is not enough here, and the second is `move`.** This picker
|
|
4366
|
+
holds a model beside its value, which Date Picker and Time Picker do not:
|
|
4367
|
+
`moved` is the HSB the square is drawn from, and it is written before the
|
|
4368
|
+
value is requested. Gating only the request would leave the square under
|
|
4369
|
+
the reader's pointer and the value where it was, which is a control that
|
|
4370
|
+
refuses and looks like it accepted. */
|
|
4371
|
+
readOnly?: (HelixColorPicker["readOnly"]) | undefined;
|
|
4372
|
+
/** Whether the form refuses to submit while no color is chosen.
|
|
4373
|
+
|
|
4374
|
+
**A color is exactly as requirable as a date**, which is the comparison
|
|
4375
|
+
that settles it: this element extends `HelixFormElement`, carries `name`
|
|
4376
|
+
and reports its value, so a consumer writing
|
|
4377
|
+
`<helix-color-picker name="brand" required>` inside a form has every reason
|
|
4378
|
+
to expect the form to refuse an empty one. Its two siblings in the same
|
|
4379
|
+
composition position, Date Picker and Time Picker, both check it.
|
|
4380
|
+
|
|
4381
|
+
Written out rather than taken from `MixinField`, for the reason those two
|
|
4382
|
+
record: the mixin brings a label, a hint and a feedback region, and this is
|
|
4383
|
+
a panel composed *into* a field that already has all three, so taking it
|
|
4384
|
+
would give one control two of each. What is left is the validity call and
|
|
4385
|
+
the anchor the browser points its bubble at.
|
|
4386
|
+
|
|
4387
|
+
**Emptiness is the only fault reported, and bad input deliberately is
|
|
4388
|
+
not.** The value row is typed into a character at a time and every
|
|
4389
|
+
keystroke reaches `requestValue`, so `#0`, `#00` and `#00f` would each be a
|
|
4390
|
+
reported fault on the way to `#00ff00`. Date Picker and Time Picker can
|
|
4391
|
+
report bad input because their value moves only on a commit. Color Input
|
|
4392
|
+
reports it for this family instead, once, against the field the reader
|
|
4393
|
+
typed into. */
|
|
4394
|
+
required?: (HelixColorPicker["required"]) | undefined;
|
|
4333
4395
|
/** Colors offered under the picker, as a comma-separated list. */
|
|
4334
4396
|
swatches?: (HelixColorPicker["swatches"]) | undefined;
|
|
4335
4397
|
/** Whether the control is non-interactive.
|
|
@@ -4450,6 +4512,67 @@ answer to which one is authoritative or which has the caret. Do not close it
|
|
|
4450
4512
|
the other way round, with Color Input dropping its own field: the value
|
|
4451
4513
|
would then be unreadable and unpasteable without opening a panel. */
|
|
4452
4514
|
"prop:noValue"?: (HelixColorPicker["noValue"]) | undefined;
|
|
4515
|
+
/** Whether the control refuses changes while still submitting its value.
|
|
4516
|
+
|
|
4517
|
+
**Enforced by refusing every request in one place**, which is the seam this
|
|
4518
|
+
component already has: `requestValue` is what every path here comes through,
|
|
4519
|
+
and gating it once is what stops the next call site from being written
|
|
4520
|
+
without the check.
|
|
4521
|
+
|
|
4522
|
+
Not `disabled`, which is the confusion worth naming: a disabled control
|
|
4523
|
+
submits nothing and leaves the tab order, and a read-only one submits its
|
|
4524
|
+
value and stays reachable, which is what a form showing a color somebody
|
|
4525
|
+
else set needs.
|
|
4526
|
+
|
|
4527
|
+
**One gate is not enough here, and the second is `move`.** This picker
|
|
4528
|
+
holds a model beside its value, which Date Picker and Time Picker do not:
|
|
4529
|
+
`moved` is the HSB the square is drawn from, and it is written before the
|
|
4530
|
+
value is requested. Gating only the request would leave the square under
|
|
4531
|
+
the reader's pointer and the value where it was, which is a control that
|
|
4532
|
+
refuses and looks like it accepted. */
|
|
4533
|
+
"bool:readonly"?: (HelixColorPicker["readOnly"]) | undefined;
|
|
4534
|
+
/** Whether the control refuses changes while still submitting its value.
|
|
4535
|
+
|
|
4536
|
+
**Enforced by refusing every request in one place**, which is the seam this
|
|
4537
|
+
component already has: `requestValue` is what every path here comes through,
|
|
4538
|
+
and gating it once is what stops the next call site from being written
|
|
4539
|
+
without the check.
|
|
4540
|
+
|
|
4541
|
+
Not `disabled`, which is the confusion worth naming: a disabled control
|
|
4542
|
+
submits nothing and leaves the tab order, and a read-only one submits its
|
|
4543
|
+
value and stays reachable, which is what a form showing a color somebody
|
|
4544
|
+
else set needs.
|
|
4545
|
+
|
|
4546
|
+
**One gate is not enough here, and the second is `move`.** This picker
|
|
4547
|
+
holds a model beside its value, which Date Picker and Time Picker do not:
|
|
4548
|
+
`moved` is the HSB the square is drawn from, and it is written before the
|
|
4549
|
+
value is requested. Gating only the request would leave the square under
|
|
4550
|
+
the reader's pointer and the value where it was, which is a control that
|
|
4551
|
+
refuses and looks like it accepted. */
|
|
4552
|
+
"prop:readOnly"?: (HelixColorPicker["readOnly"]) | undefined;
|
|
4553
|
+
/** Whether the form refuses to submit while no color is chosen.
|
|
4554
|
+
|
|
4555
|
+
**A color is exactly as requirable as a date**, which is the comparison
|
|
4556
|
+
that settles it: this element extends `HelixFormElement`, carries `name`
|
|
4557
|
+
and reports its value, so a consumer writing
|
|
4558
|
+
`<helix-color-picker name="brand" required>` inside a form has every reason
|
|
4559
|
+
to expect the form to refuse an empty one. Its two siblings in the same
|
|
4560
|
+
composition position, Date Picker and Time Picker, both check it.
|
|
4561
|
+
|
|
4562
|
+
Written out rather than taken from `MixinField`, for the reason those two
|
|
4563
|
+
record: the mixin brings a label, a hint and a feedback region, and this is
|
|
4564
|
+
a panel composed *into* a field that already has all three, so taking it
|
|
4565
|
+
would give one control two of each. What is left is the validity call and
|
|
4566
|
+
the anchor the browser points its bubble at.
|
|
4567
|
+
|
|
4568
|
+
**Emptiness is the only fault reported, and bad input deliberately is
|
|
4569
|
+
not.** The value row is typed into a character at a time and every
|
|
4570
|
+
keystroke reaches `requestValue`, so `#0`, `#00` and `#00f` would each be a
|
|
4571
|
+
reported fault on the way to `#00ff00`. Date Picker and Time Picker can
|
|
4572
|
+
report bad input because their value moves only on a commit. Color Input
|
|
4573
|
+
reports it for this family instead, once, against the field the reader
|
|
4574
|
+
typed into. */
|
|
4575
|
+
"prop:required"?: (HelixColorPicker["required"]) | undefined;
|
|
4453
4576
|
/** Colors offered under the picker, as a comma-separated list. */
|
|
4454
4577
|
"prop:swatches"?: (HelixColorPicker["swatches"]) | undefined;
|
|
4455
4578
|
/** Whether the control is non-interactive.
|
|
@@ -13917,7 +14040,41 @@ a reset should return to. */
|
|
|
13917
14040
|
Zero rather than one, because "no rating" and "the worst rating" are
|
|
13918
14041
|
different answers and a control that cannot express the first has to
|
|
13919
14042
|
pretend the second. A survey that requires an answer says so with
|
|
13920
|
-
`required`, not by making one unreachable.
|
|
14043
|
+
`required`, not by making one unreachable.
|
|
14044
|
+
|
|
14045
|
+
**It is the floor of the scale, and every edge follows from that.**
|
|
14046
|
+
|
|
14047
|
+
*Clearing* returns the row to it. An empty rating, a value nothing can
|
|
14048
|
+
parse, and a form reset with nothing declared are all the same situation,
|
|
14049
|
+
and all three draw `min` filled: at the default of zero that is the empty
|
|
14050
|
+
row this always drew, and at `min="2"` it is two marks, the way an empty
|
|
14051
|
+
`Slider` sits at its own minimum rather than at zero. The value is still
|
|
14052
|
+
`""` through all of it, so `required` still refuses it and `valueAsNumber`
|
|
14053
|
+
is still `NaN`: what the row shows is the bottom of the scale, not an
|
|
14054
|
+
answer somebody gave.
|
|
14055
|
+
|
|
14056
|
+
*The steps* are the scores from `step` up to `max` that are not below it,
|
|
14057
|
+
so `min="2"` on five marks offers 2 to 5 and leaves the first two marks
|
|
14058
|
+
filled and unpressable. At zero nothing is dropped, which is why the
|
|
14059
|
+
default row is unchanged.
|
|
14060
|
+
|
|
14061
|
+
*The keyboard* moves through those steps and no others. `wrap` is already
|
|
14062
|
+
false here, so arrowing down from the lowest one holds its ground rather
|
|
14063
|
+
than reaching a score this property forbids, and the tab stop an unrated
|
|
14064
|
+
rating carries sits on the lowest score offered rather than on the first
|
|
14065
|
+
mark.
|
|
14066
|
+
|
|
14067
|
+
*A `min` between two steps* is a floor and not a step: `min="1.5"` with
|
|
14068
|
+
whole marks clamps the value at 1.5 and offers 2 upward, since 1.5 is not
|
|
14069
|
+
somewhere the row can be pressed. That is a real thing to ask for and is
|
|
14070
|
+
left to mean what it says.
|
|
14071
|
+
|
|
14072
|
+
*A `min` outside the marks is refused rather than obeyed*, and says so
|
|
14073
|
+
once on the console. Below zero and anything that is not a number are read
|
|
14074
|
+
as zero, there being no mark to draw for a negative score; above `max` is
|
|
14075
|
+
read as `max`, which collapses the scale to its top score rather than
|
|
14076
|
+
leaving a rating with nothing to press. A property that silently accepts
|
|
14077
|
+
nonsense is the fault this pays off, so neither case is quietly ignored. */
|
|
13921
14078
|
min?: (HelixRating["min"]) | undefined;
|
|
13922
14079
|
/** Whether this shows a score rather than asks for one.
|
|
13923
14080
|
|
|
@@ -14057,7 +14214,41 @@ a reset should return to. */
|
|
|
14057
14214
|
Zero rather than one, because "no rating" and "the worst rating" are
|
|
14058
14215
|
different answers and a control that cannot express the first has to
|
|
14059
14216
|
pretend the second. A survey that requires an answer says so with
|
|
14060
|
-
`required`, not by making one unreachable.
|
|
14217
|
+
`required`, not by making one unreachable.
|
|
14218
|
+
|
|
14219
|
+
**It is the floor of the scale, and every edge follows from that.**
|
|
14220
|
+
|
|
14221
|
+
*Clearing* returns the row to it. An empty rating, a value nothing can
|
|
14222
|
+
parse, and a form reset with nothing declared are all the same situation,
|
|
14223
|
+
and all three draw `min` filled: at the default of zero that is the empty
|
|
14224
|
+
row this always drew, and at `min="2"` it is two marks, the way an empty
|
|
14225
|
+
`Slider` sits at its own minimum rather than at zero. The value is still
|
|
14226
|
+
`""` through all of it, so `required` still refuses it and `valueAsNumber`
|
|
14227
|
+
is still `NaN`: what the row shows is the bottom of the scale, not an
|
|
14228
|
+
answer somebody gave.
|
|
14229
|
+
|
|
14230
|
+
*The steps* are the scores from `step` up to `max` that are not below it,
|
|
14231
|
+
so `min="2"` on five marks offers 2 to 5 and leaves the first two marks
|
|
14232
|
+
filled and unpressable. At zero nothing is dropped, which is why the
|
|
14233
|
+
default row is unchanged.
|
|
14234
|
+
|
|
14235
|
+
*The keyboard* moves through those steps and no others. `wrap` is already
|
|
14236
|
+
false here, so arrowing down from the lowest one holds its ground rather
|
|
14237
|
+
than reaching a score this property forbids, and the tab stop an unrated
|
|
14238
|
+
rating carries sits on the lowest score offered rather than on the first
|
|
14239
|
+
mark.
|
|
14240
|
+
|
|
14241
|
+
*A `min` between two steps* is a floor and not a step: `min="1.5"` with
|
|
14242
|
+
whole marks clamps the value at 1.5 and offers 2 upward, since 1.5 is not
|
|
14243
|
+
somewhere the row can be pressed. That is a real thing to ask for and is
|
|
14244
|
+
left to mean what it says.
|
|
14245
|
+
|
|
14246
|
+
*A `min` outside the marks is refused rather than obeyed*, and says so
|
|
14247
|
+
once on the console. Below zero and anything that is not a number are read
|
|
14248
|
+
as zero, there being no mark to draw for a negative score; above `max` is
|
|
14249
|
+
read as `max`, which collapses the scale to its top score rather than
|
|
14250
|
+
leaving a rating with nothing to press. A property that silently accepts
|
|
14251
|
+
nonsense is the fault this pays off, so neither case is quietly ignored. */
|
|
14061
14252
|
"prop:min"?: (HelixRating["min"]) | undefined;
|
|
14062
14253
|
/** Whether this shows a score rather than asks for one.
|
|
14063
14254
|
|
|
@@ -24176,6 +24367,46 @@ export type CustomElements = {
|
|
|
24176
24367
|
* answer to which one is authoritative or which has the caret. Do not close it
|
|
24177
24368
|
* the other way round, with Color Input dropping its own field: the value
|
|
24178
24369
|
* would then be unreadable and unpasteable without opening a panel.
|
|
24370
|
+
* - `readonly`/`readOnly`: Whether the control refuses changes while still submitting its value.
|
|
24371
|
+
*
|
|
24372
|
+
* **Enforced by refusing every request in one place**, which is the seam this
|
|
24373
|
+
* component already has: `requestValue` is what every path here comes through,
|
|
24374
|
+
* and gating it once is what stops the next call site from being written
|
|
24375
|
+
* without the check.
|
|
24376
|
+
*
|
|
24377
|
+
* Not `disabled`, which is the confusion worth naming: a disabled control
|
|
24378
|
+
* submits nothing and leaves the tab order, and a read-only one submits its
|
|
24379
|
+
* value and stays reachable, which is what a form showing a color somebody
|
|
24380
|
+
* else set needs.
|
|
24381
|
+
*
|
|
24382
|
+
* **One gate is not enough here, and the second is `move`.** This picker
|
|
24383
|
+
* holds a model beside its value, which Date Picker and Time Picker do not:
|
|
24384
|
+
* `moved` is the HSB the square is drawn from, and it is written before the
|
|
24385
|
+
* value is requested. Gating only the request would leave the square under
|
|
24386
|
+
* the reader's pointer and the value where it was, which is a control that
|
|
24387
|
+
* refuses and looks like it accepted.
|
|
24388
|
+
* - `required`: Whether the form refuses to submit while no color is chosen.
|
|
24389
|
+
*
|
|
24390
|
+
* **A color is exactly as requirable as a date**, which is the comparison
|
|
24391
|
+
* that settles it: this element extends `HelixFormElement`, carries `name`
|
|
24392
|
+
* and reports its value, so a consumer writing
|
|
24393
|
+
* `<helix-color-picker name="brand" required>` inside a form has every reason
|
|
24394
|
+
* to expect the form to refuse an empty one. Its two siblings in the same
|
|
24395
|
+
* composition position, Date Picker and Time Picker, both check it.
|
|
24396
|
+
*
|
|
24397
|
+
* Written out rather than taken from `MixinField`, for the reason those two
|
|
24398
|
+
* record: the mixin brings a label, a hint and a feedback region, and this is
|
|
24399
|
+
* a panel composed *into* a field that already has all three, so taking it
|
|
24400
|
+
* would give one control two of each. What is left is the validity call and
|
|
24401
|
+
* the anchor the browser points its bubble at.
|
|
24402
|
+
*
|
|
24403
|
+
* **Emptiness is the only fault reported, and bad input deliberately is
|
|
24404
|
+
* not.** The value row is typed into a character at a time and every
|
|
24405
|
+
* keystroke reaches `requestValue`, so `#0`, `#00` and `#00f` would each be a
|
|
24406
|
+
* reported fault on the way to `#00ff00`. Date Picker and Time Picker can
|
|
24407
|
+
* report bad input because their value moves only on a commit. Color Input
|
|
24408
|
+
* reports it for this family instead, once, against the field the reader
|
|
24409
|
+
* typed into.
|
|
24179
24410
|
* - `swatches`: Colors offered under the picker, as a comma-separated list.
|
|
24180
24411
|
* - `disabled`: Whether the control is non-interactive.
|
|
24181
24412
|
*
|
|
@@ -33211,6 +33442,40 @@ export type CustomElements = {
|
|
|
33211
33442
|
* different answers and a control that cannot express the first has to
|
|
33212
33443
|
* pretend the second. A survey that requires an answer says so with
|
|
33213
33444
|
* `required`, not by making one unreachable.
|
|
33445
|
+
*
|
|
33446
|
+
* **It is the floor of the scale, and every edge follows from that.**
|
|
33447
|
+
*
|
|
33448
|
+
* *Clearing* returns the row to it. An empty rating, a value nothing can
|
|
33449
|
+
* parse, and a form reset with nothing declared are all the same situation,
|
|
33450
|
+
* and all three draw `min` filled: at the default of zero that is the empty
|
|
33451
|
+
* row this always drew, and at `min="2"` it is two marks, the way an empty
|
|
33452
|
+
* `Slider` sits at its own minimum rather than at zero. The value is still
|
|
33453
|
+
* `""` through all of it, so `required` still refuses it and `valueAsNumber`
|
|
33454
|
+
* is still `NaN`: what the row shows is the bottom of the scale, not an
|
|
33455
|
+
* answer somebody gave.
|
|
33456
|
+
*
|
|
33457
|
+
* *The steps* are the scores from `step` up to `max` that are not below it,
|
|
33458
|
+
* so `min="2"` on five marks offers 2 to 5 and leaves the first two marks
|
|
33459
|
+
* filled and unpressable. At zero nothing is dropped, which is why the
|
|
33460
|
+
* default row is unchanged.
|
|
33461
|
+
*
|
|
33462
|
+
* *The keyboard* moves through those steps and no others. `wrap` is already
|
|
33463
|
+
* false here, so arrowing down from the lowest one holds its ground rather
|
|
33464
|
+
* than reaching a score this property forbids, and the tab stop an unrated
|
|
33465
|
+
* rating carries sits on the lowest score offered rather than on the first
|
|
33466
|
+
* mark.
|
|
33467
|
+
*
|
|
33468
|
+
* *A `min` between two steps* is a floor and not a step: `min="1.5"` with
|
|
33469
|
+
* whole marks clamps the value at 1.5 and offers 2 upward, since 1.5 is not
|
|
33470
|
+
* somewhere the row can be pressed. That is a real thing to ask for and is
|
|
33471
|
+
* left to mean what it says.
|
|
33472
|
+
*
|
|
33473
|
+
* *A `min` outside the marks is refused rather than obeyed*, and says so
|
|
33474
|
+
* once on the console. Below zero and anything that is not a number are read
|
|
33475
|
+
* as zero, there being no mark to draw for a negative score; above `max` is
|
|
33476
|
+
* read as `max`, which collapses the scale to its top score rather than
|
|
33477
|
+
* leaving a rating with nothing to press. A property that silently accepts
|
|
33478
|
+
* nonsense is the fault this pays off, so neither case is quietly ignored.
|
|
33214
33479
|
* - `readonly`/`readOnly`: Whether this shows a score rather than asks for one.
|
|
33215
33480
|
*
|
|
33216
33481
|
* A readout is not a control that has been switched off. It takes no focus,
|
|
@@ -33368,14 +33633,15 @@ export type CustomElements = {
|
|
|
33368
33633
|
* - `--rating-size`: How big one mark is. (default: `undefined`)
|
|
33369
33634
|
* - `--rating-full`: How many marks are wholly filled. (default: `undefined`)
|
|
33370
33635
|
* - `--rating-part`: How much of the next mark is filled, 0 to 1. (default: `undefined`)
|
|
33371
|
-
* - `--rating-step`:
|
|
33372
|
-
* - `--rating-steps`: How many steps
|
|
33636
|
+
* - `--rating-step`: Which step along the row a target is, counting from one, whatever `min` leaves open. (default: `undefined`)
|
|
33637
|
+
* - `--rating-steps`: How many steps the whole row holds, which is `max` over `step`. (default: `undefined`)
|
|
33373
33638
|
*
|
|
33374
33639
|
* ## CSS Parts
|
|
33375
33640
|
*
|
|
33376
33641
|
* Custom selectors for styling elements within the component.
|
|
33377
33642
|
*
|
|
33378
33643
|
* - `feedback`: What is wrong with it.
|
|
33644
|
+
* - `field`: The row: the marks, and the score beside them.
|
|
33379
33645
|
* - `fill`: The filled marks, clipped to the score.
|
|
33380
33646
|
* - `hint`: Help under the marks, while nothing is wrong.
|
|
33381
33647
|
* - `label`: The question, over the marks.
|
|
@@ -43564,6 +43830,46 @@ export type CustomElementsSolidJs = {
|
|
|
43564
43830
|
* answer to which one is authoritative or which has the caret. Do not close it
|
|
43565
43831
|
* the other way round, with Color Input dropping its own field: the value
|
|
43566
43832
|
* would then be unreadable and unpasteable without opening a panel.
|
|
43833
|
+
* - `readonly`/`readOnly`: Whether the control refuses changes while still submitting its value.
|
|
43834
|
+
*
|
|
43835
|
+
* **Enforced by refusing every request in one place**, which is the seam this
|
|
43836
|
+
* component already has: `requestValue` is what every path here comes through,
|
|
43837
|
+
* and gating it once is what stops the next call site from being written
|
|
43838
|
+
* without the check.
|
|
43839
|
+
*
|
|
43840
|
+
* Not `disabled`, which is the confusion worth naming: a disabled control
|
|
43841
|
+
* submits nothing and leaves the tab order, and a read-only one submits its
|
|
43842
|
+
* value and stays reachable, which is what a form showing a color somebody
|
|
43843
|
+
* else set needs.
|
|
43844
|
+
*
|
|
43845
|
+
* **One gate is not enough here, and the second is `move`.** This picker
|
|
43846
|
+
* holds a model beside its value, which Date Picker and Time Picker do not:
|
|
43847
|
+
* `moved` is the HSB the square is drawn from, and it is written before the
|
|
43848
|
+
* value is requested. Gating only the request would leave the square under
|
|
43849
|
+
* the reader's pointer and the value where it was, which is a control that
|
|
43850
|
+
* refuses and looks like it accepted.
|
|
43851
|
+
* - `required`: Whether the form refuses to submit while no color is chosen.
|
|
43852
|
+
*
|
|
43853
|
+
* **A color is exactly as requirable as a date**, which is the comparison
|
|
43854
|
+
* that settles it: this element extends `HelixFormElement`, carries `name`
|
|
43855
|
+
* and reports its value, so a consumer writing
|
|
43856
|
+
* `<helix-color-picker name="brand" required>` inside a form has every reason
|
|
43857
|
+
* to expect the form to refuse an empty one. Its two siblings in the same
|
|
43858
|
+
* composition position, Date Picker and Time Picker, both check it.
|
|
43859
|
+
*
|
|
43860
|
+
* Written out rather than taken from `MixinField`, for the reason those two
|
|
43861
|
+
* record: the mixin brings a label, a hint and a feedback region, and this is
|
|
43862
|
+
* a panel composed *into* a field that already has all three, so taking it
|
|
43863
|
+
* would give one control two of each. What is left is the validity call and
|
|
43864
|
+
* the anchor the browser points its bubble at.
|
|
43865
|
+
*
|
|
43866
|
+
* **Emptiness is the only fault reported, and bad input deliberately is
|
|
43867
|
+
* not.** The value row is typed into a character at a time and every
|
|
43868
|
+
* keystroke reaches `requestValue`, so `#0`, `#00` and `#00f` would each be a
|
|
43869
|
+
* reported fault on the way to `#00ff00`. Date Picker and Time Picker can
|
|
43870
|
+
* report bad input because their value moves only on a commit. Color Input
|
|
43871
|
+
* reports it for this family instead, once, against the field the reader
|
|
43872
|
+
* typed into.
|
|
43567
43873
|
* - `swatches`: Colors offered under the picker, as a comma-separated list.
|
|
43568
43874
|
* - `disabled`: Whether the control is non-interactive.
|
|
43569
43875
|
*
|
|
@@ -52785,6 +53091,40 @@ export type CustomElementsSolidJs = {
|
|
|
52785
53091
|
* different answers and a control that cannot express the first has to
|
|
52786
53092
|
* pretend the second. A survey that requires an answer says so with
|
|
52787
53093
|
* `required`, not by making one unreachable.
|
|
53094
|
+
*
|
|
53095
|
+
* **It is the floor of the scale, and every edge follows from that.**
|
|
53096
|
+
*
|
|
53097
|
+
* *Clearing* returns the row to it. An empty rating, a value nothing can
|
|
53098
|
+
* parse, and a form reset with nothing declared are all the same situation,
|
|
53099
|
+
* and all three draw `min` filled: at the default of zero that is the empty
|
|
53100
|
+
* row this always drew, and at `min="2"` it is two marks, the way an empty
|
|
53101
|
+
* `Slider` sits at its own minimum rather than at zero. The value is still
|
|
53102
|
+
* `""` through all of it, so `required` still refuses it and `valueAsNumber`
|
|
53103
|
+
* is still `NaN`: what the row shows is the bottom of the scale, not an
|
|
53104
|
+
* answer somebody gave.
|
|
53105
|
+
*
|
|
53106
|
+
* *The steps* are the scores from `step` up to `max` that are not below it,
|
|
53107
|
+
* so `min="2"` on five marks offers 2 to 5 and leaves the first two marks
|
|
53108
|
+
* filled and unpressable. At zero nothing is dropped, which is why the
|
|
53109
|
+
* default row is unchanged.
|
|
53110
|
+
*
|
|
53111
|
+
* *The keyboard* moves through those steps and no others. `wrap` is already
|
|
53112
|
+
* false here, so arrowing down from the lowest one holds its ground rather
|
|
53113
|
+
* than reaching a score this property forbids, and the tab stop an unrated
|
|
53114
|
+
* rating carries sits on the lowest score offered rather than on the first
|
|
53115
|
+
* mark.
|
|
53116
|
+
*
|
|
53117
|
+
* *A `min` between two steps* is a floor and not a step: `min="1.5"` with
|
|
53118
|
+
* whole marks clamps the value at 1.5 and offers 2 upward, since 1.5 is not
|
|
53119
|
+
* somewhere the row can be pressed. That is a real thing to ask for and is
|
|
53120
|
+
* left to mean what it says.
|
|
53121
|
+
*
|
|
53122
|
+
* *A `min` outside the marks is refused rather than obeyed*, and says so
|
|
53123
|
+
* once on the console. Below zero and anything that is not a number are read
|
|
53124
|
+
* as zero, there being no mark to draw for a negative score; above `max` is
|
|
53125
|
+
* read as `max`, which collapses the scale to its top score rather than
|
|
53126
|
+
* leaving a rating with nothing to press. A property that silently accepts
|
|
53127
|
+
* nonsense is the fault this pays off, so neither case is quietly ignored.
|
|
52788
53128
|
* - `readonly`/`readOnly`: Whether this shows a score rather than asks for one.
|
|
52789
53129
|
*
|
|
52790
53130
|
* A readout is not a control that has been switched off. It takes no focus,
|
|
@@ -52942,14 +53282,15 @@ export type CustomElementsSolidJs = {
|
|
|
52942
53282
|
* - `--rating-size`: How big one mark is. (default: `undefined`)
|
|
52943
53283
|
* - `--rating-full`: How many marks are wholly filled. (default: `undefined`)
|
|
52944
53284
|
* - `--rating-part`: How much of the next mark is filled, 0 to 1. (default: `undefined`)
|
|
52945
|
-
* - `--rating-step`:
|
|
52946
|
-
* - `--rating-steps`: How many steps
|
|
53285
|
+
* - `--rating-step`: Which step along the row a target is, counting from one, whatever `min` leaves open. (default: `undefined`)
|
|
53286
|
+
* - `--rating-steps`: How many steps the whole row holds, which is `max` over `step`. (default: `undefined`)
|
|
52947
53287
|
*
|
|
52948
53288
|
* ## CSS Parts
|
|
52949
53289
|
*
|
|
52950
53290
|
* Custom selectors for styling elements within the component.
|
|
52951
53291
|
*
|
|
52952
53292
|
* - `feedback`: What is wrong with it.
|
|
53293
|
+
* - `field`: The row: the marks, and the score beside them.
|
|
52953
53294
|
* - `fill`: The filled marks, clipped to the score.
|
|
52954
53295
|
* - `hint`: Help under the marks, while nothing is wrong.
|
|
52955
53296
|
* - `label`: The question, over the marks.
|
|
@@ -60207,9 +60548,9 @@ export type CustomCssProperties = {
|
|
|
60207
60548
|
"--rating-full"?: (string) | undefined;
|
|
60208
60549
|
/** How much of the next mark is filled, 0 to 1. */
|
|
60209
60550
|
"--rating-part"?: (string) | undefined;
|
|
60210
|
-
/**
|
|
60551
|
+
/** Which step along the row a target is, counting from one, whatever `min` leaves open. */
|
|
60211
60552
|
"--rating-step"?: (string) | undefined;
|
|
60212
|
-
/** How many steps
|
|
60553
|
+
/** How many steps the whole row holds, which is `max` over `step`. */
|
|
60213
60554
|
"--rating-steps"?: (string) | undefined;
|
|
60214
60555
|
/** The invisible width of a divider's drag target. */
|
|
60215
60556
|
"--sandbox-grab"?: (string) | undefined;
|
package/types/vue.d.ts
CHANGED
|
@@ -2258,6 +2258,67 @@ answer to which one is authoritative or which has the caret. Do not close it
|
|
|
2258
2258
|
the other way round, with Color Input dropping its own field: the value
|
|
2259
2259
|
would then be unreadable and unpasteable without opening a panel. */
|
|
2260
2260
|
noValue?: (HelixColorPicker["noValue"]) | undefined;
|
|
2261
|
+
/** Whether the control refuses changes while still submitting its value.
|
|
2262
|
+
|
|
2263
|
+
**Enforced by refusing every request in one place**, which is the seam this
|
|
2264
|
+
component already has: `requestValue` is what every path here comes through,
|
|
2265
|
+
and gating it once is what stops the next call site from being written
|
|
2266
|
+
without the check.
|
|
2267
|
+
|
|
2268
|
+
Not `disabled`, which is the confusion worth naming: a disabled control
|
|
2269
|
+
submits nothing and leaves the tab order, and a read-only one submits its
|
|
2270
|
+
value and stays reachable, which is what a form showing a color somebody
|
|
2271
|
+
else set needs.
|
|
2272
|
+
|
|
2273
|
+
**One gate is not enough here, and the second is `move`.** This picker
|
|
2274
|
+
holds a model beside its value, which Date Picker and Time Picker do not:
|
|
2275
|
+
`moved` is the HSB the square is drawn from, and it is written before the
|
|
2276
|
+
value is requested. Gating only the request would leave the square under
|
|
2277
|
+
the reader's pointer and the value where it was, which is a control that
|
|
2278
|
+
refuses and looks like it accepted. */
|
|
2279
|
+
readonly?: (HelixColorPicker["readOnly"]) | undefined;
|
|
2280
|
+
/** Whether the control refuses changes while still submitting its value.
|
|
2281
|
+
|
|
2282
|
+
**Enforced by refusing every request in one place**, which is the seam this
|
|
2283
|
+
component already has: `requestValue` is what every path here comes through,
|
|
2284
|
+
and gating it once is what stops the next call site from being written
|
|
2285
|
+
without the check.
|
|
2286
|
+
|
|
2287
|
+
Not `disabled`, which is the confusion worth naming: a disabled control
|
|
2288
|
+
submits nothing and leaves the tab order, and a read-only one submits its
|
|
2289
|
+
value and stays reachable, which is what a form showing a color somebody
|
|
2290
|
+
else set needs.
|
|
2291
|
+
|
|
2292
|
+
**One gate is not enough here, and the second is `move`.** This picker
|
|
2293
|
+
holds a model beside its value, which Date Picker and Time Picker do not:
|
|
2294
|
+
`moved` is the HSB the square is drawn from, and it is written before the
|
|
2295
|
+
value is requested. Gating only the request would leave the square under
|
|
2296
|
+
the reader's pointer and the value where it was, which is a control that
|
|
2297
|
+
refuses and looks like it accepted. */
|
|
2298
|
+
readOnly?: (HelixColorPicker["readOnly"]) | undefined;
|
|
2299
|
+
/** Whether the form refuses to submit while no color is chosen.
|
|
2300
|
+
|
|
2301
|
+
**A color is exactly as requirable as a date**, which is the comparison
|
|
2302
|
+
that settles it: this element extends `HelixFormElement`, carries `name`
|
|
2303
|
+
and reports its value, so a consumer writing
|
|
2304
|
+
`<helix-color-picker name="brand" required>` inside a form has every reason
|
|
2305
|
+
to expect the form to refuse an empty one. Its two siblings in the same
|
|
2306
|
+
composition position, Date Picker and Time Picker, both check it.
|
|
2307
|
+
|
|
2308
|
+
Written out rather than taken from `MixinField`, for the reason those two
|
|
2309
|
+
record: the mixin brings a label, a hint and a feedback region, and this is
|
|
2310
|
+
a panel composed *into* a field that already has all three, so taking it
|
|
2311
|
+
would give one control two of each. What is left is the validity call and
|
|
2312
|
+
the anchor the browser points its bubble at.
|
|
2313
|
+
|
|
2314
|
+
**Emptiness is the only fault reported, and bad input deliberately is
|
|
2315
|
+
not.** The value row is typed into a character at a time and every
|
|
2316
|
+
keystroke reaches `requestValue`, so `#0`, `#00` and `#00f` would each be a
|
|
2317
|
+
reported fault on the way to `#00ff00`. Date Picker and Time Picker can
|
|
2318
|
+
report bad input because their value moves only on a commit. Color Input
|
|
2319
|
+
reports it for this family instead, once, against the field the reader
|
|
2320
|
+
typed into. */
|
|
2321
|
+
required?: (HelixColorPicker["required"]) | undefined;
|
|
2261
2322
|
/** Colors offered under the picker, as a comma-separated list. */
|
|
2262
2323
|
swatches?: (HelixColorPicker["swatches"]) | undefined;
|
|
2263
2324
|
/** Whether the control is non-interactive.
|
|
@@ -7152,7 +7213,41 @@ a reset should return to. */
|
|
|
7152
7213
|
Zero rather than one, because "no rating" and "the worst rating" are
|
|
7153
7214
|
different answers and a control that cannot express the first has to
|
|
7154
7215
|
pretend the second. A survey that requires an answer says so with
|
|
7155
|
-
`required`, not by making one unreachable.
|
|
7216
|
+
`required`, not by making one unreachable.
|
|
7217
|
+
|
|
7218
|
+
**It is the floor of the scale, and every edge follows from that.**
|
|
7219
|
+
|
|
7220
|
+
*Clearing* returns the row to it. An empty rating, a value nothing can
|
|
7221
|
+
parse, and a form reset with nothing declared are all the same situation,
|
|
7222
|
+
and all three draw `min` filled: at the default of zero that is the empty
|
|
7223
|
+
row this always drew, and at `min="2"` it is two marks, the way an empty
|
|
7224
|
+
`Slider` sits at its own minimum rather than at zero. The value is still
|
|
7225
|
+
`""` through all of it, so `required` still refuses it and `valueAsNumber`
|
|
7226
|
+
is still `NaN`: what the row shows is the bottom of the scale, not an
|
|
7227
|
+
answer somebody gave.
|
|
7228
|
+
|
|
7229
|
+
*The steps* are the scores from `step` up to `max` that are not below it,
|
|
7230
|
+
so `min="2"` on five marks offers 2 to 5 and leaves the first two marks
|
|
7231
|
+
filled and unpressable. At zero nothing is dropped, which is why the
|
|
7232
|
+
default row is unchanged.
|
|
7233
|
+
|
|
7234
|
+
*The keyboard* moves through those steps and no others. `wrap` is already
|
|
7235
|
+
false here, so arrowing down from the lowest one holds its ground rather
|
|
7236
|
+
than reaching a score this property forbids, and the tab stop an unrated
|
|
7237
|
+
rating carries sits on the lowest score offered rather than on the first
|
|
7238
|
+
mark.
|
|
7239
|
+
|
|
7240
|
+
*A `min` between two steps* is a floor and not a step: `min="1.5"` with
|
|
7241
|
+
whole marks clamps the value at 1.5 and offers 2 upward, since 1.5 is not
|
|
7242
|
+
somewhere the row can be pressed. That is a real thing to ask for and is
|
|
7243
|
+
left to mean what it says.
|
|
7244
|
+
|
|
7245
|
+
*A `min` outside the marks is refused rather than obeyed*, and says so
|
|
7246
|
+
once on the console. Below zero and anything that is not a number are read
|
|
7247
|
+
as zero, there being no mark to draw for a negative score; above `max` is
|
|
7248
|
+
read as `max`, which collapses the scale to its top score rather than
|
|
7249
|
+
leaving a rating with nothing to press. A property that silently accepts
|
|
7250
|
+
nonsense is the fault this pays off, so neither case is quietly ignored. */
|
|
7156
7251
|
min?: (HelixRating["min"]) | undefined;
|
|
7157
7252
|
/** Whether this shows a score rather than asks for one.
|
|
7158
7253
|
|
|
@@ -11207,9 +11302,9 @@ export type CustomCssProperties = {
|
|
|
11207
11302
|
"--rating-full"?: (string) | undefined;
|
|
11208
11303
|
/** How much of the next mark is filled, 0 to 1. */
|
|
11209
11304
|
"--rating-part"?: (string) | undefined;
|
|
11210
|
-
/**
|
|
11305
|
+
/** Which step along the row a target is, counting from one, whatever `min` leaves open. */
|
|
11211
11306
|
"--rating-step"?: (string) | undefined;
|
|
11212
|
-
/** How many steps
|
|
11307
|
+
/** How many steps the whole row holds, which is `max` over `step`. */
|
|
11213
11308
|
"--rating-steps"?: (string) | undefined;
|
|
11214
11309
|
/** The invisible width of a divider's drag target. */
|
|
11215
11310
|
"--sandbox-grab"?: (string) | undefined;
|