jsl-ui 9.28.7 → 10.0.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 (166) hide show
  1. package/docs/AutoSuggestComponent.md +17 -0
  2. package/docs/ButtonComponent.md +14 -0
  3. package/docs/CheckBoxComponent.md +12 -0
  4. package/docs/DateComponent.md +12 -0
  5. package/docs/DateRangeComponent.md +13 -0
  6. package/docs/DateTimeComponent.md +13 -0
  7. package/docs/DialogComponent.md +15 -0
  8. package/docs/ExpanderComponent.md +13 -0
  9. package/docs/FormComponent.md +15 -0
  10. package/docs/FormFieldComponent.md +15 -0
  11. package/docs/GridComponent.md +19 -0
  12. package/docs/InputComponent.md +15 -0
  13. package/docs/IntervalComponent.md +13 -0
  14. package/docs/LoadingComponent.md +12 -0
  15. package/docs/NavigationComponent.md +17 -0
  16. package/docs/Notification.md +14 -0
  17. package/docs/NotificationComponent.md +13 -0
  18. package/docs/NumberComponent.md +12 -0
  19. package/docs/OverlayComponent.md +12 -0
  20. package/docs/ProgressComponent.md +12 -0
  21. package/docs/README.md +24 -0
  22. package/docs/RibbonMenuComponent.md +14 -0
  23. package/docs/SelectComponent.md +15 -0
  24. package/docs/SplitterComponent.md +14 -0
  25. package/docs/StackPanelComponent.md +13 -0
  26. package/docs/TabsComponent.md +16 -0
  27. package/docs/TimeComponent.md +13 -0
  28. package/docs/TreeViewComponent.md +16 -0
  29. package/examples/showcase/checks-and-expanders.ts +163 -0
  30. package/examples/showcase/cultures.ts +39 -0
  31. package/examples/showcase/dates.ts +182 -0
  32. package/examples/showcase/dialogs.ts +184 -0
  33. package/examples/showcase/feedback-and-navigation.ts +174 -0
  34. package/examples/showcase/fields.ts +178 -0
  35. package/examples/showcase/fonts/Jost-Variable.ttf +0 -0
  36. package/examples/showcase/fonts/OFL-Jost.txt +93 -0
  37. package/examples/showcase/grids.ts +150 -0
  38. package/examples/showcase/index.html +60 -0
  39. package/examples/showcase/layout-and-navigation.ts +47 -0
  40. package/examples/showcase/nivona.css +98 -0
  41. package/examples/showcase/selects.ts +158 -0
  42. package/examples/showcase/showcase.css +231 -0
  43. package/examples/showcase/showcase.ts +214 -0
  44. package/examples/showcase/tabs.ts +161 -0
  45. package/examples/showcase/themes.css +83 -0
  46. package/examples/showcase/themes.ts +54 -0
  47. package/lib/components/IntervalComponent.d.ts +5 -0
  48. package/lib/components/IntervalComponent.js +29 -13
  49. package/lib/components/auto-suggest/AutoSuggestComponent.d.ts +11 -9
  50. package/lib/components/auto-suggest/AutoSuggestComponent.js +25 -38
  51. package/lib/components/button/ButtonComponent.d.ts +30 -1
  52. package/lib/components/button/ButtonComponent.js +85 -4
  53. package/lib/components/checkbox/CheckBoxComponent.d.ts +11 -1
  54. package/lib/components/checkbox/CheckBoxComponent.js +66 -56
  55. package/lib/components/checkbox/CheckBoxStyle.scss +72 -85
  56. package/lib/components/date/DateComponent.d.ts +10 -0
  57. package/lib/components/date/DateComponent.js +92 -44
  58. package/lib/components/date-range/DateRangeComponent.d.ts +14 -3
  59. package/lib/components/date-range/DateRangeComponent.js +96 -86
  60. package/lib/components/date-range/DateRangeStyle.scss +35 -11
  61. package/lib/components/date-time/DateTimeComponent.d.ts +8 -0
  62. package/lib/components/date-time/DateTimeComponent.js +64 -23
  63. package/lib/components/date-time/DateTimeStyle.scss +10 -7
  64. package/lib/components/dialog/DialogComponent.d.ts +21 -7
  65. package/lib/components/dialog/DialogComponent.js +179 -122
  66. package/lib/components/expander/ExpanderComponent.d.ts +15 -1
  67. package/lib/components/expander/ExpanderComponent.js +85 -64
  68. package/lib/components/expander/ExpanderStyle.scss +61 -47
  69. package/lib/components/form-field/FormFieldComponent.d.ts +45 -15
  70. package/lib/components/form-field/FormFieldComponent.js +249 -96
  71. package/lib/components/form-field/FormFieldStyle.scss +36 -87
  72. package/lib/components/form-field/create-control.d.ts +7 -0
  73. package/lib/components/form-field/create-control.js +48 -0
  74. package/lib/components/input/InputComponent.d.ts +18 -1
  75. package/lib/components/input/InputComponent.js +68 -93
  76. package/lib/components/loading/LoadingComponent.d.ts +9 -2
  77. package/lib/components/loading/LoadingComponent.js +13 -12
  78. package/lib/components/loading/LoadingStyle.css +19 -29
  79. package/lib/components/navigation/NavigationComponent.d.ts +34 -10
  80. package/lib/components/navigation/NavigationComponent.js +261 -33
  81. package/lib/components/navigation/NavigationStyle.scss +62 -226
  82. package/lib/components/notification/Notification.d.ts +37 -4
  83. package/lib/components/notification/Notification.js +160 -41
  84. package/lib/components/notification/Notification.scss +103 -19
  85. package/lib/components/number/NumberComponent.d.ts +16 -2
  86. package/lib/components/number/NumberComponent.js +54 -53
  87. package/lib/components/overlay/OverlayComponent.d.ts +13 -7
  88. package/lib/components/overlay/OverlayComponent.js +46 -114
  89. package/lib/components/overlay/overlay.css +18 -57
  90. package/lib/components/progress/ProgressComponent.d.ts +1 -0
  91. package/lib/components/progress/ProgressComponent.js +6 -6
  92. package/lib/components/progress/ProgressStyle.scss +5 -15
  93. package/lib/components/ribbon-menu/RibbonMenuComponent.js +2 -2
  94. package/lib/components/ribbon-menu/RibbonMenuStyle.scss +6 -76
  95. package/lib/components/select/SelectComponent.d.ts +33 -3
  96. package/lib/components/select/SelectComponent.js +312 -278
  97. package/lib/components/select/SelectDDAreaComponent.d.ts +13 -7
  98. package/lib/components/select/SelectDDAreaComponent.js +215 -256
  99. package/lib/components/select/SelectStyle.scss +204 -186
  100. package/lib/components/slider/nouislider.css +40 -54
  101. package/lib/components/stack-panel/SplitterComponent.d.ts +19 -3
  102. package/lib/components/stack-panel/SplitterComponent.js +94 -111
  103. package/lib/components/stack-panel/SplitterStyle.scss +9 -45
  104. package/lib/components/stack-panel/StackPanelComponent.js +3 -3
  105. package/lib/components/stack-panel/StackPanelStyle.scss +10 -52
  106. package/lib/components/tabs/TabsComponent.d.ts +17 -1
  107. package/lib/components/tabs/TabsComponent.js +247 -123
  108. package/lib/components/tabs/TabsStyle.scss +138 -75
  109. package/lib/components/time/TimeComponent.d.ts +5 -0
  110. package/lib/components/time/TimeComponent.js +61 -69
  111. package/lib/components/time/TimeComponent.scss +4 -4
  112. package/lib/components/tree-view/TreeViewComponent.d.ts +10 -4
  113. package/lib/components/tree-view/TreeViewComponent.js +65 -32
  114. package/lib/components/tree-view/TreeViewStyle.scss +12 -96
  115. package/lib/core/date.d.ts +2 -0
  116. package/lib/core/date.js +6 -0
  117. package/lib/core/jq.js +11 -8
  118. package/lib/grid/slick-default-theme.css +107 -31
  119. package/lib/grid/slick.creator.js +23 -5
  120. package/lib/grid/slick.formatters.js +4 -3
  121. package/lib/grid/slick.grid.css +38 -26
  122. package/lib/grid/slick.grid.d.ts +1 -0
  123. package/lib/grid/slick.grid.js +2 -3
  124. package/lib/grid.css +3413 -454
  125. package/lib/index.css +2500 -1031
  126. package/lib/index.css.map +1 -1
  127. package/lib/index.d.ts +1 -0
  128. package/lib/index.js +1 -1
  129. package/lib/index.js.map +1 -1
  130. package/lib/interaction/moveable.d.ts +1 -0
  131. package/lib/interaction/moveable.js +8 -0
  132. package/lib/interaction/resizable.d.ts +1 -0
  133. package/lib/interaction/resizable.js +9 -0
  134. package/lib/ui/auto.suggest.css +31 -14
  135. package/lib/ui/auto.suggest.d.ts +1 -0
  136. package/lib/ui/auto.suggest.js +88 -18
  137. package/lib/ui/base.css +2 -48
  138. package/lib/ui/button.css +134 -0
  139. package/lib/ui/date-input.css +11 -0
  140. package/lib/ui/date.picker/css/tiny-date-picker.css +124 -325
  141. package/lib/ui/date.picker/date-picker-options.js +4 -3
  142. package/lib/ui/date.picker/lib/date-manip.js +9 -0
  143. package/lib/ui/date.picker/mode/base-mode.d.ts +2 -1
  144. package/lib/ui/date.picker/mode/base-mode.js +112 -22
  145. package/lib/ui/date.picker/mode/dropdown-mode.d.ts +2 -4
  146. package/lib/ui/date.picker/mode/dropdown-mode.js +29 -42
  147. package/lib/ui/date.picker/mode/index.d.ts +2 -1
  148. package/lib/ui/date.picker/mode/modal-mode.d.ts +2 -1
  149. package/lib/ui/date.picker/mode/modal-mode.js +4 -2
  150. package/lib/ui/date.picker/mode/permanent-mode.d.ts +2 -1
  151. package/lib/ui/date.picker/views/day-picker.js +24 -15
  152. package/lib/ui/date.picker/views/month-picker.js +1 -1
  153. package/lib/ui/date.picker/views/year-picker.js +3 -2
  154. package/lib/ui/date.picker.d.ts +2 -1
  155. package/lib/ui/dialog.css +144 -108
  156. package/lib/ui/dialog.d.ts +19 -1
  157. package/lib/ui/dialog.js +178 -60
  158. package/lib/ui/input.css +35 -0
  159. package/lib/ui/number.input.js +50 -37
  160. package/lib/ui/theme.css +28 -0
  161. package/package.json +12 -8
  162. package/lib/components/drop-down/DropDownComponent.d.ts +0 -27
  163. package/lib/components/drop-down/DropDownComponent.js +0 -60
  164. package/lib/components/expander/OldExpanderStyle.scss +0 -37
  165. package/lib/ui/drop.down.d.ts +0 -52
  166. package/lib/ui/drop.down.js +0 -2112
