@nanahoshi/mona-ui 0.18.5 → 0.19.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 (112) hide show
  1. package/README.md +71 -13
  2. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +11 -3
  3. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +17 -9
  4. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +16 -7
  5. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +122 -48
  6. package/fesm2022/nanahoshi-mona-ui-card.mjs +22 -14
  7. package/fesm2022/nanahoshi-mona-ui-chart.mjs +78 -18
  8. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +1 -1
  9. package/fesm2022/nanahoshi-mona-ui-chip.mjs +199 -77
  10. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +1 -2
  11. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +23 -5
  12. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +49 -28
  13. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +42 -26
  14. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +11 -3
  15. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +28 -16
  16. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +74 -51
  17. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +57 -25
  18. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +13 -5
  19. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +17 -6
  20. package/fesm2022/nanahoshi-mona-ui-editor.mjs +178 -59
  21. package/fesm2022/nanahoshi-mona-ui-filter.mjs +137 -54
  22. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-WEDbZ5vy.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-Bg7rckst.mjs} +2 -2
  23. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-ibH5osCg.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BSSpaCLL.mjs} +2 -2
  24. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-D9AwQFDV.mjs +145 -0
  25. package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-hc-LeIb0.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-Byb9iTes.mjs} +21 -17
  26. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-DYajpOb9.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-CBmdtrXm.mjs} +5 -5
  27. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-Pm8Fbp6M.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DPmJmCap.mjs} +90 -42
  28. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  29. package/fesm2022/nanahoshi-mona-ui-i18n.mjs +1168 -0
  30. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +12 -4
  31. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +48 -21
  32. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +33 -18
  33. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +10 -10
  34. package/fesm2022/nanahoshi-mona-ui-list.mjs +2 -0
  35. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +29 -16
  36. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +12 -3
  37. package/fesm2022/nanahoshi-mona-ui-notification.mjs +23 -18
  38. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +211 -106
  39. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +14 -6
  40. package/fesm2022/nanahoshi-mona-ui-pager.mjs +46 -19
  41. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +57 -46
  42. package/fesm2022/nanahoshi-mona-ui-popup.mjs +35 -15
  43. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +38 -17
  44. package/fesm2022/nanahoshi-mona-ui-rating.mjs +25 -7
  45. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +431 -101
  46. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +1 -1
  47. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +26 -8
  48. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +222 -28
  49. package/fesm2022/nanahoshi-mona-ui-slider.mjs +91 -36
  50. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +34 -15
  51. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +39 -23
  52. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +50 -25
  53. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +32 -14
  54. package/fesm2022/nanahoshi-mona-ui-switch.mjs +9 -9
  55. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +74 -56
  56. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +16 -8
  57. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +33 -19
  58. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +66 -27
  59. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +23 -15
  60. package/fesm2022/nanahoshi-mona-ui-window.mjs +71 -40
  61. package/i18n/package.json +4 -0
  62. package/package.json +5 -1
  63. package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -1
  64. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +9 -3
  65. package/types/nanahoshi-mona-ui-button-group.d.ts +9 -3
  66. package/types/nanahoshi-mona-ui-calendar.d.ts +13 -3
  67. package/types/nanahoshi-mona-ui-card.d.ts +8 -2
  68. package/types/nanahoshi-mona-ui-chart.d.ts +10 -1
  69. package/types/nanahoshi-mona-ui-chip.d.ts +14 -5
  70. package/types/nanahoshi-mona-ui-color-gradient.d.ts +6 -1
  71. package/types/nanahoshi-mona-ui-color-palette.d.ts +21 -10
  72. package/types/nanahoshi-mona-ui-color-picker.d.ts +30 -20
  73. package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -1
  74. package/types/nanahoshi-mona-ui-date-picker.d.ts +7 -2
  75. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +33 -8
  76. package/types/nanahoshi-mona-ui-dialog.d.ts +16 -7
  77. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -1
  78. package/types/nanahoshi-mona-ui-dropdowns.d.ts +4 -1
  79. package/types/nanahoshi-mona-ui-editor.d.ts +6 -1
  80. package/types/nanahoshi-mona-ui-filter.d.ts +16 -10
  81. package/types/nanahoshi-mona-ui-grid.d.ts +38 -1
  82. package/types/nanahoshi-mona-ui-i18n.d.ts +633 -0
  83. package/types/nanahoshi-mona-ui-internal-list.d.ts +7 -2
  84. package/types/nanahoshi-mona-ui-internal-tree.d.ts +7 -3
  85. package/types/nanahoshi-mona-ui-list-box.d.ts +9 -4
  86. package/types/nanahoshi-mona-ui-list-view.d.ts +6 -6
  87. package/types/nanahoshi-mona-ui-list.d.ts +1 -1
  88. package/types/nanahoshi-mona-ui-menubar.d.ts +59 -58
  89. package/types/nanahoshi-mona-ui-multi-select.d.ts +6 -1
  90. package/types/nanahoshi-mona-ui-notification.d.ts +11 -5
  91. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +24 -15
  92. package/types/nanahoshi-mona-ui-otp-input.d.ts +9 -3
  93. package/types/nanahoshi-mona-ui-pager.d.ts +19 -6
  94. package/types/nanahoshi-mona-ui-popup.d.ts +2 -1
  95. package/types/nanahoshi-mona-ui-progress-bar.d.ts +9 -7
  96. package/types/nanahoshi-mona-ui-rating.d.ts +19 -12
  97. package/types/nanahoshi-mona-ui-scroll-view.d.ts +34 -28
  98. package/types/nanahoshi-mona-ui-sheet.d.ts +8 -2
  99. package/types/nanahoshi-mona-ui-sidebar.d.ts +3 -0
  100. package/types/nanahoshi-mona-ui-slider.d.ts +44 -26
  101. package/types/nanahoshi-mona-ui-spinner.d.ts +13 -4
  102. package/types/nanahoshi-mona-ui-split-button.d.ts +62 -56
  103. package/types/nanahoshi-mona-ui-splitter.d.ts +9 -6
  104. package/types/nanahoshi-mona-ui-stepper.d.ts +9 -3
  105. package/types/nanahoshi-mona-ui-switch.d.ts +1 -1
  106. package/types/nanahoshi-mona-ui-tabs.d.ts +96 -35
  107. package/types/nanahoshi-mona-ui-text-box.d.ts +11 -5
  108. package/types/nanahoshi-mona-ui-time-picker.d.ts +7 -2
  109. package/types/nanahoshi-mona-ui-time-selector.d.ts +16 -5
  110. package/types/nanahoshi-mona-ui-tree-view.d.ts +15 -10
  111. package/types/nanahoshi-mona-ui-window.d.ts +26 -20
  112. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ZM3CneJ0.mjs +0 -145
