@lmvz-ds/components 0.26.0 → 0.27.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.
Files changed (116) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/cjs/{reactive-controller-host-DrtMkMd7.js → aria-validation-controller-BMV2tv9-.js} +0 -41
  3. package/cjs/list-keyboard-controller-CzZdPBeH.js +173 -0
  4. package/cjs/lmvz-button_2.cjs.entry.js +4 -3
  5. package/cjs/lmvz-checkbox.cjs.entry.js +8 -4
  6. package/cjs/lmvz-chip.cjs.entry.js +3 -2
  7. package/cjs/lmvz-components.cjs.js +1 -1
  8. package/cjs/lmvz-header_2.cjs.entry.js +7 -51
  9. package/cjs/lmvz-input.cjs.entry.js +3 -2
  10. package/cjs/lmvz-menuitem.cjs.entry.js +3 -2
  11. package/cjs/lmvz-modal.cjs.entry.js +3 -2
  12. package/cjs/lmvz-radio.cjs.entry.js +3 -2
  13. package/cjs/lmvz-select.cjs.entry.js +3 -2
  14. package/cjs/lmvz-tab.cjs.entry.js +31 -0
  15. package/cjs/lmvz-tabs.cjs.entry.js +256 -0
  16. package/cjs/lmvz-toggle.cjs.entry.js +4 -3
  17. package/cjs/loader.cjs.js +1 -1
  18. package/cjs/reactive-controller-host-B_lZtcA6.js +43 -0
  19. package/collection/collection-manifest.json +2 -0
  20. package/collection/components/lmvz-checkbox/lmvz-checkbox.css +10 -8
  21. package/collection/components/lmvz-checkbox/lmvz-checkbox.js +4 -1
  22. package/collection/components/lmvz-header/lmvz-header.js +3 -3
  23. package/collection/components/lmvz-tab/lmvz-tab.css +148 -0
  24. package/collection/components/lmvz-tab/lmvz-tab.js +125 -0
  25. package/collection/components/lmvz-tabs/lmvz-tabs.css +58 -0
  26. package/collection/components/lmvz-tabs/lmvz-tabs.js +399 -0
  27. package/collection/components/lmvz-toggle/lmvz-toggle.js +1 -1
  28. package/collection/integration/header-integration/header-integration.js +1 -1
  29. package/collection/utils/aria/list-keyboard-controller.js +151 -28
  30. package/components/index.d.ts +4 -0
  31. package/components/index.d.ts.bak +4 -0
  32. package/components/index.js +1 -1
  33. package/components/lmvz-button-group.js +1 -1
  34. package/components/lmvz-button.js +1 -1
  35. package/components/lmvz-checkbox.js +1 -1
  36. package/components/lmvz-chip.js +1 -1
  37. package/components/lmvz-header.js +1 -1
  38. package/components/lmvz-icon.js +1 -1
  39. package/components/lmvz-input.js +1 -1
  40. package/components/lmvz-menuitem.js +1 -1
  41. package/components/lmvz-modal.js +1 -1
  42. package/components/lmvz-radio.js +1 -1
  43. package/components/lmvz-select.js +1 -1
  44. package/components/lmvz-snackbar.js +1 -1
  45. package/components/lmvz-tab.d.ts +11 -0
  46. package/components/lmvz-tab.d.ts.bak +11 -0
  47. package/components/lmvz-tab.js +1 -0
  48. package/components/lmvz-tabs.d.ts +11 -0
  49. package/components/lmvz-tabs.d.ts.bak +11 -0
  50. package/components/lmvz-tabs.js +1 -0
  51. package/components/lmvz-toggle.js +1 -1
  52. package/components/p-0P2Wb3pE.js +1 -0
  53. package/components/p-2VdcUIrr.js +1 -0
  54. package/components/p-BJEQw1Sz.js +1 -0
  55. package/components/p-Cs7RCOHZ.js +1 -0
  56. package/components/p-CtaMrBNE.js +1 -0
  57. package/components/{p-JAKQdFhF.js → p-DOTK1OW3.js} +1 -1
  58. package/components/p-DjvbwRyl.js +1 -0
  59. package/esm/{reactive-controller-host-ZrGf1F2-.js → aria-validation-controller-D-KO0Asb.js} +1 -41
  60. package/esm/list-keyboard-controller-Coi8XfUH.js +171 -0
  61. package/esm/lmvz-button_2.entry.js +2 -1
  62. package/esm/lmvz-checkbox.entry.js +7 -3
  63. package/esm/lmvz-chip.entry.js +2 -1
  64. package/esm/lmvz-components.js +1 -1
  65. package/esm/lmvz-header_2.entry.js +6 -50
  66. package/esm/lmvz-input.entry.js +2 -1
  67. package/esm/lmvz-menuitem.entry.js +2 -1
  68. package/esm/lmvz-modal.entry.js +2 -1
  69. package/esm/lmvz-radio.entry.js +2 -1
  70. package/esm/lmvz-select.entry.js +2 -1
  71. package/esm/lmvz-tab.entry.js +29 -0
  72. package/esm/lmvz-tabs.entry.js +254 -0
  73. package/esm/lmvz-toggle.entry.js +3 -2
  74. package/esm/loader.js +1 -1
  75. package/esm/reactive-controller-host-FBuCCcFC.js +41 -0
  76. package/hydrate/index.js +461 -32
  77. package/hydrate/index.mjs +461 -32
  78. package/lmvz-components/lmvz-components.esm.js +1 -1
  79. package/lmvz-components/p-43b463bf.entry.js +1 -0
  80. package/lmvz-components/p-4bd71a3c.entry.js +1 -0
  81. package/lmvz-components/p-6484fbc6.entry.js +1 -0
  82. package/lmvz-components/p-6988c3ea.entry.js +1 -0
  83. package/lmvz-components/p-758dbb82.entry.js +1 -0
  84. package/lmvz-components/p-7b15cdce.entry.js +1 -0
  85. package/lmvz-components/p-8874ff19.entry.js +1 -0
  86. package/lmvz-components/p-CtaMrBNE.js +1 -0
  87. package/lmvz-components/p-FBuCCcFC.js +1 -0
  88. package/lmvz-components/p-a5c921dc.entry.js +1 -0
  89. package/lmvz-components/p-bb46a884.entry.js +1 -0
  90. package/lmvz-components/p-bd23eab3.entry.js +1 -0
  91. package/lmvz-components/p-c6228cee.entry.js +1 -0
  92. package/lmvz-components/p-da16ff58.entry.js +1 -0
  93. package/lmvz-components/p-hRb38wX6.js +1 -0
  94. package/manifest.json +394 -1
  95. package/package.json +9 -1
  96. package/types/components/lmvz-checkbox/lmvz-checkbox.d.ts +1 -0
  97. package/types/components/lmvz-header/lmvz-header.d.ts +2 -2
  98. package/types/components/lmvz-tab/lmvz-tab.d.ts +11 -0
  99. package/types/components/lmvz-tabs/lmvz-tabs.d.ts +43 -0
  100. package/types/components.d.ts +151 -0
  101. package/types/utils/aria/list-keyboard-controller.d.ts +28 -5
  102. package/components/p-BOzeYzKk.js +0 -1
  103. package/components/p-DYa3zcGE.js +0 -1
  104. package/components/p-WLZ7VWNX.js +0 -1
  105. package/components/p-lsUdmjdw.js +0 -1
  106. package/lmvz-components/p-01aeca60.entry.js +0 -1
  107. package/lmvz-components/p-14c3d837.entry.js +0 -1
  108. package/lmvz-components/p-24e63b0a.entry.js +0 -1
  109. package/lmvz-components/p-3da301a6.entry.js +0 -1
  110. package/lmvz-components/p-40228d48.entry.js +0 -1
  111. package/lmvz-components/p-4da9073a.entry.js +0 -1
  112. package/lmvz-components/p-758078db.entry.js +0 -1
  113. package/lmvz-components/p-8dae99f1.entry.js +0 -1
  114. package/lmvz-components/p-CwX1wKkM.js +0 -1
  115. package/lmvz-components/p-e1eaa7a2.entry.js +0 -1
  116. package/lmvz-components/p-f5cece32.entry.js +0 -1
