@politiet/sheriff-web-components 2.9.0 → 2.10.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 +782 -4
- package/dist/frameworks/preact.d.ts +4 -1
- package/dist/frameworks/preact.d.ts.map +1 -1
- package/dist/frameworks/react.d.ts +4 -1
- package/dist/frameworks/react.d.ts.map +1 -1
- package/dist/frameworks/solidjs.d.ts +1 -0
- package/dist/frameworks/solidjs.d.ts.map +1 -1
- package/dist/frameworks/svelte.d.ts +1 -0
- package/dist/frameworks/svelte.d.ts.map +1 -1
- package/dist/frameworks/vue.d.ts +1 -0
- package/dist/frameworks/vue.d.ts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/react-wrappers/SDSEnvironmentBannerWrapper.d.ts +3 -0
- package/dist/react-wrappers/SDSEnvironmentBannerWrapper.d.ts.map +1 -0
- package/dist/react-wrappers/SDSEnvironmentBannerWrapper.js +10 -0
- package/dist/react-wrappers/SDSEnvironmentBannerWrapper.js.map +1 -0
- package/dist/react-wrappers/index.d.ts +1 -0
- package/dist/react-wrappers/index.d.ts.map +1 -1
- package/dist/react-wrappers/index.js +1 -0
- package/dist/react-wrappers/index.js.map +1 -1
- package/dist/sds-environment-banner/sds-environment-banner.component.d.ts +13 -0
- package/dist/sds-environment-banner/sds-environment-banner.component.d.ts.map +1 -0
- package/dist/sds-environment-banner/sds-environment-banner.component.js +36 -0
- package/dist/sds-environment-banner/sds-environment-banner.component.js.map +1 -0
- package/dist/sds-environment-banner/sds-environment-banner.d.ts +9 -0
- package/dist/sds-environment-banner/sds-environment-banner.d.ts.map +1 -0
- package/dist/sds-environment-banner/sds-environment-banner.js +15 -0
- package/dist/sds-environment-banner/sds-environment-banner.js.map +1 -0
- package/dist/sds-environment-banner/sds-environment-banner.styles.d.ts +2 -0
- package/dist/sds-environment-banner/sds-environment-banner.styles.d.ts.map +1 -0
- package/dist/sds-environment-banner/sds-environment-banner.styles.js +98 -0
- package/dist/sds-environment-banner/sds-environment-banner.styles.js.map +1 -0
- package/dist/sds-icon/sds-icon-names.d.ts +1 -1
- package/dist/sds-icon/sds-icon-names.d.ts.map +1 -1
- package/dist/sds-icon/sds-icon-names.js +484 -0
- package/dist/sds-icon/sds-icon-names.js.map +1 -1
- package/dist/sds-radio/sds-radio.d.ts.map +1 -1
- package/dist/sds-radio/sds-radio.js +4 -0
- package/dist/sds-radio/sds-radio.js.map +1 -1
- package/dist/sds-select/sds-select.component.d.ts.map +1 -1
- package/dist/sds-select/sds-select.component.js +4 -0
- package/dist/sds-select/sds-select.component.js.map +1 -1
- package/dist/sds-select/sds-select.styles.d.ts.map +1 -1
- package/dist/sds-select/sds-select.styles.js +12 -18
- package/dist/sds-select/sds-select.styles.js.map +1 -1
- package/dist/sds-textfield/sds-textfield.component.d.ts +68 -0
- package/dist/sds-textfield/sds-textfield.component.d.ts.map +1 -0
- package/dist/sds-textfield/sds-textfield.component.js +249 -0
- package/dist/sds-textfield/sds-textfield.component.js.map +1 -0
- package/dist/sds-textfield/sds-textfield.d.ts +3 -66
- package/dist/sds-textfield/sds-textfield.d.ts.map +1 -1
- package/dist/sds-textfield/sds-textfield.js +2 -241
- package/dist/sds-textfield/sds-textfield.js.map +1 -1
- package/dist/sheriff-web-components.js +148 -54
- package/package.json +12 -3
- package/web-types.json +94 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@politiet/sheriff-web-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "Sheriff Design System Web Components Library",
|
|
5
5
|
"author": "Politiets IT-enhet",
|
|
6
6
|
"license": "ISC",
|
|
@@ -75,6 +75,10 @@
|
|
|
75
75
|
"import": "./dist/sds-dialog/sds-dialog.js",
|
|
76
76
|
"types": "./dist/sds-dialog/sds-dialog.d.ts"
|
|
77
77
|
},
|
|
78
|
+
"./sds-environment-banner": {
|
|
79
|
+
"import": "./dist/sds-environment-banner/sds-environment-banner.js",
|
|
80
|
+
"types": "./dist/sds-environment-banner/sds-environment-banner.d.ts"
|
|
81
|
+
},
|
|
78
82
|
"./sds-heading": {
|
|
79
83
|
"import": "./dist/sds-heading/sds-heading.js",
|
|
80
84
|
"types": "./dist/sds-heading/sds-heading.d.ts"
|
|
@@ -168,10 +172,10 @@
|
|
|
168
172
|
},
|
|
169
173
|
"optionalDependencies": {
|
|
170
174
|
"@lit/react": "^1.0.8",
|
|
171
|
-
"@politiet/sheriff-icons": "^2.0
|
|
175
|
+
"@politiet/sheriff-icons": "^2.1.0"
|
|
172
176
|
},
|
|
173
177
|
"peerDependencies": {
|
|
174
|
-
"@politiet/sheriff-css-framework": "^2.
|
|
178
|
+
"@politiet/sheriff-css-framework": "^2.5.0",
|
|
175
179
|
"typescript": ">=3.8.0"
|
|
176
180
|
},
|
|
177
181
|
"peerDependenciesMeta": {
|
|
@@ -180,13 +184,18 @@
|
|
|
180
184
|
}
|
|
181
185
|
},
|
|
182
186
|
"devDependencies": {
|
|
187
|
+
"@axe-core/playwright": "^4.11.3",
|
|
183
188
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
184
189
|
"@digdir/designsystemet-css": "^1.12.1",
|
|
185
190
|
"@digdir/designsystemet-web": "^1.12.1",
|
|
186
191
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
187
192
|
"@rollup/plugin-terser": "^1.0.0",
|
|
188
193
|
"lit-web-types": "^0.1.5",
|
|
194
|
+
"preact": "^10.26.1",
|
|
189
195
|
"rollup": "^4.59.0",
|
|
196
|
+
"solid-js": "^1.9.4",
|
|
197
|
+
"ts-lit-plugin": "^2.0.2",
|
|
198
|
+
"vue": "^3.5.13",
|
|
190
199
|
"web-component-analyzer-webtypes": "^2.0.12"
|
|
191
200
|
},
|
|
192
201
|
"wca": {
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@politiet/sheriff-web-components",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.10.0",
|
|
5
5
|
"framework": "web-components",
|
|
6
6
|
"description-markup": "markdown",
|
|
7
7
|
"contributions": {
|
|
@@ -2994,6 +2994,97 @@
|
|
|
2994
2994
|
]
|
|
2995
2995
|
}
|
|
2996
2996
|
},
|
|
2997
|
+
{
|
|
2998
|
+
"name": "sds-environment-banner",
|
|
2999
|
+
"source": {
|
|
3000
|
+
"module": "./src/sds-environment-banner/sds-environment-banner.ts",
|
|
3001
|
+
"symbol": "SDSEnvironmentBanner"
|
|
3002
|
+
},
|
|
3003
|
+
"attributes": [
|
|
3004
|
+
{
|
|
3005
|
+
"name": "env",
|
|
3006
|
+
"required": false,
|
|
3007
|
+
"priority": "normal",
|
|
3008
|
+
"value": {
|
|
3009
|
+
"type": [
|
|
3010
|
+
"EnvironmentBannerEnv",
|
|
3011
|
+
"undefined"
|
|
3012
|
+
],
|
|
3013
|
+
"required": true
|
|
3014
|
+
},
|
|
3015
|
+
"source": {
|
|
3016
|
+
"module": "./src/sds-environment-banner/sds-environment-banner.ts",
|
|
3017
|
+
"symbol": "SDSEnvironmentBanner.env"
|
|
3018
|
+
}
|
|
3019
|
+
},
|
|
3020
|
+
{
|
|
3021
|
+
"name": "build",
|
|
3022
|
+
"required": false,
|
|
3023
|
+
"priority": "normal",
|
|
3024
|
+
"value": {
|
|
3025
|
+
"type": [
|
|
3026
|
+
"string",
|
|
3027
|
+
"undefined"
|
|
3028
|
+
],
|
|
3029
|
+
"required": true
|
|
3030
|
+
},
|
|
3031
|
+
"source": {
|
|
3032
|
+
"module": "./src/sds-environment-banner/sds-environment-banner.ts",
|
|
3033
|
+
"symbol": "SDSEnvironmentBanner.build"
|
|
3034
|
+
}
|
|
3035
|
+
}
|
|
3036
|
+
],
|
|
3037
|
+
"js": {
|
|
3038
|
+
"properties": [
|
|
3039
|
+
{
|
|
3040
|
+
"name": "styles",
|
|
3041
|
+
"required": false,
|
|
3042
|
+
"priority": "normal",
|
|
3043
|
+
"value": {
|
|
3044
|
+
"type": "CSSResult[]",
|
|
3045
|
+
"required": true,
|
|
3046
|
+
"default": "[\"styles\"]"
|
|
3047
|
+
},
|
|
3048
|
+
"source": {
|
|
3049
|
+
"module": "./src/sds-environment-banner/sds-environment-banner.ts",
|
|
3050
|
+
"symbol": "SDSEnvironmentBanner.styles"
|
|
3051
|
+
}
|
|
3052
|
+
},
|
|
3053
|
+
{
|
|
3054
|
+
"name": "env",
|
|
3055
|
+
"required": false,
|
|
3056
|
+
"priority": "normal",
|
|
3057
|
+
"value": {
|
|
3058
|
+
"type": [
|
|
3059
|
+
"EnvironmentBannerEnv",
|
|
3060
|
+
"undefined"
|
|
3061
|
+
],
|
|
3062
|
+
"required": true
|
|
3063
|
+
},
|
|
3064
|
+
"source": {
|
|
3065
|
+
"module": "./src/sds-environment-banner/sds-environment-banner.ts",
|
|
3066
|
+
"symbol": "SDSEnvironmentBanner.env"
|
|
3067
|
+
}
|
|
3068
|
+
},
|
|
3069
|
+
{
|
|
3070
|
+
"name": "build",
|
|
3071
|
+
"required": false,
|
|
3072
|
+
"priority": "normal",
|
|
3073
|
+
"value": {
|
|
3074
|
+
"type": [
|
|
3075
|
+
"string",
|
|
3076
|
+
"undefined"
|
|
3077
|
+
],
|
|
3078
|
+
"required": true
|
|
3079
|
+
},
|
|
3080
|
+
"source": {
|
|
3081
|
+
"module": "./src/sds-environment-banner/sds-environment-banner.ts",
|
|
3082
|
+
"symbol": "SDSEnvironmentBanner.build"
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
3085
|
+
]
|
|
3086
|
+
}
|
|
3087
|
+
},
|
|
2997
3088
|
{
|
|
2998
3089
|
"name": "sds-heading",
|
|
2999
3090
|
"source": {
|
|
@@ -4640,7 +4731,7 @@
|
|
|
4640
4731
|
"value": {
|
|
4641
4732
|
"type": "(event: KeyboardEvent) => void",
|
|
4642
4733
|
"required": true,
|
|
4643
|
-
"default": "\"(event: KeyboardEvent) => {\\n\\t\\tif (!this.name || this.disabled || this.readOnly) return;\\n\\n\\t\\tconst root = this.getRootNode() as Document | ShadowRoot;\\n\\t\\tconst radios = Array.from(root.querySelectorAll<SDSRadio>(`sds-radio[name=\\\"${this.name}\\\"]`));\\n\\t\\tconst currentIndex = radios.indexOf(this);\\n\\n\\t\\tif (currentIndex === -1) return;\\n\\n\\t\\tlet targetIndex: number | null = null;\\n\\n\\t\\tswitch (event.key) {\\n\\t\\t\\tcase 'ArrowUp':\\n\\t\\t\\tcase 'ArrowLeft':\\n\\t\\t\\t\\ttargetIndex = currentIndex > 0 ? currentIndex - 1 : radios.length - 1;\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\tcase 'ArrowDown':\\n\\t\\t\\tcase 'ArrowRight':\\n\\t\\t\\t\\ttargetIndex = currentIndex < radios.length - 1 ? currentIndex + 1 : 0;\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\tdefault:\\n\\t\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\tconst targetRadio = radios[targetIndex];\\n\\t\\ttargetRadio?.focus();\\n\\t\\ttargetRadio?.click();\\n\\t\\tevent.preventDefault();\\n\\t}\""
|
|
4734
|
+
"default": "\"(event: KeyboardEvent) => {\\n\\t\\tif (!this.name || this.disabled || this.readOnly) return;\\n\\n\\t\\t// If modifier keys are in play no changes should be applied\\n\\t\\tif (event.altKey || event.ctrlKey || event.shiftKey || event.metaKey) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\tconst root = this.getRootNode() as Document | ShadowRoot;\\n\\t\\tconst radios = Array.from(root.querySelectorAll<SDSRadio>(`sds-radio[name=\\\"${this.name}\\\"]`));\\n\\t\\tconst currentIndex = radios.indexOf(this);\\n\\n\\t\\tif (currentIndex === -1) return;\\n\\n\\t\\tlet targetIndex: number | null = null;\\n\\n\\t\\tswitch (event.key) {\\n\\t\\t\\tcase 'ArrowUp':\\n\\t\\t\\tcase 'ArrowLeft':\\n\\t\\t\\t\\ttargetIndex = currentIndex > 0 ? currentIndex - 1 : radios.length - 1;\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\tcase 'ArrowDown':\\n\\t\\t\\tcase 'ArrowRight':\\n\\t\\t\\t\\ttargetIndex = currentIndex < radios.length - 1 ? currentIndex + 1 : 0;\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\tdefault:\\n\\t\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\tconst targetRadio = radios[targetIndex];\\n\\t\\ttargetRadio?.focus();\\n\\t\\ttargetRadio?.click();\\n\\t\\tevent.preventDefault();\\n\\t}\""
|
|
4644
4735
|
},
|
|
4645
4736
|
"source": {
|
|
4646
4737
|
"module": "./src/sds-radio/sds-radio.ts",
|
|
@@ -5295,7 +5386,7 @@
|
|
|
5295
5386
|
"value": {
|
|
5296
5387
|
"type": "(event: KeyboardEvent) => void",
|
|
5297
5388
|
"required": true,
|
|
5298
|
-
"default": "\"(event: KeyboardEvent) => {\\n\\t\\tif (!this.readOnly) return;\\n\\n\\t\\tconst keysThatChange = new Set(['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Home', 'End', 'PageUp', 'PageDown', ' ', 'Enter']);\\n\\n\\t\\tif (keysThatChange.has(event.key)) {\\n\\t\\t\\tevent.preventDefault();\\n\\t\\t\\tevent.stopImmediatePropagation();\\n\\t\\t}\\n\\t}\""
|
|
5389
|
+
"default": "\"(event: KeyboardEvent) => {\\n\\t\\tif (!this.readOnly) return;\\n\\n\\t\\t// If modifier keys are in play no changes should be applied\\n\\t\\tif (event.altKey || event.ctrlKey || event.shiftKey || event.metaKey) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\tconst keysThatChange = new Set(['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Home', 'End', 'PageUp', 'PageDown', ' ', 'Enter']);\\n\\n\\t\\tif (keysThatChange.has(event.key)) {\\n\\t\\t\\tevent.preventDefault();\\n\\t\\t\\tevent.stopImmediatePropagation();\\n\\t\\t}\\n\\t}\""
|
|
5299
5390
|
},
|
|
5300
5391
|
"source": {
|
|
5301
5392
|
"module": "./src/sds-select/sds-select.ts",
|