@@ -1,12 +1,12 @@
1
1
  import { NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { computed, input, Directive, model, viewChild, TemplateRef, Component, output, inject, DestroyRef, ElementRef, signal, afterNextRender, afterRenderEffect, contentChildren } from '@angular/core';
3
+ import { computed, input, Directive, model, viewChild, TemplateRef, Component, inject, output, DestroyRef, ElementRef, signal, afterNextRender, afterRenderEffect, contentChildren } from '@angular/core';
4
4
  import { where, compact, from } from '@mirei/ts-collections';
5
5
  import { cva } from 'class-variance-authority';
6
6
  import { v4 } from 'uuid';
7
- import { Directionality } from '@angular/cdk/bidi';
8
7
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
9
8
  import { fromEvent, map, merge, filter, tap, skipUntil, takeUntil } from 'rxjs';
9
+ import { MonaI18nService, injectComponentDirection } from '@nanahoshi/mona-ui/i18n';
10
10
  import { LucideChevronLeft, LucideChevronRight, LucideChevronUp, LucideChevronDown } from '@lucide/angular';
11
11
  import { ButtonDirective } from '@nanahoshi/mona-ui/button';
12
12
 
@@ -36,6 +36,9 @@ class SplitterPaneStyleDirective {
36
36
  ...(ngDevMode ? [{ debugName: "paneList" }] : /* istanbul ignore next */ []));
37
37
  }
38
38
  #autoSizedPane;
