@jirawatpyk/aura-react 4.14.0 → 4.16.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 +22 -3
- package/dist/aura.bundle.js +126 -27
- package/dist/cjs/index.cjs +126 -27
- package/dist/esm/AppShell.js +12 -9
- package/dist/esm/Button.js +12 -3
- package/dist/esm/DataTable.js +16 -5
- package/dist/esm/Icon.js +1 -1
- package/dist/esm/SideNav.js +72 -4
- package/dist/esm/Skeleton.js +4 -1
- package/dist/esm/locale.js +6 -0
- package/dist/index.d.ts +513 -494
- package/dist/styles.css +75 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -41,13 +41,15 @@ npm i @jirawatpyk/aura-react @jirawatpyk/aura-tokens # React 18 or 19; import
|
|
|
41
41
|
npm i @aura/react@npm:@jirawatpyk/aura-react @aura/tokens@npm:@jirawatpyk/aura-tokens
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
React 18.3 and 19 are both tested: the dev dependencies pin 18, and CI switches the whole workspace to 19 (`node scripts/use-react.mjs 19 && npm install`) and runs every suite again — contrast, token lint, SSR, types, build, hydration with 0 warnings, layout before hydration, the three pilot pages and Storybook (axe + behaviour).
|
|
45
|
+
|
|
44
46
|
Public on npmjs; internal projects can use GitHub Packages instead ([repository README](https://github.com/Jirawatpyk/Aura-design#use-it-in-a-project)).
|
|
45
47
|
|
|
46
48
|
```tsx
|
|
47
49
|
// app root (once)
|
|
48
50
|
import '@aura/tokens/aura.css'; // tokens (light + dark)
|
|
49
51
|
import '@aura/react/styles.css'; // component styles
|
|
50
|
-
// fonts:
|
|
52
|
+
// fonts: '@jirawatpyk/aura-tokens/aura-fonts.local.css' (self-hosted, CSP font-src 'self'), next/font, or Google Fonts — see the tokens README
|
|
51
53
|
|
|
52
54
|
import { AuraProvider, AppShell, SideNav, DataTable, DatePicker } from '@aura/react';
|
|
53
55
|
|
|
@@ -74,7 +76,7 @@ export default function Root() {
|
|
|
74
76
|
|
|
75
77
|
## Components (49)
|
|
76
78
|
|
|
77
|
-
Actions: Button, IconButton, Menu, DropdownMenu, Tag · Forms: TextField, PasswordField, Textarea, NumberField, Select, RadioGroup, Checkbox, Switch, SegmentedControl, Combobox (one value, or `multiple`), FileUpload (+ `formatBytes`) · Dates & times: DatePicker, DateRangePicker, Calendar, TimePicker (+ `useFormatDate`, `formatDate`, `parseDate`, `parseTime`) · Feedback: Alert, FormErrorSummary, Toaster/`toast()` (+ `.success/.error/.warning/.info/.loading`), Tooltip, StatusPill, Badge, Progress, Skeleton, EmptyState · Overlays: Dialog, Drawer, Popover · Data: DataTable, FilterBar, Stat · Navigation: Command (⌘K palette) · Layout: AppShell, Container, Stack, Grid, Accordion, Pagination, Card, Tabs, Stepper, SideNav, Breadcrumb, Avatar, Surface, Icon · Theme: ColorSchemeToggle, ColorSchemeScript, `useColorScheme`, ThemeStyle/`createTheme` · Hooks: `useBreakpoint`, `useResponsive`, `breakpoints`, `useAuraLocale`, `useDensity`.
|
|
79
|
+
Actions: Button (`ghost`, `size="sm"`), IconButton, Menu, DropdownMenu, Tag · Forms: TextField, PasswordField, Textarea, NumberField, Select, RadioGroup, Checkbox, Switch, SegmentedControl, Combobox (one value, or `multiple`), FileUpload (+ `formatBytes`) · Dates & times: DatePicker, DateRangePicker, Calendar, TimePicker (+ `useFormatDate`, `formatDate`, `parseDate`, `parseTime`) · Feedback: Alert, FormErrorSummary, Toaster/`toast()` (+ `.success/.error/.warning/.info/.loading`), Tooltip, StatusPill, Badge, Progress, Skeleton, EmptyState · Overlays: Dialog, Drawer, Popover · Data: DataTable, FilterBar, Stat · Navigation: Command (⌘K palette) · Layout: AppShell, Container, Stack, Grid, Accordion, Pagination, Card, Tabs, Stepper, SideNav, Breadcrumb, Avatar, Surface, Icon · Theme: ColorSchemeToggle, ColorSchemeScript, `useColorScheme`, ThemeStyle/`createTheme` · Hooks: `useBreakpoint`, `useResponsive`, `breakpoints`, `useAuraLocale`, `useDensity`.
|
|
78
80
|
|
|
79
81
|
## Router links, Swedish, motion
|
|
80
82
|
|
|
@@ -96,6 +98,17 @@ Compact makes fields and buttons 36px (from 44px), table rows 40px (from 48px) a
|
|
|
96
98
|
|
|
97
99
|
Motion: skeleton pulses and indeterminate bars honour `prefers-reduced-motion: reduce` — skeletons stop (a static bar), spinners and progress bars slow to a third.
|
|
98
100
|
|
|
101
|
+
## Collapsible sidebar
|
|
102
|
+
|
|
103
|
+
```tsx
|
|
104
|
+
const [collapsed, setCollapsed] = useState(initialFromCookie); // keep the choice across reloads
|
|
105
|
+
<AppShell nav={<SideNav collapsible collapsed={collapsed} onCollapsedChange={setCollapsed} items={items} />}>
|
|
106
|
+
…
|
|
107
|
+
</AppShell>;
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
`collapsed` turns SideNav into a 64px icon-only rail (`--aura-sidenav-rail-width`). Labels become tooltips and stay the accessible names; counts and badges show as a dot; items without an icon show their first letter; clicking a group widens the rail and opens it. `collapsible` adds the collapse / expand button at the bottom. Uncontrolled: `defaultCollapsed`. Pass a short header while collapsed (a logo mark instead of the name). In AppShell's phone drawer the nav is always full width with no toggle.
|
|
111
|
+
|
|
99
112
|
## Toasts, forms, filters, rich text, ⌘K
|
|
100
113
|
|
|
101
114
|
```tsx
|
|
@@ -112,7 +125,7 @@ toast.error('Could not save'); // danger = role="alert"; the rest
|
|
|
112
125
|
|
|
113
126
|
## Phones and touch
|
|
114
127
|
|
|
115
|
-
Under 640px every text control uses 16px text (iOS Safari doesn't zoom). On touch screens (`pointer: coarse`) IconButton
|
|
128
|
+
Under 640px every text control uses 16px text (iOS Safari doesn't zoom). On touch screens (`pointer: coarse`) IconButton and `<Button size="sm">` keep their 32px look with a 44px hit area, and Radio, Checkbox and Switch rows are at least 44px with the whole row as the target. `<Button fullWidth>` fills its row and wraps long Thai or Swedish labels.
|
|
116
129
|
|
|
117
130
|
## Light and dark
|
|
118
131
|
|
|
@@ -148,6 +161,12 @@ Values are ISO strings (`2026-09-18`); with `locale="th"` display is Thai with B
|
|
|
148
161
|
|
|
149
162
|
Portals (Dialog, Drawer, menus, pickers, toasts) wait until after hydration; `useBreakpoint()` returns `lg` on the server and corrects on the client through `useSyncExternalStore`, so there are no hydration mismatches. `npm run test:ssr` renders every component with `react-dom/server` (ESM and CJS builds).
|
|
150
163
|
|
|
164
|
+
Layout is right before hydration (4.16). AppShell's sidebar-or-drawer switch is CSS (a 1024px media query), so a phone gets the menu button from the server's HTML. A DataTable with `stackBelow` renders cards and grid together until it has measured itself, and a container query shows the right one. It supports `stackBelow` 360, 400, 480, 520, 560, 600, 640, 720, 768, 800, 900, 960 and 1024; other widths stack once JavaScript runs. `npm run test:layout` loads both at 390 and 1280px with JavaScript off, then hydrated, and requires CLS 0. Columns with `hideBelow` still settle after hydration.
|
|
165
|
+
|
|
166
|
+
## TypeScript
|
|
167
|
+
|
|
168
|
+
Every optional prop takes `undefined` (4.16), so apps on `exactOptionalPropertyTypes` can write `hint={t.hint}` or `icon={x ?? undefined}`. `types-test/exact-optional.tsx` checks every exported component against the published declarations under `strict`, `exactOptionalPropertyTypes` and `noUncheckedIndexedAccess`.
|
|
169
|
+
|
|
151
170
|
## Scripts
|
|
152
171
|
|
|
153
172
|
```bash
|
package/dist/aura.bundle.js
CHANGED
|
@@ -219,7 +219,7 @@ window.Aura = (() => {
|
|
|
219
219
|
|
|
220
220
|
// src/Icon.tsx
|
|
221
221
|
var h = React2.createElement;
|
|
222
|
-
var ICONS = { "check": [["path", { "d": "M20 6 9 17l-5-5" }]], "x": [["path", { "d": "M18 6 6 18" }], ["path", { "d": "m6 6 12 12" }]], "plus": [["path", { "d": "M5 12h14" }], ["path", { "d": "M12 5v14" }]], "minus": [["path", { "d": "M5 12h14" }]], "search": [["path", { "d": "m21 21-4.34-4.34" }], ["circle", { "cx": "11", "cy": "11", "r": "8" }]], "chevron-down": [["path", { "d": "m6 9 6 6 6-6" }]], "chevron-up": [["path", { "d": "m18 15-6-6-6 6" }]], "chevron-left": [["path", { "d": "m15 18-6-6 6-6" }]], "chevron-right": [["path", { "d": "m9 18 6-6-6-6" }]], "arrow-right": [["path", { "d": "M5 12h14" }], ["path", { "d": "m12 5 7 7-7 7" }]], "arrow-up-right": [["path", { "d": "M7 7h10v10" }], ["path", { "d": "M7 17 17 7" }]], "arrow-up-down": [["path", { "d": "m21 16-4 4-4-4" }], ["path", { "d": "M17 20V4" }], ["path", { "d": "m3 8 4-4 4 4" }], ["path", { "d": "M7 4v16" }]], "loader-circle": [["path", { "d": "M21 12a9 9 0 1 1-6.219-8.56" }]], "circle-alert": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["line", { "x1": "12", "x2": "12", "y1": "8", "y2": "12" }], ["line", { "x1": "12", "x2": "12.01", "y1": "16", "y2": "16" }]], "circle-check": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "m16 9-5.5 5.5L8 12" }]], "info": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 16v-4" }], ["path", { "d": "M12 8h.01" }]], "triangle-alert": [["path", { "d": "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }], ["path", { "d": "M12 9v4" }], ["path", { "d": "M12 17h.01" }]], "settings": [["path", { "d": "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }], ["circle", { "cx": "12", "cy": "12", "r": "3" }]], "user": [["path", { "d": "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }], ["circle", { "cx": "12", "cy": "7", "r": "4" }]], "users": [["path", { "d": "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }], ["path", { "d": "M16 3.128a4 4 0 0 1 0 7.744" }], ["path", { "d": "M22 21v-2a4 4 0 0 0-3-3.87" }], ["circle", { "cx": "9", "cy": "7", "r": "4" }]], "filter": [["path", { "d": "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z" }]], "ellipsis": [["circle", { "cx": "12", "cy": "12", "r": "1" }], ["circle", { "cx": "19", "cy": "12", "r": "1" }], ["circle", { "cx": "5", "cy": "12", "r": "1" }]], "external-link": [["path", { "d": "M15 3h6v6" }], ["path", { "d": "M10 14 21 3" }], ["path", { "d": "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }]], "copy": [["rect", { "width": "14", "height": "14", "x": "8", "y": "8", "rx": "2", "ry": "2" }], ["path", { "d": "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }]], "trash-2": [["path", { "d": "M10 11v6" }], ["path", { "d": "M14 11v6" }], ["path", { "d": "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }], ["path", { "d": "M3 6h18" }], ["path", { "d": "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }]], "pencil": [["path", { "d": "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }], ["path", { "d": "m15 5 4 4" }]], "download": [["path", { "d": "M12 15V3" }], ["path", { "d": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }], ["path", { "d": "m7 10 5 5 5-5" }]], "upload": [["path", { "d": "M12 3v12" }], ["path", { "d": "m17 8-5-5-5 5" }], ["path", { "d": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }]], "calendar": [["path", { "d": "M8 2v3" }], ["path", { "d": "M16 2v3" }], ["rect", { "x": "3", "y": "3", "width": "18", "height": "18", "rx": "2" }], ["path", { "d": "M3 9h18" }]], "bell": [["path", { "d": "M10.268 21a2 2 0 0 0 3.464 0" }], ["path", { "d": "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" }]], "menu": [["path", { "d": "M4 5h16" }], ["path", { "d": "M4 12h16" }], ["path", { "d": "M4 19h16" }]], "eye": [["path", { "d": "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }], ["circle", { "cx": "12", "cy": "12", "r": "3" }]], "log-out": [["path", { "d": "m16 17 5-5-5-5" }], ["path", { "d": "M21 12H9" }], ["path", { "d": "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }]], "circle": [["circle", { "cx": "12", "cy": "12", "r": "10" }]], "circle-dot-dashed": [["path", { "d": "M10.1 2.18a9.93 9.93 0 0 1 3.8 0" }], ["path", { "d": "M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7" }], ["path", { "d": "M21.82 10.1a9.93 9.93 0 0 1 0 3.8" }], ["path", { "d": "M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69" }], ["path", { "d": "M13.9 21.82a9.94 9.94 0 0 1-3.8 0" }], ["path", { "d": "M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7" }], ["path", { "d": "M2.18 13.9a9.93 9.93 0 0 1 0-3.8" }], ["path", { "d": "M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69" }], ["circle", { "cx": "12", "cy": "12", "r": "1" }]], "ban": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M4.929 4.929 19.07 19.071" }]], "arrow-up": [["path", { "d": "m5 12 7-7 7 7" }], ["path", { "d": "M12 19V5" }]], "arrow-down": [["path", { "d": "M12 5v14" }], ["path", { "d": "m19 12-7 7-7-7" }]], "inbox": [["polyline", { "points": "22 12 16 12 14 15 10 15 8 12 2 12" }], ["path", { "d": "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" }]], "pin": [["path", { "d": "M12 17v5" }], ["path", { "d": "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" }]], "pin-off": [["path", { "d": "M12 17v5" }], ["path", { "d": "M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89" }], ["path", { "d": "m2 2 20 20" }], ["path", { "d": "M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11" }]], "eye-off": [["path", { "d": "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }], ["path", { "d": "M14.084 14.158a3 3 0 0 1-4.242-4.242" }], ["path", { "d": "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }], ["path", { "d": "m2 2 20 20" }]], "columns-3": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "M15 3v18" }]], "arrow-left": [["path", { "d": "m12 19-7-7 7-7" }], ["path", { "d": "M19 12H5" }]], "rotate-ccw": [["path", { "d": "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }], ["path", { "d": "M3 3v5h5" }]], "house": [["path", { "d": "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" }], ["path", { "d": "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }]], "layout-dashboard": [["rect", { "width": "7", "height": "9", "x": "3", "y": "3", "rx": "1" }], ["rect", { "width": "7", "height": "5", "x": "14", "y": "3", "rx": "1" }], ["rect", { "width": "7", "height": "9", "x": "14", "y": "12", "rx": "1" }], ["rect", { "width": "7", "height": "5", "x": "3", "y": "16", "rx": "1" }]], "folder": [["path", { "d": "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }]], "chart-column": [["path", { "d": "M3 3v16a2 2 0 0 0 2 2h16" }], ["path", { "d": "M18 17V9" }], ["path", { "d": "M13 17V5" }], ["path", { "d": "M8 17v-3" }]], "file-text": [["path", { "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { "d": "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { "d": "M10 9H8" }], ["path", { "d": "M16 13H8" }], ["path", { "d": "M16 17H8" }]], "mail": [["path", { "d": "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" }], ["rect", { "x": "2", "y": "4", "width": "20", "height": "16", "rx": "2" }]], "lock": [["rect", { "width": "18", "height": "11", "x": "3", "y": "11", "rx": "2", "ry": "2" }], ["path", { "d": "M7 11V7a5 5 0 0 1 10 0v4" }]], "clock": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 6v6l4 2" }]], "trending-up": [["path", { "d": "M16 7h6v6" }], ["path", { "d": "m22 7-8.5 8.5-5-5L2 17" }]], "trending-down": [["path", { "d": "M16 17h6v-6" }], ["path", { "d": "m22 17-8.5-8.5-5 5L2 7" }]], "image": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2", "ry": "2" }], ["circle", { "cx": "9", "cy": "9", "r": "2" }], ["path", { "d": "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]], "paperclip": [["path", { "d": "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" }]], "cloud-upload": [["path", { "d": "M12 13v8" }], ["path", { "d": "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" }], ["path", { "d": "m8 17 4-4 4 4" }]], "file": [["path", { "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { "d": "M14 2v5a1 1 0 0 0 1 1h5" }]], "sun": [["circle", { "cx": "12", "cy": "12", "r": "4" }], ["path", { "d": "M12 2v2" }], ["path", { "d": "M12 20v2" }], ["path", { "d": "m4.93 4.93 1.41 1.41" }], ["path", { "d": "m17.66 17.66 1.41 1.41" }], ["path", { "d": "M2 12h2" }], ["path", { "d": "M20 12h2" }], ["path", { "d": "m6.34 17.66-1.41 1.41" }], ["path", { "d": "m19.07 4.93-1.41 1.41" }]], "moon": [["path", { "d": "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" }]], "monitor": [["rect", { "width": "20", "height": "14", "x": "2", "y": "3", "rx": "2" }], ["line", { "x1": "8", "x2": "16", "y1": "21", "y2": "21" }], ["line", { "x1": "12", "x2": "12", "y1": "17", "y2": "21" }]] };
|
|
222
|
+
var ICONS = { "check": [["path", { "d": "M20 6 9 17l-5-5" }]], "x": [["path", { "d": "M18 6 6 18" }], ["path", { "d": "m6 6 12 12" }]], "plus": [["path", { "d": "M5 12h14" }], ["path", { "d": "M12 5v14" }]], "minus": [["path", { "d": "M5 12h14" }]], "search": [["path", { "d": "m21 21-4.34-4.34" }], ["circle", { "cx": "11", "cy": "11", "r": "8" }]], "chevron-down": [["path", { "d": "m6 9 6 6 6-6" }]], "chevron-up": [["path", { "d": "m18 15-6-6-6 6" }]], "chevron-left": [["path", { "d": "m15 18-6-6 6-6" }]], "chevron-right": [["path", { "d": "m9 18 6-6-6-6" }]], "arrow-right": [["path", { "d": "M5 12h14" }], ["path", { "d": "m12 5 7 7-7 7" }]], "arrow-up-right": [["path", { "d": "M7 7h10v10" }], ["path", { "d": "M7 17 17 7" }]], "arrow-up-down": [["path", { "d": "m21 16-4 4-4-4" }], ["path", { "d": "M17 20V4" }], ["path", { "d": "m3 8 4-4 4 4" }], ["path", { "d": "M7 4v16" }]], "loader-circle": [["path", { "d": "M21 12a9 9 0 1 1-6.219-8.56" }]], "circle-alert": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["line", { "x1": "12", "x2": "12", "y1": "8", "y2": "12" }], ["line", { "x1": "12", "x2": "12.01", "y1": "16", "y2": "16" }]], "circle-check": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "m16 9-5.5 5.5L8 12" }]], "info": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 16v-4" }], ["path", { "d": "M12 8h.01" }]], "triangle-alert": [["path", { "d": "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }], ["path", { "d": "M12 9v4" }], ["path", { "d": "M12 17h.01" }]], "settings": [["path", { "d": "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }], ["circle", { "cx": "12", "cy": "12", "r": "3" }]], "user": [["path", { "d": "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }], ["circle", { "cx": "12", "cy": "7", "r": "4" }]], "users": [["path", { "d": "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }], ["path", { "d": "M16 3.128a4 4 0 0 1 0 7.744" }], ["path", { "d": "M22 21v-2a4 4 0 0 0-3-3.87" }], ["circle", { "cx": "9", "cy": "7", "r": "4" }]], "filter": [["path", { "d": "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z" }]], "ellipsis": [["circle", { "cx": "12", "cy": "12", "r": "1" }], ["circle", { "cx": "19", "cy": "12", "r": "1" }], ["circle", { "cx": "5", "cy": "12", "r": "1" }]], "external-link": [["path", { "d": "M15 3h6v6" }], ["path", { "d": "M10 14 21 3" }], ["path", { "d": "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }]], "copy": [["rect", { "width": "14", "height": "14", "x": "8", "y": "8", "rx": "2", "ry": "2" }], ["path", { "d": "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }]], "trash-2": [["path", { "d": "M10 11v6" }], ["path", { "d": "M14 11v6" }], ["path", { "d": "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }], ["path", { "d": "M3 6h18" }], ["path", { "d": "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }]], "pencil": [["path", { "d": "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }], ["path", { "d": "m15 5 4 4" }]], "download": [["path", { "d": "M12 15V3" }], ["path", { "d": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }], ["path", { "d": "m7 10 5 5 5-5" }]], "upload": [["path", { "d": "M12 3v12" }], ["path", { "d": "m17 8-5-5-5 5" }], ["path", { "d": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }]], "calendar": [["path", { "d": "M8 2v3" }], ["path", { "d": "M16 2v3" }], ["rect", { "x": "3", "y": "3", "width": "18", "height": "18", "rx": "2" }], ["path", { "d": "M3 9h18" }]], "bell": [["path", { "d": "M10.268 21a2 2 0 0 0 3.464 0" }], ["path", { "d": "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" }]], "menu": [["path", { "d": "M4 5h16" }], ["path", { "d": "M4 12h16" }], ["path", { "d": "M4 19h16" }]], "eye": [["path", { "d": "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }], ["circle", { "cx": "12", "cy": "12", "r": "3" }]], "log-out": [["path", { "d": "m16 17 5-5-5-5" }], ["path", { "d": "M21 12H9" }], ["path", { "d": "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }]], "circle": [["circle", { "cx": "12", "cy": "12", "r": "10" }]], "circle-dot-dashed": [["path", { "d": "M10.1 2.18a9.93 9.93 0 0 1 3.8 0" }], ["path", { "d": "M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7" }], ["path", { "d": "M21.82 10.1a9.93 9.93 0 0 1 0 3.8" }], ["path", { "d": "M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69" }], ["path", { "d": "M13.9 21.82a9.94 9.94 0 0 1-3.8 0" }], ["path", { "d": "M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7" }], ["path", { "d": "M2.18 13.9a9.93 9.93 0 0 1 0-3.8" }], ["path", { "d": "M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69" }], ["circle", { "cx": "12", "cy": "12", "r": "1" }]], "ban": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M4.929 4.929 19.07 19.071" }]], "arrow-up": [["path", { "d": "m5 12 7-7 7 7" }], ["path", { "d": "M12 19V5" }]], "arrow-down": [["path", { "d": "M12 5v14" }], ["path", { "d": "m19 12-7 7-7-7" }]], "inbox": [["polyline", { "points": "22 12 16 12 14 15 10 15 8 12 2 12" }], ["path", { "d": "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" }]], "pin": [["path", { "d": "M12 17v5" }], ["path", { "d": "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" }]], "pin-off": [["path", { "d": "M12 17v5" }], ["path", { "d": "M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89" }], ["path", { "d": "m2 2 20 20" }], ["path", { "d": "M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11" }]], "eye-off": [["path", { "d": "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }], ["path", { "d": "M14.084 14.158a3 3 0 0 1-4.242-4.242" }], ["path", { "d": "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }], ["path", { "d": "m2 2 20 20" }]], "columns-3": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "M15 3v18" }]], "arrow-left": [["path", { "d": "m12 19-7-7 7-7" }], ["path", { "d": "M19 12H5" }]], "rotate-ccw": [["path", { "d": "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }], ["path", { "d": "M3 3v5h5" }]], "house": [["path", { "d": "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" }], ["path", { "d": "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }]], "layout-dashboard": [["rect", { "width": "7", "height": "9", "x": "3", "y": "3", "rx": "1" }], ["rect", { "width": "7", "height": "5", "x": "14", "y": "3", "rx": "1" }], ["rect", { "width": "7", "height": "9", "x": "14", "y": "12", "rx": "1" }], ["rect", { "width": "7", "height": "5", "x": "3", "y": "16", "rx": "1" }]], "folder": [["path", { "d": "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }]], "chart-column": [["path", { "d": "M3 3v16a2 2 0 0 0 2 2h16" }], ["path", { "d": "M18 17V9" }], ["path", { "d": "M13 17V5" }], ["path", { "d": "M8 17v-3" }]], "file-text": [["path", { "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { "d": "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { "d": "M10 9H8" }], ["path", { "d": "M16 13H8" }], ["path", { "d": "M16 17H8" }]], "mail": [["path", { "d": "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" }], ["rect", { "x": "2", "y": "4", "width": "20", "height": "16", "rx": "2" }]], "lock": [["rect", { "width": "18", "height": "11", "x": "3", "y": "11", "rx": "2", "ry": "2" }], ["path", { "d": "M7 11V7a5 5 0 0 1 10 0v4" }]], "clock": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 6v6l4 2" }]], "trending-up": [["path", { "d": "M16 7h6v6" }], ["path", { "d": "m22 7-8.5 8.5-5-5L2 17" }]], "trending-down": [["path", { "d": "M16 17h6v-6" }], ["path", { "d": "m22 17-8.5-8.5-5 5L2 7" }]], "image": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2", "ry": "2" }], ["circle", { "cx": "9", "cy": "9", "r": "2" }], ["path", { "d": "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]], "paperclip": [["path", { "d": "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" }]], "cloud-upload": [["path", { "d": "M12 13v8" }], ["path", { "d": "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" }], ["path", { "d": "m8 17 4-4 4 4" }]], "file": [["path", { "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { "d": "M14 2v5a1 1 0 0 0 1 1h5" }]], "sun": [["circle", { "cx": "12", "cy": "12", "r": "4" }], ["path", { "d": "M12 2v2" }], ["path", { "d": "M12 20v2" }], ["path", { "d": "m4.93 4.93 1.41 1.41" }], ["path", { "d": "m17.66 17.66 1.41 1.41" }], ["path", { "d": "M2 12h2" }], ["path", { "d": "M20 12h2" }], ["path", { "d": "m6.34 17.66-1.41 1.41" }], ["path", { "d": "m19.07 4.93-1.41 1.41" }]], "moon": [["path", { "d": "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" }]], "monitor": [["rect", { "width": "20", "height": "14", "x": "2", "y": "3", "rx": "2" }], ["line", { "x1": "8", "x2": "16", "y1": "21", "y2": "21" }], ["line", { "x1": "12", "x2": "12", "y1": "17", "y2": "21" }]], "panel-left-close": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "m16 15-3-3 3-3" }]], "panel-left-open": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "m14 9 3 3-3 3" }]] };
|
|
223
223
|
var SIZES = { sm: 16, md: 20, lg: 24 };
|
|
224
224
|
var Icon = React2.forwardRef(function Icon2(props, ref) {
|
|
225
225
|
const size = SIZES[props.size] || props.size || 16;
|
|
@@ -296,6 +296,8 @@ window.Aura = (() => {
|
|
|
296
296
|
breadcrumb: "Breadcrumb",
|
|
297
297
|
navigation: "Navigation",
|
|
298
298
|
openNav: "Open navigation",
|
|
299
|
+
collapseNav: "Collapse sidebar",
|
|
300
|
+
expandNav: "Expand sidebar",
|
|
299
301
|
searching: "Searching\u2026",
|
|
300
302
|
noMatches: "No matches",
|
|
301
303
|
clear: function(what) {
|
|
@@ -407,6 +409,8 @@ window.Aura = (() => {
|
|
|
407
409
|
breadcrumb: "\u0E40\u0E2A\u0E49\u0E19\u0E17\u0E32\u0E07",
|
|
408
410
|
navigation: "\u0E40\u0E21\u0E19\u0E39",
|
|
409
411
|
openNav: "\u0E40\u0E1B\u0E34\u0E14\u0E40\u0E21\u0E19\u0E39",
|
|
412
|
+
collapseNav: "\u0E22\u0E48\u0E2D\u0E41\u0E16\u0E1A\u0E40\u0E21\u0E19\u0E39",
|
|
413
|
+
expandNav: "\u0E02\u0E22\u0E32\u0E22\u0E41\u0E16\u0E1A\u0E40\u0E21\u0E19\u0E39",
|
|
410
414
|
searching: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E04\u0E49\u0E19\u0E2B\u0E32\u2026",
|
|
411
415
|
noMatches: "\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E19",
|
|
412
416
|
clear: function(what) {
|
|
@@ -518,6 +522,8 @@ window.Aura = (() => {
|
|
|
518
522
|
breadcrumb: "Br\xF6dsmulor",
|
|
519
523
|
navigation: "Navigering",
|
|
520
524
|
openNav: "\xD6ppna menyn",
|
|
525
|
+
collapseNav: "F\xE4ll ihop sidof\xE4ltet",
|
|
526
|
+
expandNav: "F\xE4ll ut sidof\xE4ltet",
|
|
521
527
|
searching: "S\xF6ker\u2026",
|
|
522
528
|
noMatches: "Inga tr\xE4ffar",
|
|
523
529
|
clear: function(what) {
|
|
@@ -655,7 +661,8 @@ window.Aura = (() => {
|
|
|
655
661
|
"disabled",
|
|
656
662
|
"linkComponent",
|
|
657
663
|
"href",
|
|
658
|
-
"fullWidth"
|
|
664
|
+
"fullWidth",
|
|
665
|
+
"size"
|
|
659
666
|
]);
|
|
660
667
|
const Tag3 = disabled ? "a" : Link;
|
|
661
668
|
return /* @__PURE__ */ React4.createElement(
|
|
@@ -667,7 +674,13 @@ window.Aura = (() => {
|
|
|
667
674
|
role: disabled ? "link" : void 0,
|
|
668
675
|
"aria-disabled": disabled || void 0,
|
|
669
676
|
tabIndex: disabled ? -1 : props.tabIndex,
|
|
670
|
-
className: cx(
|
|
677
|
+
className: cx(
|
|
678
|
+
"aura-btn",
|
|
679
|
+
"aura-btn--" + variant,
|
|
680
|
+
props.size === "sm" && "aura-btn--sm",
|
|
681
|
+
props.fullWidth && "aura-btn--full",
|
|
682
|
+
props.className
|
|
683
|
+
),
|
|
671
684
|
onClick: disabled ? void 0 : props.onClick
|
|
672
685
|
},
|
|
673
686
|
props.icon ? /* @__PURE__ */ React4.createElement(Icon, { name: props.icon }) : null,
|
|
@@ -693,7 +706,8 @@ window.Aura = (() => {
|
|
|
693
706
|
"iconRight",
|
|
694
707
|
"loading",
|
|
695
708
|
"onClick",
|
|
696
|
-
"fullWidth"
|
|
709
|
+
"fullWidth",
|
|
710
|
+
"size"
|
|
697
711
|
]);
|
|
698
712
|
return /* @__PURE__ */ React4.createElement(
|
|
699
713
|
"button",
|
|
@@ -704,6 +718,7 @@ window.Aura = (() => {
|
|
|
704
718
|
className: cx(
|
|
705
719
|
"aura-btn",
|
|
706
720
|
"aura-btn--" + variant,
|
|
721
|
+
props.size === "sm" && "aura-btn--sm",
|
|
707
722
|
props.fullWidth && "aura-btn--full",
|
|
708
723
|
loading && "is-loading",
|
|
709
724
|
props.className
|
|
@@ -3091,6 +3106,7 @@ window.Aura = (() => {
|
|
|
3091
3106
|
{ key: "owner", label: "OWNER" }
|
|
3092
3107
|
];
|
|
3093
3108
|
var SKELETON_WIDTHS = ["72%", "56%", "84%", "44%", "64%"];
|
|
3109
|
+
var STACK_WIDTHS = [360, 400, 480, 520, 560, 600, 640, 720, 768, 800, 900, 960, 1024];
|
|
3094
3110
|
var ROW_H_DEFAULT = 48;
|
|
3095
3111
|
var OVERSCAN = 8;
|
|
3096
3112
|
var FLEX_MIN = 160;
|
|
@@ -3157,6 +3173,7 @@ window.Aura = (() => {
|
|
|
3157
3173
|
const measure = !!props.stackBelow || columns.some(function(c) {
|
|
3158
3174
|
return c.hideBelow != null;
|
|
3159
3175
|
});
|
|
3176
|
+
const dual = !!props.stackBelow && boxWidth[0] == null && STACK_WIDTHS.indexOf(props.stackBelow) >= 0;
|
|
3160
3177
|
React28.useEffect(
|
|
3161
3178
|
function() {
|
|
3162
3179
|
if (!measure || !wrapRef.current || typeof ResizeObserver === "undefined") return;
|
|
@@ -3168,9 +3185,15 @@ window.Aura = (() => {
|
|
|
3168
3185
|
ro.disconnect();
|
|
3169
3186
|
};
|
|
3170
3187
|
},
|
|
3171
|
-
[measure]
|
|
3188
|
+
[measure, dual]
|
|
3172
3189
|
);
|
|
3173
3190
|
const stacked = !!props.stackBelow && boxWidth[0] != null && boxWidth[0] < props.stackBelow;
|
|
3191
|
+
useIsoLayoutEffect(
|
|
3192
|
+
function() {
|
|
3193
|
+
if (measure && boxWidth[0] == null && wrapRef.current) boxWidth[1](wrapRef.current.getBoundingClientRect().width);
|
|
3194
|
+
},
|
|
3195
|
+
[measure]
|
|
3196
|
+
);
|
|
3174
3197
|
function tooNarrow(c) {
|
|
3175
3198
|
if (c.hideBelow == null || boxWidth[0] == null || stacked) return false;
|
|
3176
3199
|
const px = typeof c.hideBelow === "number" ? c.hideBelow : BP[c.hideBelow];
|
|
@@ -3982,7 +4005,7 @@ window.Aura = (() => {
|
|
|
3982
4005
|
} else if (height && rows.length && !loading) {
|
|
3983
4006
|
foot = /* @__PURE__ */ React28.createElement("div", { className: "aura-table__foot" }, /* @__PURE__ */ React28.createElement("span", null, t.rowCount(shownTotal)), selectable && selected.length ? /* @__PURE__ */ React28.createElement("span", null, t.selectedCount(selected.length)) : /* @__PURE__ */ React28.createElement("span", null));
|
|
3984
4007
|
}
|
|
3985
|
-
|
|
4008
|
+
function renderStacked(wrapRefArg) {
|
|
3986
4009
|
const titleCol = vis[0], pillCol = vis.filter(function(c) {
|
|
3987
4010
|
return c.pill && c !== titleCol;
|
|
3988
4011
|
})[0];
|
|
@@ -4046,7 +4069,7 @@ window.Aura = (() => {
|
|
|
4046
4069
|
return /* @__PURE__ */ React28.createElement(
|
|
4047
4070
|
"div",
|
|
4048
4071
|
{
|
|
4049
|
-
ref:
|
|
4072
|
+
ref: wrapRefArg,
|
|
4050
4073
|
"data-density": props.density,
|
|
4051
4074
|
className: cx("aura-table aura-table--stacked", refreshing && "is-refreshing", props.className),
|
|
4052
4075
|
role: "region",
|
|
@@ -4067,15 +4090,16 @@ window.Aura = (() => {
|
|
|
4067
4090
|
foot
|
|
4068
4091
|
);
|
|
4069
4092
|
}
|
|
4093
|
+
if (stacked) return renderStacked(wrapMerged);
|
|
4070
4094
|
const scrollStyle = {
|
|
4071
4095
|
scrollPaddingLeft: "calc(var(--aura-space-6)" + selW + " + " + acc + "px)",
|
|
4072
4096
|
scrollPaddingTop: ROW_H + "px"
|
|
4073
4097
|
};
|
|
4074
4098
|
if (height) scrollStyle.height = height + "px";
|
|
4075
|
-
|
|
4099
|
+
const gridEl = /* @__PURE__ */ React28.createElement(
|
|
4076
4100
|
"div",
|
|
4077
4101
|
{
|
|
4078
|
-
ref: wrapMerged,
|
|
4102
|
+
ref: dual ? void 0 : wrapMerged,
|
|
4079
4103
|
"data-density": props.density,
|
|
4080
4104
|
className: cx("aura-table", scrolledX[0] && "is-scrolled-x", refreshing && "is-refreshing", props.className)
|
|
4081
4105
|
},
|
|
@@ -4131,6 +4155,8 @@ window.Aura = (() => {
|
|
|
4131
4155
|
}
|
|
4132
4156
|
) : null
|
|
4133
4157
|
);
|
|
4158
|
+
if (!dual) return gridEl;
|
|
4159
|
+
return /* @__PURE__ */ React28.createElement("div", { ref: wrapMerged, className: "aura-table-dual", "data-stack-below": props.stackBelow }, renderStacked(void 0), gridEl);
|
|
4134
4160
|
});
|
|
4135
4161
|
|
|
4136
4162
|
// src/Card.tsx
|
|
@@ -4243,6 +4269,7 @@ window.Aura = (() => {
|
|
|
4243
4269
|
|
|
4244
4270
|
// src/SideNav.tsx
|
|
4245
4271
|
var React31 = __toESM(require_react(), 1);
|
|
4272
|
+
var import_react_dom8 = __toESM(require_react_dom(), 1);
|
|
4246
4273
|
function contains(it, id) {
|
|
4247
4274
|
return !!id && !!it.children && it.children.some(function(c) {
|
|
4248
4275
|
return c.id === id || contains(c, id);
|
|
@@ -4258,6 +4285,39 @@ window.Aura = (() => {
|
|
|
4258
4285
|
props.onChange
|
|
4259
4286
|
);
|
|
4260
4287
|
const active = st[0];
|
|
4288
|
+
const col = useMaybeControlled(props.collapsed, !!props.defaultCollapsed, props.onCollapsedChange);
|
|
4289
|
+
const collapsed = col[0];
|
|
4290
|
+
const tipState = React31.useState(null), tip = tipState[0], setTip = tipState[1];
|
|
4291
|
+
React31.useEffect(
|
|
4292
|
+
function() {
|
|
4293
|
+
if (!collapsed) setTip(null);
|
|
4294
|
+
},
|
|
4295
|
+
[collapsed]
|
|
4296
|
+
);
|
|
4297
|
+
React31.useEffect(
|
|
4298
|
+
function() {
|
|
4299
|
+
if (!tip) return;
|
|
4300
|
+
function esc(e) {
|
|
4301
|
+
if (e.key === "Escape") setTip(null);
|
|
4302
|
+
}
|
|
4303
|
+
document.addEventListener("keydown", esc);
|
|
4304
|
+
return function() {
|
|
4305
|
+
document.removeEventListener("keydown", esc);
|
|
4306
|
+
};
|
|
4307
|
+
},
|
|
4308
|
+
[tip]
|
|
4309
|
+
);
|
|
4310
|
+
function tipHandlers(label) {
|
|
4311
|
+
if (!collapsed) return {};
|
|
4312
|
+
function show2(e) {
|
|
4313
|
+
const r = e.currentTarget.getBoundingClientRect();
|
|
4314
|
+
setTip({ text: label, top: r.top + r.height / 2, left: r.right + 8 });
|
|
4315
|
+
}
|
|
4316
|
+
function hide() {
|
|
4317
|
+
setTip(null);
|
|
4318
|
+
}
|
|
4319
|
+
return { onMouseEnter: show2, onFocus: show2, onMouseLeave: hide, onBlur: hide };
|
|
4320
|
+
}
|
|
4261
4321
|
const sections = props.sections || [{ items: props.items || [] }];
|
|
4262
4322
|
const openState = React31.useState({}), toggled = openState[0], setToggled = openState[1];
|
|
4263
4323
|
function isOpen(it) {
|
|
@@ -4303,8 +4363,10 @@ window.Aura = (() => {
|
|
|
4303
4363
|
visible[j].focus();
|
|
4304
4364
|
}
|
|
4305
4365
|
function inner(it, group, open) {
|
|
4366
|
+
const marked = it.count != null && it.count > 0 || it.badge != null;
|
|
4306
4367
|
return [
|
|
4307
|
-
it.icon ? /* @__PURE__ */ React31.createElement(Icon, { key: "i", name: it.icon }) : null,
|
|
4368
|
+
it.icon ? /* @__PURE__ */ React31.createElement(Icon, { key: "i", name: it.icon }) : collapsed ? /* @__PURE__ */ React31.createElement("span", { key: "i", className: "aura-nav__initial", "aria-hidden": "true" }, it.label.charAt(0)) : null,
|
|
4369
|
+
collapsed && marked ? /* @__PURE__ */ React31.createElement("span", { key: "d", className: "aura-nav__dot", "aria-hidden": "true" }) : null,
|
|
4308
4370
|
/* @__PURE__ */ React31.createElement("span", { key: "l", className: "aura-nav__label" }, it.label),
|
|
4309
4371
|
it.badge != null ? /* @__PURE__ */ React31.createElement("span", { key: "b", className: "aura-nav__badge" }, it.badge) : null,
|
|
4310
4372
|
it.count != null ? /* @__PURE__ */ React31.createElement("span", { key: "c", className: "aura-nav__count" }, it.count) : null,
|
|
@@ -4313,7 +4375,7 @@ window.Aura = (() => {
|
|
|
4313
4375
|
}
|
|
4314
4376
|
function item(it, depth) {
|
|
4315
4377
|
if (it.children) {
|
|
4316
|
-
const open = isOpen(it);
|
|
4378
|
+
const open = !collapsed && isOpen(it);
|
|
4317
4379
|
const listId = base + "-" + it.id;
|
|
4318
4380
|
const holdsActive = contains(it, active);
|
|
4319
4381
|
return /* @__PURE__ */ React31.createElement("li", { key: it.id, className: "aura-nav__group" }, /* @__PURE__ */ React31.createElement(
|
|
@@ -4324,10 +4386,15 @@ window.Aura = (() => {
|
|
|
4324
4386
|
"aria-expanded": open,
|
|
4325
4387
|
"aria-controls": listId,
|
|
4326
4388
|
style: depth ? { ["--aura-nav-depth"]: depth } : void 0,
|
|
4389
|
+
...tipHandlers(it.label),
|
|
4327
4390
|
onClick: function() {
|
|
4328
4391
|
const next = Object.assign({}, toggled);
|
|
4329
4392
|
next[it.id] = !open;
|
|
4330
4393
|
setToggled(next);
|
|
4394
|
+
if (collapsed) {
|
|
4395
|
+
setTip(null);
|
|
4396
|
+
col[1](false);
|
|
4397
|
+
}
|
|
4331
4398
|
},
|
|
4332
4399
|
onKeyDown: function(e) {
|
|
4333
4400
|
if (e.key === "ArrowRight" && !open) {
|
|
@@ -4346,6 +4413,7 @@ window.Aura = (() => {
|
|
|
4346
4413
|
}
|
|
4347
4414
|
const on = active === it.id;
|
|
4348
4415
|
const common = {
|
|
4416
|
+
...tipHandlers(it.label),
|
|
4349
4417
|
className: cx("aura-nav__item", on && "is-active"),
|
|
4350
4418
|
"aria-current": on ? "page" : void 0,
|
|
4351
4419
|
style: depth ? { ["--aura-nav-depth"]: depth } : void 0,
|
|
@@ -4364,7 +4432,8 @@ window.Aura = (() => {
|
|
|
4364
4432
|
if (typeof ref === "function") ref(el);
|
|
4365
4433
|
else if (ref) ref.current = el;
|
|
4366
4434
|
},
|
|
4367
|
-
className: cx("aura-nav", props.className),
|
|
4435
|
+
className: cx("aura-nav", collapsed && "aura-nav--collapsed", props.className),
|
|
4436
|
+
"data-collapsed": collapsed ? "" : void 0,
|
|
4368
4437
|
"aria-label": props.label || t.mainNav,
|
|
4369
4438
|
onKeyDown
|
|
4370
4439
|
},
|
|
@@ -4374,7 +4443,31 @@ window.Aura = (() => {
|
|
|
4374
4443
|
return item(it, 0);
|
|
4375
4444
|
})));
|
|
4376
4445
|
})),
|
|
4377
|
-
props.footer ? /* @__PURE__ */ React31.createElement("div", { className: "aura-nav__footer" }, props.footer) : null
|
|
4446
|
+
props.footer ? /* @__PURE__ */ React31.createElement("div", { className: "aura-nav__footer" }, props.footer) : null,
|
|
4447
|
+
props.collapsible ? /* @__PURE__ */ React31.createElement("div", { className: "aura-nav__toggle" }, /* @__PURE__ */ React31.createElement(
|
|
4448
|
+
IconButton,
|
|
4449
|
+
{
|
|
4450
|
+
icon: collapsed ? "panel-left-open" : "panel-left-close",
|
|
4451
|
+
label: collapsed ? t.expandNav : t.collapseNav,
|
|
4452
|
+
size: "md",
|
|
4453
|
+
onClick: function() {
|
|
4454
|
+
setTip(null);
|
|
4455
|
+
col[1](!collapsed);
|
|
4456
|
+
}
|
|
4457
|
+
}
|
|
4458
|
+
)) : null,
|
|
4459
|
+
tip && typeof document !== "undefined" ? (0, import_react_dom8.createPortal)(
|
|
4460
|
+
/* @__PURE__ */ React31.createElement(
|
|
4461
|
+
"div",
|
|
4462
|
+
{
|
|
4463
|
+
className: "aura-tooltip aura-tooltip--right",
|
|
4464
|
+
"aria-hidden": "true",
|
|
4465
|
+
style: { top: tip.top, left: tip.left }
|
|
4466
|
+
},
|
|
4467
|
+
tip.text
|
|
4468
|
+
),
|
|
4469
|
+
document.body
|
|
4470
|
+
) : null
|
|
4378
4471
|
);
|
|
4379
4472
|
});
|
|
4380
4473
|
|
|
@@ -4525,23 +4618,25 @@ window.Aura = (() => {
|
|
|
4525
4618
|
var AppShell = React38.forwardRef(function AppShell2(props, ref) {
|
|
4526
4619
|
const t = useStrings();
|
|
4527
4620
|
const bp = useBreakpoint();
|
|
4528
|
-
const
|
|
4621
|
+
const wide = bp === "lg" || bp === "xl";
|
|
4529
4622
|
const st = React38.useState(false), open = st[0], setOpen = st[1];
|
|
4530
4623
|
React38.useEffect(
|
|
4531
4624
|
function() {
|
|
4532
|
-
if (
|
|
4625
|
+
if (wide) setOpen(false);
|
|
4533
4626
|
},
|
|
4534
|
-
[
|
|
4627
|
+
[wide]
|
|
4535
4628
|
);
|
|
4536
|
-
const navEl = props.nav;
|
|
4537
|
-
const
|
|
4629
|
+
const navEl = props.nav && React38.isValidElement(props.nav) ? props.nav : null;
|
|
4630
|
+
const drawerNav = navEl ? React38.cloneElement(navEl, {
|
|
4538
4631
|
onChange: function(id) {
|
|
4539
4632
|
if (navEl.props.onChange) navEl.props.onChange(id);
|
|
4540
4633
|
setOpen(false);
|
|
4541
4634
|
},
|
|
4542
|
-
className: cx(navEl.props.className, "is-in-drawer")
|
|
4635
|
+
className: cx(navEl.props.className, "is-in-drawer"),
|
|
4636
|
+
collapsed: false,
|
|
4637
|
+
collapsible: false
|
|
4543
4638
|
}) : props.nav;
|
|
4544
|
-
return /* @__PURE__ */ React38.createElement("div", { ref, className: cx("aura-shell",
|
|
4639
|
+
return /* @__PURE__ */ React38.createElement("div", { ref, className: cx("aura-shell", props.className) }, props.nav ? /* @__PURE__ */ React38.createElement("div", { className: "aura-shell__nav" }, props.nav) : null, props.nav ? /* @__PURE__ */ React38.createElement(
|
|
4545
4640
|
Drawer,
|
|
4546
4641
|
{
|
|
4547
4642
|
open,
|
|
@@ -4553,10 +4648,11 @@ window.Aura = (() => {
|
|
|
4553
4648
|
"aria-label": props.navLabel || t.navigation,
|
|
4554
4649
|
dismissible: true
|
|
4555
4650
|
},
|
|
4556
|
-
|
|
4557
|
-
) : null, /* @__PURE__ */ React38.createElement("div", { className: "aura-shell__main" }, props.header ||
|
|
4651
|
+
drawerNav
|
|
4652
|
+
) : null, /* @__PURE__ */ React38.createElement("div", { className: "aura-shell__main" }, props.header || props.nav ? /* @__PURE__ */ React38.createElement("header", { className: cx("aura-shell__bar", !props.header && "aura-shell__bar--menu-only") }, props.nav ? /* @__PURE__ */ React38.createElement(
|
|
4558
4653
|
IconButton,
|
|
4559
4654
|
{
|
|
4655
|
+
className: "aura-shell__menu",
|
|
4560
4656
|
icon: "menu",
|
|
4561
4657
|
label: props.menuLabel || t.openNav,
|
|
4562
4658
|
size: "md",
|
|
@@ -4620,7 +4716,7 @@ window.Aura = (() => {
|
|
|
4620
4716
|
|
|
4621
4717
|
// src/TimePicker.tsx
|
|
4622
4718
|
var React41 = __toESM(require_react(), 1);
|
|
4623
|
-
var
|
|
4719
|
+
var import_react_dom9 = __toESM(require_react_dom(), 1);
|
|
4624
4720
|
function pad2(n2) {
|
|
4625
4721
|
return (n2 < 10 ? "0" : "") + n2;
|
|
4626
4722
|
}
|
|
@@ -4817,7 +4913,7 @@ window.Aura = (() => {
|
|
|
4817
4913
|
}
|
|
4818
4914
|
}
|
|
4819
4915
|
const error = errState[0] || props.error;
|
|
4820
|
-
const list = open && mounted && pos[0] ? (0,
|
|
4916
|
+
const list = open && mounted && pos[0] ? (0, import_react_dom9.createPortal)(
|
|
4821
4917
|
/* @__PURE__ */ React41.createElement("div", { ref: listRef, className: "aura-combo__popover aura-time__popover", style: pos[0] }, /* @__PURE__ */ React41.createElement("ul", { id: listId, role: "listbox", "aria-label": props.label, className: "aura-combo__list" }, slots.map(function(s, i) {
|
|
4822
4918
|
const dis = blocked(s), sel = s === value;
|
|
4823
4919
|
return /* @__PURE__ */ React41.createElement(
|
|
@@ -5592,7 +5688,10 @@ window.Aura = (() => {
|
|
|
5592
5688
|
rows
|
|
5593
5689
|
);
|
|
5594
5690
|
}
|
|
5595
|
-
const style = {
|
|
5691
|
+
const style = {
|
|
5692
|
+
width: props.width,
|
|
5693
|
+
height: props.height
|
|
5694
|
+
};
|
|
5596
5695
|
if (v === "circle") {
|
|
5597
5696
|
style.width = style.height = props.size || props.width || 40;
|
|
5598
5697
|
}
|
|
@@ -5769,7 +5868,7 @@ window.Aura = (() => {
|
|
|
5769
5868
|
|
|
5770
5869
|
// src/Popover.tsx
|
|
5771
5870
|
var React51 = __toESM(require_react(), 1);
|
|
5772
|
-
var
|
|
5871
|
+
var import_react_dom10 = __toESM(require_react_dom(), 1);
|
|
5773
5872
|
function position(anchor, pop, placement) {
|
|
5774
5873
|
const r = anchor.getBoundingClientRect(), pw = pop.offsetWidth, ph = pop.offsetHeight, vw = window.innerWidth, vh = window.innerHeight, gap = 6;
|
|
5775
5874
|
let side = (placement || "bottom-start").split("-")[0], align = (placement || "bottom-start").split("-")[1] || "start";
|
|
@@ -5833,7 +5932,7 @@ window.Aura = (() => {
|
|
|
5833
5932
|
[open, mounted]
|
|
5834
5933
|
);
|
|
5835
5934
|
const child = React51.Children.only(props.trigger);
|
|
5836
|
-
const panel = open && mounted ? (0,
|
|
5935
|
+
const panel = open && mounted ? (0, import_react_dom10.createPortal)(
|
|
5837
5936
|
/* @__PURE__ */ React51.createElement(
|
|
5838
5937
|
"div",
|
|
5839
5938
|
{
|