@oicl/openbridge-webcomponents 2.0.0-next.136 → 2.0.0-next.137

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 (28) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +11434 -10949
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +837 -67
  4. package/dist/automation/hydraulic-check-valve/hydraulic-check-valve.css.js +12 -0
  5. package/dist/automation/hydraulic-check-valve/hydraulic-check-valve.css.js.map +1 -0
  6. package/dist/automation/hydraulic-check-valve/hydraulic-check-valve.d.ts +33 -0
  7. package/dist/automation/hydraulic-check-valve/hydraulic-check-valve.d.ts.map +1 -0
  8. package/dist/automation/hydraulic-check-valve/hydraulic-check-valve.js +58 -0
  9. package/dist/automation/hydraulic-check-valve/hydraulic-check-valve.js.map +1 -0
  10. package/dist/automation/hydraulic-valve-4-3/hydraulic-valve-4-3.d.ts +77 -0
  11. package/dist/automation/hydraulic-valve-4-3/hydraulic-valve-4-3.d.ts.map +1 -0
  12. package/dist/automation/hydraulic-valve-4-3/hydraulic-valve-4-3.js +74 -0
  13. package/dist/automation/hydraulic-valve-4-3/hydraulic-valve-4-3.js.map +1 -0
  14. package/dist/automation/hydraulic-valve-x-2/hydraulic-valve-x-2.d.ts +74 -0
  15. package/dist/automation/hydraulic-valve-x-2/hydraulic-valve-x-2.d.ts.map +1 -0
  16. package/dist/automation/hydraulic-valve-x-2/hydraulic-valve-x-2.js +60 -0
  17. package/dist/automation/hydraulic-valve-x-2/hydraulic-valve-x-2.js.map +1 -0
  18. package/dist/automation/shuffle-button/shuffle-button-base.d.ts +67 -0
  19. package/dist/automation/shuffle-button/shuffle-button-base.d.ts.map +1 -0
  20. package/dist/automation/shuffle-button/shuffle-button-base.js +126 -0
  21. package/dist/automation/shuffle-button/shuffle-button-base.js.map +1 -0
  22. package/dist/automation/shuffle-button/shuffle-button.css.js +219 -0
  23. package/dist/automation/shuffle-button/shuffle-button.css.js.map +1 -0
  24. package/dist/automation/shuffle-button/shuffle-layout.d.ts +9 -0
  25. package/dist/automation/shuffle-button/shuffle-layout.d.ts.map +1 -0
  26. package/dist/automation/shuffle-button/shuffle-layout.js +16 -0
  27. package/dist/automation/shuffle-button/shuffle-layout.js.map +1 -0
  28. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shuffle-button-base.js","sources":["../../../src/automation/shuffle-button/shuffle-button-base.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport type {PropertyValues, TemplateResult} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport componentStyle from './shuffle-button.css?inline';\nimport {\n clampPosition,\n shuffleSlotCount,\n shuffleWindowOffset,\n} from './shuffle-layout.js';\n\n/**\n * Detail payload for the `position-selected` event dispatched by\n * shuffle-button components. `position` is the zero-based position the user\n * requested.\n */\nexport interface PositionSelectedDetail {\n position: number;\n}\n\n/**\n * The `position-selected` event dispatched by shuffle-button components.\n */\nexport type PositionSelectedEvent = CustomEvent<PositionSelectedDetail>;\n\n/**\n * Base class for shuffle-button selectors: a control whose selected thumb\n * always occupies the fixed center slot of a (2·n−1)-slot row (or column when\n * `vertical`). Option thumbs keep their logical order and redistribute to\n * either side of the selected thumb; empty spacer slots absorb the remaining\n * length so the total size never changes.\n *\n * ## Controlled selection\n * Clicking an option or pressing an arrow key only fires `position-selected`.\n * The host application sets `selectedPosition` once the device confirms the\n * change, so the control never shows a position the device has not reached.\n *\n * ## Keyboard\n * Follows the WAI-ARIA radio group pattern\n * (https://www.w3.org/WAI/ARIA/apg/patterns/radio/): `role=\"radiogroup\"` with\n * one `role=\"radio\"` thumb per position, a single tab stop on the selected\n * thumb, and Left/Up and Right/Down moving to the previous/next position with\n * wrap-around. Departures: arrow keys request the position rather than moving\n * the checked state (controlled selection above), and focus follows the thumb\n * only once the host confirms it. Space/Enter on a focused thumb request it\n * through the native button click. Home/End are out of scope.\n *\n * Subclasses define `positionCount` and `renderPositionIcon()` and carry the\n * `@fires position-selected` tag: the manifest and the framework wrappers read\n * events from the registered element, not from this base.\n *\n * Not declared `abstract`: the wrapper generators wrap every `LitElement`\n * subclass and pass its constructor as a concrete `Constructor<T>`, so the\n * default implementations below stand in for abstract members (same as\n * `ObcAbstractAutomationButton`).\n *\n * @property selectedPosition - Zero-based index of the currently selected position. Out-of-range values are clamped.\n * @property vertical - Lays the control out vertically: positions stack top to bottom and the position symbols rotate 90° counter-clockwise to match a vertical flow path.\n * @property ariaLabel - Accessible name for the radio group (the control is icon-only). Concrete components override the default with a device-specific name.\n */\nexport class ObcShuffleButtonBase extends LitElement {\n @property({type: Number}) selectedPosition = 1;\n\n @property({type: Boolean}) vertical = false;\n\n @property({type: String}) override ariaLabel = 'Position selector';\n\n @state() private suppressHover = false;\n\n protected get positionCount(): number {\n return 1;\n }\n\n protected renderPositionIcon(_position: number): TemplateResult {\n return html``;\n }\n\n override render() {\n const count = this.positionCount;\n const selected = clampPosition(count, this.selectedPosition);\n return html`\n <div\n class=${classMap({shuffle: true, vertical: this.vertical})}\n role=\"radiogroup\"\n aria-label=${this.ariaLabel}\n aria-orientation=${this.vertical ? 'vertical' : 'horizontal'}\n style=\"--_shuffle-slot-count: ${shuffleSlotCount(\n count\n )}; --_shuffle-window-offset: ${shuffleWindowOffset(\n count,\n selected\n )};${this.suppressHover ? ' --obc-can-hover: 0;' : ''}\"\n @keydown=${this.handleKeydown}\n @pointermove=${this.restoreHover}\n >\n <div class=\"window\">\n <div class=\"track\"></div>\n ${Array.from({length: count}, (_, position) =>\n this.renderThumb(position, selected)\n )}\n </div>\n </div>\n `;\n }\n\n private renderThumb(position: number, selected: number) {\n const isSelected = position === selected;\n return html`\n <button\n class=${classMap({thumb: true, selected: isSelected})}\n type=\"button\"\n role=\"radio\"\n aria-checked=${isSelected}\n tabindex=${isSelected ? 0 : -1}\n @click=${() => this.requestPosition(position)}\n >\n <div class=\"visible-wrapper\">\n <div class=\"icon-container\">${this.renderPositionIcon(position)}</div>\n </div>\n </button>\n `;\n }\n\n private requestPosition(position: number) {\n if (position === clampPosition(this.positionCount, this.selectedPosition)) {\n return;\n }\n // Browsers keep :hover on the thumb that shuffles away from under a\n // stationary pointer; mute hover feedback until the pointer really moves.\n this.suppressHover = true;\n const event: PositionSelectedEvent = new CustomEvent('position-selected', {\n detail: {position},\n bubbles: true,\n composed: true,\n });\n this.dispatchEvent(event);\n }\n\n private restoreHover() {\n this.suppressHover = false;\n }\n\n private handleKeydown(event: KeyboardEvent) {\n let delta: number;\n if (event.key === 'ArrowRight' || event.key === 'ArrowDown') {\n delta = 1;\n } else if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') {\n delta = -1;\n } else {\n return;\n }\n event.preventDefault();\n const count = this.positionCount;\n const selected = clampPosition(count, this.selectedPosition);\n this.requestPosition((selected + delta + count) % count);\n }\n\n protected override updated(changed: PropertyValues) {\n if (\n changed.has('selectedPosition') &&\n this.shadowRoot?.activeElement instanceof HTMLElement\n ) {\n this.shadowRoot\n .querySelector<HTMLButtonElement>('button.thumb.selected')\n ?.focus();\n }\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n"],"names":[],"mappings":"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"}
@@ -0,0 +1,219 @@
1
+ import { css } from "lit";
2
+ const componentStyle = css`* {
3
+ -webkit-tap-highlight-color: transparent;
4
+ }
5
+
6
+ :host {
7
+ display: inline-block;
8
+ }
9
+
10
+ /* ---- Slot grid ----
11
+ * The box is (2n-1) touch-target slots; the selected thumb always sits in the
12
+ * center slot, so the box never changes size with the selection. */
13
+
14
+ .shuffle {
15
+ --shuffle-slot-size: var(--global-size-spacing-touch-target-min);
16
+ --_shuffle-slot-count: 1;
17
+ --_shuffle-window-offset: 0;
18
+ position: relative; /* containing block for the sliding .window */
19
+ width: calc(var(--_shuffle-slot-count) * var(--shuffle-slot-size));
20
+ height: var(--shuffle-slot-size);
21
+ }
22
+
23
+ .shuffle.vertical {
24
+ width: var(--shuffle-slot-size);
25
+ height: calc(var(--_shuffle-slot-count) * var(--shuffle-slot-size));
26
+ }
27
+
28
+ /* The window holds the n thumbs in logical order and slides by whole slots so
29
+ * the selected one lands in the center; the box above stays put. */
30
+
31
+ .window {
32
+ position: absolute; /* slides inside the fixed-size .shuffle box */
33
+ top: 0;
34
+ left: 0;
35
+ display: flex;
36
+ transform: translateX(
37
+ calc(var(--_shuffle-window-offset) * var(--shuffle-slot-size))
38
+ );
39
+ transition: transform 100ms ease-out; /* TODO(designer): Figma is WIP and specifies no motion */
40
+ }
41
+
42
+ .shuffle.vertical .window {
43
+ flex-direction: column;
44
+ transform: translateY(
45
+ calc(var(--_shuffle-window-offset) * var(--shuffle-slot-size))
46
+ );
47
+ }
48
+
49
+ @media (prefers-reduced-motion: reduce) {
50
+ .window {
51
+ transition: none;
52
+ }
53
+ }
54
+
55
+ /* The track is inset to the visual target height so it aligns with the thumbs'
56
+ * visible wrappers, not with the touch slots. */
57
+
58
+ .track {
59
+ border-color: var(--indent-enabled-border-color);
60
+ background-color: var(--indent-enabled-background-color);
61
+ border-width: 1px;
62
+ border-style: solid;
63
+ --base-border-color: var(--indent-enabled-border-color);
64
+ --base-background-color: var(--indent-enabled-background-color);
65
+ position: absolute;
66
+ inset: calc(
67
+ (
68
+ var(--shuffle-slot-size) -
69
+ var(--global-size-spacing-visual-target-min)
70
+ ) /
71
+ 2
72
+ )
73
+ 0;
74
+ border-radius: var(--global-border-radius-border-radius-base);
75
+ box-sizing: border-box; /* the mixin border must not grow the track past the slots */
76
+ }
77
+
78
+ .shuffle.vertical .track {
79
+ inset: 0
80
+ calc(
81
+ (
82
+ var(--shuffle-slot-size) -
83
+ var(--global-size-spacing-visual-target-min)
84
+ ) /
85
+ 2
86
+ );
87
+ }
88
+
89
+ /* ---- Thumbs ----
90
+ * Two-layer pattern: the button is the touch target and focus-ring layer, the
91
+ * .visible-wrapper is the visual target. */
92
+
93
+ .thumb {
94
+ position: relative;
95
+ width: var(--shuffle-slot-size);
96
+ height: var(--shuffle-slot-size);
97
+ display: flex;
98
+ align-items: center;
99
+ justify-content: center;
100
+ flex-shrink: 0; /* a slot never shrinks below the touch target */
101
+ padding: 0;
102
+ margin: 0;
103
+ border: none;
104
+ background: none;
105
+ cursor: pointer;
106
+ }
107
+
108
+ button.thumb {
109
+ cursor: pointer;
110
+ }
111
+
112
+ button.thumb:focus {
113
+ outline: none;
114
+ }
115
+
116
+ button.thumb .visible-wrapper {
117
+ border-color: var(--flat-enabled-border-color);
118
+ background-color: var(--flat-enabled-background-color);
119
+ border-width: 1px;
120
+ border-style: solid;
121
+ cursor: pointer;
122
+ --base-border-color: var(--flat-enabled-border-color);
123
+ --base-background-color: var(--flat-enabled-background-color);
124
+ }
125
+
126
+ button.thumb.activated .visible-wrapper {
127
+ border-color: var(--flat-activated-border-color);
128
+ background-color: var(--flat-activated-background-color);
129
+ --base-border-color: var(--flat-activated-border-color);
130
+ --base-background-color: var(--flat-activated-background-color);
131
+ }
132
+
133
+ @media (hover:hover) {
134
+
135
+ button.thumb:hover .visible-wrapper {
136
+ border-color: color-mix(in srgb, var(--flat-hover-border-color) calc(var(--obc-can-hover) * 100%), var(--base-border-color));
137
+ background-color: color-mix(in srgb, var(--flat-hover-background-color) calc(var(--obc-can-hover) * 100%), var(--base-background-color));
138
+ }
139
+ }
140
+
141
+ button.thumb:active .visible-wrapper {
142
+ border-color: var(--flat-pressed-border-color);
143
+ background-color: var(--flat-pressed-background-color);
144
+ }
145
+
146
+ button.thumb:focus-visible .visible-wrapper {
147
+ outline-color: var(--border-focus-color);
148
+ outline-width: var(--global-size-spacing-border-weight-focusframe);
149
+ outline-style: solid;
150
+ border-color: var(--container-global-color);
151
+ z-index: 1;
152
+ }
153
+
154
+ button.thumb:disabled .visible-wrapper {
155
+ border-color: var(--flat-disabled-border-color);
156
+ background-color: var(--flat-disabled-background-color);
157
+ cursor: not-allowed;
158
+ color: var(--on-flat-disabled-color) !important;
159
+ }
160
+
161
+ button.thumb.disabled .visible-wrapper {
162
+ border-color: var(--flat-disabled-border-color);
163
+ background-color: var(--flat-disabled-background-color);
164
+ cursor: not-allowed;
165
+ color: var(--on-flat-disabled-color) !important;
166
+ }
167
+
168
+ button.thumb:disabled {
169
+ cursor: not-allowed;
170
+ }
171
+
172
+ button.thumb.disabled {
173
+ cursor: not-allowed;
174
+ }
175
+
176
+ .visible-wrapper {
177
+ display: flex;
178
+ align-items: center;
179
+ justify-content: center;
180
+ width: 100%;
181
+ height: var(--global-size-spacing-visual-target-min);
182
+ box-sizing: border-box;
183
+ border-radius: var(--global-border-radius-border-radius-base);
184
+ color: var(--automation-device-secondary-color);
185
+ }
186
+
187
+ .thumb.selected {
188
+ cursor: default; /* clicking the selected position is a no-op */
189
+ }
190
+
191
+ .thumb.selected .visible-wrapper {
192
+ background-color: var(--automation-pipe-primary-color);
193
+ border: 1px solid var(--automation-pipe-tertiary-color);
194
+ color: var(--automation-device-tertiary-color);
195
+ }
196
+
197
+ .shuffle.vertical .visible-wrapper {
198
+ width: var(--global-size-spacing-visual-target-min);
199
+ height: 100%;
200
+ }
201
+
202
+ .icon-container {
203
+ width: var(--global-size-spacing-icon-icon-size-regular);
204
+ height: var(--global-size-spacing-icon-icon-size-regular);
205
+ }
206
+
207
+ .shuffle.vertical .icon-container {
208
+ transform: rotate(-90deg); /* symbols are drawn for horizontal flow */
209
+ }
210
+
211
+ .icon-container > * {
212
+ width: 100%;
213
+ height: 100%;
214
+ }
215
+ `;
216
+ export {
217
+ componentStyle as default
218
+ };
219
+ //# sourceMappingURL=shuffle-button.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shuffle-button.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Pure layout math for the shuffle-button mechanism: a selector whose selected
3
+ * thumb always occupies the fixed center slot of a (2n-1)-slot row while the
4
+ * remaining option thumbs keep their logical order on either side.
5
+ */
6
+ export declare function clampPosition(positionCount: number, position: number): number;
7
+ export declare function shuffleSlotCount(positionCount: number): number;
8
+ export declare function shuffleWindowOffset(positionCount: number, selectedPosition: number): number;
9
+ //# sourceMappingURL=shuffle-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shuffle-layout.d.ts","sourceRoot":"","sources":["../../../src/automation/shuffle-button/shuffle-layout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wBAAgB,aAAa,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG7E;AAED,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,MAAM,EACrB,gBAAgB,EAAE,MAAM,GACvB,MAAM,CAER"}
@@ -0,0 +1,16 @@
1
+ function clampPosition(positionCount, position) {
2
+ const rounded = Number.isNaN(position) ? 0 : Math.round(position);
3
+ return Math.min(Math.max(rounded, 0), positionCount - 1);
4
+ }
5
+ function shuffleSlotCount(positionCount) {
6
+ return 2 * positionCount - 1;
7
+ }
8
+ function shuffleWindowOffset(positionCount, selectedPosition) {
9
+ return positionCount - 1 - clampPosition(positionCount, selectedPosition);
10
+ }
11
+ export {
12
+ clampPosition,
13
+ shuffleSlotCount,
14
+ shuffleWindowOffset
15
+ };
16
+ //# sourceMappingURL=shuffle-layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shuffle-layout.js","sources":["../../../src/automation/shuffle-button/shuffle-layout.ts"],"sourcesContent":["/**\n * Pure layout math for the shuffle-button mechanism: a selector whose selected\n * thumb always occupies the fixed center slot of a (2n-1)-slot row while the\n * remaining option thumbs keep their logical order on either side.\n */\n\nexport function clampPosition(positionCount: number, position: number): number {\n const rounded = Number.isNaN(position) ? 0 : Math.round(position);\n return Math.min(Math.max(rounded, 0), positionCount - 1);\n}\n\nexport function shuffleSlotCount(positionCount: number): number {\n return 2 * positionCount - 1;\n}\n\nexport function shuffleWindowOffset(\n positionCount: number,\n selectedPosition: number\n): number {\n return positionCount - 1 - clampPosition(positionCount, selectedPosition);\n}\n"],"names":[],"mappings":"AAMO,SAAS,cAAc,eAAuB,UAA0B;AAC7E,QAAM,UAAU,OAAO,MAAM,QAAQ,IAAI,IAAI,KAAK,MAAM,QAAQ;AAChE,SAAO,KAAK,IAAI,KAAK,IAAI,SAAS,CAAC,GAAG,gBAAgB,CAAC;AACzD;AAEO,SAAS,iBAAiB,eAA+B;AAC9D,SAAO,IAAI,gBAAgB;AAC7B;AAEO,SAAS,oBACd,eACA,kBACQ;AACR,SAAO,gBAAgB,IAAI,cAAc,eAAe,gBAAgB;AAC1E;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oicl/openbridge-webcomponents",
3
- "version": "2.0.0-next.136",
3
+ "version": "2.0.0-next.137",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",