@quidgest/ui 0.20.0 → 0.20.1
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/CHANGELOG.md +11 -1
- package/dist/json/api.json +277 -14
- package/dist/manifest/components.json +1 -0
- package/dist/ui.css +193 -0
- package/dist/ui.esm.js +667 -650
- package/dist/ui.js +977 -960
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +977 -960
- package/dist/ui.scss +462 -266
- package/esm/components/QGauge/QGauge.d.ts +56 -0
- package/esm/components/QGauge/QGauge.d.ts.map +1 -0
- package/esm/components/QGauge/QGauge.vue.js +305 -0
- package/esm/components/QGauge/QGauge2.vue.js +5 -0
- package/esm/components/QGauge/constants.d.ts +6 -0
- package/esm/components/QGauge/constants.d.ts.map +1 -0
- package/esm/components/QGauge/constants.js +8 -0
- package/esm/components/QGauge/index.d.ts +124 -0
- package/esm/components/QGauge/index.d.ts.map +1 -0
- package/esm/components/QGauge/index.js +6 -0
- package/esm/components/QGauge/types.d.ts +146 -0
- package/esm/components/QGauge/types.d.ts.map +1 -0
- package/esm/components/index.d.ts +1 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +64 -62
- package/esm/composables/useColor/index.d.ts +8 -0
- package/esm/composables/useColor/index.d.ts.map +1 -1
- package/esm/composables/useColor/index.js +16 -18
- package/esm/index.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,16 @@ On `0.x`, breaking changes typically ship as a **minor** bump. The `/release` wo
|
|
|
9
9
|
|
|
10
10
|
Entries below start at **0.16.0**. Earlier history is in git / GitLab MRs. Patch releases within a minor line may be summarized under that minor unless a break shipped in between.
|
|
11
11
|
|
|
12
|
+
## [0.20.1] - 2026-09-04
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- `QGauge` — gauge / meter UI component
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- Distributed SCSS — preserve `url(...)` references so asset paths survive packaging
|
|
21
|
+
|
|
12
22
|
## [0.20.0] - 2026-09-01
|
|
13
23
|
|
|
14
24
|
### Changed
|
|
@@ -73,7 +83,7 @@ Entries below start at **0.16.0**. Earlier history is in git / GitLab MRs. Patch
|
|
|
73
83
|
- **Breaking:** Unified group / toggle APIs for consistency:
|
|
74
84
|
- Rename `QButtonToggle` → `QToggleButton`; pass items via the default slot (`options` prop removed)
|
|
75
85
|
- `QAccordion` now expects `QAccordionItem` children in the default slot
|
|
76
|
-
- Remove `active` from `QButton`; use `QToggle` for stateful toggle
|
|
86
|
+
- Remove `active` from `QButton`; use `QToggle` for stateful toggle behavior
|
|
77
87
|
|
|
78
88
|
### Added _(0.16.x through 0.16.75)_
|
|
79
89
|
|
package/dist/json/api.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.20.
|
|
2
|
+
"version": "0.20.1",
|
|
3
3
|
"components": [
|
|
4
4
|
{
|
|
5
5
|
"name": "QAccordion",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"examples": [
|
|
124
124
|
{
|
|
125
125
|
"title": "Default",
|
|
126
|
-
"description": "Default
|
|
126
|
+
"description": "Default behavior of the accordion.",
|
|
127
127
|
"code": "<q-accordion v-bind=\"args\">\n\t\t <q-accordion-item title=\"Section 1\" value=\"1\">\n\t\t\tContent for section 1\n\t\t </q-accordion-item>\n\t\t <q-accordion-item title=\"Section 2\" value=\"2\">\n\t\t\tContent for section 2\n\t\t </q-accordion-item>\n\t\t <q-accordion-item title=\"Section 3\" value=\"3\">\n\t\t\tContent for section 3\n\t\t </q-accordion-item>\n\t\t</q-accordion>"
|
|
128
128
|
},
|
|
129
129
|
{
|
|
@@ -1008,32 +1008,32 @@
|
|
|
1008
1008
|
"examples": [
|
|
1009
1009
|
{
|
|
1010
1010
|
"title": "Default",
|
|
1011
|
-
"description": "Default
|
|
1011
|
+
"description": "Default behavior of the card.",
|
|
1012
1012
|
"code": "<q-card v-bind=\"args\">\n\t\t\t\t<q-text-field label=\"Text input\"/>\n\t\t\t</q-card>"
|
|
1013
1013
|
},
|
|
1014
1014
|
{
|
|
1015
1015
|
"title": "Clickable",
|
|
1016
|
-
"description": "Default
|
|
1016
|
+
"description": "Default behavior of a clickable card.",
|
|
1017
1017
|
"code": "<q-card v-bind=\"args\" @click=\"onClick\">\n\t\t\t\t\t{{ args.subtitle }}\n\t\t\t\t</q-card>"
|
|
1018
1018
|
},
|
|
1019
1019
|
{
|
|
1020
1020
|
"title": "Link",
|
|
1021
|
-
"description": "Default
|
|
1021
|
+
"description": "Default behavior of a card with a link/url.",
|
|
1022
1022
|
"code": "<q-card v-bind=\"args\">\n\t\t\t\t{{ args.subtitle }}\n\t\t\t</q-card>"
|
|
1023
1023
|
},
|
|
1024
1024
|
{
|
|
1025
1025
|
"title": "Loading",
|
|
1026
|
-
"description": "Default
|
|
1026
|
+
"description": "Default behavior of a loading card.",
|
|
1027
1027
|
"code": "<q-card v-bind=\"args\">\n\t\t\t\t<q-text-field label=\"Text input\"/>\n\t\t\t</q-card>"
|
|
1028
1028
|
},
|
|
1029
1029
|
{
|
|
1030
1030
|
"title": "Borderless",
|
|
1031
|
-
"description": "Default
|
|
1031
|
+
"description": "Default behavior of a borderless card.",
|
|
1032
1032
|
"code": "<q-card v-bind=\"args\">\n\t\t\t\t<q-text-field label=\"Text input\"/>\n\t\t\t</q-card>"
|
|
1033
1033
|
},
|
|
1034
1034
|
{
|
|
1035
1035
|
"title": "Elevation",
|
|
1036
|
-
"description": "Default
|
|
1036
|
+
"description": "Default behavior of a card with elevation.",
|
|
1037
1037
|
"code": "<div style=\"display: flex; gap: 1rem;\">\n\t\t\t\t<q-card v-bind=\"args\" title=\"Elevated Low\" elevation=\"low\">\n\t\t\t\t\tSome quick example text to build on the card title.\n\t\t\t\t</q-card>\n\t\t\t\t<q-card v-bind=\"args\" title=\"Elevated Medium\" elevation=\"medium\">\n\t\t\t\t\tSome quick example text to build on the card title.\n\t\t\t\t</q-card>\n\t\t\t\t<q-card v-bind=\"args\" title=\"Elevated High\" elevation=\"high\">\n\t\t\t\t\tSome quick example text to build on the card title.\n\t\t\t\t</q-card>\n\t\t\t</div>"
|
|
1038
1038
|
},
|
|
1039
1039
|
{
|
|
@@ -1689,22 +1689,22 @@
|
|
|
1689
1689
|
"examples": [
|
|
1690
1690
|
{
|
|
1691
1691
|
"title": "Default",
|
|
1692
|
-
"description": "Default
|
|
1692
|
+
"description": "Default behavior of the collapsible.",
|
|
1693
1693
|
"code": "<q-collapsible v-bind=\"args\">\n\t\t\t\t<q-text-field label=\"Text input\"/>\n\t\t\t</q-collapsible>"
|
|
1694
1694
|
},
|
|
1695
1695
|
{
|
|
1696
1696
|
"title": "Starts Expanded",
|
|
1697
|
-
"description": "
|
|
1697
|
+
"description": "Behavior of a collapsible that starts expanded.",
|
|
1698
1698
|
"code": "<q-collapsible v-bind=\"args\">\n\t\t\t\t<q-text-field label=\"Text input\"/>\n\t\t\t</q-collapsible>"
|
|
1699
1699
|
},
|
|
1700
1700
|
{
|
|
1701
1701
|
"title": "Subtitle",
|
|
1702
|
-
"description": "
|
|
1702
|
+
"description": "Behavior of the collapsible with a title.",
|
|
1703
1703
|
"code": "<q-collapsible v-bind=\"args\">\n\t\t\t\t<q-text-field label=\"Text input\"/>\n\t\t\t</q-collapsible>"
|
|
1704
1704
|
},
|
|
1705
1705
|
{
|
|
1706
1706
|
"title": "Required",
|
|
1707
|
-
"description": "
|
|
1707
|
+
"description": "Behavior of the collapsible when there are required fields inside.",
|
|
1708
1708
|
"code": "<q-collapsible v-bind=\"args\">\n\t\t\t\t<q-text-field label=\"Text input\" required/>\n\t\t\t</q-collapsible>"
|
|
1709
1709
|
},
|
|
1710
1710
|
{
|
|
@@ -2919,7 +2919,7 @@
|
|
|
2919
2919
|
"examples": [
|
|
2920
2920
|
{
|
|
2921
2921
|
"title": "Default",
|
|
2922
|
-
"description": "Default
|
|
2922
|
+
"description": "Default behavior of the dialog.",
|
|
2923
2923
|
"code": "<q-button label=\"Click me\" @click=\"args.modelValue = true\" />\n\t\t\t<q-dialog v-model=\"args.modelValue\" v-bind=\"args\" />"
|
|
2924
2924
|
},
|
|
2925
2925
|
{
|
|
@@ -2939,7 +2939,7 @@
|
|
|
2939
2939
|
},
|
|
2940
2940
|
{
|
|
2941
2941
|
"title": "Custom Buttons",
|
|
2942
|
-
"description": "Custom buttons on the dialog allow the user to customize its look and
|
|
2942
|
+
"description": "Custom buttons on the dialog allow the user to customize its look and behavior.",
|
|
2943
2943
|
"code": "<QDialog :text=\"What shall we do?\" :icon=\"{\n\t\t\ticon: 'help-circle-outline'\n\t\t}\" :buttons=\"[\n\t\t\t{\n\t\t\t\tid: 'scroll-btn',\n\t\t\t\ticon: {\n\t\t\t\t\ticon: 'arrow-up'\n\t\t\t\t},\n\t\t\t\taction: () => {\n\t\t\t\t\twindow.scrollTo({ top: 0, behavior: 'smooth' })\n\t\t\t\t},\n\t\t\t\tprops: {\n\t\t\t\t\tlabel: 'Scroll to Top',\n\t\t\t\t\tvariant: 'bold'\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'refresh-btn',\n\t\t\t\ticon: {\n\t\t\t\t\ticon: 'refresh'\n\t\t\t\t},\n\t\t\t\taction: () => {\n\t\t\t\t\tlocation.reload()\n\t\t\t\t},\n\t\t\t\tprops: {\n\t\t\t\t\tlabel: 'Refresh the page!',\n\t\t\t\t\tvariant: 'bold',\n\t\t\t\t\tcolor: 'danger'\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'cancel-btn',\n\t\t\t\ticon: {\n\t\t\t\t\ticon: 'cancel'\n\t\t\t\t},\n\t\t\t\tprops: {\n\t\t\t\t\tlabel: 'Cancel'\n\t\t\t\t}\n\t\t\t}\n\t\t]\" />"
|
|
2944
2944
|
},
|
|
2945
2945
|
{
|
|
@@ -3857,6 +3857,269 @@
|
|
|
3857
3857
|
}
|
|
3858
3858
|
]
|
|
3859
3859
|
},
|
|
3860
|
+
{
|
|
3861
|
+
"name": "QGauge",
|
|
3862
|
+
"description": "A gauge displays a KPI within a bounded scale and can highlight semantic performance ranges.",
|
|
3863
|
+
"meta": {
|
|
3864
|
+
"props": [
|
|
3865
|
+
{
|
|
3866
|
+
"name": "modelValue",
|
|
3867
|
+
"type": {
|
|
3868
|
+
"kind": "primitive",
|
|
3869
|
+
"name": "number"
|
|
3870
|
+
},
|
|
3871
|
+
"description": "",
|
|
3872
|
+
"required": false
|
|
3873
|
+
},
|
|
3874
|
+
{
|
|
3875
|
+
"name": "id",
|
|
3876
|
+
"type": {
|
|
3877
|
+
"kind": "primitive",
|
|
3878
|
+
"name": "string"
|
|
3879
|
+
},
|
|
3880
|
+
"description": "The component unique identifier.",
|
|
3881
|
+
"required": false,
|
|
3882
|
+
"category": "Identification"
|
|
3883
|
+
},
|
|
3884
|
+
{
|
|
3885
|
+
"name": "min",
|
|
3886
|
+
"type": {
|
|
3887
|
+
"kind": "primitive",
|
|
3888
|
+
"name": "number"
|
|
3889
|
+
},
|
|
3890
|
+
"description": "Lowest value represented by the scale.",
|
|
3891
|
+
"default": "0",
|
|
3892
|
+
"required": false,
|
|
3893
|
+
"category": "Configuration"
|
|
3894
|
+
},
|
|
3895
|
+
{
|
|
3896
|
+
"name": "max",
|
|
3897
|
+
"type": {
|
|
3898
|
+
"kind": "primitive",
|
|
3899
|
+
"name": "number"
|
|
3900
|
+
},
|
|
3901
|
+
"description": "Highest value represented by the scale.",
|
|
3902
|
+
"default": "100",
|
|
3903
|
+
"required": false,
|
|
3904
|
+
"category": "Configuration"
|
|
3905
|
+
},
|
|
3906
|
+
{
|
|
3907
|
+
"name": "ranges",
|
|
3908
|
+
"type": {
|
|
3909
|
+
"kind": "array",
|
|
3910
|
+
"elementType": {
|
|
3911
|
+
"name": "object",
|
|
3912
|
+
"value": {}
|
|
3913
|
+
}
|
|
3914
|
+
},
|
|
3915
|
+
"description": "Colored intervals displayed over the neutral gauge track.",
|
|
3916
|
+
"required": false,
|
|
3917
|
+
"category": "Configuration"
|
|
3918
|
+
},
|
|
3919
|
+
{
|
|
3920
|
+
"name": "ticks",
|
|
3921
|
+
"type": {
|
|
3922
|
+
"kind": "array",
|
|
3923
|
+
"elementType": {
|
|
3924
|
+
"name": "number"
|
|
3925
|
+
}
|
|
3926
|
+
},
|
|
3927
|
+
"description": "Explicit values to label on the scale. Overrides tickCount.",
|
|
3928
|
+
"required": false,
|
|
3929
|
+
"category": "Configuration"
|
|
3930
|
+
},
|
|
3931
|
+
{
|
|
3932
|
+
"name": "tickCount",
|
|
3933
|
+
"type": {
|
|
3934
|
+
"kind": "primitive",
|
|
3935
|
+
"name": "number"
|
|
3936
|
+
},
|
|
3937
|
+
"description": "Number of evenly spaced scale labels generated when ticks is omitted.",
|
|
3938
|
+
"default": "5",
|
|
3939
|
+
"required": false,
|
|
3940
|
+
"category": "Configuration"
|
|
3941
|
+
},
|
|
3942
|
+
{
|
|
3943
|
+
"name": "label",
|
|
3944
|
+
"type": {
|
|
3945
|
+
"kind": "primitive",
|
|
3946
|
+
"name": "string"
|
|
3947
|
+
},
|
|
3948
|
+
"description": "KPI title displayed above the gauge.",
|
|
3949
|
+
"required": false,
|
|
3950
|
+
"category": "Content"
|
|
3951
|
+
},
|
|
3952
|
+
{
|
|
3953
|
+
"name": "valueLabel",
|
|
3954
|
+
"type": {
|
|
3955
|
+
"kind": "union",
|
|
3956
|
+
"types": [
|
|
3957
|
+
{
|
|
3958
|
+
"name": "string"
|
|
3959
|
+
},
|
|
3960
|
+
{
|
|
3961
|
+
"name": "other",
|
|
3962
|
+
"value": "(value: number, min: number, max: number): string"
|
|
3963
|
+
}
|
|
3964
|
+
]
|
|
3965
|
+
},
|
|
3966
|
+
"description": "Text or formatter used as the fallback display and as the current-value part\nof `aria-valuetext`. Set this when the `value` slot changes how the value\nshould be announced, because slot markup cannot be inferred reliably for\naccessibility. When provided, it is treated as complete current-value text,\nso the unit is not appended there automatically.",
|
|
3967
|
+
"required": false,
|
|
3968
|
+
"category": "Content"
|
|
3969
|
+
},
|
|
3970
|
+
{
|
|
3971
|
+
"name": "target",
|
|
3972
|
+
"type": {
|
|
3973
|
+
"kind": "primitive",
|
|
3974
|
+
"name": "number"
|
|
3975
|
+
},
|
|
3976
|
+
"description": "Target value highlighted on the gauge track.",
|
|
3977
|
+
"required": false,
|
|
3978
|
+
"category": "Configuration"
|
|
3979
|
+
},
|
|
3980
|
+
{
|
|
3981
|
+
"name": "targetComparison",
|
|
3982
|
+
"type": {
|
|
3983
|
+
"kind": "enum",
|
|
3984
|
+
"values": [
|
|
3985
|
+
"at-least",
|
|
3986
|
+
"at-most"
|
|
3987
|
+
]
|
|
3988
|
+
},
|
|
3989
|
+
"description": "Target comparison mode. Use `at-least` when values should reach or exceed\nthe target, and `at-most` when values should stay at or below it.",
|
|
3990
|
+
"default": "at-least",
|
|
3991
|
+
"required": false,
|
|
3992
|
+
"category": "Configuration"
|
|
3993
|
+
},
|
|
3994
|
+
{
|
|
3995
|
+
"name": "targetLabel",
|
|
3996
|
+
"type": {
|
|
3997
|
+
"kind": "union",
|
|
3998
|
+
"types": [
|
|
3999
|
+
{
|
|
4000
|
+
"name": "string"
|
|
4001
|
+
},
|
|
4002
|
+
{
|
|
4003
|
+
"name": "other",
|
|
4004
|
+
"value": "(target: number, min: number, max: number): string"
|
|
4005
|
+
}
|
|
4006
|
+
]
|
|
4007
|
+
},
|
|
4008
|
+
"description": "Text or formatter used to describe the target value.",
|
|
4009
|
+
"required": false,
|
|
4010
|
+
"category": "Content"
|
|
4011
|
+
},
|
|
4012
|
+
{
|
|
4013
|
+
"name": "showTargetValue",
|
|
4014
|
+
"type": {
|
|
4015
|
+
"kind": "primitive",
|
|
4016
|
+
"name": "boolean"
|
|
4017
|
+
},
|
|
4018
|
+
"description": "Whether the target value label is displayed next to the target marker.",
|
|
4019
|
+
"required": false,
|
|
4020
|
+
"category": "Presentation"
|
|
4021
|
+
},
|
|
4022
|
+
{
|
|
4023
|
+
"name": "showLegend",
|
|
4024
|
+
"type": {
|
|
4025
|
+
"kind": "primitive",
|
|
4026
|
+
"name": "boolean"
|
|
4027
|
+
},
|
|
4028
|
+
"description": "Whether the legend is displayed below the gauge.",
|
|
4029
|
+
"default": "true",
|
|
4030
|
+
"required": false,
|
|
4031
|
+
"category": "Presentation"
|
|
4032
|
+
},
|
|
4033
|
+
{
|
|
4034
|
+
"name": "showTargetLegend",
|
|
4035
|
+
"type": {
|
|
4036
|
+
"kind": "primitive",
|
|
4037
|
+
"name": "boolean"
|
|
4038
|
+
},
|
|
4039
|
+
"description": "Whether target status items are included in the legend when a target marker\nis visible. The legend itself must also be enabled with `showLegend`.",
|
|
4040
|
+
"default": "true",
|
|
4041
|
+
"required": false,
|
|
4042
|
+
"category": "Presentation"
|
|
4043
|
+
},
|
|
4044
|
+
{
|
|
4045
|
+
"name": "unit",
|
|
4046
|
+
"type": {
|
|
4047
|
+
"kind": "primitive",
|
|
4048
|
+
"name": "string"
|
|
4049
|
+
},
|
|
4050
|
+
"description": "Unit displayed next to the current value.",
|
|
4051
|
+
"required": false,
|
|
4052
|
+
"category": "Content"
|
|
4053
|
+
},
|
|
4054
|
+
{
|
|
4055
|
+
"name": "secondaryLabel",
|
|
4056
|
+
"type": {
|
|
4057
|
+
"kind": "primitive",
|
|
4058
|
+
"name": "string"
|
|
4059
|
+
},
|
|
4060
|
+
"description": "Supporting information displayed below the current value.",
|
|
4061
|
+
"required": false,
|
|
4062
|
+
"category": "Content"
|
|
4063
|
+
},
|
|
4064
|
+
{
|
|
4065
|
+
"name": "texts",
|
|
4066
|
+
"type": {
|
|
4067
|
+
"kind": "object",
|
|
4068
|
+
"fields": {}
|
|
4069
|
+
},
|
|
4070
|
+
"description": "Custom text configurations.",
|
|
4071
|
+
"default": "DEFAULT_TEXTS",
|
|
4072
|
+
"required": false,
|
|
4073
|
+
"category": "Configuration"
|
|
4074
|
+
},
|
|
4075
|
+
{
|
|
4076
|
+
"name": "tickFormatter",
|
|
4077
|
+
"type": {
|
|
4078
|
+
"kind": "unknown",
|
|
4079
|
+
"raw": "((value: number) => string) | undefined"
|
|
4080
|
+
},
|
|
4081
|
+
"description": "Formatter used for scale labels.",
|
|
4082
|
+
"required": false,
|
|
4083
|
+
"category": "Configuration"
|
|
4084
|
+
}
|
|
4085
|
+
],
|
|
4086
|
+
"events": [
|
|
4087
|
+
{
|
|
4088
|
+
"name": "update:modelValue",
|
|
4089
|
+
"description": "",
|
|
4090
|
+
"type": "[value: number]"
|
|
4091
|
+
}
|
|
4092
|
+
],
|
|
4093
|
+
"slots": [
|
|
4094
|
+
{
|
|
4095
|
+
"name": "value",
|
|
4096
|
+
"description": "Custom markup for the visible current value. Also set `valueLabel` when the\nslot changes how the value should be announced, because slot content does\nnot replace `aria-valuetext`."
|
|
4097
|
+
}
|
|
4098
|
+
]
|
|
4099
|
+
},
|
|
4100
|
+
"examples": [
|
|
4101
|
+
{
|
|
4102
|
+
"title": "Default",
|
|
4103
|
+
"description": "The default gauge uses semantic ranges and supporting KPI information.",
|
|
4104
|
+
"code": "<QGauge :model-value=\"76\" :label=\"Delivery performance\" :target=\"80\" :target-label=\"Target 80%\" :show-target-value=\"true\" :unit=\"%\" :secondary-label=\"+4.2% from last month\" />"
|
|
4105
|
+
},
|
|
4106
|
+
{
|
|
4107
|
+
"title": "Lower Is Better",
|
|
4108
|
+
"description": "Range order and colors can represent metrics where lower values are better.",
|
|
4109
|
+
"code": "<QGauge :model-value=\"18\" :label=\"Average response time\" :max=\"60\" :target=\"20\" :target-comparison=\"at-most\" :target-label=\"Target 20 min\" :show-target-value=\"true\" :unit=\"min\" :secondary-label=\"-3 min from last month\" :ranges=\"[\n\t\t\t{ from: 0, to: 20, color: 'success', label: 'On target' },\n\t\t\t{ from: 20, to: 40, color: 'warning', label: 'Attention' },\n\t\t\t{ from: 40, to: 60, color: 'danger', label: 'Critical' }\n\t\t]\" />"
|
|
4110
|
+
},
|
|
4111
|
+
{
|
|
4112
|
+
"title": "Explicit Ticks",
|
|
4113
|
+
"description": "Explicit ticks and formatters support domain-specific values.",
|
|
4114
|
+
"code": "<QGauge :model-value=\"10.6\" :label=\"Revenue\" :max=\"21\" :target=\"15\" :target-label=\"Target 15M\" :show-target-value=\"true\" :unit=\"Dollars\" :ticks=\"0,3,6,9,12,15,18,21\" :value-label=\"(value: number) => `${value.toFixed(1)}M`\" :tick-formatter=\"(value: number) => (value === 0 ? '0' : `${value}M`)\" :ranges=\"[\n\t\t\t{ from: 0, to: 6, color: 'danger', label: 'Below target' },\n\t\t\t{ from: 6, to: 15, color: 'warning', label: 'Approaching target' },\n\t\t\t{ from: 15, to: 21, color: 'success', label: 'On target' }\n\t\t]\" />"
|
|
4115
|
+
},
|
|
4116
|
+
{
|
|
4117
|
+
"title": "Responsive Composition",
|
|
4118
|
+
"description": "Gauges remain responsive when composed into a KPI dashboard owned by the consumer.",
|
|
4119
|
+
"code": "<div class=\"q-gauge-story-grid\">\n\t\t\t\t<q-gauge\n\t\t\t\t\tv-for=\"item in items\"\n\t\t\t\t\t:key=\"item.label\"\n\t\t\t\t\t:model-value=\"item.value\"\n\t\t\t\t\t:label=\"item.label\"\n\t\t\t\t\t:target=\"item.target\"\n\t\t\t\t\t:unit=\"item.unit\"\n\t\t\t\t\t:ranges=\"performanceRanges\"\n\t\t\t\t\t:show-legend=\"false\"\n\t\t\t\t/>\n\t\t\t</div>"
|
|
4120
|
+
}
|
|
4121
|
+
]
|
|
4122
|
+
},
|
|
3860
4123
|
{
|
|
3861
4124
|
"name": "QIcon",
|
|
3862
4125
|
"description": "Displays an icon. Note: This Storybook includes a Material Design Icons v7.3.67 SVG bundle for demonstration purposes. For the complete list of available icons, visit the official [Material Design Icons](https://pictogrammers.com/library/mdi/) page.",
|
package/dist/ui.css
CHANGED
|
@@ -3275,6 +3275,199 @@ body *::-webkit-scrollbar-track {
|
|
|
3275
3275
|
outline: 0;
|
|
3276
3276
|
}
|
|
3277
3277
|
|
|
3278
|
+
.q-gauge {
|
|
3279
|
+
display: flex;
|
|
3280
|
+
width: 100%;
|
|
3281
|
+
min-width: min(14rem, 100%);
|
|
3282
|
+
flex-direction: column;
|
|
3283
|
+
align-items: center;
|
|
3284
|
+
padding: 1rem 1rem 1.125rem;
|
|
3285
|
+
border: 1px solid var(--q-theme-neutral-light);
|
|
3286
|
+
border-radius: 0.25rem;
|
|
3287
|
+
background-color: var(--q-theme-container);
|
|
3288
|
+
box-shadow: 0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
3289
|
+
color: var(--q-theme-on-background);
|
|
3290
|
+
}
|
|
3291
|
+
.q-gauge__label {
|
|
3292
|
+
width: 100%;
|
|
3293
|
+
overflow: hidden;
|
|
3294
|
+
color: var(--q-theme-neutral-dark);
|
|
3295
|
+
font-size: 1rem;
|
|
3296
|
+
font-weight: 700;
|
|
3297
|
+
line-height: 1.25;
|
|
3298
|
+
text-align: center;
|
|
3299
|
+
text-overflow: ellipsis;
|
|
3300
|
+
white-space: nowrap;
|
|
3301
|
+
}
|
|
3302
|
+
.q-gauge__visual {
|
|
3303
|
+
width: 100%;
|
|
3304
|
+
max-width: 18rem;
|
|
3305
|
+
margin-top: 0.25rem;
|
|
3306
|
+
}
|
|
3307
|
+
.q-gauge__svg {
|
|
3308
|
+
display: block;
|
|
3309
|
+
width: 100%;
|
|
3310
|
+
height: auto;
|
|
3311
|
+
overflow: visible;
|
|
3312
|
+
}
|
|
3313
|
+
.q-gauge__track-shadow, .q-gauge__track, .q-gauge__range {
|
|
3314
|
+
fill: none;
|
|
3315
|
+
stroke-linecap: butt;
|
|
3316
|
+
}
|
|
3317
|
+
.q-gauge__track-shadow {
|
|
3318
|
+
stroke: rgb(var(--q-theme-neutral-dark-rgb)/18%);
|
|
3319
|
+
stroke-width: 26;
|
|
3320
|
+
}
|
|
3321
|
+
.q-gauge__track {
|
|
3322
|
+
stroke: rgb(var(--q-theme-neutral-light-rgb)/82%);
|
|
3323
|
+
stroke-width: 24;
|
|
3324
|
+
}
|
|
3325
|
+
.q-gauge__range {
|
|
3326
|
+
stroke-width: 22;
|
|
3327
|
+
}
|
|
3328
|
+
.q-gauge__tick line {
|
|
3329
|
+
stroke: var(--q-theme-container);
|
|
3330
|
+
stroke-linecap: square;
|
|
3331
|
+
stroke-width: 3;
|
|
3332
|
+
}
|
|
3333
|
+
.q-gauge__tick text {
|
|
3334
|
+
fill: rgb(var(--q-theme-neutral-dark-rgb)/78%);
|
|
3335
|
+
font-size: 0.75rem;
|
|
3336
|
+
font-weight: 700;
|
|
3337
|
+
text-anchor: middle;
|
|
3338
|
+
dominant-baseline: middle;
|
|
3339
|
+
}
|
|
3340
|
+
.q-gauge__target {
|
|
3341
|
+
pointer-events: none;
|
|
3342
|
+
}
|
|
3343
|
+
.q-gauge__target line {
|
|
3344
|
+
stroke-linecap: round;
|
|
3345
|
+
vector-effect: non-scaling-stroke;
|
|
3346
|
+
}
|
|
3347
|
+
.q-gauge__target-outline {
|
|
3348
|
+
stroke: var(--q-theme-container);
|
|
3349
|
+
stroke-width: 7;
|
|
3350
|
+
}
|
|
3351
|
+
.q-gauge__target-line {
|
|
3352
|
+
stroke: var(--q-theme-neutral-dark);
|
|
3353
|
+
stroke-width: 3;
|
|
3354
|
+
}
|
|
3355
|
+
.q-gauge__target--achieved .q-gauge__target-line {
|
|
3356
|
+
stroke: var(--q-theme-success);
|
|
3357
|
+
}
|
|
3358
|
+
.q-gauge__target--missed .q-gauge__target-line {
|
|
3359
|
+
stroke: var(--q-theme-danger);
|
|
3360
|
+
stroke-dasharray: 3 4;
|
|
3361
|
+
}
|
|
3362
|
+
.q-gauge__target-value {
|
|
3363
|
+
fill: var(--q-theme-neutral-dark);
|
|
3364
|
+
font-size: 0.6875rem;
|
|
3365
|
+
font-weight: 700;
|
|
3366
|
+
paint-order: stroke;
|
|
3367
|
+
stroke: var(--q-theme-container);
|
|
3368
|
+
stroke-linejoin: round;
|
|
3369
|
+
stroke-width: 4;
|
|
3370
|
+
text-anchor: middle;
|
|
3371
|
+
dominant-baseline: middle;
|
|
3372
|
+
}
|
|
3373
|
+
.q-gauge__target--achieved .q-gauge__target-value {
|
|
3374
|
+
fill: var(--q-theme-success);
|
|
3375
|
+
}
|
|
3376
|
+
.q-gauge__target--missed .q-gauge__target-value {
|
|
3377
|
+
fill: var(--q-theme-danger);
|
|
3378
|
+
}
|
|
3379
|
+
.q-gauge__needle {
|
|
3380
|
+
transition: transform 0.3s ease;
|
|
3381
|
+
}
|
|
3382
|
+
.q-gauge__needle line {
|
|
3383
|
+
stroke: var(--q-theme-neutral-dark);
|
|
3384
|
+
stroke-linecap: round;
|
|
3385
|
+
stroke-width: 3;
|
|
3386
|
+
}
|
|
3387
|
+
.q-gauge__hub {
|
|
3388
|
+
fill: var(--q-theme-container);
|
|
3389
|
+
filter: drop-shadow(0 0.4rem 0.45rem rgb(var(--q-theme-neutral-dark-rgb)/28%));
|
|
3390
|
+
stroke: rgb(var(--q-theme-neutral-light-rgb)/65%);
|
|
3391
|
+
stroke-width: 1;
|
|
3392
|
+
}
|
|
3393
|
+
.q-gauge__hub-center {
|
|
3394
|
+
fill: var(--q-theme-container);
|
|
3395
|
+
}
|
|
3396
|
+
.q-gauge__value-row {
|
|
3397
|
+
display: flex;
|
|
3398
|
+
min-height: 1.75rem;
|
|
3399
|
+
align-items: baseline;
|
|
3400
|
+
justify-content: center;
|
|
3401
|
+
gap: 0.25rem;
|
|
3402
|
+
margin-top: -0.25rem;
|
|
3403
|
+
}
|
|
3404
|
+
.q-gauge__value {
|
|
3405
|
+
color: var(--q-theme-neutral-dark);
|
|
3406
|
+
font-size: 1.5rem;
|
|
3407
|
+
font-weight: 700;
|
|
3408
|
+
line-height: 1;
|
|
3409
|
+
}
|
|
3410
|
+
.q-gauge__unit {
|
|
3411
|
+
color: var(--q-theme-neutral);
|
|
3412
|
+
font-size: 0.75rem;
|
|
3413
|
+
}
|
|
3414
|
+
.q-gauge__secondary {
|
|
3415
|
+
color: var(--q-theme-neutral);
|
|
3416
|
+
font-size: 0.75rem;
|
|
3417
|
+
min-height: 1.125rem;
|
|
3418
|
+
margin-top: 0.25rem;
|
|
3419
|
+
text-align: center;
|
|
3420
|
+
}
|
|
3421
|
+
.q-gauge__legend {
|
|
3422
|
+
display: flex;
|
|
3423
|
+
width: 100%;
|
|
3424
|
+
flex-wrap: wrap;
|
|
3425
|
+
justify-content: center;
|
|
3426
|
+
gap: 0.375rem 0.75rem;
|
|
3427
|
+
margin: 0.75rem 0 0;
|
|
3428
|
+
padding: 0;
|
|
3429
|
+
list-style: none;
|
|
3430
|
+
}
|
|
3431
|
+
.q-gauge__legend-item {
|
|
3432
|
+
display: inline-flex;
|
|
3433
|
+
min-width: 0;
|
|
3434
|
+
align-items: center;
|
|
3435
|
+
gap: 0.3125rem;
|
|
3436
|
+
color: var(--q-theme-neutral);
|
|
3437
|
+
font-size: 0.75rem;
|
|
3438
|
+
line-height: 1.2;
|
|
3439
|
+
}
|
|
3440
|
+
.q-gauge__legend-item--active {
|
|
3441
|
+
color: var(--q-theme-neutral-dark);
|
|
3442
|
+
font-weight: 700;
|
|
3443
|
+
}
|
|
3444
|
+
.q-gauge__legend-swatch {
|
|
3445
|
+
width: 0.75rem;
|
|
3446
|
+
height: 0.75rem;
|
|
3447
|
+
flex: 0 0 0.75rem;
|
|
3448
|
+
border: 1px solid rgb(var(--q-theme-neutral-dark-rgb)/12%);
|
|
3449
|
+
border-radius: 0.125rem;
|
|
3450
|
+
}
|
|
3451
|
+
.q-gauge__legend-target {
|
|
3452
|
+
width: 1rem;
|
|
3453
|
+
height: 0;
|
|
3454
|
+
flex: 0 0 1rem;
|
|
3455
|
+
border-top: 0.1875rem solid var(--q-theme-success);
|
|
3456
|
+
border-radius: 999px;
|
|
3457
|
+
}
|
|
3458
|
+
.q-gauge__legend-target--missed {
|
|
3459
|
+
border-color: var(--q-theme-danger);
|
|
3460
|
+
border-top-style: dashed;
|
|
3461
|
+
}
|
|
3462
|
+
.q-gauge__legend-label {
|
|
3463
|
+
overflow-wrap: anywhere;
|
|
3464
|
+
}
|
|
3465
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3466
|
+
.q-gauge__needle {
|
|
3467
|
+
transition: none;
|
|
3468
|
+
}
|
|
3469
|
+
}
|
|
3470
|
+
|
|
3278
3471
|
.q-container {
|
|
3279
3472
|
width: 100%;
|
|
3280
3473
|
margin-left: auto;
|