@jirawatpyk/aura-react 5.33.0 → 5.34.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/README.md +9 -2
- package/dist/aura.bundle.js +685 -409
- package/dist/cjs/index.cjs +684 -408
- package/dist/esm/StatusTile.js +53 -0
- package/dist/esm/autoTip.js +5 -0
- package/dist/esm/breakpoints.js +18 -1
- package/dist/esm/index.js +5 -0
- package/dist/esm/responsive.js +1 -15
- package/dist/esm/strings.js +4 -0
- package/dist/esm/strings.sv.js +4 -0
- package/dist/esm/strings.th.js +4 -0
- package/dist/esm/tiles.js +212 -0
- package/dist/index.d.cts +111 -36
- package/dist/index.d.ts +111 -36
- package/dist/locales/sv.cjs +4 -0
- package/dist/locales/sv.d.cts +5 -0
- package/dist/locales/sv.d.ts +5 -0
- package/dist/locales/th.cjs +4 -0
- package/dist/locales/th.d.cts +5 -0
- package/dist/locales/th.d.ts +5 -0
- package/dist/server/index.cjs +263 -27
- package/dist/server/index.d.cts +75 -0
- package/dist/server/index.d.ts +75 -0
- package/dist/server/index.js +263 -27
- package/dist/styles.css +62 -0
- package/dist/styles.layer.css +62 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1614,6 +1614,70 @@ export interface Theme {
|
|
|
1614
1614
|
/** CSS overriding the tokens. No selector: the whole page. A selector (".tenant-acme") scopes it. Load after aura.css. */
|
|
1615
1615
|
css(selector?: string): string;
|
|
1616
1616
|
}
|
|
1617
|
+
/** A monitored thing's state on a StatusTile. */
|
|
1618
|
+
export type StatusTileStatus = "down" | "problem" | "maintenance" | "ok";
|
|
1619
|
+
/** A colour for a tile's value or a marker: `danger`, `warning`, `accent` (violet), `neutral` (grey) or `default`
|
|
1620
|
+
* (the text colour). */
|
|
1621
|
+
export type TileTone = "danger" | "warning" | "accent" | "neutral" | "default";
|
|
1622
|
+
/** A small icon at the end of a StatusTile's second line ("SSL expires soon", "Muted"). */
|
|
1623
|
+
export interface StatusTileMarker {
|
|
1624
|
+
icon: IconInput;
|
|
1625
|
+
/** What it means. Read with the tile's name and shown as a tip on hover (a mouse only: on a phone, say it on the
|
|
1626
|
+
* detail page too). */
|
|
1627
|
+
label: string;
|
|
1628
|
+
/** Default `neutral`. */
|
|
1629
|
+
tone?: TileTone | undefined;
|
|
1630
|
+
}
|
|
1631
|
+
export interface StatusTileProps extends Pick<React$1.HTMLAttributes<HTMLElement>, "id" | "style" | "lang" | "dir">, React$1.AriaAttributes, DataAttributes {
|
|
1632
|
+
/** down (red), problem (amber), maintenance (violet) or ok (grey). Each has its own icon too, so colour is never the
|
|
1633
|
+
* only sign. */
|
|
1634
|
+
status: StatusTileStatus;
|
|
1635
|
+
/** The name. Wraps to two lines at most, then ends with "…"; a cut name shows in full in a tip on hover. */
|
|
1636
|
+
title: React$1.ReactNode;
|
|
1637
|
+
/** Top right, tabular figures: "12m", "99.98%", "240 ms". */
|
|
1638
|
+
value?: React$1.ReactNode | undefined;
|
|
1639
|
+
/** The value's colour. Default: the status's (down → danger, problem → warning, maintenance → accent, ok → default). */
|
|
1640
|
+
valueTone?: TileTone | undefined;
|
|
1641
|
+
/** A short second line: "since 09:41", "3 of 4 checks". */
|
|
1642
|
+
meta?: React$1.ReactNode | undefined;
|
|
1643
|
+
/** Small icons at the end of the second line, each with a label. */
|
|
1644
|
+
markers?: ReadonlyArray<StatusTileMarker> | undefined;
|
|
1645
|
+
/** Makes the whole tile a link. Its name is everything the tile says, in reading order. */
|
|
1646
|
+
href?: string | undefined;
|
|
1647
|
+
/** Your router's link (e.g. `next/link`); defaults to AuraProvider's `linkComponent`, then `<a>`. */
|
|
1648
|
+
linkComponent?: React$1.ElementType | undefined;
|
|
1649
|
+
/** The status word read out after the title. Default: the locale's (Down, Problem, Maintenance, OK). */
|
|
1650
|
+
statusLabel?: string | undefined;
|
|
1651
|
+
className?: string | undefined;
|
|
1652
|
+
}
|
|
1653
|
+
export interface TileGridProps extends Pick<React$1.HTMLAttributes<HTMLElement>, "id" | "style" | "lang" | "dir">, React$1.AriaAttributes, DataAttributes {
|
|
1654
|
+
/** Equal columns, responsive like Grid. Default `{ base: 2, md: 3 }` (two on phones, three from 768px). */
|
|
1655
|
+
columns?: Responsive<number> | undefined;
|
|
1656
|
+
/** Each child (and each child of a Fragment) becomes one list item; the grid is a `ul` with an 8px gap. */
|
|
1657
|
+
children?: React$1.ReactNode;
|
|
1658
|
+
className?: string | undefined;
|
|
1659
|
+
}
|
|
1660
|
+
export interface SparklineProps extends Pick<React$1.SVGAttributes<SVGSVGElement>, "id" | "style">, DataAttributes {
|
|
1661
|
+
/** The values, oldest first. `null` (or a value that isn't a finite number) is no point: the line breaks there. */
|
|
1662
|
+
data: ReadonlyArray<number | null | undefined>;
|
|
1663
|
+
/** Which points failed, by the same index as `data`. Shown only when `failures` isn't `none`. */
|
|
1664
|
+
failed?: ReadonlyArray<boolean | null | undefined> | undefined;
|
|
1665
|
+
/** How failed points show: `none` (default), `band` (a red band behind the point) or `ticks` (a red tick at the
|
|
1666
|
+
* foot). */
|
|
1667
|
+
failures?: "none" | "band" | "ticks" | undefined;
|
|
1668
|
+
/** The line's colour. Default `neutral`. */
|
|
1669
|
+
tone?: "neutral" | "accent" | "danger" | "warning" | "positive" | undefined;
|
|
1670
|
+
/** `sm` 80×24 (default), `md` 120×32. */
|
|
1671
|
+
size?: "sm" | "md" | undefined;
|
|
1672
|
+
/** The scale's ends; default the data's own lowest and highest. Give tiles the same ones to compare them. Values
|
|
1673
|
+
* beyond them are drawn at the edge. */
|
|
1674
|
+
min?: number | undefined;
|
|
1675
|
+
max?: number | undefined;
|
|
1676
|
+
/** What the line says, for screen readers ("Response time, last 24 h: 180–420 ms, 2 failures"). Without it the
|
|
1677
|
+
* sparkline is decoration and hidden from them. */
|
|
1678
|
+
label?: string | undefined;
|
|
1679
|
+
className?: string | undefined;
|
|
1680
|
+
}
|
|
1617
1681
|
/** One SVG child: element name and its attributes. */
|
|
1618
1682
|
export type IconShape = [
|
|
1619
1683
|
string,
|
|
@@ -1824,42 +1888,10 @@ export interface PageHeaderProps extends Pick<React$1.HTMLAttributes<HTMLElement
|
|
|
1824
1888
|
style?: React$1.CSSProperties | undefined;
|
|
1825
1889
|
}
|
|
1826
1890
|
export declare const PageHeader: React$1.ForwardRefExoticComponent<PageHeaderProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1827
|
-
/**
|
|
1828
|
-
*
|
|
1829
|
-
*
|
|
1830
|
-
export declare const
|
|
1831
|
-
/** ActionBar — a bar stuck to the bottom of the screen or of a card: a status line and the form's or selection's
|
|
1832
|
-
* actions. It is `position: sticky`, so it stays in the flow at the end of its parent and never covers the last field. */
|
|
1833
|
-
export declare const ActionBar: React$1.ForwardRefExoticComponent<ActionBarProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1834
|
-
/** Separator — a 1px `aura-border-default` rule between groups of content (4.20). Decorative by default (hidden from
|
|
1835
|
-
* screen readers); `decorative={false}` makes it a `role="separator"` that is announced. */
|
|
1836
|
-
export declare const Separator: React$1.ForwardRefExoticComponent<SeparatorProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1837
|
-
/** A static table. Scrolls sideways inside its own box when it is wider than its container. */
|
|
1838
|
-
export declare const Table: React$1.ForwardRefExoticComponent<TableProps & React$1.RefAttributes<HTMLTableElement>>;
|
|
1839
|
-
export declare const THead: React$1.ForwardRefExoticComponent<TableSectionProps & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
1840
|
-
export declare const TBody: React$1.ForwardRefExoticComponent<TableSectionProps & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
1841
|
-
export declare const TFoot: React$1.ForwardRefExoticComponent<TableSectionProps & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
1842
|
-
export declare const Tr: React$1.ForwardRefExoticComponent<TableRowProps & React$1.RefAttributes<HTMLTableRowElement>>;
|
|
1843
|
-
/** Header cell. `scope` defaults to `col`; pass `scope="row"` for a row header in the body. */
|
|
1844
|
-
export declare const Th: React$1.ForwardRefExoticComponent<TableCellProps & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
1845
|
-
/** Data cell. `numeric` right-aligns with tabular figures (money, counts). */
|
|
1846
|
-
export declare const Td: React$1.ForwardRefExoticComponent<TableCellProps & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
1847
|
-
/** BottomNav — a phone tab bar: icon over a short label, a count or dot, the current page marked. Fixed to the bottom,
|
|
1848
|
-
* padded for the home indicator, with a spacer of the same height in the flow so nothing sits under it. Which
|
|
1849
|
-
* breakpoints show it is decided in CSS, so the server's HTML is already right and nothing shifts on hydration. */
|
|
1850
|
-
export declare const BottomNav: React$1.ForwardRefExoticComponent<BottomNavProps & React$1.RefAttributes<HTMLElement>>;
|
|
1851
|
-
/** Min-width breakpoints in px, mirroring the aura-bp-* tokens. */
|
|
1852
|
-
export declare const breakpoints: {
|
|
1853
|
-
sm: 640;
|
|
1854
|
-
md: 768;
|
|
1855
|
-
lg: 1024;
|
|
1856
|
-
xl: 1280;
|
|
1857
|
-
};
|
|
1858
|
-
/** The widest breakpoint the window currently meets: 'base' | 'sm' | 'md' | 'lg' | 'xl'. 'lg' during server render. */
|
|
1859
|
-
export declare function useBreakpoint(): Breakpoint;
|
|
1860
|
-
/** Pick a value for the current breakpoint from { base, sm, md, lg, xl } (falls back to the next smaller one). */
|
|
1861
|
-
export declare function useResponsive<T>(value: Responsive<T>): T | undefined;
|
|
1862
|
-
export declare const Surface: React$1.ForwardRefExoticComponent<SurfaceProps & React$1.RefAttributes<HTMLElement>>;
|
|
1891
|
+
/** StatusTile (5.34, DxT Monitor S06): one monitored thing — a status icon and tint, a two-line title, a value at the
|
|
1892
|
+
* top right, a short meta line and marker icons. With `href` the whole tile is one link, named by everything it
|
|
1893
|
+
* says. Put tiles in a TileGrid. Also exported from `/server` (status word in English unless `statusLabel`). */
|
|
1894
|
+
export declare const StatusTile: React$1.ForwardRefExoticComponent<StatusTileProps & React$1.RefAttributes<HTMLElement>>;
|
|
1863
1895
|
/** Every built-in label. Function entries build the text from their arguments. */
|
|
1864
1896
|
export interface AuraStrings {
|
|
1865
1897
|
close: string;
|
|
@@ -1949,6 +1981,11 @@ export interface AuraStrings {
|
|
|
1949
1981
|
breadcrumbMore: string;
|
|
1950
1982
|
/** A Stepper step with `status: 'error'` (5.18). */
|
|
1951
1983
|
stepError: string;
|
|
1984
|
+
/** StatusTile's status words (5.34). */
|
|
1985
|
+
statusDown: string;
|
|
1986
|
+
statusProblem: string;
|
|
1987
|
+
statusMaintenance: string;
|
|
1988
|
+
statusOk: string;
|
|
1952
1989
|
}
|
|
1953
1990
|
/** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
|
|
1954
1991
|
* only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
|
|
@@ -1961,6 +1998,44 @@ export declare const STRINGS: {
|
|
|
1961
1998
|
th: AuraStrings;
|
|
1962
1999
|
sv: AuraStrings;
|
|
1963
2000
|
};
|
|
2001
|
+
export declare const TileGrid: React$1.ForwardRefExoticComponent<TileGridProps & React$1.RefAttributes<HTMLUListElement>>;
|
|
2002
|
+
export declare const Sparkline: React$1.ForwardRefExoticComponent<SparklineProps & React$1.RefAttributes<SVGSVGElement>>;
|
|
2003
|
+
/** AppShell — side navigation + top bar + content. The nav is fixed from lg (1024px) up and a Drawer below it.
|
|
2004
|
+
* Which one shows is decided in CSS (4.16), so the server's HTML is already right on a phone and nothing shifts on
|
|
2005
|
+
* hydration; JavaScript only opens and closes the drawer. */
|
|
2006
|
+
export declare const AppShell: React$1.ForwardRefExoticComponent<AppShellProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2007
|
+
/** ActionBar — a bar stuck to the bottom of the screen or of a card: a status line and the form's or selection's
|
|
2008
|
+
* actions. It is `position: sticky`, so it stays in the flow at the end of its parent and never covers the last field. */
|
|
2009
|
+
export declare const ActionBar: React$1.ForwardRefExoticComponent<ActionBarProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2010
|
+
/** Separator — a 1px `aura-border-default` rule between groups of content (4.20). Decorative by default (hidden from
|
|
2011
|
+
* screen readers); `decorative={false}` makes it a `role="separator"` that is announced. */
|
|
2012
|
+
export declare const Separator: React$1.ForwardRefExoticComponent<SeparatorProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2013
|
+
/** A static table. Scrolls sideways inside its own box when it is wider than its container. */
|
|
2014
|
+
export declare const Table: React$1.ForwardRefExoticComponent<TableProps & React$1.RefAttributes<HTMLTableElement>>;
|
|
2015
|
+
export declare const THead: React$1.ForwardRefExoticComponent<TableSectionProps & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
2016
|
+
export declare const TBody: React$1.ForwardRefExoticComponent<TableSectionProps & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
2017
|
+
export declare const TFoot: React$1.ForwardRefExoticComponent<TableSectionProps & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
2018
|
+
export declare const Tr: React$1.ForwardRefExoticComponent<TableRowProps & React$1.RefAttributes<HTMLTableRowElement>>;
|
|
2019
|
+
/** Header cell. `scope` defaults to `col`; pass `scope="row"` for a row header in the body. */
|
|
2020
|
+
export declare const Th: React$1.ForwardRefExoticComponent<TableCellProps & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
2021
|
+
/** Data cell. `numeric` right-aligns with tabular figures (money, counts). */
|
|
2022
|
+
export declare const Td: React$1.ForwardRefExoticComponent<TableCellProps & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
2023
|
+
/** BottomNav — a phone tab bar: icon over a short label, a count or dot, the current page marked. Fixed to the bottom,
|
|
2024
|
+
* padded for the home indicator, with a spacer of the same height in the flow so nothing sits under it. Which
|
|
2025
|
+
* breakpoints show it is decided in CSS, so the server's HTML is already right and nothing shifts on hydration. */
|
|
2026
|
+
export declare const BottomNav: React$1.ForwardRefExoticComponent<BottomNavProps & React$1.RefAttributes<HTMLElement>>;
|
|
2027
|
+
/** Min-width breakpoints in px, mirroring the aura-bp-* tokens. */
|
|
2028
|
+
export declare const breakpoints: {
|
|
2029
|
+
sm: 640;
|
|
2030
|
+
md: 768;
|
|
2031
|
+
lg: 1024;
|
|
2032
|
+
xl: 1280;
|
|
2033
|
+
};
|
|
2034
|
+
/** The widest breakpoint the window currently meets: 'base' | 'sm' | 'md' | 'lg' | 'xl'. 'lg' during server render. */
|
|
2035
|
+
export declare function useBreakpoint(): Breakpoint;
|
|
2036
|
+
/** Pick a value for the current breakpoint from { base, sm, md, lg, xl } (falls back to the next smaller one). */
|
|
2037
|
+
export declare function useResponsive<T>(value: Responsive<T>): T | undefined;
|
|
2038
|
+
export declare const Surface: React$1.ForwardRefExoticComponent<SurfaceProps & React$1.RefAttributes<HTMLElement>>;
|
|
1964
2039
|
/** What useAuraLocale returns. `locale` and `calendar` are null outside an AuraProvider. */
|
|
1965
2040
|
export interface AuraLocaleValue {
|
|
1966
2041
|
locale: "th" | "en" | "sv" | null;
|
package/dist/locales/sv.cjs
CHANGED
|
@@ -148,6 +148,10 @@ var sv = {
|
|
|
148
148
|
},
|
|
149
149
|
breadcrumbMore: "Visa hela s\xF6kv\xE4gen",
|
|
150
150
|
stepError: "har fel",
|
|
151
|
+
statusDown: "Nere",
|
|
152
|
+
statusProblem: "Problem",
|
|
153
|
+
statusMaintenance: "Underh\xE5ll",
|
|
154
|
+
statusOk: "OK",
|
|
151
155
|
accepts: function(list, max) {
|
|
152
156
|
return [list, max && "h\xF6gst " + max + " per fil"].filter(Boolean).join(", ");
|
|
153
157
|
}
|
package/dist/locales/sv.d.cts
CHANGED
|
@@ -89,6 +89,11 @@ export interface AuraStrings {
|
|
|
89
89
|
breadcrumbMore: string;
|
|
90
90
|
/** A Stepper step with `status: 'error'` (5.18). */
|
|
91
91
|
stepError: string;
|
|
92
|
+
/** StatusTile's status words (5.34). */
|
|
93
|
+
statusDown: string;
|
|
94
|
+
statusProblem: string;
|
|
95
|
+
statusMaintenance: string;
|
|
96
|
+
statusOk: string;
|
|
92
97
|
}
|
|
93
98
|
/** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
|
|
94
99
|
* only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
|
package/dist/locales/sv.d.ts
CHANGED
|
@@ -89,6 +89,11 @@ export interface AuraStrings {
|
|
|
89
89
|
breadcrumbMore: string;
|
|
90
90
|
/** A Stepper step with `status: 'error'` (5.18). */
|
|
91
91
|
stepError: string;
|
|
92
|
+
/** StatusTile's status words (5.34). */
|
|
93
|
+
statusDown: string;
|
|
94
|
+
statusProblem: string;
|
|
95
|
+
statusMaintenance: string;
|
|
96
|
+
statusOk: string;
|
|
92
97
|
}
|
|
93
98
|
/** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
|
|
94
99
|
* only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
|
package/dist/locales/th.cjs
CHANGED
|
@@ -148,6 +148,10 @@ var th = {
|
|
|
148
148
|
},
|
|
149
149
|
breadcrumbMore: "\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E2A\u0E49\u0E19\u0E17\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
|
|
150
150
|
stepError: "\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14",
|
|
151
|
+
statusDown: "\u0E25\u0E48\u0E21",
|
|
152
|
+
statusProblem: "\u0E21\u0E35\u0E1B\u0E31\u0E0D\u0E2B\u0E32",
|
|
153
|
+
statusMaintenance: "\u0E1B\u0E34\u0E14\u0E1B\u0E23\u0E31\u0E1A\u0E1B\u0E23\u0E38\u0E07",
|
|
154
|
+
statusOk: "\u0E1B\u0E01\u0E15\u0E34",
|
|
151
155
|
accepts: function(list, max) {
|
|
152
156
|
return [list, max && "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + max + " \u0E15\u0E48\u0E2D\u0E44\u0E1F\u0E25\u0E4C"].filter(Boolean).join(" \xB7 ");
|
|
153
157
|
}
|
package/dist/locales/th.d.cts
CHANGED
|
@@ -89,6 +89,11 @@ export interface AuraStrings {
|
|
|
89
89
|
breadcrumbMore: string;
|
|
90
90
|
/** A Stepper step with `status: 'error'` (5.18). */
|
|
91
91
|
stepError: string;
|
|
92
|
+
/** StatusTile's status words (5.34). */
|
|
93
|
+
statusDown: string;
|
|
94
|
+
statusProblem: string;
|
|
95
|
+
statusMaintenance: string;
|
|
96
|
+
statusOk: string;
|
|
92
97
|
}
|
|
93
98
|
/** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
|
|
94
99
|
* only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
|
package/dist/locales/th.d.ts
CHANGED
|
@@ -89,6 +89,11 @@ export interface AuraStrings {
|
|
|
89
89
|
breadcrumbMore: string;
|
|
90
90
|
/** A Stepper step with `status: 'error'` (5.18). */
|
|
91
91
|
stepError: string;
|
|
92
|
+
/** StatusTile's status words (5.34). */
|
|
93
|
+
statusDown: string;
|
|
94
|
+
statusProblem: string;
|
|
95
|
+
statusMaintenance: string;
|
|
96
|
+
statusOk: string;
|
|
92
97
|
}
|
|
93
98
|
/** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
|
|
94
99
|
* only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
|
package/dist/server/index.cjs
CHANGED
|
@@ -39,8 +39,11 @@ __export(server_exports, {
|
|
|
39
39
|
Icon: () => Icon,
|
|
40
40
|
PageHeader: () => PageHeader,
|
|
41
41
|
STRINGS: () => STRINGS,
|
|
42
|
+
Sparkline: () => Sparkline,
|
|
42
43
|
Stat: () => ServerStat,
|
|
43
44
|
StatusPill: () => ServerStatusPill,
|
|
45
|
+
StatusTile: () => ServerStatusTile,
|
|
46
|
+
TileGrid: () => TileGrid,
|
|
44
47
|
brandScale: () => scale,
|
|
45
48
|
breakpoints: () => breakpoints,
|
|
46
49
|
buttonClass: () => buttonClass,
|
|
@@ -329,11 +332,15 @@ var th = {
|
|
|
329
332
|
pageN: function(p) {
|
|
330
333
|
return "\u0E2B\u0E19\u0E49\u0E32 " + p;
|
|
331
334
|
},
|
|
332
|
-
progressReserved: function(v,
|
|
333
|
-
return "\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27 " + n(v) + " \u0E08\u0E32\u0E01 " + n(max) + " \u0E08\u0E2D\u0E07\u0E44\u0E27\u0E49 " + n(
|
|
335
|
+
progressReserved: function(v, r2, max) {
|
|
336
|
+
return "\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27 " + n(v) + " \u0E08\u0E32\u0E01 " + n(max) + " \u0E08\u0E2D\u0E07\u0E44\u0E27\u0E49 " + n(r2);
|
|
334
337
|
},
|
|
335
338
|
breadcrumbMore: "\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E2A\u0E49\u0E19\u0E17\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
|
|
336
339
|
stepError: "\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14",
|
|
340
|
+
statusDown: "\u0E25\u0E48\u0E21",
|
|
341
|
+
statusProblem: "\u0E21\u0E35\u0E1B\u0E31\u0E0D\u0E2B\u0E32",
|
|
342
|
+
statusMaintenance: "\u0E1B\u0E34\u0E14\u0E1B\u0E23\u0E31\u0E1A\u0E1B\u0E23\u0E38\u0E07",
|
|
343
|
+
statusOk: "\u0E1B\u0E01\u0E15\u0E34",
|
|
337
344
|
accepts: function(list, max) {
|
|
338
345
|
return [list, max && "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + max + " \u0E15\u0E48\u0E2D\u0E44\u0E1F\u0E25\u0E4C"].filter(Boolean).join(" \xB7 ");
|
|
339
346
|
}
|
|
@@ -460,11 +467,15 @@ var sv = {
|
|
|
460
467
|
pageN: function(p) {
|
|
461
468
|
return "Sida " + p;
|
|
462
469
|
},
|
|
463
|
-
progressReserved: function(v,
|
|
464
|
-
return nsv(v) + " av " + nsv(max) + " anv\xE4nda, " + nsv(
|
|
470
|
+
progressReserved: function(v, r2, max) {
|
|
471
|
+
return nsv(v) + " av " + nsv(max) + " anv\xE4nda, " + nsv(r2) + " reserverade";
|
|
465
472
|
},
|
|
466
473
|
breadcrumbMore: "Visa hela s\xF6kv\xE4gen",
|
|
467
474
|
stepError: "har fel",
|
|
475
|
+
statusDown: "Nere",
|
|
476
|
+
statusProblem: "Problem",
|
|
477
|
+
statusMaintenance: "Underh\xE5ll",
|
|
478
|
+
statusOk: "OK",
|
|
468
479
|
accepts: function(list, max) {
|
|
469
480
|
return [list, max && "h\xF6gst " + max + " per fil"].filter(Boolean).join(", ");
|
|
470
481
|
}
|
|
@@ -592,11 +603,15 @@ var STRINGS = {
|
|
|
592
603
|
pageN: function(p) {
|
|
593
604
|
return "Page " + p;
|
|
594
605
|
},
|
|
595
|
-
progressReserved: function(v,
|
|
596
|
-
return n2(v) + " of " + n2(max) + " used, " + n2(
|
|
606
|
+
progressReserved: function(v, r2, max) {
|
|
607
|
+
return n2(v) + " of " + n2(max) + " used, " + n2(r2) + " reserved";
|
|
597
608
|
},
|
|
598
609
|
breadcrumbMore: "Show the full path",
|
|
599
610
|
stepError: "has errors",
|
|
611
|
+
statusDown: "Down",
|
|
612
|
+
statusProblem: "Problem",
|
|
613
|
+
statusMaintenance: "Maintenance",
|
|
614
|
+
statusOk: "OK",
|
|
600
615
|
accepts: function(list, max) {
|
|
601
616
|
return [list, max && "up to " + max + " each"].filter(Boolean).join(", ");
|
|
602
617
|
}
|
|
@@ -607,14 +622,14 @@ var STRINGS = {
|
|
|
607
622
|
|
|
608
623
|
// src/theme.ts
|
|
609
624
|
function hexToRgb(hex) {
|
|
610
|
-
let
|
|
611
|
-
if (
|
|
612
|
-
|
|
625
|
+
let h6 = String(hex).trim().replace("#", "");
|
|
626
|
+
if (h6.length === 3)
|
|
627
|
+
h6 = h6.split("").map(function(c) {
|
|
613
628
|
return c + c;
|
|
614
629
|
}).join("");
|
|
615
|
-
if (!/^[0-9a-f]{6}$/i.test(
|
|
630
|
+
if (!/^[0-9a-f]{6}$/i.test(h6)) throw new Error('createTheme: "' + hex + '" is not a #rgb or #rrggbb colour');
|
|
616
631
|
return [0, 2, 4].map(function(i) {
|
|
617
|
-
return parseInt(
|
|
632
|
+
return parseInt(h6.slice(i, i + 2), 16) / 255;
|
|
618
633
|
});
|
|
619
634
|
}
|
|
620
635
|
function rgbToHex(rgb) {
|
|
@@ -630,10 +645,10 @@ function delin(c) {
|
|
|
630
645
|
return c <= 31308e-7 ? 12.92 * c : 1.055 * Math.pow(c, 1 / 2.4) - 0.055;
|
|
631
646
|
}
|
|
632
647
|
function rgbToOklch(rgb) {
|
|
633
|
-
const
|
|
634
|
-
const l = Math.cbrt(0.4122214708 *
|
|
635
|
-
const m = Math.cbrt(0.2119034982 *
|
|
636
|
-
const s = Math.cbrt(0.0883024619 *
|
|
648
|
+
const r2 = lin(rgb[0]), g = lin(rgb[1]), b = lin(rgb[2]);
|
|
649
|
+
const l = Math.cbrt(0.4122214708 * r2 + 0.5363325363 * g + 0.0514459929 * b);
|
|
650
|
+
const m = Math.cbrt(0.2119034982 * r2 + 0.6806995451 * g + 0.1073969566 * b);
|
|
651
|
+
const s = Math.cbrt(0.0883024619 * r2 + 0.2817188376 * g + 0.6299787005 * b);
|
|
637
652
|
const L = 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s;
|
|
638
653
|
const A = 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s;
|
|
639
654
|
const B = 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s;
|
|
@@ -793,13 +808,13 @@ function createTheme(opts) {
|
|
|
793
808
|
D["card-shadow-creative"] = "8px 8px 0px " + shadowDark;
|
|
794
809
|
const checks = [];
|
|
795
810
|
function check(theme, fg, bg, target, fgHex, bgHex) {
|
|
796
|
-
const
|
|
811
|
+
const r2 = contrast(fgHex, bgHex);
|
|
797
812
|
checks.push({
|
|
798
813
|
theme,
|
|
799
814
|
pair: fg + " on " + bg,
|
|
800
|
-
ratio: Math.round(
|
|
815
|
+
ratio: Math.round(r2 * 100) / 100,
|
|
801
816
|
target,
|
|
802
|
-
pass:
|
|
817
|
+
pass: r2 >= target - 5e-3
|
|
803
818
|
});
|
|
804
819
|
}
|
|
805
820
|
[
|
|
@@ -919,6 +934,18 @@ function colorSchemeScript(options) {
|
|
|
919
934
|
|
|
920
935
|
// src/breakpoints.ts
|
|
921
936
|
var breakpoints = { sm: 640, md: 768, lg: 1024, xl: 1280 };
|
|
937
|
+
var ORDER = ["base", "sm", "md", "lg", "xl"];
|
|
938
|
+
function respVars(prefix, value, map2) {
|
|
939
|
+
const style = {};
|
|
940
|
+
if (value == null) return style;
|
|
941
|
+
if (typeof value !== "object") value = { base: value };
|
|
942
|
+
let byBp = value, cur;
|
|
943
|
+
ORDER.forEach(function(k) {
|
|
944
|
+
if (byBp[k] !== void 0) cur = map2 ? map2(byBp[k]) : byBp[k];
|
|
945
|
+
if (cur !== void 0) style["--" + prefix + "-" + k] = cur;
|
|
946
|
+
});
|
|
947
|
+
return style;
|
|
948
|
+
}
|
|
922
949
|
|
|
923
950
|
// src/display.tsx
|
|
924
951
|
var React3 = __toESM(require("react"), 1);
|
|
@@ -982,9 +1009,9 @@ function iconSvg(shapes, props, ref) {
|
|
|
982
1009
|
...a11y
|
|
983
1010
|
},
|
|
984
1011
|
shapes.map(function(s, i) {
|
|
985
|
-
const
|
|
986
|
-
for (const k in s[1])
|
|
987
|
-
return h(s[0],
|
|
1012
|
+
const attrs2 = { key: i };
|
|
1013
|
+
for (const k in s[1]) attrs2[k === "stroke-width" ? "strokeWidth" : k] = s[1][k];
|
|
1014
|
+
return h(s[0], attrs2);
|
|
988
1015
|
})
|
|
989
1016
|
);
|
|
990
1017
|
}
|
|
@@ -1116,6 +1143,14 @@ var IconTrendingDown = /* @__PURE__ */ defineIcon("trending-down", [
|
|
|
1116
1143
|
["path", { d: "M16 17h6v-6" }],
|
|
1117
1144
|
["path", { d: "m22 17-8.5-8.5-5 5L2 7" }]
|
|
1118
1145
|
]);
|
|
1146
|
+
var IconWrench = /* @__PURE__ */ defineIcon("wrench", [
|
|
1147
|
+
[
|
|
1148
|
+
"path",
|
|
1149
|
+
{
|
|
1150
|
+
d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z"
|
|
1151
|
+
}
|
|
1152
|
+
]
|
|
1153
|
+
]);
|
|
1119
1154
|
|
|
1120
1155
|
// src/display.tsx
|
|
1121
1156
|
var h2 = React3.createElement;
|
|
@@ -1356,14 +1391,14 @@ function ServerAvatar(props) {
|
|
|
1356
1391
|
var React4 = __toESM(require("react"), 1);
|
|
1357
1392
|
var h3 = React4.createElement;
|
|
1358
1393
|
var Container = React4.forwardRef(function Container2(props, ref) {
|
|
1359
|
-
const
|
|
1394
|
+
const attrs2 = {};
|
|
1360
1395
|
Object.keys(props).forEach(function(k) {
|
|
1361
1396
|
if (k === "id" || k === "lang" || k === "dir" || /^(aria|data)-/.test(k))
|
|
1362
|
-
|
|
1397
|
+
attrs2[k] = props[k];
|
|
1363
1398
|
});
|
|
1364
1399
|
return h3(
|
|
1365
1400
|
props.as || "div",
|
|
1366
|
-
Object.assign(
|
|
1401
|
+
Object.assign(attrs2, {
|
|
1367
1402
|
ref,
|
|
1368
1403
|
className: cx(
|
|
1369
1404
|
"aura-container",
|
|
@@ -1381,15 +1416,15 @@ var Container = React4.forwardRef(function Container2(props, ref) {
|
|
|
1381
1416
|
var React5 = __toESM(require("react"), 1);
|
|
1382
1417
|
var h4 = React5.createElement;
|
|
1383
1418
|
var PageHeader = React5.forwardRef(function PageHeader2(props, ref) {
|
|
1384
|
-
const
|
|
1419
|
+
const attrs2 = {};
|
|
1385
1420
|
Object.keys(props).forEach(function(k) {
|
|
1386
1421
|
if (k === "id" || k === "lang" || k === "dir" || k === "role" || /^(aria|data)-/.test(k))
|
|
1387
|
-
|
|
1422
|
+
attrs2[k] = props[k];
|
|
1388
1423
|
});
|
|
1389
1424
|
const level = props.headingLevel || 1;
|
|
1390
1425
|
return h4(
|
|
1391
1426
|
"div",
|
|
1392
|
-
Object.assign(
|
|
1427
|
+
Object.assign(attrs2, { ref, className: cx("aura-page-header", props.className), style: props.style }),
|
|
1393
1428
|
h4(
|
|
1394
1429
|
"div",
|
|
1395
1430
|
{ className: "aura-page-header__text" },
|
|
@@ -1401,3 +1436,204 @@ var PageHeader = React5.forwardRef(function PageHeader2(props, ref) {
|
|
|
1401
1436
|
props.actions != null && props.actions !== false ? h4("div", { className: "aura-page-header__actions" }, props.actions) : null
|
|
1402
1437
|
);
|
|
1403
1438
|
});
|
|
1439
|
+
|
|
1440
|
+
// src/tiles.tsx
|
|
1441
|
+
var React6 = __toESM(require("react"), 1);
|
|
1442
|
+
var h5 = React6.createElement;
|
|
1443
|
+
var STATUS_ICON = {
|
|
1444
|
+
down: IconCircleAlert,
|
|
1445
|
+
problem: IconTriangleAlert,
|
|
1446
|
+
maintenance: IconWrench,
|
|
1447
|
+
ok: IconCircleCheck
|
|
1448
|
+
};
|
|
1449
|
+
var STATUS_TONE = {
|
|
1450
|
+
down: "danger",
|
|
1451
|
+
problem: "warning",
|
|
1452
|
+
maintenance: "accent",
|
|
1453
|
+
ok: "default"
|
|
1454
|
+
};
|
|
1455
|
+
var STATUS_WORD = {
|
|
1456
|
+
down: "statusDown",
|
|
1457
|
+
problem: "statusProblem",
|
|
1458
|
+
maintenance: "statusMaintenance",
|
|
1459
|
+
ok: "statusOk"
|
|
1460
|
+
};
|
|
1461
|
+
function statusWord(status, t) {
|
|
1462
|
+
return String(t[STATUS_WORD[status]] || STATUS_WORD[status]);
|
|
1463
|
+
}
|
|
1464
|
+
function attrs(props) {
|
|
1465
|
+
const out = {};
|
|
1466
|
+
Object.keys(props).forEach(function(k) {
|
|
1467
|
+
if (k === "id" || k === "style" || k === "lang" || k === "dir" || /^(aria|data)-/.test(k))
|
|
1468
|
+
out[k] = props[k];
|
|
1469
|
+
});
|
|
1470
|
+
return out;
|
|
1471
|
+
}
|
|
1472
|
+
var comma = h5("span", { className: "aura-status-tile__sep" }, ",");
|
|
1473
|
+
function statusTileElement(props, ref, Link, t, titleRef) {
|
|
1474
|
+
const status = STATUS_ICON[props.status] ? props.status : "ok";
|
|
1475
|
+
const valueTone = props.valueTone || STATUS_TONE[status];
|
|
1476
|
+
const word = props.statusLabel || statusWord(status, t);
|
|
1477
|
+
const markers = (props.markers || []).filter(Boolean);
|
|
1478
|
+
const has = function(v) {
|
|
1479
|
+
return v != null && v !== false && v !== "";
|
|
1480
|
+
};
|
|
1481
|
+
const hasValue = has(props.value), hasMeta = has(props.meta);
|
|
1482
|
+
const Tag = props.href ? Link : "div";
|
|
1483
|
+
return h5(
|
|
1484
|
+
Tag,
|
|
1485
|
+
Object.assign(attrs(props), {
|
|
1486
|
+
ref,
|
|
1487
|
+
href: props.href,
|
|
1488
|
+
className: cx("aura-status-tile", "aura-status-tile--" + status, props.href && "is-interactive", props.className)
|
|
1489
|
+
}),
|
|
1490
|
+
h5(
|
|
1491
|
+
"span",
|
|
1492
|
+
{ className: "aura-status-tile__head" },
|
|
1493
|
+
h5(Icon, { name: h5(STATUS_ICON[status]), size: 16, className: "aura-status-tile__icon" }),
|
|
1494
|
+
h5("span", { className: "aura-status-tile__title", ref: titleRef }, props.title, comma),
|
|
1495
|
+
h5("span", { className: "aura-sr-only" }, word + (hasValue || hasMeta || markers.length ? "," : "")),
|
|
1496
|
+
hasValue ? h5(
|
|
1497
|
+
"span",
|
|
1498
|
+
{ className: cx("aura-status-tile__value", "is-" + valueTone) },
|
|
1499
|
+
props.value,
|
|
1500
|
+
hasMeta || markers.length ? comma : null
|
|
1501
|
+
) : null
|
|
1502
|
+
),
|
|
1503
|
+
hasMeta || markers.length ? h5(
|
|
1504
|
+
"span",
|
|
1505
|
+
{ className: "aura-status-tile__foot" },
|
|
1506
|
+
hasMeta ? h5("span", { className: "aura-status-tile__meta" }, props.meta, markers.length ? comma : null) : null,
|
|
1507
|
+
markers.length ? h5(
|
|
1508
|
+
"span",
|
|
1509
|
+
{ className: "aura-status-tile__markers" },
|
|
1510
|
+
markers.map(function(m, i) {
|
|
1511
|
+
return h5(
|
|
1512
|
+
"span",
|
|
1513
|
+
{
|
|
1514
|
+
key: i,
|
|
1515
|
+
className: cx("aura-status-tile__marker", "is-" + (m.tone || "neutral")),
|
|
1516
|
+
"data-aura-tip": m.label
|
|
1517
|
+
},
|
|
1518
|
+
h5(Icon, { name: m.icon, size: 14 }),
|
|
1519
|
+
h5("span", { className: "aura-sr-only" }, m.label + (i < markers.length - 1 ? "," : ""))
|
|
1520
|
+
);
|
|
1521
|
+
})
|
|
1522
|
+
) : null
|
|
1523
|
+
) : null
|
|
1524
|
+
);
|
|
1525
|
+
}
|
|
1526
|
+
function ServerStatusTile(props) {
|
|
1527
|
+
return statusTileElement(props, void 0, props.linkComponent || "a", STRINGS.en);
|
|
1528
|
+
}
|
|
1529
|
+
var TileGrid = React6.forwardRef(function TileGrid2(props, ref) {
|
|
1530
|
+
const style = Object.assign(
|
|
1531
|
+
{},
|
|
1532
|
+
respVars("aura-grid-cols", props.columns == null ? { base: 2, md: 3 } : props.columns),
|
|
1533
|
+
props.style
|
|
1534
|
+
);
|
|
1535
|
+
return h5(
|
|
1536
|
+
"ul",
|
|
1537
|
+
Object.assign(attrs(props), {
|
|
1538
|
+
ref,
|
|
1539
|
+
role: "list",
|
|
1540
|
+
className: cx("aura-grid-layout", "aura-tile-grid", props.className),
|
|
1541
|
+
style
|
|
1542
|
+
}),
|
|
1543
|
+
/* toArray drops null and booleans and keys each element; a Fragment's children are items too. */
|
|
1544
|
+
flat(props.children).map(function(c, i) {
|
|
1545
|
+
return h5("li", { key: React6.isValidElement(c) && c.key != null ? c.key : i }, c);
|
|
1546
|
+
})
|
|
1547
|
+
);
|
|
1548
|
+
});
|
|
1549
|
+
function flat(children) {
|
|
1550
|
+
const out = [];
|
|
1551
|
+
React6.Children.toArray(children).forEach(function(c) {
|
|
1552
|
+
if (React6.isValidElement(c) && c.type === React6.Fragment)
|
|
1553
|
+
flat(c.props.children).forEach(function(x) {
|
|
1554
|
+
out.push(React6.isValidElement(x) ? React6.cloneElement(x, { key: String(c.key) + "/" + String(x.key) }) : x);
|
|
1555
|
+
});
|
|
1556
|
+
else if (c !== "") out.push(c);
|
|
1557
|
+
});
|
|
1558
|
+
return out;
|
|
1559
|
+
}
|
|
1560
|
+
var SIZES2 = { sm: [80, 24], md: [120, 32] };
|
|
1561
|
+
var PAD = 2;
|
|
1562
|
+
function r(n3) {
|
|
1563
|
+
return Math.round(n3 * 100) / 100;
|
|
1564
|
+
}
|
|
1565
|
+
function num(v) {
|
|
1566
|
+
return typeof v === "number" && isFinite(v) ? v : null;
|
|
1567
|
+
}
|
|
1568
|
+
var Sparkline = React6.forwardRef(function Sparkline2(props, ref) {
|
|
1569
|
+
const wh = SIZES2[props.size || "sm"] || SIZES2.sm;
|
|
1570
|
+
const W = wh[0], H = wh[1];
|
|
1571
|
+
const data = (props.data || []).map(num);
|
|
1572
|
+
const n3 = data.length;
|
|
1573
|
+
const vals = data.filter(function(v) {
|
|
1574
|
+
return v != null;
|
|
1575
|
+
});
|
|
1576
|
+
let lo = num(props.min), hi = num(props.max);
|
|
1577
|
+
if (lo == null) lo = vals.length ? Math.min.apply(null, vals) : 0;
|
|
1578
|
+
if (hi == null) hi = vals.length ? Math.max.apply(null, vals) : 0;
|
|
1579
|
+
if (lo > hi) {
|
|
1580
|
+
const s = lo;
|
|
1581
|
+
lo = hi;
|
|
1582
|
+
hi = s;
|
|
1583
|
+
}
|
|
1584
|
+
const step = n3 > 1 ? (W - 2 * PAD) / (n3 - 1) : 0;
|
|
1585
|
+
const x = function(i) {
|
|
1586
|
+
return n3 > 1 ? PAD + i * step : W / 2;
|
|
1587
|
+
};
|
|
1588
|
+
const y = function(v) {
|
|
1589
|
+
if (hi === lo) return H / 2;
|
|
1590
|
+
const k = Math.max(0, Math.min(1, (v - lo) / (hi - lo)));
|
|
1591
|
+
return H - PAD - k * (H - 2 * PAD);
|
|
1592
|
+
};
|
|
1593
|
+
let d = "";
|
|
1594
|
+
const dots = [];
|
|
1595
|
+
data.forEach(function(v, i) {
|
|
1596
|
+
if (v == null) return;
|
|
1597
|
+
const prev = i > 0 && data[i - 1] != null, next = i < n3 - 1 && data[i + 1] != null;
|
|
1598
|
+
if (!prev && !next) dots.push(h5("circle", { key: "d" + i, cx: r(x(i)), cy: r(y(v)), r: 1.5 }));
|
|
1599
|
+
else d += (prev ? "L" : "M") + r(x(i)) + " " + r(y(v));
|
|
1600
|
+
});
|
|
1601
|
+
const mode = props.failures || "none";
|
|
1602
|
+
const fails = [];
|
|
1603
|
+
if (mode !== "none" && props.failed)
|
|
1604
|
+
data.forEach(function(_v, i) {
|
|
1605
|
+
if (!props.failed[i]) return;
|
|
1606
|
+
if (mode === "band") {
|
|
1607
|
+
const w = Math.max(2, step || W), left = Math.max(0, x(i) - w / 2), right = Math.min(W, x(i) + w / 2);
|
|
1608
|
+
fails.push(h5("rect", { key: "f" + i, x: r(left), y: 0, width: r(right - left), height: H }));
|
|
1609
|
+
} else
|
|
1610
|
+
fails.push(
|
|
1611
|
+
h5("rect", {
|
|
1612
|
+
key: "f" + i,
|
|
1613
|
+
x: r(Math.max(0, Math.min(W - 1.5, x(i) - 0.75))),
|
|
1614
|
+
y: H - 6,
|
|
1615
|
+
width: 1.5,
|
|
1616
|
+
height: 6
|
|
1617
|
+
})
|
|
1618
|
+
);
|
|
1619
|
+
});
|
|
1620
|
+
const named = !!props.label;
|
|
1621
|
+
return h5(
|
|
1622
|
+
"svg",
|
|
1623
|
+
Object.assign(attrs(props), {
|
|
1624
|
+
ref,
|
|
1625
|
+
className: cx("aura-sparkline", "is-" + (props.tone || "neutral"), props.className),
|
|
1626
|
+
width: W,
|
|
1627
|
+
height: H,
|
|
1628
|
+
viewBox: "0 0 " + W + " " + H,
|
|
1629
|
+
role: named ? "img" : void 0,
|
|
1630
|
+
"aria-label": named ? props.label : void 0,
|
|
1631
|
+
"aria-hidden": named ? void 0 : true,
|
|
1632
|
+
focusable: "false"
|
|
1633
|
+
}),
|
|
1634
|
+
fails.length && mode === "band" ? h5("g", { className: "aura-sparkline__band" }, fails) : null,
|
|
1635
|
+
d ? h5("path", { className: "aura-sparkline__line", d }) : null,
|
|
1636
|
+
dots.length ? h5("g", { className: "aura-sparkline__dots" }, dots) : null,
|
|
1637
|
+
fails.length && mode === "ticks" ? h5("g", { className: "aura-sparkline__ticks" }, fails) : null
|
|
1638
|
+
);
|
|
1639
|
+
});
|