@folkehelseinstituttet/designsystem 0.45.4 → 0.47.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 +1 -1
- package/fhi-body.js +32 -4
- package/fhi-body.js.map +1 -1
- package/fhi-body.manifest.json +1 -1
- package/fhi-segmented-control-item.d.ts +1 -0
- package/fhi-segmented-control-item.js +114 -0
- package/fhi-segmented-control-item.js.map +1 -0
- package/fhi-segmented-control-item.manifest.json +1 -0
- package/fhi-segmented-control.d.ts +1 -0
- package/fhi-segmented-control.js +119 -0
- package/fhi-segmented-control.js.map +1 -0
- package/fhi-segmented-control.manifest.json +1 -0
- package/index.js +6 -4
- package/package.json +1 -1
- package/web-types.json +124 -1
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@folkehelseinstituttet/designsystem",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.47.0",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -4978,6 +4978,109 @@
|
|
|
4978
4978
|
"events": []
|
|
4979
4979
|
}
|
|
4980
4980
|
},
|
|
4981
|
+
{
|
|
4982
|
+
"name": "fhi-segmented-control-item",
|
|
4983
|
+
"description": "## FHI Segmented Control Item\n\nhttps://designsystem.fhi.no/?path=/docs/komponenter-segmented-control--docs\n\nThe <fhi-segmented-control-item> component represents an individual choice within a <fhi-segmented-control>. It can display text content with or without an icon.\n\n---\n\n\n### **Slot Section:**\n - _default_ - The default slot. Used for placing the text content.\n- **icon** - Slot for placing an icon.",
|
|
4984
|
+
"doc-url": "",
|
|
4985
|
+
"attributes": [
|
|
4986
|
+
{
|
|
4987
|
+
"name": "selected",
|
|
4988
|
+
"description": "Whether the segmented control button is selected or not.",
|
|
4989
|
+
"value": { "type": "boolean", "default": "false" }
|
|
4990
|
+
},
|
|
4991
|
+
{
|
|
4992
|
+
"name": "value",
|
|
4993
|
+
"description": "The value of the segmented control item.\nIf not specified, the value will be derived from the items text content.",
|
|
4994
|
+
"value": { "type": "string | null", "default": "null" }
|
|
4995
|
+
},
|
|
4996
|
+
{
|
|
4997
|
+
"name": "variant",
|
|
4998
|
+
"description": "Sets the segmented control item's visual style and emphasis. This is automatically inherited from the parent segmented control.",
|
|
4999
|
+
"value": { "type": "'strong' | 'subtle'", "default": "'strong'" }
|
|
5000
|
+
}
|
|
5001
|
+
],
|
|
5002
|
+
"slots": [
|
|
5003
|
+
{
|
|
5004
|
+
"name": "",
|
|
5005
|
+
"description": "The default slot. Used for placing the text content."
|
|
5006
|
+
},
|
|
5007
|
+
{ "name": "icon", "description": "Slot for placing an icon." }
|
|
5008
|
+
],
|
|
5009
|
+
"events": [],
|
|
5010
|
+
"js": {
|
|
5011
|
+
"properties": [
|
|
5012
|
+
{ "name": "contentSlot", "type": "HTMLSlotElement" },
|
|
5013
|
+
{ "name": "iconSlotElements", "type": "Array<HTMLElement>" },
|
|
5014
|
+
{
|
|
5015
|
+
"name": "selected",
|
|
5016
|
+
"description": "Whether the segmented control button is selected or not.",
|
|
5017
|
+
"type": "boolean"
|
|
5018
|
+
},
|
|
5019
|
+
{
|
|
5020
|
+
"name": "value",
|
|
5021
|
+
"description": "The value of the segmented control item.\nIf not specified, the value will be derived from the items text content.",
|
|
5022
|
+
"type": "string | null"
|
|
5023
|
+
},
|
|
5024
|
+
{
|
|
5025
|
+
"name": "variant",
|
|
5026
|
+
"description": "Sets the segmented control item's visual style and emphasis. This is automatically inherited from the parent segmented control.",
|
|
5027
|
+
"type": "'strong' | 'subtle'"
|
|
5028
|
+
}
|
|
5029
|
+
],
|
|
5030
|
+
"events": []
|
|
5031
|
+
}
|
|
5032
|
+
},
|
|
5033
|
+
{
|
|
5034
|
+
"name": "fhi-segmented-control",
|
|
5035
|
+
"description": "## FHI Segmented Control\n\nhttps://designsystem.fhi.no/?path=/docs/komponenter-segmented-control--docs\n\nThe <fhi-segmented-control> component lets the user select one option from a group of related choices. Each choice is defined with a <fhi-segmented-control-item> element.\n\nThe choice should affect the content within the same context.\n\nExample usage:\n```html\n<fhi-segmented-control value=\"item2\">\n <fhi-segmented-control-item value=\"item1\">Item 1</fhi-segmented-control-item>\n <fhi-segmented-control-item value=\"item2\">Item 2</fhi-segmented-control-item>\n <fhi-segmented-control-item value=\"item3\">Item 3</fhi-segmented-control-item>\n</fhi-segmented-control>\n```\n\n---\n\n\n### **Custom Events:**\n - **change** - Standard DOM event with the type `change`.\nThis event is dispatched when the selected item of the segmented control changes.\n\n### **Slot Section:**\n - _default_ - The default slot. Used for placing <fhi-segmented-control-item> elements.",
|
|
5036
|
+
"doc-url": "",
|
|
5037
|
+
"attributes": [
|
|
5038
|
+
{
|
|
5039
|
+
"name": "value",
|
|
5040
|
+
"description": "The currently selected value of the segmented control.",
|
|
5041
|
+
"value": { "type": "string" }
|
|
5042
|
+
},
|
|
5043
|
+
{
|
|
5044
|
+
"name": "variant",
|
|
5045
|
+
"description": "The visual style of the segmented control. This will be applied to all segmented control items within the group.",
|
|
5046
|
+
"value": { "type": "'strong' | 'subtle'", "default": "'strong'" }
|
|
5047
|
+
}
|
|
5048
|
+
],
|
|
5049
|
+
"slots": [
|
|
5050
|
+
{
|
|
5051
|
+
"name": "",
|
|
5052
|
+
"description": "The default slot. Used for placing <fhi-segmented-control-item> elements."
|
|
5053
|
+
}
|
|
5054
|
+
],
|
|
5055
|
+
"events": [
|
|
5056
|
+
{
|
|
5057
|
+
"name": "change",
|
|
5058
|
+
"type": "Event",
|
|
5059
|
+
"description": "Standard DOM event with the type `change`.\nThis event is dispatched when the selected item of the segmented control changes."
|
|
5060
|
+
}
|
|
5061
|
+
],
|
|
5062
|
+
"js": {
|
|
5063
|
+
"properties": [
|
|
5064
|
+
{
|
|
5065
|
+
"name": "value",
|
|
5066
|
+
"description": "The currently selected value of the segmented control.",
|
|
5067
|
+
"type": "string"
|
|
5068
|
+
},
|
|
5069
|
+
{
|
|
5070
|
+
"name": "variant",
|
|
5071
|
+
"description": "The visual style of the segmented control. This will be applied to all segmented control items within the group.",
|
|
5072
|
+
"type": "'strong' | 'subtle'"
|
|
5073
|
+
}
|
|
5074
|
+
],
|
|
5075
|
+
"events": [
|
|
5076
|
+
{
|
|
5077
|
+
"name": "change",
|
|
5078
|
+
"type": "Event",
|
|
5079
|
+
"description": "Standard DOM event with the type `change`.\nThis event is dispatched when the selected item of the segmented control changes."
|
|
5080
|
+
}
|
|
5081
|
+
]
|
|
5082
|
+
}
|
|
5083
|
+
},
|
|
4981
5084
|
{
|
|
4982
5085
|
"name": "fhi-select-item",
|
|
4983
5086
|
"description": "## FHI Select Item\n\nhttps://designsystem.fhi.no/?path=/docs/komponenter-select--docs\n\nThe `<fhi-select-item>` component is used to represent an individual option within a `<fhi-select>` dropdown list.\nIt provides a labeled option element with selection state and value attribute.\n\n---\n\n\n### **Slot Section:**\n - _default_ - The default slot is used to provide text content for the `<fhi-select-item>` element.",
|
|
@@ -5150,6 +5253,11 @@
|
|
|
5150
5253
|
"description": "Sets color of the given text. It supports any valid CSS color value (e.g. hex, rgb, rgba, hsl, hsla, color names).\n\nIt is recommended to use Design Tokens for colors defined in the FHI Design System.\nSee: https://designsystem.fhi.no/?path=/docs/design-tokens-farger--docs\n\nExample:\n```html\n <fhi-body color=\"var(--fhi-color-primary-text-default)\">\n This text will be in the primary text color.\n </fhi-body>\n```",
|
|
5151
5254
|
"value": { "type": "string" }
|
|
5152
5255
|
},
|
|
5256
|
+
{
|
|
5257
|
+
"name": "emphasized",
|
|
5258
|
+
"description": "Sets the text to be in italics and semantically emphasized.\n\nExample:\n\n </fhi-body>\n```",
|
|
5259
|
+
"value": { "type": "boolean" }
|
|
5260
|
+
},
|
|
5153
5261
|
{
|
|
5154
5262
|
"name": "size",
|
|
5155
5263
|
"description": "Sets the font size of the given text.",
|
|
@@ -5157,6 +5265,11 @@
|
|
|
5157
5265
|
"type": "'large' | 'medium' | 'small'",
|
|
5158
5266
|
"default": "'medium'"
|
|
5159
5267
|
}
|
|
5268
|
+
},
|
|
5269
|
+
{
|
|
5270
|
+
"name": "strong",
|
|
5271
|
+
"description": "Sets the text to be bold and semantically important.\n\nExample:\n\n </fhi-body>\n```",
|
|
5272
|
+
"value": { "type": "boolean" }
|
|
5160
5273
|
}
|
|
5161
5274
|
],
|
|
5162
5275
|
"slots": [
|
|
@@ -5173,10 +5286,20 @@
|
|
|
5173
5286
|
"description": "Sets color of the given text. It supports any valid CSS color value (e.g. hex, rgb, rgba, hsl, hsla, color names).\n\nIt is recommended to use Design Tokens for colors defined in the FHI Design System.\nSee: https://designsystem.fhi.no/?path=/docs/design-tokens-farger--docs\n\nExample:\n```html\n <fhi-body color=\"var(--fhi-color-primary-text-default)\">\n This text will be in the primary text color.\n </fhi-body>\n```",
|
|
5174
5287
|
"type": "string"
|
|
5175
5288
|
},
|
|
5289
|
+
{
|
|
5290
|
+
"name": "emphasized",
|
|
5291
|
+
"description": "Sets the text to be in italics and semantically emphasized.\n\nExample:\n\n </fhi-body>\n```",
|
|
5292
|
+
"type": "boolean"
|
|
5293
|
+
},
|
|
5176
5294
|
{
|
|
5177
5295
|
"name": "size",
|
|
5178
5296
|
"description": "Sets the font size of the given text.",
|
|
5179
5297
|
"type": "'large' | 'medium' | 'small'"
|
|
5298
|
+
},
|
|
5299
|
+
{
|
|
5300
|
+
"name": "strong",
|
|
5301
|
+
"description": "Sets the text to be bold and semantically important.\n\nExample:\n\n </fhi-body>\n```",
|
|
5302
|
+
"type": "boolean"
|
|
5180
5303
|
}
|
|
5181
5304
|
],
|
|
5182
5305
|
"events": []
|