@@ -0,0 +1,148 @@
1
+
2
+ @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides;
3
+ /**
4
+ * This defines the order of our lmvz-ds' CSS layers. See readme.md for details.
5
+ * Important: Always import this file _before_ layering your own styles!
6
+ */
7
+ @layer lmvz-ds.reset {
8
+ body {
9
+ margin: 0;
10
+ }
11
+
12
+ h1,
13
+ h2,
14
+ h3,
15
+ h4,
16
+ h5,
17
+ h6 {
18
+ margin: 0;
19
+ }
20
+
21
+ *[hidden] {
22
+ display: none !important;
23
+ }
24
+
25
+ }
26
+ :host {
27
+ display: inline-block;
28
+ flex: none;
29
+ }
30
+ :host([disabled]) {
31
+ cursor: not-allowed;
32
+ pointer-events: none;
33
+ }
34
+ button {
35
+ --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary, #000000);
36
+ --lmvz-tab-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0);
37
+
38
+ position: relative;
39
+ display: inline-flex;
40
+ flex-direction: column;
41
+ align-items: center;
42
+ justify-content: center;
43
+ gap: var(--lmvz-component-component-spacing-0-default, 4px);
44
+
45
+ padding-top: var(--lmvz-dimension-8-12, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem));
46
+ padding-bottom: var(--lmvz-dimension-8-14, clamp(0.5rem, 0.41rem + 0.39vw, 0.88rem));
47
+ padding-inline: var(--lmvz-dimension-16-24, clamp(1rem, 0.88rem + 0.52vw, 1.5rem));
48
+
49
+ border: none;
50
+ border-radius: var(--lmvz-semantic-border-radius-round, 999px);
51
+ background: var(--lmvz-tab-background);
52
+ color: var(--lmvz-tab-color);
53
+
54
+ font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5
55
+ Router);
56
+ cursor: pointer;
57
+ white-space: nowrap;
58
+ transition:
59
+ background-color 0.15s ease,
60
+ color 0.15s ease;
61
+ }
62
+ button:focus-visible {
63
+ outline: var(--lmvz-ds-outline, 1px solid #0e7ab4);
64
+ outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem));
65
+ z-index: 1;
66
+ }
67
+ button:disabled {
68
+ opacity: var(--lmvz-component-input-disabled-opacity, 40%);
69
+ pointer-events: none;
70
+ cursor: not-allowed;
71
+ }
72
+ button:hover {
73
+ --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0);
74
+ --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary-hover, #000000);
75
+ }
76
+ button:active {
77
+ --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0);
78
+ --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary-active, #000000);
79
+ }
80
+ :host([has-media]) {
81
+ --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary, #000000);
82
+ --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary, #ffffff);
83
+ }
84
+ :host([has-media]) button {
85
+ padding-top: var(--lmvz-dimension-16-18, clamp(1rem, 0.97rem + 0.13vw, 1.13rem));
86
+ padding-bottom: var(--lmvz-dimension-12-14, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem));
87
+ padding-inline: var(--lmvz-dimension-40-48, clamp(2.5rem, 2.38rem + 0.52vw, 3rem));
88
+ border-radius: var(--lmvz-semantic-border-radius-lg, 14px);
89
+ }
90
+ :host([has-media]) button:hover {
91
+ --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary-hover, #000000);
92
+ }
93
+ :host([has-media]) button:active {
94
+ --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary-active, #000000);
95
+ }
96
+ :host([selected]) button {
97
+ --lmvz-tab-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4);
98
+ --lmvz-tab-background: var(--lmvz-semantic-color-status-active, #f6fbfe);
99
+ }
100
+ :host([selected][has-media]) button:hover,
101
+ :host([selected][has-media]) button:active {
102
+ --lmvz-tab-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4);
103
+ }
104
+ .indicator {
105
+ /* TODO: replace with a design token if one is introduced for tab indicator border */
106
+ --lmvz-tab-indicator-size: 4px;
107
+
108
+ position: absolute;
109
+ background: linear-gradient(to right, var(--lmvz-semantic-color-gradient-main-1, #0e7ab4), var(--lmvz-semantic-color-gradient-main-2, #0e7ab4));
110
+ opacity: 0;
111
+ transition: opacity 0.15s ease;
112
+
113
+ /* Horizontal: full-width bar at bottom */
114
+ inset-block-end: 0;
115
+ inset-inline: 0;
116
+ block-size: var(--lmvz-tab-indicator-size);
117
+ border-start-start-radius: 0;
118
+ border-start-end-radius: 0;
119
+ border-end-start-radius: var(--lmvz-tab-indicator-size);
120
+ border-end-end-radius: var(--lmvz-tab-indicator-size);
121
+ }
122
+ :host([selected][has-media]) .indicator {
123
+ opacity: 1;
124
+ }
125
+ :host([vertical]) button {
126
+ border-radius: var(--lmvz-semantic-border-radius-round, 999px);
127
+ }
128
+ :host([vertical]) .indicator {
129
+ /* Vertical: narrow bar at inline-start edge */
130
+ inset-block: 0;
131
+ inset-inline: 0 auto;
132
+ inline-size: var(--lmvz-tab-indicator-size);
133
+ block-size: auto;
134
+ border-radius: 0 var(--lmvz-tab-indicator-size) var(--lmvz-tab-indicator-size) 0;
135
+ background: linear-gradient(to bottom, var(--lmvz-semantic-color-gradient-main-1, #0e7ab4), var(--lmvz-semantic-color-gradient-main-2, #0e7ab4));
136
+ }
137
+ ::slotted(*) {
138
+ --lmvz-component-color: var(--lmvz-tab-color);
139
+ }
140
+ ::slotted(lmvz-icon) {
141
+ --lmvz-component-size: var(--lmvz-dimension-16-18, clamp(1rem, 0.97rem + 0.13vw, 1.13rem));
142
+ }
143
+ :host([has-media]) ::slotted(lmvz-icon) {
144
+ --lmvz-component-size: var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.44rem + 0.26vw, 1.75rem));
145
+ }
146
+ .label {
147
+ display: contents;
148
+ }
@@ -0,0 +1,125 @@
1
+ import { Host, h } from "@stencil/core";
2
+ export class LmvzTab {
3
+ el;
4
+ mediaSlotEl;
5
+ value;
6
+ disabled = false;
7
+ selected = false;
8
+ vertical = false;
9
+ handleMediaSlotChange = () => {
10
+ this.el.toggleAttribute('has-media', (this.mediaSlotEl?.assignedElements() ?? []).length > 0);
11
+ };
12
+ componentDidLoad() {
13
+ this.handleMediaSlotChange();
14
+ this.el.dispatchEvent(new CustomEvent('lmvzTabReady', { bubbles: true, composed: false }));
15
+ }
16
+ render() {
17
+ return (h(Host, { key: 'f02b0624ac752f25e3996071ab88be1364dd27c3' }, h("button", { key: '1666fea6a68c66d5bf88141660067a66e0164891', part: "button", role: "tab", disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, tabIndex: 0 }, h("slot", { key: '23d1ef98da2a72efa3a5ec1563298fc4c08da441', name: "media", ref: (el) => (this.mediaSlotEl = el), onSlotchange: this.handleMediaSlotChange }), h("span", { key: 'bd96765d2228817c621a2ad4fd4f3b05fcdb3a21', class: "label" }, h("slot", { key: 'ef51c25169a1d993797a86b89fa296218e264969' })), h("span", { key: '28dda1631d62325a29e285909ee3f1c0ea9da3ad', "aria-hidden": "true", part: "indicator", class: "indicator" }))));
18
+ }
19
+ static get is() { return "lmvz-tab"; }
20
+ static get encapsulation() { return "shadow"; }
21
+ static get delegatesFocus() { return true; }
22
+ static get originalStyleUrls() {
23
+ return {
24
+ "$": ["lmvz-tab.css"]
25
+ };
26
+ }
27
+ static get styleUrls() {
28
+ return {
29
+ "$": ["lmvz-tab.css"]
30
+ };
31
+ }
32
+ static get properties() {
33
+ return {
34
+ "value": {
35
+ "type": "string",
36
+ "mutable": false,
37
+ "complexType": {
38
+ "original": "string",
39
+ "resolved": "string",
40
+ "references": {}
41
+ },
42
+ "required": true,
43
+ "optional": false,
44
+ "docs": {
45
+ "tags": [],
46
+ "text": "Unique value that identifies this tab within its `lmvz-tabs` parent.\nThe parent uses this to track the selected tab."
47
+ },
48
+ "getter": false,
49
+ "setter": false,
50
+ "reflect": true,
51
+ "attribute": "value"
52
+ },
53
+ "disabled": {
54
+ "type": "boolean",
55
+ "mutable": false,
56
+ "complexType": {
57
+ "original": "boolean",
58
+ "resolved": "boolean",
59
+ "references": {}
60
+ },
61
+ "required": false,
62
+ "optional": false,
63
+ "docs": {
64
+ "tags": [{
65
+ "name": "default",
66
+ "text": "false"
67
+ }],
68
+ "text": "Whether the tab is disabled.\nDisabled tabs are not activatable and are skipped by arrow-key navigation in `lmvz-tabs`."
69
+ },
70
+ "getter": false,
71
+ "setter": false,
72
+ "reflect": true,
73
+ "attribute": "disabled",
74
+ "defaultValue": "false"
75
+ },
76
+ "selected": {
77
+ "type": "boolean",
78
+ "mutable": false,
79
+ "complexType": {
80
+ "original": "boolean",
81
+ "resolved": "boolean",
82
+ "references": {}
83
+ },
84
+ "required": false,
85
+ "optional": false,
86
+ "docs": {
87
+ "tags": [{
88
+ "name": "default",
89
+ "text": "false"
90
+ }],
91
+ "text": "Whether this tab is currently selected.\nSet by the parent `lmvz-tabs` component \u2014 do not set manually."
92
+ },
93
+ "getter": false,
94
+ "setter": false,
95
+ "reflect": true,
96
+ "attribute": "selected",
97
+ "defaultValue": "false"
98
+ },
99
+ "vertical": {
100
+ "type": "boolean",
101
+ "mutable": false,
102
+ "complexType": {
103
+ "original": "boolean",
104
+ "resolved": "boolean",
105
+ "references": {}
106
+ },
107
+ "required": false,
108
+ "optional": false,
109
+ "docs": {
110
+ "tags": [{
111
+ "name": "default",
112
+ "text": "false"
113
+ }],
114
+ "text": "Vertical orientation context.\nSet by the parent `lmvz-tabs` when `orientation=\"vertical\"` \u2014 do not set manually.\nWhen true the selection indicator moves to the inline-start edge."
115
+ },
116
+ "getter": false,
117
+ "setter": false,
118
+ "reflect": true,
119
+ "attribute": "vertical",
120
+ "defaultValue": "false"
121
+ }
122
+ };
123
+ }
124
+ static get elementRef() { return "el"; }
125
+ }
@@ -0,0 +1,58 @@
1
+
2
+ @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides;
3
+ /**
4
+ * This defines the order of our lmvz-ds' CSS layers. See readme.md for details.
5
+ * Important: Always import this file _before_ layering your own styles!
6
+ */
7
+ @layer lmvz-ds.reset {
8
+ body {
9
+ margin: 0;
10
+ }
11
+
12
+ h1,
13
+ h2,
14
+ h3,
15
+ h4,
16
+ h5,
17
+ h6 {
18
+ margin: 0;
19
+ }
20
+
21
+ *[hidden] {
22
+ display: none !important;
23
+ }
24
+
25
+ }
26
+ :host {
27
+ display: inline-block;
28
+ }
29
+ .tablist {
30
+ display: inline-flex;
31
+ flex-direction: row;
32
+ background: var(--lmvz-semantic-color-int-secondary, #f0f0f0);
33
+ border-radius: var(--lmvz-semantic-border-radius-round, 999px);
34
+ /* Horizontal overflow: tabs scroll when they overflow the container */
35
+ overflow: auto hidden;
36
+ /* Hide scrollbar visually while keeping scroll functionality */
37
+ scrollbar-width: none; /* Firefox */
38
+ }
39
+ .tablist::-webkit-scrollbar {
40
+ display: none; /* Chrome/Safari */
41
+ }
42
+ :host([has-icon-tabs]) .tablist {
43
+ gap: var(--lmvz-dimension-6-8, clamp(0.38rem, 0.34rem + 0.13vw, 0.5rem));
44
+ background: none;
45
+ border-radius: 0;
46
+ }
47
+ /* ── Vertical orientation ────────────────────────────────────────────────── */
48
+ :host([orientation='vertical']) .tablist {
49
+ flex-direction: column;
50
+ overflow: visible auto;
51
+ }
52
+ /* The panels slot renders inline; individual panels control their own display */
53
+ ::slotted([role='tabpanel']) {
54
+ display: block;
55
+ }
56
+ ::slotted([role='tabpanel'][hidden]) {
57
+ display: none;
58
+ }