@lmvz-ds/components 0.15.2 → 0.17.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/dist/cjs/{Effect-CpZhfb0D.js → Effect-DdYOHaR4.js} +121 -83
- package/dist/cjs/{aria-loader-B7b45RMv.js → aria-loader-BRxRUIyi.js} +45 -10
- package/dist/cjs/{assets-BnJmIx_h.js → assets-OvQ-WUwR.js} +2 -2
- package/dist/cjs/{component-CRc6eHcV.js → component-Csg9MtNK.js} +4 -2
- package/dist/cjs/{icons-Brr4vqiE.js → icons-EHBLbidD.js} +2 -2
- package/dist/cjs/{index-QRnWYctw.js → index-BBqtydE-.js} +1 -1
- package/dist/cjs/index-Bp6Dd2i1.js +94 -0
- package/dist/cjs/{index-9ZJx0550.js → index-CH-YLRgg.js} +1 -1
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/lmvz-action.cjs.entry.js +2 -2
- package/dist/cjs/lmvz-button.cjs.entry.js +73 -0
- package/dist/cjs/lmvz-card.cjs.entry.js +3 -3
- package/dist/cjs/lmvz-chip.cjs.entry.js +2 -2
- package/dist/cjs/lmvz-components.cjs.js +3 -3
- package/dist/cjs/{lmvz-header.cjs.entry.js → lmvz-header_2.cjs.entry.js} +24 -15
- package/dist/cjs/lmvz-icon.cjs.entry.js +10 -10
- package/dist/cjs/lmvz-input.cjs.entry.js +183 -0
- package/dist/cjs/lmvz-menuitem.cjs.entry.js +7 -5
- package/dist/cjs/lmvz-select.cjs.entry.js +71 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{reactive-controller-host-Ai9l4S9S.js → reactive-controller-host-vy1TIIXv.js} +2 -2
- package/dist/collection/collection-manifest.json +14 -2
- package/dist/collection/components/lmvz-action/lmvz-action.js +1 -1
- package/dist/collection/components/lmvz-button/lmvz-button.css +2 -24
- package/dist/collection/components/lmvz-button/lmvz-button.js +2 -2
- package/dist/collection/components/lmvz-card/lmvz-card.css +2 -24
- package/dist/collection/components/lmvz-card/lmvz-card.js +3 -3
- package/dist/collection/components/lmvz-chip/lmvz-chip.js +2 -2
- package/dist/collection/components/lmvz-header/lmvz-header.js +12 -8
- package/dist/collection/components/lmvz-icon/lmvz-icon.js +7 -7
- package/dist/collection/components/lmvz-input/lmvz-input.css +2 -24
- package/dist/collection/components/lmvz-input/lmvz-input.js +31 -27
- package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.css +2 -24
- package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.js +4 -2
- package/dist/collection/components/lmvz-select/lmvz-select.css +3 -25
- package/dist/collection/components/lmvz-select/lmvz-select.js +4 -4
- package/dist/collection/integration/header-integration.js +3 -3
- package/dist/collection/utils/aria/list-keyboard-controller.js +6 -4
- package/dist/collection/utils/component.js +6 -4
- package/dist/components/index.js +1 -1
- package/dist/components/lmvz-action.js +1 -1
- package/dist/components/lmvz-button.js +1 -1
- package/dist/components/lmvz-card.js +1 -1
- package/dist/components/lmvz-chip.js +1 -1
- package/dist/components/lmvz-header.js +1 -1
- package/dist/components/lmvz-icon.js +1 -1
- package/dist/components/lmvz-input.js +1 -1
- package/dist/components/lmvz-menuitem.js +1 -1
- package/dist/components/lmvz-select.js +1 -1
- package/dist/components/p-BsHYIl56.js +1 -0
- package/dist/components/{p-DcMNH3fv.js → p-CKtksB0G.js} +1 -1
- package/dist/components/{p-B3JVFwO1.js → p-DQEkWkMh.js} +1 -1
- package/dist/components/p-GKEnURpp.js +1 -0
- package/dist/components/{p-DK2hpvEW.js → p-vIq2biqy.js} +1 -1
- package/dist/esm/{Effect-DyamyJqO.js → Effect-9SROYpxM.js} +121 -83
- package/dist/esm/{aria-loader-Ddn7Qz_6.js → aria-loader-JxXwTAe5.js} +45 -10
- package/dist/esm/{assets-CvV1KMMV.js → assets-CNHv_WMG.js} +1 -1
- package/dist/esm/{component-DpoTUPzl.js → component-DIrAQ4IB.js} +4 -2
- package/dist/esm/{icons-C69Um2xB.js → icons-B255FOe4.js} +2 -2
- package/dist/esm/{index-CekEw3_K.js → index-BW1YMEA3.js} +1 -1
- package/dist/esm/index-BfTCfPZ1.js +92 -0
- package/dist/esm/{index-smGPjoDX.js → index-CQb-mBBB.js} +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/lmvz-action.entry.js +2 -2
- package/dist/esm/lmvz-button.entry.js +71 -0
- package/dist/esm/lmvz-card.entry.js +3 -3
- package/dist/esm/lmvz-chip.entry.js +2 -2
- package/dist/esm/lmvz-components.js +4 -4
- package/dist/esm/{lmvz-header.entry.js → lmvz-header_2.entry.js} +23 -15
- package/dist/esm/lmvz-icon.entry.js +10 -10
- package/dist/esm/lmvz-input.entry.js +181 -0
- package/dist/esm/lmvz-menuitem.entry.js +7 -5
- package/dist/esm/lmvz-select.entry.js +69 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{reactive-controller-host-CdAJ3t-B.js → reactive-controller-host-OhKYwMvP.js} +2 -2
- package/dist/ext-libs.d.ts +1 -0
- package/dist/lmvz-components/index.esm.js +1 -1
- package/dist/lmvz-components/lmvz-components.esm.js +1 -1
- package/dist/lmvz-components/p-150ecfb6.entry.js +1 -0
- package/dist/lmvz-components/p-22f67eff.entry.js +1 -0
- package/dist/lmvz-components/p-4530f088.entry.js +1 -0
- package/dist/lmvz-components/p-47d7ed0e.entry.js +1 -0
- package/dist/lmvz-components/p-5c3f1404.entry.js +1 -0
- package/dist/lmvz-components/p-8d51e396.entry.js +1 -0
- package/dist/lmvz-components/p-9SROYpxM.js +1 -0
- package/dist/lmvz-components/p-BfTCfPZ1.js +6 -0
- package/dist/lmvz-components/p-Bx29-tJt.js +1 -0
- package/dist/lmvz-components/{p-B7KSylv_.js → p-Cp76bcGb.js} +1 -1
- package/dist/lmvz-components/{p-cM67HC0Z.js → p-Cp7cp10e.js} +1 -1
- package/dist/lmvz-components/{p-DpoTUPzl.js → p-DIrAQ4IB.js} +1 -1
- package/dist/lmvz-components/{p-D7GrtdQF.js → p-DyO6wO4l.js} +1 -1
- package/dist/lmvz-components/p-b8926640.entry.js +1 -0
- package/dist/lmvz-components/p-b9d1953f.entry.js +1 -0
- package/dist/lmvz-components/p-d9c3f542.entry.js +1 -0
- package/dist/lmvz-components/{p-BEoSvNlI.js → p-i2508Ct1.js} +1 -1
- package/dist/manifest.json +150 -66
- package/dist/stencil.config.base.js +44 -0
- package/dist/stencil.config.dev.js +21 -0
- package/dist/stencil.config.integration.js +26 -0
- package/dist/stencil.config.js +15 -0
- package/dist/stencil.config.prod.js +29 -0
- package/dist/types/components/lmvz-action/lmvz-action.d.ts +1 -1
- package/dist/types/components/lmvz-button/lmvz-button.d.ts +2 -2
- package/dist/types/components/lmvz-card/lmvz-card.d.ts +1 -1
- package/dist/types/components/lmvz-header/lmvz-header.d.ts +3 -3
- package/dist/types/components/lmvz-icon/lmvz-icon.d.ts +4 -4
- package/dist/types/components/lmvz-input/lmvz-input.d.ts +3 -3
- package/dist/types/components/lmvz-menuitem/lmvz-menuitem.d.ts +3 -3
- package/dist/types/components/lmvz-select/lmvz-select.d.ts +1 -1
- package/dist/types/components.d.ts +3 -3
- package/dist/types/index.d.ts +1 -1
- package/dist/types/opt/atlassian/pipelines/agent/build/packages/components/.stencil/stencil.config.base.d.ts +2 -0
- package/dist/types/opt/atlassian/pipelines/agent/build/packages/components/.stencil/stencil.config.d.ts +2 -0
- package/dist/types/opt/atlassian/pipelines/agent/build/packages/components/.stencil/stencil.config.dev.d.ts +2 -0
- package/dist/types/opt/atlassian/pipelines/agent/build/packages/components/.stencil/stencil.config.integration.d.ts +2 -0
- package/dist/types/opt/atlassian/pipelines/agent/build/packages/components/.stencil/stencil.config.prod.d.ts +2 -0
- package/dist/types/utils/aria/aria-validation-controller.d.ts +1 -1
- package/dist/types/utils/aria/element-activation-controller.d.ts +1 -1
- package/dist/types/utils/component.d.ts +2 -2
- package/dist/types/utils/http.d.ts +3 -3
- package/dist/types/utils/validation/svg.d.ts +1 -1
- package/hydrate/index.js +908 -441
- package/hydrate/index.mjs +908 -441
- package/package.json +33 -73
- package/readme.md +3 -3
- package/dist/cjs/lmvz-button_3.cjs.entry.js +0 -399
- package/dist/collection/utils/typing.js +0 -1
- package/dist/components/p-CSRpdnrt.js +0 -1
- package/dist/components/p-DR19QMDG.js +0 -1
- package/dist/esm/lmvz-button_3.entry.js +0 -395
- package/dist/lmvz-components/p-70ca3319.entry.js +0 -1
- package/dist/lmvz-components/p-73648317.entry.js +0 -1
- package/dist/lmvz-components/p-8ed959da.entry.js +0 -1
- package/dist/lmvz-components/p-9526c364.entry.js +0 -1
- package/dist/lmvz-components/p-9faac8f3.entry.js +0 -1
- package/dist/lmvz-components/p-D7RHrBYK.js +0 -1
- package/dist/lmvz-components/p-DyamyJqO.js +0 -1
- package/dist/lmvz-components/p-d4b68381.entry.js +0 -1
- package/dist/lmvz-components/p-ea1a9d4a.entry.js +0 -6
- package/dist/types/utils/typing.d.ts +0 -3
- /package/dist/components/{p-BaPwpeMs.js → p-CahBdGGN.js} +0 -0
- /package/dist/lmvz-components/{p-smGPjoDX.js → p-CQb-mBBB.js} +0 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@lmvz-ds/components",
|
|
3
3
|
"private": false,
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.17.0",
|
|
6
6
|
"description": "The components of the design system",
|
|
7
7
|
"author": "Patrick Nemenz <patrick.nemenz@adesso.at>",
|
|
8
8
|
"volta": {
|
|
@@ -108,86 +108,46 @@
|
|
|
108
108
|
"type": "git",
|
|
109
109
|
"url": "https://bitbucket.org/lmvz/lmvz-ds"
|
|
110
110
|
},
|
|
111
|
-
"scripts": {
|
|
112
|
-
"start": "npm run start:integration",
|
|
113
|
-
"start:integration": "npm run build:integration -- --watch",
|
|
114
|
-
"start:dev": "stencil build --watch --dev --serve --config stencil.config.dev.ts",
|
|
115
|
-
"build": "npm run build:components",
|
|
116
|
-
"build:components": "stencil build --docs --prod --config stencil.config.prod.ts",
|
|
117
|
-
"build:debug": "node --inspect-brk ../../node_modules/.bin/stencil build --debug --docs --config ./stencil.config.dev.ts",
|
|
118
|
-
"build:integration": "stencil build --config stencil.config.integration.ts",
|
|
119
|
-
"test": "stencil-test",
|
|
120
|
-
"test:watch": "stencil-test --watch",
|
|
121
|
-
"lint": "concurrently 'eslint \"src/**\"' 'stylelint \"src/**/*.css\" --config ./stylelint.config.mjs'",
|
|
122
|
-
"generate": "stencil generate",
|
|
123
|
-
"update": "npx npm-check-updates -u"
|
|
124
|
-
},
|
|
125
|
-
"nx": {
|
|
126
|
-
"targets": {
|
|
127
|
-
"start:integration": {
|
|
128
|
-
"dependsOn": [
|
|
129
|
-
"^build"
|
|
130
|
-
]
|
|
131
|
-
},
|
|
132
|
-
"start:dev": {
|
|
133
|
-
"dependsOn": [
|
|
134
|
-
"^build"
|
|
135
|
-
]
|
|
136
|
-
},
|
|
137
|
-
"build:integration": {
|
|
138
|
-
"dependsOn": [
|
|
139
|
-
"^build"
|
|
140
|
-
]
|
|
141
|
-
},
|
|
142
|
-
"build:components": {
|
|
143
|
-
"cache": true,
|
|
144
|
-
"dependsOn": [
|
|
145
|
-
"^build:components"
|
|
146
|
-
],
|
|
147
|
-
"outputs": [
|
|
148
|
-
"{projectRoot}/src/components.d.ts",
|
|
149
|
-
"{projectRoot}/.stencil",
|
|
150
|
-
"{projectRoot}/dist",
|
|
151
|
-
"{projectRoot}/hydrate",
|
|
152
|
-
"{projectRoot}/loader",
|
|
153
|
-
"{projectRoot}/assets"
|
|
154
|
-
]
|
|
155
|
-
},
|
|
156
|
-
"lint": {
|
|
157
|
-
"dependsOn": [
|
|
158
|
-
"^build"
|
|
159
|
-
]
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
111
|
"dependencies": {
|
|
164
|
-
"@lmvz-ds/aria-validation": "^0.15.2",
|
|
165
112
|
"classnames": "^2.5.1",
|
|
166
|
-
"effect": "3.
|
|
113
|
+
"effect": "^3.21.0",
|
|
114
|
+
"@lmvz-ds/aria-validation": "~0.16.0"
|
|
167
115
|
},
|
|
168
116
|
"devDependencies": {
|
|
169
|
-
"@
|
|
170
|
-
"@lmvz-ds/lib-styles": "^0.15.2",
|
|
171
|
-
"@lmvz-ds/styles": "^0.15.2",
|
|
172
|
-
"@stencil-community/postcss": "^2.2.0",
|
|
117
|
+
"@stencil-community/postcss": "2.2.0",
|
|
173
118
|
"@stencil/angular-output-target": "1.3.0",
|
|
174
|
-
"@stencil/core": "4.43.
|
|
175
|
-
"@stencil/react-output-target": "
|
|
176
|
-
"@stencil/
|
|
177
|
-
"@stencil/
|
|
178
|
-
"@stencil/vue-output-target": "^0.11.8",
|
|
119
|
+
"@stencil/core": "^4.43.3",
|
|
120
|
+
"@stencil/react-output-target": "1.4.2",
|
|
121
|
+
"@stencil/vitest": "1.8.3",
|
|
122
|
+
"@stencil/vue-output-target": "0.13.1",
|
|
179
123
|
"@types/postcss-import": "^14.0.3",
|
|
180
124
|
"concurrently": "^9.2.1",
|
|
181
125
|
"happy-dom": "^20.8.4",
|
|
126
|
+
"postcss-auto-var-fallback": "1.1.0",
|
|
182
127
|
"postcss-import": "^16.1.1",
|
|
183
128
|
"rollup-plugin-postcss": "^4.0.2",
|
|
184
|
-
"stylelint": "^
|
|
185
|
-
"stylelint-config-standard": "^
|
|
186
|
-
"stylelint-value-no-unknown-custom-properties": "
|
|
187
|
-
"
|
|
188
|
-
"tsx": "^4.
|
|
189
|
-
"vite": "^
|
|
190
|
-
"vitest": "^4.1.0"
|
|
129
|
+
"stylelint": "^16.0.1",
|
|
130
|
+
"stylelint-config-standard": "^38.0.0",
|
|
131
|
+
"stylelint-value-no-unknown-custom-properties": "6.1.1",
|
|
132
|
+
"tslib": "^2.8.1",
|
|
133
|
+
"tsx": "^4.8.1",
|
|
134
|
+
"vite": "^8.0.2",
|
|
135
|
+
"vitest": "^4.1.0",
|
|
136
|
+
"@lmvz-ds/design-tokens": "~0.17.0",
|
|
137
|
+
"@lmvz-ds/lib-config": "0.15.2",
|
|
138
|
+
"@lmvz-ds/lib-styles": "~0.16.0",
|
|
139
|
+
"@lmvz-ds/styles": "~0.17.0"
|
|
191
140
|
},
|
|
192
|
-
"gitHead": "
|
|
193
|
-
|
|
141
|
+
"gitHead": "aaec2215b0239d6fa4a5876af444e0b7abba2c7d",
|
|
142
|
+
"scripts": {
|
|
143
|
+
"start": "pnpm run build:integration -- --watch",
|
|
144
|
+
"dev": "stencil build --watch --dev --serve --config stencil.config.dev.ts",
|
|
145
|
+
"build": "stencil build --docs --prod --config stencil.config.prod.ts",
|
|
146
|
+
"build:debug": "node --inspect-brk ../../node_modules/.bin/stencil build --debug --docs --config ./stencil.config.dev.ts",
|
|
147
|
+
"build:integration": "stencil build --config stencil.config.integration.ts",
|
|
148
|
+
"test": "pnpm stencil-test",
|
|
149
|
+
"test:watch": "pnpm stencil-test --watch",
|
|
150
|
+
"lint": "concurrently 'eslint \"src/**\"' 'stylelint \"src/**/*.css\" --config ./stylelint.config.mjs'",
|
|
151
|
+
"generate": "stencil generate"
|
|
152
|
+
}
|
|
153
|
+
}
|
package/readme.md
CHANGED
|
@@ -106,7 +106,7 @@ package.json exports should be generated along with the Stencil build (for new c
|
|
|
106
106
|
|
|
107
107
|
### Development
|
|
108
108
|
|
|
109
|
-
Use the `start:dev` script to start Stencil's dev server.
|
|
109
|
+
Use the `pnpm run start:dev` script to start Stencil's dev server.
|
|
110
110
|
(`start` will be called from the Storybook sibling package and will only run a (watching) production build).
|
|
111
111
|
|
|
112
112
|
### Building
|
|
@@ -114,7 +114,7 @@ Use the `start:dev` script to start Stencil's dev server.
|
|
|
114
114
|
To build the components (and styles) for production, run the build script. This will also sync changes to the wrapper projects.
|
|
115
115
|
|
|
116
116
|
```bash
|
|
117
|
-
|
|
117
|
+
pnpm run build
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
### Creating New Components
|
|
@@ -122,7 +122,7 @@ npm run build
|
|
|
122
122
|
Always use the `lmvz-` prefix when creating new components!
|
|
123
123
|
|
|
124
124
|
```bash
|
|
125
|
-
|
|
125
|
+
pnpm run @stencil/core generate lmvz-[component name]
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
### Testing
|
|
@@ -1,399 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-9ZJx0550.js');
|
|
4
|
-
var reactiveControllerHost = require('./reactive-controller-host-Ai9l4S9S.js');
|
|
5
|
-
var elementActivationController = require('./element-activation-controller-DC_6T0Rt.js');
|
|
6
|
-
var component = require('./component-CRc6eHcV.js');
|
|
7
|
-
require('./aria-loader-B7b45RMv.js');
|
|
8
|
-
|
|
9
|
-
function getDefaultExportFromCjs (x) {
|
|
10
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
var classnames = {exports: {}};
|
|
14
|
-
|
|
15
|
-
/*!
|
|
16
|
-
Copyright (c) 2018 Jed Watson.
|
|
17
|
-
Licensed under the MIT License (MIT), see
|
|
18
|
-
http://jedwatson.github.io/classnames
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
var hasRequiredClassnames;
|
|
22
|
-
|
|
23
|
-
function requireClassnames () {
|
|
24
|
-
if (hasRequiredClassnames) return classnames.exports;
|
|
25
|
-
hasRequiredClassnames = 1;
|
|
26
|
-
(function (module) {
|
|
27
|
-
/* global define */
|
|
28
|
-
|
|
29
|
-
(function () {
|
|
30
|
-
|
|
31
|
-
var hasOwn = {}.hasOwnProperty;
|
|
32
|
-
|
|
33
|
-
function classNames () {
|
|
34
|
-
var classes = '';
|
|
35
|
-
|
|
36
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
37
|
-
var arg = arguments[i];
|
|
38
|
-
if (arg) {
|
|
39
|
-
classes = appendClass(classes, parseValue(arg));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return classes;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function parseValue (arg) {
|
|
47
|
-
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
48
|
-
return arg;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (typeof arg !== 'object') {
|
|
52
|
-
return '';
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
if (Array.isArray(arg)) {
|
|
56
|
-
return classNames.apply(null, arg);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
60
|
-
return arg.toString();
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
var classes = '';
|
|
64
|
-
|
|
65
|
-
for (var key in arg) {
|
|
66
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
67
|
-
classes = appendClass(classes, key);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return classes;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function appendClass (value, newClass) {
|
|
75
|
-
if (!newClass) {
|
|
76
|
-
return value;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (value) {
|
|
80
|
-
return value + ' ' + newClass;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return value + newClass;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
if (module.exports) {
|
|
87
|
-
classNames.default = classNames;
|
|
88
|
-
module.exports = classNames;
|
|
89
|
-
} else {
|
|
90
|
-
window.classNames = classNames;
|
|
91
|
-
}
|
|
92
|
-
}());
|
|
93
|
-
} (classnames));
|
|
94
|
-
return classnames.exports;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
var classnamesExports = requireClassnames();
|
|
98
|
-
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
99
|
-
|
|
100
|
-
const lmvzButtonCss = () => ` @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } } :host { button { --lmvz-button-color: var(--lmvz-component-color, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-padding-inline: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-padding-block: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); --lmvz-button-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; --lmvz-button-background: var(--lmvz-semantic-color-int-primary, #000000); display: inline-flex; align-items: center; justify-content: center; gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-align: center; text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-status-selected, #f1f9fe); outline-offset: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-hover, #2e2e2e); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-active, #545454); } button.secondary { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-button-border-width: var(--lmvz-semantic-border-width-default, 1px); --lmvz-button-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); } button.secondary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-button-border-color: var(--lmvz-semantic-color-border-hover, #c7c7c7); } button.secondary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); --lmvz-button-border-color: var(--lmvz-semantic-color-border-active, #d4d4d4); } button.tertiary { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary, #545454); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); } button.small { --lmvz-button-padding-inline: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-padding-block: var(--lmvz-component-input-sm-padding-y, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-gap: var(--lmvz-component-input-sm-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } button.large { --lmvz-button-padding-inline: var(--lmvz-component-input-lg-padding-x, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-padding-block: var(--lmvz-component-input-lg-padding-y, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-gap: var(--lmvz-component-input-lg-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); } display: contents; } ::slotted(*) { --lmvz-component-color: var(--lmvz-button-color); } `;
|
|
101
|
-
|
|
102
|
-
const LmvzButton = class extends reactiveControllerHost.ReactiveControllerHost {
|
|
103
|
-
get el() { return index.getElement(this); }
|
|
104
|
-
validationEl;
|
|
105
|
-
inheritedAttributes = {};
|
|
106
|
-
formEl = null;
|
|
107
|
-
formButtonEl = null;
|
|
108
|
-
lmvzActivation;
|
|
109
|
-
get ti() {
|
|
110
|
-
return 0;
|
|
111
|
-
}
|
|
112
|
-
scale = 'default';
|
|
113
|
-
variant = 'secondary';
|
|
114
|
-
disabled = false;
|
|
115
|
-
type = 'button';
|
|
116
|
-
form;
|
|
117
|
-
constructor(hostRef) {
|
|
118
|
-
super();
|
|
119
|
-
index.registerInstance(this, hostRef);
|
|
120
|
-
this.lmvzActivation = index.createEvent(this, "lmvzActivation");
|
|
121
|
-
this.addController(new reactiveControllerHost.AriaValidationController(this));
|
|
122
|
-
this.addController(new elementActivationController.ElementActivationController(this, {
|
|
123
|
-
localHandler: this.handleClick.bind(this),
|
|
124
|
-
keys: ['Enter'],
|
|
125
|
-
}));
|
|
126
|
-
}
|
|
127
|
-
connectedCallback() {
|
|
128
|
-
this.inheritedAttributes = component.inheritAriaAttributes(this.el);
|
|
129
|
-
super.connectedCallback();
|
|
130
|
-
}
|
|
131
|
-
renderHiddenButton() {
|
|
132
|
-
const formEl = (this.formEl = component.findFormByRef(this.form, this.el));
|
|
133
|
-
if (!formEl)
|
|
134
|
-
return;
|
|
135
|
-
const { formButtonEl } = this;
|
|
136
|
-
if (formButtonEl !== null && formEl.contains(formButtonEl))
|
|
137
|
-
return;
|
|
138
|
-
const newFormButtonEl = (this.formButtonEl = document.createElement('button'));
|
|
139
|
-
newFormButtonEl.type = 'submit';
|
|
140
|
-
newFormButtonEl.style.display = 'none';
|
|
141
|
-
newFormButtonEl.disabled = this.disabled;
|
|
142
|
-
formEl.appendChild(newFormButtonEl);
|
|
143
|
-
}
|
|
144
|
-
submitForm(ev) {
|
|
145
|
-
if (this.formEl && this.formButtonEl) {
|
|
146
|
-
ev.preventDefault();
|
|
147
|
-
this.formButtonEl.click();
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
handleClick = (ev) => {
|
|
151
|
-
if (this.type === 'submit') {
|
|
152
|
-
this.submitForm(ev);
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
render() {
|
|
156
|
-
this.renderHiddenButton();
|
|
157
|
-
return (index.h(index.Host, { key: '3f3eda78349322ce5160d7aac1290a73f0adcd4a', "aria-disabled": this.disabled ? 'true' : null }, index.h("button", { key: 'b132404d8d5f5bf0fa7e845b562c953c5ceec36c', ref: (e) => (this.validationEl = e), disabled: this.disabled, class: classNames(this.variant, { [this.scale ?? '']: !!this.scale, disabled: this.disabled }), ...this.inheritedAttributes }, index.h("slot", { key: 'ce63f7f1061ec9c3f10cbcfc67998ddbf3e04c3d' }))));
|
|
158
|
-
}
|
|
159
|
-
static get delegatesFocus() { return true; }
|
|
160
|
-
};
|
|
161
|
-
LmvzButton.style = lmvzButtonCss();
|
|
162
|
-
|
|
163
|
-
const lmvzInputCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } .sc-lmvz-input-h { display: block; font-family: var(--lmvz-global-font-family-default, Router); --input-radius: var(--lmvz-component-input-radius-default, 999px); --input-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --input-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --input-border-color-hover: var(--lmvz-semantic-color-border-hover, #c7c7c7); --input-border-color-focus: var(--lmvz-semantic-color-status-on-selected, #0e7ab4); --input-border-width: var(--lmvz-semantic-border-width-default, 1px); --input-height: 48px; --input-padding-x: 16px; --label-color: var(--lmvz-semantic-color-on-surface-input-secondary, #7a7a7a); --input-text-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --helper-text-color: var(--lmvz-semantic-color-on-surface-input-secondary, #7a7a7a); --error-text-color: var(--lmvz-semantic-color-status-on-danger, #e52a31); --label-floating-scale: 0.85; --label-minimized-top: -6px; --label-minimized-bg: var(--input-bg); --label-minimized-padding-x: 4px; --input-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%); } .input-container.sc-lmvz-input { display: flex; flex-direction: column; position: relative; width: 100%; } .input-wrapper.sc-lmvz-input { background-color: var(--input-bg); border: var(--input-border-width) solid var(--input-border-color); border-radius: var(--input-radius); display: flex; align-items: center; height: var(--input-height); padding: 0 var(--input-padding-x); position: relative; transition: border-color 0.2s ease; gap: 8px; } [disabled].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { opacity: var(--input-disabled-opacity); cursor: not-allowed; pointer-events: none; } .input-container.sc-lmvz-input:focus-within .input-wrapper.sc-lmvz-input { border-color: var(--input-border-color-focus); outline: 2px solid var(--input-border-color-focus); outline-offset: 2px; } .input-container.sc-lmvz-input:has(input:focus-visible) .input-wrapper.sc-lmvz-input { box-shadow: 0 0 0 3px rgb(0 86 214 / 20%); } [error].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { border-color: var(--error-text-color); } [error].sc-lmvz-input-h:focus-within .input-wrapper.sc-lmvz-input { border-color: var(--error-text-color); outline-color: var(--error-text-color); } .sc-lmvz-input-h:not([disabled]) .input-wrapper.sc-lmvz-input:hover { border-color: var(--input-border-color-hover); } .label-input-group.sc-lmvz-input { position: relative; flex-grow: 1; display: flex; align-items: center; height: 100%; } label.sc-lmvz-input { position: absolute; left: 0; top: 50%; transform: translateY(-50%); color: var(--label-color); font-size: 14px; font-family: Router, sans-serif; font-weight: 400; pointer-events: none; transition: all 0.2s ease-out; background-color: transparent; padding: 0; margin: 0; line-height: normal; white-space: nowrap; } label.floating.sc-lmvz-input { top: 0; transform: translateY(-50%) scale(0.85); transform-origin: left top; background-color: var(--label-minimized-bg); padding: 0 var(--label-minimized-padding-x); left: -2px; color: var(--input-text-color); font-weight: 500; } .required-indicator.sc-lmvz-input { color: var(--error-text-color); margin-left: 2px; } input.sc-lmvz-input { border: none; background: transparent; width: 100%; height: 100%; color: var(--input-text-color); font-family: inherit; font-size: 14px; outline: none; padding: 0; margin: 0; font-weight: 400; } input.sc-lmvz-input::placeholder { color: var(--label-color); } div.sc-lmvz-input:empty { display: none; } [role='status'].sc-lmvz-input { padding-top: 8px; padding-left: 12px; font-size: 12px; color: var(--helper-text-color); font-family: Router, sans-serif; font-weight: 500; } [role='alert'].sc-lmvz-input { padding-top: 8px; padding-left: 12px; font-size: 12px; color: var(--error-text-color); font-family: Router, sans-serif; font-weight: 500; } .sc-lmvz-input-s > lmvz-button { --lmvz-button-padding: 4px; }`;
|
|
164
|
-
|
|
165
|
-
let inputIdCounter = 0;
|
|
166
|
-
const LmvzInput = class extends reactiveControllerHost.ReactiveControllerHost {
|
|
167
|
-
get el() { return index.getElement(this); }
|
|
168
|
-
get validationEl() {
|
|
169
|
-
return this.el;
|
|
170
|
-
}
|
|
171
|
-
lmvzInput;
|
|
172
|
-
internals;
|
|
173
|
-
nativeInputElement;
|
|
174
|
-
inputId = `lmvz-input-${inputIdCounter++}`;
|
|
175
|
-
initialValue = '';
|
|
176
|
-
nativeError = false;
|
|
177
|
-
errorFromProp = false;
|
|
178
|
-
get helperId() {
|
|
179
|
-
return this.helperText ? `${this.inputId}-helper` : undefined;
|
|
180
|
-
}
|
|
181
|
-
get showErrorMessage() {
|
|
182
|
-
return this.error && Boolean(this.errorMessage);
|
|
183
|
-
}
|
|
184
|
-
get errorId() {
|
|
185
|
-
return `${this.inputId}-error`;
|
|
186
|
-
}
|
|
187
|
-
get describedBy() {
|
|
188
|
-
const ids = [];
|
|
189
|
-
if (this.helperId)
|
|
190
|
-
ids.push(this.helperId);
|
|
191
|
-
if (this.showErrorMessage)
|
|
192
|
-
ids.push(this.errorId);
|
|
193
|
-
return ids.length > 0 ? ids.join(' ') : undefined;
|
|
194
|
-
}
|
|
195
|
-
value;
|
|
196
|
-
label;
|
|
197
|
-
helperText;
|
|
198
|
-
placeholder;
|
|
199
|
-
disabled = false;
|
|
200
|
-
readonly = false;
|
|
201
|
-
required = false;
|
|
202
|
-
name;
|
|
203
|
-
type = 'text';
|
|
204
|
-
errorMessage;
|
|
205
|
-
autocomplete;
|
|
206
|
-
inputmode;
|
|
207
|
-
autocorrect;
|
|
208
|
-
autocapitalize;
|
|
209
|
-
spellcheck;
|
|
210
|
-
autofocus = false;
|
|
211
|
-
minlength;
|
|
212
|
-
maxlength;
|
|
213
|
-
pattern;
|
|
214
|
-
min;
|
|
215
|
-
max;
|
|
216
|
-
step;
|
|
217
|
-
form;
|
|
218
|
-
get error() {
|
|
219
|
-
return this.errorFromProp || this.nativeError;
|
|
220
|
-
}
|
|
221
|
-
set error(value) {
|
|
222
|
-
this.errorFromProp = value;
|
|
223
|
-
}
|
|
224
|
-
async setValue(newValue) {
|
|
225
|
-
const input = this.nativeInputElement;
|
|
226
|
-
this.value = input.value = newValue ?? '';
|
|
227
|
-
this.internals.setFormValue?.(newValue);
|
|
228
|
-
this.lmvzInput.emit(newValue);
|
|
229
|
-
}
|
|
230
|
-
async focusInput() {
|
|
231
|
-
this.nativeInputElement?.focus();
|
|
232
|
-
}
|
|
233
|
-
async blurInput() {
|
|
234
|
-
this.nativeInputElement?.blur();
|
|
235
|
-
}
|
|
236
|
-
async select() {
|
|
237
|
-
this.nativeInputElement?.select();
|
|
238
|
-
}
|
|
239
|
-
async checkValidity() {
|
|
240
|
-
return this.nativeInputElement?.checkValidity?.() ?? false;
|
|
241
|
-
}
|
|
242
|
-
async reportValidity() {
|
|
243
|
-
return this.nativeInputElement?.reportValidity?.() ?? false;
|
|
244
|
-
}
|
|
245
|
-
async getInputElement() {
|
|
246
|
-
if (!this.nativeInputElement) {
|
|
247
|
-
await new Promise((resolve) => component.componentOnReady(this.el, resolve));
|
|
248
|
-
}
|
|
249
|
-
return Promise.resolve(this.nativeInputElement);
|
|
250
|
-
}
|
|
251
|
-
constructor(hostRef) {
|
|
252
|
-
super();
|
|
253
|
-
index.registerInstance(this, hostRef);
|
|
254
|
-
this.lmvzInput = index.createEvent(this, "lmvzInput");
|
|
255
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
256
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
257
|
-
}
|
|
258
|
-
else {
|
|
259
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
260
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
261
|
-
}
|
|
262
|
-
this.addController(new reactiveControllerHost.AriaValidationController(this, {
|
|
263
|
-
reValidateOnPropChanges: true,
|
|
264
|
-
}));
|
|
265
|
-
}
|
|
266
|
-
componentWillLoad() {
|
|
267
|
-
this.initialValue = this.value;
|
|
268
|
-
super.componentWillLoad();
|
|
269
|
-
}
|
|
270
|
-
formAssociatedCallback(form) {
|
|
271
|
-
if (!form)
|
|
272
|
-
return;
|
|
273
|
-
this.internals.setFormValue?.(this.value);
|
|
274
|
-
}
|
|
275
|
-
formResetCallback() {
|
|
276
|
-
this.internals.setValidity({});
|
|
277
|
-
this.setValue(this.initialValue);
|
|
278
|
-
}
|
|
279
|
-
formStateRestoreCallback(state) {
|
|
280
|
-
this.setValue(state);
|
|
281
|
-
}
|
|
282
|
-
handleValueChange(newValue) {
|
|
283
|
-
if (!this.nativeInputElement)
|
|
284
|
-
return;
|
|
285
|
-
const isInternalChange = this.nativeInputElement.value === newValue;
|
|
286
|
-
if (isInternalChange)
|
|
287
|
-
return;
|
|
288
|
-
this.setValue(newValue);
|
|
289
|
-
}
|
|
290
|
-
handleDisabledChange(disabled) {
|
|
291
|
-
if (disabled && this.nativeInputElement) {
|
|
292
|
-
this.nativeInputElement.blur();
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
handleInput = (event) => {
|
|
296
|
-
const input = event.target;
|
|
297
|
-
this.setValue(input.value);
|
|
298
|
-
};
|
|
299
|
-
handleChange = (event) => {
|
|
300
|
-
const input = event.target ?? this.nativeInputElement;
|
|
301
|
-
this.updateNativeError(input);
|
|
302
|
-
};
|
|
303
|
-
handleFocus = () => { };
|
|
304
|
-
handleBlur = (event) => {
|
|
305
|
-
const input = event.target;
|
|
306
|
-
input.reportValidity?.();
|
|
307
|
-
};
|
|
308
|
-
updateNativeError(fromEvent) {
|
|
309
|
-
const input = fromEvent ?? this.nativeInputElement;
|
|
310
|
-
if (!input)
|
|
311
|
-
return;
|
|
312
|
-
this.nativeError = !(input.checkValidity?.() ?? true);
|
|
313
|
-
}
|
|
314
|
-
render() {
|
|
315
|
-
const hasValue = Boolean(this.value);
|
|
316
|
-
const shouldFloatLabel = hasValue || Boolean(this.placeholder);
|
|
317
|
-
return (index.h("div", { key: '50e70a8963db11234428d8753b4ac4a22424fe93', class: classNames('input-container', {
|
|
318
|
-
'interaction-filled': hasValue,
|
|
319
|
-
}) }, index.h("div", { key: '15fdd5c130ff915830b5a9055743d3493f02baf0', class: "input-wrapper" }, index.h("slot", { key: '16dd0a7af0ea88b1b4f23e9c62bc20f28425b9ee', name: "before-input" }), index.h("div", { key: '46afc3affa6fca9049da985fb65a2aab94b0d479', class: "label-input-group" }, index.h("label", { key: '21c938202cdd21beb284b75d2451247a421a0218', htmlFor: this.inputId, class: classNames({ floating: shouldFloatLabel }) }, this.label, this.required && (index.h("span", { key: '0bbba8b04242a1bee0bf0b5b0bc15c11f616cbac', class: "required-indicator", "aria-hidden": "true" }, ' ', "*"))), index.h("input", { key: '9af271fb9251e78706190a0e6cb8373ace8a10f7', id: this.inputId, ref: (el) => (this.nativeInputElement = el), type: this.type, min: this.min, max: this.max, step: this.step, value: this.value, name: this.name, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, required: this.required, form: this.form, autocomplete: this.autocomplete, inputmode: this.inputmode, autocorrect: this.autocorrect, autocapitalize: this.autocapitalize, spellcheck: this.spellcheck, autofocus: this.autofocus, minlength: this.minlength, maxlength: this.maxlength, pattern: this.pattern, "aria-invalid": this.error ? 'true' : 'false', "aria-required": this.required ? 'true' : 'false', "aria-describedby": this.describedBy, "aria-errormessage": this.errorId, onInput: this.handleInput, onChange: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur })), index.h("slot", { key: 'db559809a6a5614b522f362c3cf6e97469fb4da4', name: "after-input" })), index.h("div", { key: '191b364963a017f6b458c2d33fbc4a1b376b8379', id: this.helperId, role: "status" }, this.helperText || null), index.h("div", { key: '058d13a869f6a3c49f94793eeacecb2b2e672e5c', id: this.errorId, role: "alert" }, (this.showErrorMessage && this.errorMessage) || null)));
|
|
320
|
-
}
|
|
321
|
-
static get formAssociated() { return true; }
|
|
322
|
-
static get watchers() { return {
|
|
323
|
-
"value": [{
|
|
324
|
-
"handleValueChange": 0
|
|
325
|
-
}],
|
|
326
|
-
"disabled": [{
|
|
327
|
-
"handleDisabledChange": 0
|
|
328
|
-
}]
|
|
329
|
-
}; }
|
|
330
|
-
};
|
|
331
|
-
LmvzInput.style = lmvzInputCss();
|
|
332
|
-
|
|
333
|
-
const chevronDownSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIwLjMzMzQgOC42NjY2M0wxMi4wMDAxIDE3TDMuNjY2NzUgOC42NjY2MyIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=';
|
|
334
|
-
|
|
335
|
-
const lmvzSelectCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } .sc-lmvz-select-h { display: block; font-family: var(--lmvz-global-font-family-default, Router); --lmvz-internal-select-floating-label-top-offset: 0.375rem; padding-top: var(--lmvz-internal-select-floating-label-top-offset); --lmvz-select-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-select-bg: var(--lmvz-semantic-color-int-secondary, #f0f0f0); --lmvz-select-bg-hover: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-select-text-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-select-label-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --lmvz-select-padding-x: var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); --lmvz-select-gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-select-height: 40px; --lmvz-select-label-font-size: var(--lmvz-component-component-typography-body-sm-font-size, 0.75rem); --lmvz-select-label-top-offset: calc(var(--lmvz-internal-select-floating-label-top-offset) * -1); --lmvz-select-label-minimized-padding-x: 4px; --lmvz-select-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%); --lmvz-select-helper-color: var(--lmvz-semantic-color-on-surface-input-secondary, #7a7a7a); --lmvz-select-focus-color: var(--lmvz-semantic-color-status-on-selected, #0e7ab4); --lmvz-select-error-color: var(--lmvz-semantic-color-status-on-danger, #e52a31); } .select-wrapper.sc-lmvz-select { position: relative; height: var(--lmvz-select-height); } label.sc-lmvz-select { position: absolute; top: 50%; left: var(--lmvz-select-padding-x); font-size: var(--lmvz-select-label-font-size); color: var(--lmvz-select-label-color); line-height: normal; white-space: nowrap; pointer-events: none; z-index: 2; transform: translateY(-50%); transform-origin: left top; transition: top 0.2s ease-out, transform 0.2s ease-out, opacity 0.2s ease-out, padding 0.2s ease-out; } label.assistive-label.sc-lmvz-select { opacity: 0; padding: 0; } label.floating-label.sc-lmvz-select { top: var(--lmvz-select-label-top-offset); transform: translateY(0) scale(0.85); left: calc(var(--lmvz-select-padding-x) - 2px); background-color: var(--lmvz-select-bg); padding: 0 var(--lmvz-select-label-minimized-padding-x); opacity: 1; font-weight: 500; } label.sc-lmvz-select > span[aria-hidden='true'].sc-lmvz-select, div[aria-hidden='true'].sc-lmvz-select > span.sc-lmvz-select:first-child > span[aria-hidden='true'].sc-lmvz-select { color: var(--lmvz-select-error-color); margin-left: 2px; display: inline-block; line-height: 0; vertical-align: middle; } div[aria-hidden].sc-lmvz-select { display: flex; align-items: center; gap: var(--lmvz-select-gap); height: 100%; padding: 0 var(--lmvz-select-padding-x); border-radius: var(--lmvz-select-radius); background-color: var(--lmvz-select-bg); cursor: pointer; position: relative; z-index: 1; transition: background-color 0.15s ease; } .sc-lmvz-select-h:not([disabled]) .select-wrapper.sc-lmvz-select:hover div[aria-hidden].sc-lmvz-select { background-color: var(--lmvz-select-bg-hover); } .select-wrapper.sc-lmvz-select:focus-within div[aria-hidden].sc-lmvz-select { outline: 2px solid var(--lmvz-select-focus-color); outline-offset: 2px; } div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:first-child { flex: 1 0 0; font-size: var(--lmvz-component-component-typography-body-md-font-size, 0.875rem); font-weight: var(--lmvz-global-font-weight-500, 500); color: var(--lmvz-select-text-color); line-height: 1.4; letter-spacing: var(--lmvz-component-body-md-letter-spacing, 0px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:last-child { flex-shrink: 0; display: flex; align-items: center; justify-content: center; } img.sc-lmvz-select { display: block; width: var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); height: var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); } select.sc-lmvz-select { appearance: none; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; border: none; background: transparent; margin: 0; padding: 0; } [disabled].sc-lmvz-select-h .select-wrapper.sc-lmvz-select { opacity: var(--lmvz-select-disabled-opacity); pointer-events: none; cursor: not-allowed; } [role='status'].sc-lmvz-select { margin-top: 4px; padding-left: var(--lmvz-select-padding-x); font-size: var(--lmvz-select-label-font-size); color: var(--lmvz-select-helper-color); line-height: normal; }`;
|
|
336
|
-
|
|
337
|
-
let selectIdCounter = 0;
|
|
338
|
-
const LmvzSelect = class extends reactiveControllerHost.ReactiveControllerHost {
|
|
339
|
-
get el() { return index.getElement(this); }
|
|
340
|
-
get validationEl() {
|
|
341
|
-
return this.el;
|
|
342
|
-
}
|
|
343
|
-
selectId = `lmvz-select-${selectIdCounter++}`;
|
|
344
|
-
nativeSelectEl;
|
|
345
|
-
constructor(hostRef) {
|
|
346
|
-
super();
|
|
347
|
-
index.registerInstance(this, hostRef);
|
|
348
|
-
this.lmvzChange = index.createEvent(this, "lmvzChange");
|
|
349
|
-
this.addController(new reactiveControllerHost.AriaValidationController(this));
|
|
350
|
-
}
|
|
351
|
-
lmvzChange;
|
|
352
|
-
value;
|
|
353
|
-
label;
|
|
354
|
-
helperText;
|
|
355
|
-
disabled = false;
|
|
356
|
-
required = false;
|
|
357
|
-
name;
|
|
358
|
-
selectedLabel = '';
|
|
359
|
-
get hasValue() {
|
|
360
|
-
return Boolean(this.value);
|
|
361
|
-
}
|
|
362
|
-
componentDidLoad() {
|
|
363
|
-
this.syncSelectedLabel();
|
|
364
|
-
super.componentDidLoad();
|
|
365
|
-
}
|
|
366
|
-
handleValueChange(newValue) {
|
|
367
|
-
if (this.nativeSelectEl && this.nativeSelectEl.value !== (newValue ?? '')) {
|
|
368
|
-
this.nativeSelectEl.value = newValue ?? '';
|
|
369
|
-
}
|
|
370
|
-
this.syncSelectedLabel();
|
|
371
|
-
}
|
|
372
|
-
syncSelectedLabel() {
|
|
373
|
-
if (!this.nativeSelectEl)
|
|
374
|
-
return;
|
|
375
|
-
const idx = this.nativeSelectEl.selectedIndex;
|
|
376
|
-
this.selectedLabel = idx >= 0 ? (this.nativeSelectEl.options[idx]?.text ?? '') : '';
|
|
377
|
-
}
|
|
378
|
-
handleChange = (event) => {
|
|
379
|
-
const select = event.target;
|
|
380
|
-
this.value = select.value;
|
|
381
|
-
this.syncSelectedLabel();
|
|
382
|
-
this.lmvzChange.emit(select.value);
|
|
383
|
-
};
|
|
384
|
-
render() {
|
|
385
|
-
const hasValue = this.hasValue;
|
|
386
|
-
const shouldShowLabel = hasValue;
|
|
387
|
-
return (index.h(index.Host, { key: '2e93e1107001237254f4f9d1a0bee5caf1ab2471' }, index.h("div", { key: 'a5403bf851515d24b9a112661f457b9a6d1bc189', class: "select-wrapper" }, index.h("label", { key: 'c0821beee587d720ef3bf185094645dd2d22b701', htmlFor: this.selectId, class: shouldShowLabel ? 'floating-label' : 'assistive-label' }, this.label, this.required && shouldShowLabel && index.h("span", { key: '3659c7947caa419ccf21954da3efc24e5bac6963', "aria-hidden": "true" }, " *")), index.h("div", { key: '65db22f89f119cbb96ed9de556fd60d7d1c5cce3', "aria-hidden": "true" }, index.h("span", { key: 'e0e53b6fe461ab078a6268f2f0050a14722d15a4' }, hasValue ? this.selectedLabel : this.label, this.required && !hasValue && index.h("span", { key: '2f508f1d94c1437da702e81d2520f9df3f9e96ea', "aria-hidden": "true" }, " *")), index.h("span", { key: '7bbc03b8f6665341874e6bcc02592bfdc7aa5861' }, index.h("img", { key: '6453a928e8aa56bfd39b40d11685554bb37c16e4', src: chevronDownSvg, alt: "" }))), index.h("select", { key: '40170929a774d271c1487e16d15410715471c06b', id: this.selectId, ref: (el) => (this.nativeSelectEl = el), name: this.name, disabled: this.disabled, required: this.required, "aria-label": this.label, onChange: this.handleChange }, !hasValue && index.h("option", { key: '5d29283095f87f4d3d38183c4a7e42f5b0e806e4', value: "", disabled: true, selected: true, hidden: true }), index.h("slot", { key: '56bf95ba5ab35768681eac7770e56560f6b57f88' }))), this.helperText && index.h("div", { key: 'fbe735b28acdd21088d377635804781197c0b1b1', role: "status" }, this.helperText)));
|
|
388
|
-
}
|
|
389
|
-
static get watchers() { return {
|
|
390
|
-
"value": [{
|
|
391
|
-
"handleValueChange": 0
|
|
392
|
-
}]
|
|
393
|
-
}; }
|
|
394
|
-
};
|
|
395
|
-
LmvzSelect.style = lmvzSelectCss();
|
|
396
|
-
|
|
397
|
-
exports.lmvz_button = LmvzButton;
|
|
398
|
-
exports.lmvz_input = LmvzInput;
|
|
399
|
-
exports.lmvz_select = LmvzSelect;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|