@@ -1,124 +1,107 @@
1
1
  import "./SplitterStyle.scss";
2
2
  export class SplitterComponent {
3
- constructor(options) {
4
- // tslint:disable-next-line: variable-name
3
+ constructor(options = {}) {
4
+ this.options = options;
5
5
  this._is_splitter = true;
6
- this.options = options !== null && options !== void 0 ? options : {};
7
- if (this.options.minSizesInPX == null) {
8
- this.options.minSizesInPX = [];
9
- }
10
- if (this.options.minSizesInPX[0] == null) {
11
- this.options.minSizesInPX[0] = 0;
6
+ this.State = {};
7
+ }
8
+ isEqual(node) { return Object.getPrototypeOf(node) === Object.getPrototypeOf(this); }
9
+ render() {
10
+ var _a;
11
+ return { tag: "div", attr: { class: "split-comp", tabindex: "0", role: "separator", "aria-label": (_a = this.options.ariaLabel) !== null && _a !== void 0 ? _a : "Resize panels",
12
+ pointerdown: (e) => {
13
+ if (e.button !== 0 || !this.panels()) {
14
+ return false;
15
+ }
16
+ e.preventDefault();
17
+ this.State.dom.focus();
18
+ const [a, b] = this.panels();
19
+ this.State.drag = { id: e.pointerId, start: this.vertical() ? e.clientY : e.clientX, first: this.size(a), total: this.size(a) + this.size(b) };
20
+ this.State.dom.setPointerCapture(e.pointerId);
21
+ return false;
22
+ },
23
+ pointermove: (e) => {
24
+ var _a;
25
+ if (((_a = this.State.drag) === null || _a === void 0 ? void 0 : _a.id) === e.pointerId) {
26
+ this.resize(this.State.drag.first + (this.vertical() ? e.clientY : e.clientX) - this.State.drag.start, this.State.drag.total);
27
+ }
28
+ return false;
29
+ },
30
+ pointerup: () => { this.finish(); return false; }, pointercancel: () => { this.finish(); return false; },
31
+ lostpointercapture: () => { this.finish(); return false; },
32
+ keydown: (e) => {
33
+ var _a;
34
+ const keys = this.vertical() ? ["ArrowUp", "ArrowDown"] : ["ArrowLeft", "ArrowRight"];
35
+ const direction = keys.indexOf(e.key);
36
+ if (direction < 0 && e.key !== "Home" && e.key !== "End") {
37
+ return false;
38
+ }
39
+ const panels = this.panels();
40
+ if (!panels) {
41
+ return false;
42
+ }
43
+ e.preventDefault();
44
+ e.stopPropagation();
45
+ const total = this.size(panels[0]) + this.size(panels[1]);
46
+ this.resize(e.key === "Home" ? 0 : e.key === "End" ? total : this.size(panels[0]) + (direction ? 1 : -1) * (e.shiftKey ? 50 : 10), total);
47
+ (_a = this.options.onResizeDone) === null || _a === void 0 ? void 0 : _a.notify({ size1InPX: this.size(panels[0]) });
48
+ return false;
49
+ }
50
+ } };
51
+ }
52
+ onCreate(node) { this.State.dom = node.dom; this.updateAria(); }
53
+ onRemove() { this.State.drag = undefined; this.State.dom = undefined; }
54
+ vertical() { var _a; return (_a = this.State.dom) === null || _a === void 0 ? void 0 : _a.parentElement.classList.contains("vstackpanel"); }
55
+ panels() {
56
+ var _a, _b;
57
+ const a = (_a = this.State.dom) === null || _a === void 0 ? void 0 : _a.previousElementSibling, b = (_b = this.State.dom) === null || _b === void 0 ? void 0 : _b.nextElementSibling;
58
+ return a && b ? [a, b] : undefined;
59
+ }
60
+ size(el) { return this.vertical() ? el.getBoundingClientRect().height : el.getBoundingClientRect().width; }
61
+ resize(value, total) {
62
+ var _a, _b, _c, _d, _e, _f, _g;
63
+ const panels = this.panels();
64
+ if (!panels) {
65
+ return;
12
66
  }
13
- if (this.options.minSizesInPX[1] == null) {
14
- this.options.minSizesInPX[1] = 0;
67
+ const min = (_a = this.options.minSizesInPX) !== null && _a !== void 0 ? _a : [], max = (_b = this.options.maxSizesInPX) !== null && _b !== void 0 ? _b : [];
68
+ const low = Math.max((_c = min[0]) !== null && _c !== void 0 ? _c : 0, total - ((_d = max[1]) !== null && _d !== void 0 ? _d : total));
69
+ const high = Math.min((_e = max[0]) !== null && _e !== void 0 ? _e : total, total - ((_f = min[1]) !== null && _f !== void 0 ? _f : 0));
70
+ if (low > high) {
71
+ return;
15
72
  }
16
- if (this.options.maxSizesInPX == null) {
17
- this.options.maxSizesInPX = [];
73
+ const first = Math.max(low, Math.min(high, value)), dimension = this.vertical() ? "height" : "width";
74
+ panels.forEach((panel, index) => { panel.style.flex = "0 0 auto"; panel.style[dimension] = (index ? total - first : first) + "px"; });
75
+ this.updateAria();
76
+ (_g = this.options.onResize) === null || _g === void 0 ? void 0 : _g.notify();
77
+ }
78
+ updateAria() {
79
+ if (!this.State.dom) {
80
+ return;
18
81
  }
19
- if (!SplitterComponent.listenerRegistered) {
20
- SplitterComponent.listenerRegistered = true;
21
- this.registerListener();
82
+ this.State.dom.setAttribute("aria-orientation", this.vertical() ? "horizontal" : "vertical");
83
+ const panels = this.panels();
84
+ if (!panels) {
85
+ return;
22
86
  }
87
+ const total = this.size(panels[0]) + this.size(panels[1]);
88
+ this.State.dom.setAttribute("aria-valuemin", "0");
89
+ this.State.dom.setAttribute("aria-valuemax", "100");
90
+ this.State.dom.setAttribute("aria-valuenow", String(Math.round(this.size(panels[0]) / Math.max(1, total) * 100)));
23
91
  }
24
- isEqual(node) {
25
- return this.__proto__ === node.__proto__;
26
- }
27
- render() {
28
- return { tag: "div", attr: { class: "split-comp" } };
29
- }
30
- registerListener() {
31
- let dragStartX = 0;
32
- let draggedEl;
33
- let elLeft;
34
- let elRight;
35
- let elLeftWidth;
36
- let elRightWidth;
37
- let isDown;
38
- function mousemove(e) {
39
- var _a;
40
- if (!isDown) {
41
- return;
42
- }
43
- e.preventDefault();
44
- // e.stopPropagation();
45
- // e.stopImmediatePropagation();
46
- let x;
47
- const orientation = draggedEl.parentElement.classList.contains("vstackpanel") ? "vertical" : "horizontal";
48
- const component = draggedEl._component;
49
- if (orientation === "horizontal") {
50
- x = e.pageX != null ? e.pageX : e.touches[0].pageX;
51
- }
52
- else {
53
- x = e.pageY != null ? e.pageY : e.touches[0].pageY;
54
- }
55
- const delta = dragStartX - x;
56
- if ((elLeftWidth - delta) < component.options.minSizesInPX[0] ||
57
- (elRightWidth + delta) < component.options.minSizesInPX[1]) {
58
- return;
59
- }
60
- if ((elLeftWidth - delta) > component.options.maxSizesInPX[0] ||
61
- (elRightWidth + delta) > component.options.maxSizesInPX[1]) {
62
- return;
63
- }
64
- if (orientation === "horizontal") {
65
- elLeft.style.width = (elLeftWidth - delta) + "px";
66
- elRight.style.width = (elRightWidth + delta) + "px";
67
- }
68
- else {
69
- elLeft.style.height = (elLeftWidth - delta) + "px";
70
- elRight.style.height = (elRightWidth + delta) + "px";
71
- }
72
- (_a = component.options.onResize) === null || _a === void 0 ? void 0 : _a.notify();
92
+ finish() {
93
+ var _a, _b;
94
+ if (!this.State.drag) {
95
+ return;
73
96
  }
74
- function mouseup(e) {
75
- var _a;
76
- isDown = false;
77
- // document.removeEventListener("mousemove", mousemove);
78
- // document.removeEventListener("touchmove", mousemove);
79
- document.removeEventListener("mouseup", mousedown);
80
- document.removeEventListener("touchend", mousedown);
81
- const component = draggedEl._component;
82
- const area1 = draggedEl.previousElementSibling;
83
- const args = {};
84
- if (area1 != null) {
85
- args.size1InPX = area1.getBoundingClientRect().width;
86
- }
87
- (_a = component.options.onResizeDone) === null || _a === void 0 ? void 0 : _a.notify(args);
97
+ const id = this.State.drag.id;
98
+ this.State.drag = undefined;
99
+ if ((_a = this.State.dom) === null || _a === void 0 ? void 0 : _a.hasPointerCapture(id)) {
100
+ this.State.dom.releasePointerCapture(id);
88
101
  }
89
- function mousedown(e) {
90
- if (e.target.classList.contains("split-comp")) {
91
- isDown = true;
92
- const orientation = e.target.parentElement.classList.contains("vstackpanel") ? "vertical" : "horizontal";
93
- if (orientation === "horizontal") {
94
- dragStartX = e.pageX != null ? e.pageX : e.touches[0].pageX;
95
- }
96
- else {
97
- dragStartX = e.pageY != null ? e.pageY : e.touches[0].pageY;
98
- }
99
- draggedEl = e.target;
100
- elLeft = draggedEl.previousElementSibling;
101
- elRight = draggedEl.nextElementSibling;
102
- if (elLeft != null && elRight != null) {
103
- if (orientation === "horizontal") {
104
- elLeftWidth = elLeft.getBoundingClientRect().width;
105
- elRightWidth = elRight.getBoundingClientRect().width;
106
- }
107
- else {
108
- elLeftWidth = elLeft.getBoundingClientRect().height;
109
- elRightWidth = elRight.getBoundingClientRect().height;
110
- }
111
- document.body.addEventListener("mousemove", mousemove, { passive: false });
112
- document.body.addEventListener("touchmove", mousemove, { passive: false });
113
- document.body.addEventListener("mouseup", mouseup, false);
114
- document.body.addEventListener("touchend", mouseup, false);
115
- }
116
- }
102
+ const panels = this.panels();
103
+ if (panels) {
104
+ (_b = this.options.onResizeDone) === null || _b === void 0 ? void 0 : _b.notify({ size1InPX: this.size(panels[0]) });
117
105
  }
118
- document.addEventListener("mousedown", mousedown);
119
- document.addEventListener("touchstart", mousedown);
120
- document.removeEventListener("mousemove", mousemove);
121
- document.removeEventListener("touchmove", mousemove);
122
106
  }
123
107
  }
124
- SplitterComponent.listenerRegistered = false;
@@ -1,45 +1,9 @@
1
- .stackpanel-comp.hstackpanel > .split-comp {
2
- width: 14px !important;
3
- background: #d5d5d5;
4
- cursor: w-resize;
5
- position: relative;
6
-
7
- &::before {
8
- height: 4rem;
9
- background: #696969;
10
- width: 7px;
11
- position: absolute;
12
- top: calc(50% - 2rem);
13
- content: "";
14
- left: 3px;
15
- border-radius: 3px;
16
- }
17
-
18
- &:hover {
19
- box-shadow: 0px 0px 3px 2px rgba(0, 0, 0, 0.3);
20
- }
21
- }
22
-
23
- .stackpanel-comp.vstackpanel > .split-comp {
24
- height: 14px !important;
25
- flex-basis: 14px;
26
- flex-grow: 0;
27
- background: #d5d5d5;
28
- cursor: n-resize;
29
- position: relative;
30
-
31
- &::before {
32
- background: #696969;
33
- height: 7px;
34
- width: 4rem;
35
- position: absolute;
36
- left: calc(50% - 2rem);
37
- content: "";
38
- top: 3px;
39
- border-radius: 3px;
40
- }
41
-
42
- &:hover {
43
- box-shadow: 0px 0px 3px 2px rgba(0, 0, 0, 0.3);
44
- }
45
- }
1
+ @import "../../ui/theme.css";
2
+ .stackpanel-comp > .split-comp { position: relative; flex: 0 0 12px; align-self: stretch; background: var(--jsl-color-surface-subtle); touch-action: none; user-select: none; outline-offset: -2px; }
3
+ .split-comp::before { content: ""; position: absolute; border-radius: 999px; background: var(--jsl-color-border); }
4
+ .hstackpanel > .split-comp { cursor: col-resize; }
5
+ .hstackpanel > .split-comp::before { width: 3px; height: 32px; max-height: 80%; top: 50%; left: 50%; transform: translate(-50%,-50%); }
6
+ .vstackpanel > .split-comp { cursor: row-resize; }
7
+ .vstackpanel > .split-comp::before { height: 3px; width: 32px; max-width: 80%; top: 50%; left: 50%; transform: translate(-50%,-50%); }
8
+ .split-comp:hover::before, .split-comp:focus-visible::before { background: var(--jsl-color-accent); }
9
+ .split-comp:focus-visible { outline: 2px solid var(--jsl-color-focus); }
@@ -36,13 +36,13 @@ export class StackPanelComponent {
36
36
  if (this.options.sizes != null && this.options.sizes[idx] != null) {
37
37
  const s = this.options.sizes[idx];
38
38
  if (s === "*") {
39
- return undefined;
39
+ return "flex:1 1 0";
40
40
  }
41
41
  if (this.options.orientation === "vertical") {
42
- return "height: " + s;
42
+ return "flex:0 0 auto;height: " + s;
43
43
  }
44
44
  else {
45
- return "width:" + s;
45
+ return "flex:0 0 auto;width:" + s;
46
46
  }
47
47
  }
48
48
  return "flex-grow:1;";
@@ -1,53 +1,11 @@
1
-
2
- .stackpanel-comp.hstackpanel {
3
- position: relative;
1
+ @import "../../ui/theme.css";
2
+ .stackpanel-comp { display: flex; min-width: 0; min-height: 0; box-sizing: border-box; }
3
+ .stackpanel-comp.hstackpanel { flex-direction: row; width: 100%; }
4
+ .stackpanel-comp.vstackpanel { flex-direction: column; }
5
+ .stackpanel-comp.wrap { flex-wrap: wrap; }
6
+ .stackpanel-comp > div:not(.split-comp) { min-width: 0; min-height: 0; box-sizing: border-box; }
7
+ @media (max-width: 70em) {
8
+ .stackpanel-comp.hstackpanel.responsive { flex-direction: column; }
9
+ .stackpanel-comp.hstackpanel.responsive > div:not(.split-comp) { width: auto !important; flex: 0 0 auto !important; }
10
+ .stackpanel-comp.hstackpanel.responsive > .split-comp { display: none; }
4
11
  }
5
-
6
- @media (max-width: 70em) {
7
- .stackpanel-comp.hstackpanel.responsive > div {
8
- width: auto!important;
9
- }
10
- }
11
-
12
- .stackpanel-comp.hstackpanel:not(.responsive) {
13
- // flex-grow: 1;
14
- position: relative;
15
- display: flex;
16
- width: 100%;
17
- }
18
-
19
- // .stackpanel-comp.hstackpanel:not(.responsive) > div {
20
- // display: flex;
21
- // }
22
-
23
- @media (min-width: 70em) {
24
-
25
- .stackpanel-comp.hstackpanel {
26
- // flex-grow: 1;
27
- position: relative;
28
- display: flex;
29
- width: 100%;
30
- }
31
-
32
- }
33
-
34
- .stackpanel-comp.wrap {
35
- flex-wrap: wrap;
36
- }
37
-
38
- .stackpanel-comp.vstackpanel {
39
- position: relative;
40
- }
41
-
42
- // .stackpanel-comp.vstackpanel > div {
43
- // display: block;
44
- // }
45
-
46
- .stackpanel-comp.vstackpanel > div {
47
- display: flex;
48
- flex-direction: column;
49
- height: 100%;
50
- flex-basis: auto;
51
- flex-grow: 1;
52
- flex-shrink: 1;
53
- }
@@ -8,6 +8,9 @@ export interface ITabItemOption {
8
8
  onCreate?: () => IJSLVNode | string | IJSLComponent;
9
9
  canClose?: boolean;
10
10
  onClosing?: () => boolean;
11
+ /** Accessible name for an icon-only or custom header. */
12
+ ariaLabel?: string;
13
+ closeButtonLabel?: string;
11
14
  }
12
15
  export interface ITabOptions {
13
16
  tabs?: ITabItemOption[];
@@ -18,11 +21,14 @@ export interface ITabOptions {
18
21
  onSelect?: (index?: number) => boolean | void;
19
22
  maxHeight?: string;
20
23
  preserveContent?: boolean;
24
+ ariaLabel?: string;
21
25
  }
22
26
  export declare class TabsComponent implements IJSLComponent {
23
27
  private options?;
24
28
  State: {
25
- selectedIndex: any;
29
+ selectedIndex: number;
30
+ id?: string;
31
+ created?: WeakSet<ITabItemOption>;
26
32
  };
27
33
  private renderer;
28
34
  constructor(options?: ITabOptions);
@@ -34,7 +40,17 @@ export declare class TabsComponent implements IJSLComponent {
34
40
  GetByID(id: string): ITabItemOption;
35
41
  closeTabIndex(index: number, raiseSelectEvent?: boolean): boolean;
36
42
  onInit(renderer: JSLRender): void;
43
+ onCreate(): void;
44
+ /** Select programmatically without raising onSelect, including -1 for no selection. */
37
45
  SetSelectedTab(index: number): void;
46
+ private selectFromUser;
47
+ private onTabKeydown;
48
+ private requestRefresh;
49
+ private revealTab;
50
+ private createContent;
51
+ private isValidIndex;
52
+ private firstEnabledIndex;
53
+ private triggerId;
38
54
  private toNode;
39
55
  private checkForDuplicateIds;
40
56
  }