39
+ getPaneFlexShrink(pane) {
40
+ return pane.collapsible() && pane.collapsed() ? "0" : "1";
41
+ }
39
42
  getFractionalWeight(size) {
40
43
  if (typeof size !== "string") {
41
44
  return null;
@@ -71,9 +74,6 @@ class SplitterPaneStyleDirective {
71
74
  }
72
75
  return size === null ? "1" : "0";
73
76
  }
74
- getPaneFlexShrink(pane) {
75
- return pane.collapsible() && pane.collapsed() ? "0" : "1";
76
- }
77
77
  getPaneSize(pane) {
78
78
  const size = pane.size();
79
79
  if (size === "" || size === undefined || size === null) {
@@ -157,16 +157,16 @@ const splitterResizerHandleThemeVariants = cva(`
157
157
 
158
158
  class SplitterPaneComponent {
159
159
  constructor() {
160
- /**
161
- * @description Whether the pane is collapsible.
162
- */
163
- this.collapsible = input(false, /* @ts-ignore */
164
- ...(ngDevMode ? [{ debugName: "collapsible" }] : /* istanbul ignore next */ []));
165
160
  /**
166
161
  * @description Whether the pane is collapsed.
167
162
  */
168
163
  this.collapsed = model(false, /* @ts-ignore */
169
164
  ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
165
+ /**
166
+ * @description Whether the pane is collapsible.
167
+ */
168
+ this.collapsible = input(false, /* @ts-ignore */
169
+ ...(ngDevMode ? [{ debugName: "collapsible" }] : /* istanbul ignore next */ []));
170
170
  /**
171
171
  * @description The maximum size of the pane.
172
172
  */
@@ -192,7 +192,7 @@ class SplitterPaneComponent {
192
192
  this.uid = v4();
193
193
  }
194
194
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitterPaneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
195
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: SplitterPaneComponent, isStandalone: true, selector: "mona-splitter-pane", inputs: { collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange", size: "sizeChange" }, viewQueries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: `
195
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: SplitterPaneComponent, isStandalone: true, selector: "mona-splitter-pane", inputs: { collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange", size: "sizeChange" }, viewQueries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: `
196
196
  <ng-template>
197
197
  <ng-content></ng-content>
198
198
  </ng-template>
@@ -208,15 +208,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
208
208
  </ng-template>
209
209
  `
210
210
  }]
211
- }], propDecorators: { collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }, { type: i0.Output, args: ["sizeChange"] }], template: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
211
+ }], propDecorators: { collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }, { type: i0.Output, args: ["sizeChange"] }], template: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
212
+
213
+ const SPLITTER_DEFAULT_MESSAGES = {
214
+ collapseDown: "Collapse pane below",
215
+ collapseNext: "Collapse next pane",
216
+ collapsePrevious: "Collapse previous pane",
217
+ collapseUp: "Collapse pane above",
218
+ resizer: "Resizer"
219
+ };
212
220
 
213
221
  class SplitterResizerHandleComponent {
214
222
  constructor() {
223
+ this.#i18n = inject(MonaI18nService);
215
224
  this.baseClass = computed(() => {
216
225
  const orientation = this.orientation();
217
226
  return splitterResizerHandleThemeVariants({ orientation });
218
227
  }, /* @ts-ignore */
219
228
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
229
+ this.messages = this.#i18n.componentMessages("splitter", SPLITTER_DEFAULT_MESSAGES);
220
230
  this.collapseNext = output();
221
231
  this.collapsePrevious = output();
222
232
  this.nextControlsVisible = input.required(/* @ts-ignore */
@@ -228,32 +238,37 @@ class SplitterResizerHandleComponent {
228
238
  this.resizable = input.required(/* @ts-ignore */
229
239
  ...(ngDevMode ? [{ debugName: "resizable" }] : /* istanbul ignore next */ []));
230
240
  }
241
+ #i18n;
231
242
  onPointerDown(event) {
232
243
  event.preventDefault();
233
244
  event.stopPropagation();
234
245
  }
235
246
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitterResizerHandleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
236
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SplitterResizerHandleComponent, isStandalone: true, selector: "mona-splitter-resizer-handle", inputs: { nextControlsVisible: { classPropertyName: "nextControlsVisible", publicName: "nextControlsVisible", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: true, transformFunction: null }, previousControlsVisible: { classPropertyName: "previousControlsVisible", publicName: "previousControlsVisible", isSignal: true, isRequired: true, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { collapseNext: "collapseNext", collapsePrevious: "collapsePrevious" }, host: { properties: { "class": "baseClass()" } }, ngImport: i0, template: "@if (orientation() === \"horizontal\") {\n @if (previousControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n aria-label=\"Collapse previous pane\"\n (click)=\"collapsePrevious.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronLeft [size]=\"12\"></svg>\n </button>\n }\n @if (resizable()) {\n <div class=\"flex h-6 w-0.5 bg-primary/40\"></div>\n }\n @if (nextControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n aria-label=\"Collapse next pane\"\n (click)=\"collapseNext.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronRight [size]=\"12\"></svg>\n </button>\n }\n} @else {\n @if (previousControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n aria-label=\"Collapse pane above\"\n (click)=\"collapsePrevious.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronUp [size]=\"12\"></svg>\n </button>\n }\n @if (resizable()) {\n <div class=\"flex h-0.5 w-6 bg-primary/40\"></div>\n }\n @if (nextControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n aria-label=\"Collapse pane below\"\n (click)=\"collapseNext.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronDown [size]=\"12\"></svg>\n </button>\n }\n}\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: LucideChevronLeft, selector: "svg[lucideChevronLeft]" }, { kind: "component", type: LucideChevronRight, selector: "svg[lucideChevronRight]" }, { kind: "component", type: LucideChevronUp, selector: "svg[lucideChevronUp]" }, { kind: "component", type: LucideChevronDown, selector: "svg[lucideChevronDown]" }] }); }
247
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SplitterResizerHandleComponent, isStandalone: true, selector: "mona-splitter-resizer-handle", inputs: { nextControlsVisible: { classPropertyName: "nextControlsVisible", publicName: "nextControlsVisible", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: true, transformFunction: null }, previousControlsVisible: { classPropertyName: "previousControlsVisible", publicName: "previousControlsVisible", isSignal: true, isRequired: true, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { collapseNext: "collapseNext", collapsePrevious: "collapsePrevious" }, host: { properties: { "class": "baseClass()" } }, ngImport: i0, template: "@if (orientation() === \"horizontal\") {\n @if (previousControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n [attr.aria-label]=\"messages().collapsePrevious\"\n (click)=\"collapsePrevious.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronLeft [size]=\"12\" class=\"rtl:rotate-180\"></svg>\n </button>\n }\n @if (resizable()) {\n <div class=\"flex h-6 w-0.5 bg-primary/40\"></div>\n }\n @if (nextControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n [attr.aria-label]=\"messages().collapseNext\"\n (click)=\"collapseNext.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronRight [size]=\"12\" class=\"rtl:rotate-180\"></svg>\n </button>\n }\n} @else {\n @if (previousControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n [attr.aria-label]=\"messages().collapseUp\"\n (click)=\"collapsePrevious.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronUp [size]=\"12\"></svg>\n </button>\n }\n @if (resizable()) {\n <div class=\"flex h-0.5 w-6 bg-primary/40\"></div>\n }\n @if (nextControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n [attr.aria-label]=\"messages().collapseDown\"\n (click)=\"collapseNext.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronDown [size]=\"12\"></svg>\n </button>\n }\n}\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: LucideChevronLeft, selector: "svg[lucideChevronLeft]" }, { kind: "component", type: LucideChevronRight, selector: "svg[lucideChevronRight]" }, { kind: "component", type: LucideChevronUp, selector: "svg[lucideChevronUp]" }, { kind: "component", type: LucideChevronDown, selector: "svg[lucideChevronDown]" }] }); }
237
248
  }
238
249
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitterResizerHandleComponent, decorators: [{
239
250
  type: Component,
240
251
  args: [{ selector: "mona-splitter-resizer-handle", imports: [ButtonDirective, LucideChevronLeft, LucideChevronRight, LucideChevronUp, LucideChevronDown], host: {
241
252
  "[class]": "baseClass()"
242
- }, template: "@if (orientation() === \"horizontal\") {\n @if (previousControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n aria-label=\"Collapse previous pane\"\n (click)=\"collapsePrevious.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronLeft [size]=\"12\"></svg>\n </button>\n }\n @if (resizable()) {\n <div class=\"flex h-6 w-0.5 bg-primary/40\"></div>\n }\n @if (nextControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n aria-label=\"Collapse next pane\"\n (click)=\"collapseNext.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronRight [size]=\"12\"></svg>\n </button>\n }\n} @else {\n @if (previousControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n aria-label=\"Collapse pane above\"\n (click)=\"collapsePrevious.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronUp [size]=\"12\"></svg>\n </button>\n }\n @if (resizable()) {\n <div class=\"flex h-0.5 w-6 bg-primary/40\"></div>\n }\n @if (nextControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n aria-label=\"Collapse pane below\"\n (click)=\"collapseNext.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronDown [size]=\"12\"></svg>\n </button>\n }\n}\n" }]
253
+ }, template: "@if (orientation() === \"horizontal\") {\n @if (previousControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n [attr.aria-label]=\"messages().collapsePrevious\"\n (click)=\"collapsePrevious.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronLeft [size]=\"12\" class=\"rtl:rotate-180\"></svg>\n </button>\n }\n @if (resizable()) {\n <div class=\"flex h-6 w-0.5 bg-primary/40\"></div>\n }\n @if (nextControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n [attr.aria-label]=\"messages().collapseNext\"\n (click)=\"collapseNext.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronRight [size]=\"12\" class=\"rtl:rotate-180\"></svg>\n </button>\n }\n} @else {\n @if (previousControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n [attr.aria-label]=\"messages().collapseUp\"\n (click)=\"collapsePrevious.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronUp [size]=\"12\"></svg>\n </button>\n }\n @if (resizable()) {\n <div class=\"flex h-0.5 w-6 bg-primary/40\"></div>\n }\n @if (nextControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n [attr.aria-label]=\"messages().collapseDown\"\n (click)=\"collapseNext.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronDown [size]=\"12\"></svg>\n </button>\n }\n}\n" }]
243
254
  }], propDecorators: { collapseNext: [{ type: i0.Output, args: ["collapseNext"] }], collapsePrevious: [{ type: i0.Output, args: ["collapsePrevious"] }], nextControlsVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextControlsVisible", required: true }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: true }] }], previousControlsVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "previousControlsVisible", required: true }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: true }] }] } });
244
255
 
245
256
  class SplitterResizerComponent {
246
257
  #destroyRef;
247
- #directionality;
258
+ #direction;
248
259
  #hostElementRef;
260
+ #i18n;
249
261
  #paneSizeMemory;
250
262
  #splitter;
251
263
  constructor() {
252
264
  this.#destroyRef = inject(DestroyRef);
253
- this.#directionality = inject(Directionality);
265
+ this.#direction = injectComponentDirection();
254
266
  this.#hostElementRef = inject(ElementRef);
267
+ this.#i18n = inject(MonaI18nService);
255
268
  this.#paneSizeMemory = new WeakMap();
256
269
  this.#splitter = inject(SplitterComponent);
270
+ this.isRtl = computed(() => this.#direction() === "rtl", /* @ts-ignore */
271
+ ...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
257
272
  this.ariaValueMax = signal(0, /* @ts-ignore */
258
273
  ...(ngDevMode ? [{ debugName: "ariaValueMax" }] : /* istanbul ignore next */ []));
259
274
  this.ariaValueMin = signal(0, /* @ts-ignore */
@@ -272,6 +287,7 @@ class SplitterResizerComponent {
272
287
  return !this.resizable() && this.getCollapsibleTargetPane() === null;
273
288
  }, /* @ts-ignore */
274
289
  ...(ngDevMode ? [{ debugName: "isInert" }] : /* istanbul ignore next */ []));
290
+ this.messages = this.#i18n.componentMessages("splitter", SPLITTER_DEFAULT_MESSAGES);
275
291
  this.nextCollapseControlsVisible = computed(() => {
276
292
  return this.hovered() && this.nextPane().collapsible() && !this.nextPane().collapsed();
277
293
  }, /* @ts-ignore */
@@ -286,6 +302,11 @@ class SplitterResizerComponent {
286
302
  ...(ngDevMode ? [{ debugName: "resizable" }] : /* istanbul ignore next */ []));
287
303
  this.resizing = signal(false, /* @ts-ignore */
288
304
  ...(ngDevMode ? [{ debugName: "resizing" }] : /* istanbul ignore next */ []));
305
+ /**
306
+ * @description Accessible label for the separator element.
307
+ * @default ""
308
+ */
309
+ this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
289
310
  this.nextPane = input.required(/* @ts-ignore */
290
311
  ...(ngDevMode ? [{ debugName: "nextPane" }] : /* istanbul ignore next */ []));
291
312
  this.orientation = input.required(/* @ts-ignore */
@@ -378,7 +399,7 @@ class SplitterResizerComponent {
378
399
  this.togglePane(target.pane, target.element, target.direction);
379
400
  }
380
401
  distributeSpaceToNeighbors(space, neighbors) {
381
- let remaining = space;
402
+ const remaining = space;
382
403
  const capacities = neighbors.map(neighbor => {
383
404
  const max = this.getMaxSize(neighbor.pane);
384
405
  const capacity = max === Number.POSITIVE_INFINITY ? Number.POSITIVE_INFINITY : Math.max(0, max - neighbor.size);
@@ -392,7 +413,7 @@ class SplitterResizerComponent {
392
413
  });
393
414
  return;
394
415
  }
395
- let available = capacities.reduce((sum, c) => sum + c.capacity, 0);
416
+ const available = capacities.reduce((sum, c) => sum + c.capacity, 0);
396
417
  if (available <= 0) {
397
418
  return;
398
419
  }
@@ -544,7 +565,7 @@ class SplitterResizerComponent {
544
565
  handleCollapserKeys(key) {
545
566
  const orientation = this.orientation();
546
567
  if (orientation === "horizontal") {
547
- const isRtl = this.#directionality.value === "rtl";
568
+ const isRtl = this.isRtl();
548
569
  if (key === "ArrowLeft") {
549
570
  this.collapsePane(isRtl ? "next" : "previous");
550
571
  return true;
@@ -589,7 +610,7 @@ class SplitterResizerComponent {
589
610
  return false;
590
611
  }
591
612
  if (orientation === "horizontal") {
592
- const isRtl = this.#directionality.value === "rtl";
613
+ const isRtl = this.isRtl();
593
614
  if (key === "ArrowLeft") {
594
615
  this.nudgeSplitter(isRtl ? step : -step);
595
616
  return true;
@@ -729,7 +750,10 @@ class SplitterResizerComponent {
729
750
  updateHorizontalPaneSizes(event) {
730
751
  const [previousRect, nextRect] = this.getPaneRectangles();
731
752
  const maxWidth = previousRect.width + nextRect.width;
732
- const desiredPrevWidth = Math.min(Math.max(event.clientX - previousRect.left, 0), maxWidth);
753
+ const isRtl = this.isRtl();
754
+ const desiredPrevWidth = isRtl
755
+ ? Math.min(Math.max(previousRect.right - event.clientX, 0), maxWidth)
756
+ : Math.min(Math.max(event.clientX - previousRect.left, 0), maxWidth);
733
757
  const [previousPaneWidth, nextPaneWidth] = this.clampPaneSizes(maxWidth, desiredPrevWidth, this.previousPane(), this.nextPane());
734
758
  this.updatePaneSizes(`${previousPaneWidth}px`, `${nextPaneWidth}px`);
735
759
  }
@@ -747,7 +771,7 @@ class SplitterResizerComponent {
747
771
  this.updatePaneSizes(`${previousPaneHeight}px`, `${nextPaneHeight}px`);
748
772
  }
749
773
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitterResizerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
750
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: SplitterResizerComponent, isStandalone: true, selector: "mona-splitter-resizer", inputs: { nextPane: { classPropertyName: "nextPane", publicName: "nextPane", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: true, transformFunction: null }, previousPane: { classPropertyName: "previousPane", publicName: "previousPane", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "separator" }, listeners: { "dblclick": "toggleCollapse()" }, properties: { "class": "baseClass()", "style.cursor": "resizable() ? (orientation()==='horizontal' ? 'ew-resize' : 'ns-resize') : 'auto'", "attr.aria-orientation": "orientation()", "attr.aria-valuemax": "ariaValueMax()", "attr.aria-valuemin": "ariaValueMin()", "attr.aria-valuenow": "ariaValueNow()", "attr.tabindex": "isInert() ? -1 : 0" } }, ngImport: i0, template: "<mona-splitter-resizer-handle\n (collapseNext)=\"collapseNext($event)\"\n (collapsePrevious)=\"collapsePrevious($event)\"\n [nextControlsVisible]=\"nextCollapseControlsVisible()\"\n [orientation]=\"orientation()\"\n [previousControlsVisible]=\"previousCollapseControlsVisible()\"\n [resizable]=\"resizable()\">\n</mona-splitter-resizer-handle>\n", dependencies: [{ kind: "component", type: SplitterResizerHandleComponent, selector: "mona-splitter-resizer-handle", inputs: ["nextControlsVisible", "orientation", "previousControlsVisible", "resizable"], outputs: ["collapseNext", "collapsePrevious"] }] }); }
774
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: SplitterResizerComponent, isStandalone: true, selector: "mona-splitter-resizer", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, nextPane: { classPropertyName: "nextPane", publicName: "nextPane", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: true, transformFunction: null }, previousPane: { classPropertyName: "previousPane", publicName: "previousPane", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "separator" }, listeners: { "dblclick": "toggleCollapse()" }, properties: { "class": "baseClass()", "style.cursor": "resizable() ? (orientation()==='horizontal' ? 'ew-resize' : 'ns-resize') : 'auto'", "attr.aria-label": "ariaLabel() || messages().resizer", "attr.aria-orientation": "orientation()", "attr.aria-valuemax": "ariaValueMax()", "attr.aria-valuemin": "ariaValueMin()", "attr.aria-valuenow": "ariaValueNow()", "attr.tabindex": "isInert() ? -1 : 0" } }, ngImport: i0, template: "<mona-splitter-resizer-handle\n (collapseNext)=\"collapseNext($event)\"\n (collapsePrevious)=\"collapsePrevious($event)\"\n [nextControlsVisible]=\"nextCollapseControlsVisible()\"\n [orientation]=\"orientation()\"\n [previousControlsVisible]=\"previousCollapseControlsVisible()\"\n [resizable]=\"resizable()\">\n</mona-splitter-resizer-handle>\n", dependencies: [{ kind: "component", type: SplitterResizerHandleComponent, selector: "mona-splitter-resizer-handle", inputs: ["nextControlsVisible", "orientation", "previousControlsVisible", "resizable"], outputs: ["collapseNext", "collapsePrevious"] }] }); }
751
775
  }
752
776
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitterResizerComponent, decorators: [{
753
777
  type: Component,
@@ -756,13 +780,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
756
780
  "[style.cursor]": "resizable() ? (orientation()==='horizontal' ? 'ew-resize' : 'ns-resize') : 'auto'",
757
781
  "(dblclick)": "toggleCollapse()",
758
782
  role: "separator",
783
+ "[attr.aria-label]": "ariaLabel() || messages().resizer",
759
784
  "[attr.aria-orientation]": "orientation()",
760
785
  "[attr.aria-valuemax]": "ariaValueMax()",
761
786
  "[attr.aria-valuemin]": "ariaValueMin()",
762
787
  "[attr.aria-valuenow]": "ariaValueNow()",
763
788
  "[attr.tabindex]": "isInert() ? -1 : 0"
764
789
  }, template: "<mona-splitter-resizer-handle\n (collapseNext)=\"collapseNext($event)\"\n (collapsePrevious)=\"collapsePrevious($event)\"\n [nextControlsVisible]=\"nextCollapseControlsVisible()\"\n [orientation]=\"orientation()\"\n [previousControlsVisible]=\"previousCollapseControlsVisible()\"\n [resizable]=\"resizable()\">\n</mona-splitter-resizer-handle>\n" }]
765
- }], ctorParameters: () => [], propDecorators: { nextPane: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextPane", required: true }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: true }] }], previousPane: [{ type: i0.Input, args: [{ isSignal: true, alias: "previousPane", required: true }] }] } });
790
+ }], ctorParameters: () => [], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], nextPane: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextPane", required: true }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: true }] }], previousPane: [{ type: i0.Input, args: [{ isSignal: true, alias: "previousPane", required: true }] }] } });
766
791
 
767
792
  class SplitterComponent {
768
793
  constructor() {
@@ -787,7 +812,7 @@ class SplitterComponent {
787
812
  return from(this.paneList()).firstOrDefault(pane => pane.uid === uid);
788
813
  }
789
814
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
790
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SplitterComponent, isStandalone: true, selector: "mona-splitter", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "baseClass()" } }, queries: [{ propertyName: "paneList", predicate: SplitterPaneComponent, isSignal: true }], ngImport: i0, template: "@for (pane of paneList(); track pane.uid) {\n <div\n class=\"overflow-hidden min-w-0 min-h-0\"\n [attr.data-pid]=\"pane.uid\"\n [attr.data-px]=\"$index\"\n monaSplitterPaneStyle\n [pane]=\"pane\"\n [paneList]=\"paneList()\">\n <ng-container [ngTemplateOutlet]=\"pane.template()\"></ng-container>\n </div>\n @if ($index !== $count - 1) {\n <mona-splitter-resizer\n [nextPane]=\"paneList()[$index + 1]\"\n [orientation]=\"orientation()!\"\n [previousPane]=\"paneList()[$index]\">\n </mona-splitter-resizer>\n }\n}\n", dependencies: [{ kind: "component", type: SplitterResizerComponent, selector: "mona-splitter-resizer", inputs: ["nextPane", "orientation", "previousPane"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: SplitterPaneStyleDirective, selector: "div[monaSplitterPaneStyle]", inputs: ["pane", "paneList"] }] }); }
815
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SplitterComponent, isStandalone: true, selector: "mona-splitter", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "baseClass()" } }, queries: [{ propertyName: "paneList", predicate: SplitterPaneComponent, isSignal: true }], ngImport: i0, template: "@for (pane of paneList(); track pane.uid) {\n <div\n class=\"overflow-hidden min-w-0 min-h-0\"\n [attr.data-pid]=\"pane.uid\"\n [attr.data-px]=\"$index\"\n monaSplitterPaneStyle\n [pane]=\"pane\"\n [paneList]=\"paneList()\">\n <ng-container [ngTemplateOutlet]=\"pane.template()\"></ng-container>\n </div>\n @if ($index !== $count - 1) {\n <mona-splitter-resizer\n [nextPane]=\"paneList()[$index + 1]\"\n [orientation]=\"orientation()!\"\n [previousPane]=\"paneList()[$index]\">\n </mona-splitter-resizer>\n }\n}\n", dependencies: [{ kind: "component", type: SplitterResizerComponent, selector: "mona-splitter-resizer", inputs: ["aria-label", "nextPane", "orientation", "previousPane"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: SplitterPaneStyleDirective, selector: "div[monaSplitterPaneStyle]", inputs: ["pane", "paneList"] }] }); }
791
816
  }
792
817
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitterComponent, decorators: [{
793
818
  type: Component,
@@ -804,5 +829,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
804
829
  * Generated bundle index. Do not edit.
805
830
  */
806
831
 
807
- export { SplitterComponent, SplitterPaneComponent };
832
+ export { SPLITTER_DEFAULT_MESSAGES, SplitterComponent, SplitterPaneComponent };
808
833
  //# sourceMappingURL=nanahoshi-mona-ui-splitter.mjs.map
@@ -4,6 +4,7 @@ import { NgTemplateOutlet } from '@angular/common';
4
4
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
5
  import { select } from '@mirei/ts-collections';
6
6
  import { fromEvent } from 'rxjs';
7
+ import { injectComponentDirection, MonaI18nService } from '@nanahoshi/mona-ui/i18n';
7
8
  import { cva } from 'class-variance-authority';
8
9
 
9
10
  /**
@@ -77,7 +78,7 @@ const stepperStepListThemeVariants = cva(`
77
78
  `,
78
79
  vertical: `
79
80
  h-full w-max flex-col
80
- -translate-x-3
81
+ -translate-x-3 rtl:translate-x-3
81
82
  `
82
83
  }
83
84
  },
@@ -137,7 +138,7 @@ const stepperTrackThemeVariants = cva(`
137
138
  }
138
139
  });
139
140
  const stepperTrackLineThemeVariants = cva(`
140
- absolute bg-primary
141
+ absolute start-0 top-0 bg-primary
141
142
  `, {
142
143
  variants: {
143
144
  orientation: {
@@ -151,11 +152,11 @@ const stepperTrackLineThemeVariants = cva(`
151
152
  });
152
153
 
153
154
  class StepperIndicatorDirective {
154
- #wasFocused;
155
155
  #host;
156
+ #wasFocused;
156
157
  constructor() {
157
- this.#wasFocused = false;
158
158
  this.#host = inject(ElementRef);
159
+ this.#wasFocused = false;
159
160
  this.stepIndicatorClass = computed(() => {
160
161
  const active = this.active();
161
162
  const focused = this.focused();
@@ -192,14 +193,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
192
193
  }]
193
194
  }], ctorParameters: () => [], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: true }] }], focused: [{ type: i0.Input, args: [{ isSignal: true, alias: "focused", required: true }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: true }] }] } });
194
195
 
196
+ const STEPPER_DEFAULT_MESSAGES = {
197
+ stepProgress: "Step progress",
198
+ stepper: "Progress"
199
+ };
200
+
195
201
  class StepperComponent {
196
202
  #destroyRef;
203
+ #direction;
197
204
  #hostElementRef;
205
+ #i18n;
198
206
  #trackItemSize;
199
207
  #trackLength;
200
208
  constructor() {
201
209
  this.#destroyRef = inject(DestroyRef);
210
+ this.#direction = injectComponentDirection();
202
211
  this.#hostElementRef = inject(ElementRef);
212
+ this.#i18n = inject(MonaI18nService);
213
+ this.isRtl = computed(() => this.#direction() === "rtl", /* @ts-ignore */
214
+ ...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
203
215
  this.#trackItemSize = computed(() => {
204
216
  const stepCount = this.viewSteps().length;
205
217
  return stepCount !== 0 ? 100 / stepCount : 0;
@@ -251,6 +263,7 @@ class StepperComponent {
251
263
  return stepperStepListItemThemeVariants({ orientation });
252
264
  }, /* @ts-ignore */
253
265
  ...(ngDevMode ? [{ debugName: "listItemClass" }] : /* istanbul ignore next */ []));
266
+ this.messages = this.#i18n.componentMessages("stepper", STEPPER_DEFAULT_MESSAGES);
254
267
  this.progressMax = computed(() => Math.max(this.viewSteps().length - 1, 0), /* @ts-ignore */
255
268
  ...(ngDevMode ? [{ debugName: "progressMax" }] : /* istanbul ignore next */ []));
256
269
  this.stepTemplate = contentChild(StepperStepTemplateDirective, {
@@ -301,9 +314,9 @@ class StepperComponent {
301
314
  ...(ngDevMode ? [{ debugName: "viewSteps" }] : /* istanbul ignore next */ []));
302
315
  /**
303
316
  * @description Sets the accessible label for the stepper group.
304
- * @default "Progress"
317
+ * @default ""
305
318
  */
306
- this.ariaLabel = input("Progress", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
319
+ this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
307
320
  /**
308
321
  * @description Sets the flow of the stepper.
309
322
  * If set to true, the user will only be able to navigate to the previous or the next step.
@@ -318,9 +331,9 @@ class StepperComponent {
318
331
  ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
319
332
  /**
320
333
  * @description Sets the accessible label for the progress bar element.
321
- * @default "Step progress"
334
+ * @default ""
322
335
  */
323
- this.progressAriaLabel = input("Step progress", /* @ts-ignore */
336
+ this.progressAriaLabel = input("", /* @ts-ignore */
324
337
  ...(ngDevMode ? [{ debugName: "progressAriaLabel" }] : /* istanbul ignore next */ []));
325
338
  /**
326
339
  * @description Sets the roundness of the stepper steps.
@@ -417,8 +430,13 @@ class StepperComponent {
417
430
  .pipe(takeUntilDestroyed(this.#destroyRef))
418
431
  .subscribe(event => {
419
432
  const orientation = this.orientation();
420
- const previousKey = orientation === "vertical" ? "ArrowUp" : "ArrowLeft";
421
- const nextKey = orientation === "vertical" ? "ArrowDown" : "ArrowRight";
433
+ const isRtl = this.isRtl();
434
+ let previousKey = orientation === "vertical" ? "ArrowUp" : "ArrowLeft";
435
+ let nextKey = orientation === "vertical" ? "ArrowDown" : "ArrowRight";
436
+ if (orientation === "horizontal" && isRtl) {
437
+ previousKey = "ArrowRight";
438
+ nextKey = "ArrowLeft";
439
+ }
422
440
  if (event.key === previousKey) {
423
441
  event.preventDefault();
424
442
  this.moveHighlight(-1);
@@ -446,16 +464,16 @@ class StepperComponent {
446
464
  });
447
465
  }
448
466
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: StepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
449
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: StepperComponent, isStandalone: true, selector: "mona-stepper", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, progressAriaLabel: { classPropertyName: "progressAriaLabel", publicName: "progressAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { step: "stepChange" }, host: { attributes: { "role": "group" }, properties: { "attr.aria-label": "ariaLabel()", "class": "baseClass()", "style": "hostStyles()" } }, queries: [{ propertyName: "indicatorTemplate", first: true, predicate: StepperIndicatorTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: StepperLabelTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "stepTemplate", first: true, predicate: StepperStepTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<ol [class]=\"listClass()\">\n @for (step of viewSteps(); track step.index) {\n @let active = isStepActive(step);\n @let locked = isStepLocked(step);\n @let focused = step.index === highlightedStep();\n @let options = step.options;\n @let index = step.index;\n @let currentIndex = activeStep()?.index ?? -1;\n @let disabled = !!options.disabled;\n <li\n [class]=\"listItemClass()\"\n [class.cursor-pointer]=\"!locked\"\n [class.cursor-not-allowed]=\"locked\"\n [style]=\"trackItemStyles()\"\n role=\"presentation\"\n (click)=\"onStepClick(step)\">\n @if (stepTemplate()) {\n <span\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n </span>\n } @else {\n <span\n monaStepperIndicator\n [rounded]=\"rounded()\"\n [active]=\"active\"\n [focused]=\"focused\"\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n @if (indicatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"indicatorTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n {{ step.index + 1 }}\n }\n </span>\n }\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ options.label }}</span>\n }\n </li>\n }\n</ol>\n<div\n [class]=\"trackClass()\"\n [style]=\"trackStyles()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"step()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"progressMax()\"\n [attr.aria-label]=\"progressAriaLabel()\">\n <div [class]=\"trackLineClass()\" [style]=\"trackInnerStyles()\"></div>\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: StepperIndicatorDirective, selector: "span[monaStepperIndicator]", inputs: ["active", "focused", "rounded"] }] }); }
467
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: StepperComponent, isStandalone: true, selector: "mona-stepper", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, progressAriaLabel: { classPropertyName: "progressAriaLabel", publicName: "progressAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { step: "stepChange" }, host: { attributes: { "role": "group" }, properties: { "attr.aria-label": "ariaLabel() || messages().stepper", "class": "baseClass()", "style": "hostStyles()" } }, queries: [{ propertyName: "indicatorTemplate", first: true, predicate: StepperIndicatorTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: StepperLabelTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "stepTemplate", first: true, predicate: StepperStepTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<ol [class]=\"listClass()\">\n @for (step of viewSteps(); track step.index) {\n @let active = isStepActive(step);\n @let locked = isStepLocked(step);\n @let focused = step.index === highlightedStep();\n @let options = step.options;\n @let index = step.index;\n @let currentIndex = activeStep()?.index ?? -1;\n @let disabled = !!options.disabled;\n <li\n [class]=\"listItemClass()\"\n [class.cursor-pointer]=\"!locked\"\n [class.cursor-not-allowed]=\"locked\"\n [style]=\"trackItemStyles()\"\n role=\"presentation\"\n (click)=\"onStepClick(step)\">\n @if (stepTemplate()) {\n <span\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n </span>\n } @else {\n <span\n monaStepperIndicator\n [rounded]=\"rounded()\"\n [active]=\"active\"\n [focused]=\"focused\"\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n @if (indicatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"indicatorTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n {{ step.index + 1 }}\n }\n </span>\n }\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ options.label }}</span>\n }\n </li>\n }\n</ol>\n<div\n [class]=\"trackClass()\"\n [style]=\"trackStyles()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"step()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"progressMax()\"\n [attr.aria-label]=\"progressAriaLabel() || messages().stepProgress\">\n <div [class]=\"trackLineClass()\" [style]=\"trackInnerStyles()\"></div>\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: StepperIndicatorDirective, selector: "span[monaStepperIndicator]", inputs: ["active", "focused", "rounded"] }] }); }
450
468
  }
451
469
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: StepperComponent, decorators: [{
452
470
  type: Component,
453
471
  args: [{ selector: "mona-stepper", imports: [NgTemplateOutlet, StepperIndicatorDirective], host: {
454
472
  role: "group",
455
- "[attr.aria-label]": "ariaLabel()",
473
+ "[attr.aria-label]": "ariaLabel() || messages().stepper",
456
474
  "[class]": "baseClass()",
457
475
  "[style]": "hostStyles()"
458
- }, template: "<ol [class]=\"listClass()\">\n @for (step of viewSteps(); track step.index) {\n @let active = isStepActive(step);\n @let locked = isStepLocked(step);\n @let focused = step.index === highlightedStep();\n @let options = step.options;\n @let index = step.index;\n @let currentIndex = activeStep()?.index ?? -1;\n @let disabled = !!options.disabled;\n <li\n [class]=\"listItemClass()\"\n [class.cursor-pointer]=\"!locked\"\n [class.cursor-not-allowed]=\"locked\"\n [style]=\"trackItemStyles()\"\n role=\"presentation\"\n (click)=\"onStepClick(step)\">\n @if (stepTemplate()) {\n <span\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n </span>\n } @else {\n <span\n monaStepperIndicator\n [rounded]=\"rounded()\"\n [active]=\"active\"\n [focused]=\"focused\"\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n @if (indicatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"indicatorTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n {{ step.index + 1 }}\n }\n </span>\n }\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ options.label }}</span>\n }\n </li>\n }\n</ol>\n<div\n [class]=\"trackClass()\"\n [style]=\"trackStyles()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"step()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"progressMax()\"\n [attr.aria-label]=\"progressAriaLabel()\">\n <div [class]=\"trackLineClass()\" [style]=\"trackInnerStyles()\"></div>\n</div>\n" }]
476
+ }, template: "<ol [class]=\"listClass()\">\n @for (step of viewSteps(); track step.index) {\n @let active = isStepActive(step);\n @let locked = isStepLocked(step);\n @let focused = step.index === highlightedStep();\n @let options = step.options;\n @let index = step.index;\n @let currentIndex = activeStep()?.index ?? -1;\n @let disabled = !!options.disabled;\n <li\n [class]=\"listItemClass()\"\n [class.cursor-pointer]=\"!locked\"\n [class.cursor-not-allowed]=\"locked\"\n [style]=\"trackItemStyles()\"\n role=\"presentation\"\n (click)=\"onStepClick(step)\">\n @if (stepTemplate()) {\n <span\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n </span>\n } @else {\n <span\n monaStepperIndicator\n [rounded]=\"rounded()\"\n [active]=\"active\"\n [focused]=\"focused\"\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n @if (indicatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"indicatorTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n {{ step.index + 1 }}\n }\n </span>\n }\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ options.label }}</span>\n }\n </li>\n }\n</ol>\n<div\n [class]=\"trackClass()\"\n [style]=\"trackStyles()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"step()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"progressMax()\"\n [attr.aria-label]=\"progressAriaLabel() || messages().stepProgress\">\n <div [class]=\"trackLineClass()\" [style]=\"trackInnerStyles()\"></div>\n</div>\n" }]
459
477
  }], ctorParameters: () => [], propDecorators: { indicatorTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StepperIndicatorTemplateDirective), { ...{
460
478
  read: TemplateRef
461
479
  }, isSignal: true }] }], labelTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StepperLabelTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], stepTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StepperStepTemplateDirective), { ...{
@@ -470,5 +488,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
470
488
  * Generated bundle index. Do not edit.
471
489
  */
472
490
 
473
- export { StepperComponent, StepperIndicatorTemplateDirective, StepperLabelTemplateDirective, StepperStepTemplateDirective };
491
+ export { STEPPER_DEFAULT_MESSAGES, StepperComponent, StepperIndicatorTemplateDirective, StepperLabelTemplateDirective, StepperStepTemplateDirective };
474
492
  //# sourceMappingURL=nanahoshi-mona-ui-stepper.mjs.map
@@ -86,7 +86,7 @@ const switchHandleThemeVariants = cva(`
86
86
  ${themeRaisedSurfaceClasses} text-foreground
87
87
  border border-border-subtle shadow-(--shadow-control)
88
88
  outline-none
89
- transition-[left,background] duration-(--mona-motion-standard) ease-in-out
89
+ transition-[inset-inline-start,background] duration-(--mona-motion-standard) ease-in-out
90
90
  data-[active='true']:bg-primary-foreground
91
91
  group-data-[disabled='true']:border-disabled-border
92
92
  group-data-[disabled='true']:bg-disabled-background
@@ -102,18 +102,18 @@ const switchHandleThemeVariants = cva(`
102
102
  size: {
103
103
  large: `
104
104
  h-6 w-6
105
- data-[active='true']:left-[calc(100%-26px)]
106
- data-[active='false']:left-0.5
105
+ data-[active='true']:start-[calc(100%-26px)]
106
+ data-[active='false']:start-0.5
107
107
  `,
108
108
  medium: `
109
109
  h-5 w-5
110
- data-[active='true']:left-[calc(100%-22px)]
111
- data-[active='false']:left-0.5
110
+ data-[active='true']:start-[calc(100%-22px)]
111
+ data-[active='false']:start-0.5
112
112
  `,
113
113
  small: `
114
114
  h-4 w-4
115
- data-[active='true']:left-[calc(100%-18px)]
116
- data-[active='false']:left-0.5
115
+ data-[active='true']:start-[calc(100%-18px)]
116
+ data-[active='false']:start-0.5
117
117
  `
118
118
  }
119
119
  }
@@ -135,8 +135,6 @@ class SwitchComponent {
135
135
  return twMerge(classes, this.userClass());
136
136
  }, /* @ts-ignore */
137
137
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
138
- this.invalidState = computed(() => this.touched() && (this.invalid() || (this.required() && !this.checked())), /* @ts-ignore */
139
- ...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
140
138
  this.handleClasses = computed(() => {
141
139
  const rounded = this.rounded();
142
140
  const size = this.size();
@@ -145,6 +143,8 @@ class SwitchComponent {
145
143
  }, /* @ts-ignore */
146
144
  ...(ngDevMode ? [{ debugName: "handleClasses" }] : /* istanbul ignore next */ []));
147
145
  this.handleContentTemplate = contentChild(SwitchHandleContentTemplateDirective, { ...(ngDevMode ? { debugName: "handleContentTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
146
+ this.invalidState = computed(() => this.touched() && (this.invalid() || (this.required() && !this.checked())), /* @ts-ignore */
147
+ ...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
148
148
  this.labelClasses = computed(() => {
149
149
  const classes = switchLabelThemeVariants();
150
150
  return twMerge(classes);