@eagami/ui 4.6.0 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eagami/ui",
3
- "version": "4.6.0",
3
+ "version": "4.7.0",
4
4
  "description": "Lightweight, accessible, themeable Angular UI component library and icon set built on CSS custom properties",
5
5
  "author": "Michal Wiraszka <michal@eagami.com>",
6
6
  "license": "MIT",
@@ -0,0 +1,38 @@
1
+ // Sign multiplier for horizontal translate animations: +1 in LTR, -1 in RTL, so
2
+ // a single `translateX(calc(<x> * var(--ea-rtl-sign)))` mirrors automatically.
3
+ :where(:root) {
4
+ --ea-rtl-sign: 1;
5
+ }
6
+
7
+ [dir='rtl'] {
8
+ --ea-rtl-sign: -1;
9
+ }
10
+
11
+ // Horizontally mirrors directional glyphs (prev/next chevrons, breadcrumb
12
+ // separators, transfer arrows) when an ancestor sets dir="rtl". Opt in by
13
+ // adding the `ea-rtl-flip` class to the icon element.
14
+ [dir='rtl'] .ea-rtl-flip {
15
+ transform: scaleX(-1);
16
+ }
17
+
18
+ // background-position has no logical keyword, so flip the paginator select's
19
+ // native chevron from the inline-end to the inline-start edge under RTL.
20
+ [dir='rtl'] .ea-paginator__select {
21
+ background-position: left 6px center;
22
+ }
23
+
24
+ // The tree disclosure chevron points toward the inline-start (left) when
25
+ // collapsed in RTL; the open state still rotates down. A 180deg turn keeps it in
26
+ // pure-rotation space so the expand transition stays smooth. Must live here, not
27
+ // the component, because the dir ancestor is outside its encapsulation scope.
28
+ [dir='rtl'] .ea-tree-node__chevron:not(.ea-tree-node__chevron--open) {
29
+ transform: rotate(180deg);
30
+ }
31
+
32
+ // Native fields use dir="auto" so typed LTR text stays LTR, but that resolves
33
+ // an empty field to LTR and parks its placeholder on the left. Pin them to the
34
+ // inline-end edge so every RTL field reads from the right like the others.
35
+ [dir='rtl'] input[dir='auto'],
36
+ [dir='rtl'] textarea[dir='auto'] {
37
+ text-align: right;
38
+ }
@@ -4,3 +4,4 @@
4
4
  @use 'tokens/index';
5
5
  @use 'reset';
6
6
  @use 'tooltip';
7
+ @use 'rtl';
@@ -1575,8 +1575,11 @@ declare class DividerComponent {
1575
1575
  static ɵcmp: i0.ɵɵComponentDeclaration<DividerComponent, "ea-divider", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "thick": { "alias": "thick"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1576
1576
  }
1577
1577
 
1578
- /** Edge of the viewport from which the drawer slides in. */
1579
- type DrawerPosition = 'left' | 'right' | 'top' | 'bottom';
1578
+ /**
1579
+ * Edge of the viewport from which the drawer slides in. `start`/`end` are
1580
+ * direction-aware (start = left in LTR, right in RTL); `left`/`right` are fixed.
1581
+ */
1582
+ type DrawerPosition = 'left' | 'right' | 'top' | 'bottom' | 'start' | 'end';
1580
1583
  /** Width of the drawer panel along its primary axis. */
1581
1584
  type DrawerWidth = EaWidth;
1582
1585
  /**
@@ -2271,6 +2274,8 @@ interface PopoverPositionOptions {
2271
2274
  readonly margin?: number;
2272
2275
  /** Set the popover's width to match the anchor's. Useful for dropdown-style menus. */
2273
2276
  readonly matchAnchorWidth?: boolean;
2277
+ /** Right-to-left context. Swaps `-start`/`-end` alignment so they track the reading direction. */
2278
+ readonly rtl?: boolean;
2274
2279
  }
2275
2280
  interface Rect {
2276
2281
  readonly width: number;