athena-ui-js 2.4.0 → 2.4.1
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 +24 -2
- package/docs/styling.md +123 -123
- package/package.json +4 -1
- package/src/athena-ui.js +1 -1
- package/src/libs/config/config.js +1 -1
- package/src/libs/hephaestus/codeGenerator/codeEditor.js +1037 -0
- package/src/libs/hephaestus/codeGenerator/codeGenerator.js +286 -0
- package/src/libs/hephaestus/widgetGrid/widgetGrid.js +870 -0
- package/types/athena-ui.d.ts +103 -103
- package/types/code.d.ts +4 -4
- package/types/libs/config/config.d.ts +3 -3
- package/types/libs/core/codeDiff.d.ts +32 -32
- package/types/libs/core/codeLanguages.d.ts +58 -58
- package/types/libs/hephaestus/codeGenerator/codeEditor.d.ts +60 -60
- package/types/libs/hephaestus/codeGenerator/codeGenerator.d.ts +99 -99
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ layout (header, menu, content wrapper, footer) from a single `init()` call, load
|
|
|
5
5
|
and theme, and ships the building blocks of a multipurpose application: forms, tables, charts,
|
|
6
6
|
feedback, navigation, a router and more.
|
|
7
7
|
|
|
8
|
-
Current version: **2.4.
|
|
8
|
+
Current version: **2.4.1**
|
|
9
9
|
|
|
10
10
|
[Quick start](#usage) · [API](#api) · [Components](#charts) · [Themes](#themes) · [Tests](#tests) · [Release notes](#releases)
|
|
11
11
|
|
|
@@ -149,7 +149,7 @@ It takes the options of `init()`. The header and footer follow the settings `gen
|
|
|
149
149
|
| `header_title_text` | `"Athena UI"` | Title in the header |
|
|
150
150
|
| `header_img_url` | | Header logo URL |
|
|
151
151
|
| `copyright` | placeholder text | Footer text, the version is appended |
|
|
152
|
-
| `version` | `"2.4.
|
|
152
|
+
| `version` | `"2.4.1"` | Version shown in the footer |
|
|
153
153
|
| `bordered` | `true` | Draw a border around the layout blocks |
|
|
154
154
|
| `generateHeader`, `generateFooter` | `true` | Generate the header / footer block |
|
|
155
155
|
| `generateHeadercontent`, `generateFooterContent`, `generateWrappercontent` | `true` | Generate the content of the block |
|
|
@@ -863,6 +863,28 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
|
|
863
863
|
|
|
864
864
|
## Releases
|
|
865
865
|
|
|
866
|
+
### 2.4.1
|
|
867
|
+
#### Fixed:
|
|
868
|
+
1. **2.3.0 and 2.4.0 were published without two folders** (`src/libs/hephaestus/widgetGrid` and `.../codeGenerator`): `import "athena-ui-js"`, `athena-ui-js/widgets` and `athena-ui-js/code` failed with "module not found". Both folders are in the package now. **Use 2.4.1 or later**; 2.3.0 and 2.4.0 should be deprecated.
|
|
869
|
+
#### Added:
|
|
870
|
+
1. `npm run check:package` (`scripts/check-package.mjs`): reads what `npm pack --dry-run` would publish and follows the imports of every entry point through that list; it runs in CI and in `npm test`, so a folder that is not on the `files` list fails the build instead of the users
|
|
871
|
+
|
|
872
|
+
### 2.4.0
|
|
873
|
+
#### Added:
|
|
874
|
+
1. `athena-ui-js/code`: `highlightCode`, `generateCodeBlock` (language label, copy button), `createDiffView`, `createCodeEditor` (a textarea over highlighted lines: indentation, closing brackets, comments, find and replace, completions, markers, read-only lines, own undo), ten languages and `registerLanguage`; token colours are theme tokens with a contrast test
|
|
875
|
+
2. The Code page of the demo
|
|
876
|
+
|
|
877
|
+
### 2.3.0
|
|
878
|
+
#### Added:
|
|
879
|
+
1. `athena-ui-js/widgets`: `registerWidget` and `createWidgetGrid`: a dashboard of widgets that can be added, configured, moved and resized with the pointer or the keyboard, locked, undone, saved and loaded as validated JSON, with a layout per breakpoint
|
|
880
|
+
2. The grid maths (`placeItem`, `compact`, `findFreeSpot`, `normalize`) as exports, and the Widgets page of the demo
|
|
881
|
+
|
|
882
|
+
### 2.2.0
|
|
883
|
+
#### Added:
|
|
884
|
+
1. Motion: the tokens `--athena-duration-*` and `--athena-ease-*` (0 under reduced motion), `athena-ui-js/motion` (`animate`, `flip`, `stagger`, `spring`, `tween`, `viewTransition`, `setMotion`), transitions of dialogs, toasts, popovers, the accordion and the menu, the first drawing of charts, a cross-fade of theme changes, `createRouter({ transition: true })`, `generateTable({ animateRows: true })` and `generateSkeleton`
|
|
885
|
+
#### Changed:
|
|
886
|
+
1. The blanket `transition: none` under reduced motion is gone: the durations are 0 instead; a closed dialog or toast stays in the page for the length of its exit transition (none under reduced motion)
|
|
887
|
+
|
|
866
888
|
### 2.1.0
|
|
867
889
|
#### Changed:
|
|
868
890
|
1. The dropdown menu is a native popover (`popover="auto"`, opened by its button through `popovertarget`): it is drawn in the top layer, so no parent with `overflow: hidden` cuts it off; a click outside and Esc close it and the focus goes back to the button; `aria-expanded` follows every way of opening and closing it. Markup: the menu has the attribute `popover` and no `hidden` any more (use `:popover-open`)
|
package/docs/styling.md
CHANGED
|
@@ -1,123 +1,123 @@
|
|
|
1
|
-
# Styling reference
|
|
2
|
-
|
|
3
|
-
Generated by `npm run docs` from `src/res/themes/default/style.css` and `tokens.css`. Do not edit by hand.
|
|
4
|
-
|
|
5
|
-
All Athena UI rules are in the cascade layer `athena`: a plain rule of your application (not in a layer) always wins, whatever its specificity.
|
|
6
|
-
Start with the tokens, they cover most of what people want to change.
|
|
7
|
-
|
|
8
|
-
## Tokens
|
|
9
|
-
|
|
10
|
-
| Variable | Default (light) |
|
|
11
|
-
| --- | --- |
|
|
12
|
-
| `--athena-accent` | `#8e44ad` |
|
|
13
|
-
| `--athena-radius` | `2px` |
|
|
14
|
-
| `--athena-bg` | `#fff` |
|
|
15
|
-
| `--athena-fg` | `#1a1a1a` |
|
|
16
|
-
| `--athena-muted` | `#666` |
|
|
17
|
-
| `--athena-border` | `#000` |
|
|
18
|
-
| `--athena-line` | `#ccc` |
|
|
19
|
-
| `--athena-surface` | `#f2f2f2` |
|
|
20
|
-
| `--athena-surface-alt` | `#fafafa` |
|
|
21
|
-
| `--athena-hover` | `#e8f0fe` |
|
|
22
|
-
| `--athena-overlay` | `rgb(0 0 0 / 40%)` |
|
|
23
|
-
| `--athena-accent` | `#2f6db5` |
|
|
24
|
-
| `--athena-accent-fg` | `#fff` |
|
|
25
|
-
| `--athena-focus` | `#1b4f8f` |
|
|
26
|
-
| `--athena-danger` | `#c0392b` |
|
|
27
|
-
| `--athena-success` | `#1e8449` |
|
|
28
|
-
| `--athena-warning` | `#9a6700` |
|
|
29
|
-
| `--athena-info` | `#2471a3` |
|
|
30
|
-
| `--athena-shadow` | `0 4px 14px rgb(0 0 0 / 18%)` |
|
|
31
|
-
| `--athena-tok-comment` | `#5a6270` |
|
|
32
|
-
| `--athena-tok-string` | `#0b6e3a` |
|
|
33
|
-
| `--athena-tok-number` | `#a24b00` |
|
|
34
|
-
| `--athena-tok-keyword` | `#7a2a9e` |
|
|
35
|
-
| `--athena-tok-literal` | `#0b5fa5` |
|
|
36
|
-
| `--athena-tok-function` | `#1f55b0` |
|
|
37
|
-
| `--athena-tok-type` | `#0f6b6b` |
|
|
38
|
-
| `--athena-tok-property` | `#9b2c5b` |
|
|
39
|
-
| `--athena-tok-tag` | `#a3201f` |
|
|
40
|
-
| `--athena-tok-attribute` | `#8a5300` |
|
|
41
|
-
| `--athena-tok-variable` | `#0a6a8a` |
|
|
42
|
-
| `--athena-tok-selector` | `#7a2a9e` |
|
|
43
|
-
| `--athena-tok-meta` | `#6b4eae` |
|
|
44
|
-
| `--athena-tok-entity` | `#0a6a8a` |
|
|
45
|
-
| `--athena-tok-builtin` | `#0b5fa5` |
|
|
46
|
-
| `--athena-tok-operator` | `#3b4048` |
|
|
47
|
-
| `--athena-tok-punctuation` | `#5a6270` |
|
|
48
|
-
| `--athena-radius` | `6px` |
|
|
49
|
-
| `--athena-border-width` | `1px` |
|
|
50
|
-
| `--athena-space-1` | `4px` |
|
|
51
|
-
| `--athena-space-2` | `8px` |
|
|
52
|
-
| `--athena-space-3` | `12px` |
|
|
53
|
-
| `--athena-space-4` | `16px` |
|
|
54
|
-
| `--grid-gap` | `16px` |
|
|
55
|
-
| `--athena-focus-width` | `2px` |
|
|
56
|
-
| `--athena-dialog-small` | `360px` |
|
|
57
|
-
| `--athena-dialog-medium` | `480px` |
|
|
58
|
-
| `--athena-dialog-large` | `720px` |
|
|
59
|
-
| `--athena-row-height` | `36px` |
|
|
60
|
-
| `--athena-duration-fast` | `120ms` |
|
|
61
|
-
| `--athena-duration-base` | `200ms` |
|
|
62
|
-
| `--athena-duration-slow` | `360ms` |
|
|
63
|
-
| `--athena-ease-standard` | `cubic-bezier(0.2, 0, 0, 1)` |
|
|
64
|
-
| `--athena-ease-in` | `cubic-bezier(0.4, 0, 1, 1)` |
|
|
65
|
-
| `--athena-ease-out` | `cubic-bezier(0, 0, 0.2, 1)` |
|
|
66
|
-
| `--athena-ease-spring` | `linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017 19.4%, 1.077 22.8%, 1.121 26.7%, 1.149 31.2%, 1.159 36.2%, 1.138 49.9%, 1.115 56.3%, 1.043 69.7%, 1.009 81.2%, 0.998 92.1%, 1)` |
|
|
67
|
-
|
|
68
|
-
Dark colours: set `data-mode="dark"` on `<html>` (or let `createThemeManager` do it); without the attribute the system decides. Themes: see `appearance.css`.
|
|
69
|
-
|
|
70
|
-
## Components
|
|
71
|
-
|
|
72
|
-
| Group of rules | Classes | Variables it reads |
|
|
73
|
-
| --- | --- | --- |
|
|
74
|
-
| General | - | `--athena-accent` `--athena-bg` `--athena-border-width` `--athena-fg` `--athena-line` |
|
|
75
|
-
| Header, Wrapper, Footer | `.footer-container` `.header-container` `.wrapper-container` | - |
|
|
76
|
-
| Elements | `.container` `.default-cointainer-bordered` `.menu` | `--athena-border` |
|
|
77
|
-
| Modal (background) | `.modal` `.modal-content` | `--athena-bg` `--athena-border-width` `--athena-fg` `--athena-line` `--athena-overlay` |
|
|
78
|
-
| Modal close button | `.close` | `--athena-fg` `--athena-muted` |
|
|
79
|
-
| Buttons | `.athena-button` `.button-danger` `.button-large` `.button-link` `.button-secondary` `.button-small` | `--athena-accent` `--athena-accent-fg` `--athena-danger` `--athena-fg` `--athena-line` `--athena-radius` `--athena-surface` |
|
|
80
|
-
| Forms | `.athena-form` `.choice` `.choices` `.field` `.field-error` `.field-group` `.field-help` `.field-invalid` `.field-label` `.field-required` `.form-actions` `.form-message` `.form-message-error` `.form-message-success` | `--athena-border-width` `--athena-danger` `--athena-line` `--athena-muted` `--athena-radius` `--athena-space-1` `--athena-space-2` `--athena-space-3` `--athena-success` |
|
|
81
|
-
| Switch: a checkbox drawn as a toggle | `.switch` `.switch-track` | `--athena-accent` `--athena-duration-fast` `--athena-ease-standard` `--athena-line` |
|
|
82
|
-
| Spinner, alerts, toasts, progress | `.alert` `.alert-body` `.alert-close` `.alert-error` `.alert-info` `.alert-success` `.alert-warning` `.button-loading` `.progress-bar` `.progress-error` `.progress-fill` `.progress-indeterminate` `.progress-label` `.progress-success` `.progress-warning` `.spinner` `.spinner-large` `.spinner-small` `.toast` `.toast-container` | `--alert-color` `--athena-accent` `--athena-border-width` `--athena-danger` `--athena-duration-base` `--athena-ease-standard` `--athena-fg` `--athena-info` `--athena-line` `--athena-muted` `--athena-radius` `--athena-shadow` `--athena-space-2` `--athena-space-3` `--athena-success` `--athena-surface` `--athena-surface-alt` `--athena-warning` `--progress-color` |
|
|
83
|
-
| Dialog: the native <dialog> element, opened with showModal() | `.dialog` | `--athena-bg` `--athena-border-width` `--athena-dialog-medium` `--athena-fg` `--athena-line` `--athena-overlay` `--athena-radius` `--athena-shadow` `--dialog-width` |
|
|
84
|
-
| The content fills the dialog up to its edge, so a click on the backdrop is a click on the dialog element itself | `.dialog-body` `.dialog-close` `.dialog-footer` `.dialog-full` `.dialog-inner` `.dialog-large` `.dialog-medium` `.dialog-small` `.dialog-title` | `--athena-dialog-large` `--athena-dialog-medium` `--athena-dialog-small` `--athena-muted` `--athena-space-2` |
|
|
85
|
-
| Tabs | `.tab` `.tab-active` `.tab-list` `.tab-panel` | `--athena-accent` `--athena-border-width` `--athena-fg` `--athena-line` |
|
|
86
|
-
| Breadcrumbs, pagination | `.breadcrumb-item` `.breadcrumb-list` `.page-button` `.page-current` `.pagination` | `--athena-accent` `--athena-accent-fg` `--athena-bg` `--athena-border-width` `--athena-fg` `--athena-line` `--athena-muted` `--athena-space-1` |
|
|
87
|
-
| Accordion: <details> and <summary> | `.accordion-header` `.accordion-icon` `.accordion-item` `.accordion-panel` `.sidebar-parent` | `--athena-accent` `--athena-border-width` `--athena-duration-fast` `--athena-ease-standard` `--athena-fg` `--athena-focus` `--athena-focus-width` `--athena-line` `--athena-surface` |
|
|
88
|
-
| Dropdown | `.dropdown` `.dropdown-menu` `.dropdown-right` | `--athena-bg` `--athena-border-width` `--athena-line` `--athena-radius` `--athena-shadow` |
|
|
89
|
-
| A popover (the dropdown menu, the tooltip) is in the top layer, placed next to its anchor by script through two variables | `.athena-popover` `.athena-popover-above` `.athena-popover-center` `.athena-popover-end` `.dropdown-divider` `.dropdown-item` `.dropdown-menu` | `--athena-fg` `--athena-hover` `--athena-line` `--athena-popover-left` `--athena-popover-top` |
|
|
90
|
-
| Sidebar | `.accordion-icon` `.sidebar` `.sidebar-link` `.sidebar-list` `.sidebar-parent` `.sidebar-sublist` `.sidebar-toggle` | `--athena-accent` `--athena-accent-fg` `--athena-fg` `--athena-hover` `--athena-space-2` |
|
|
91
|
-
| Cards, sections, grid | `.athena-grid` `.card` `.card-body` `.card-footer` `.card-image` `.card-title` | `--athena-bg` `--athena-border-width` `--athena-line` `--athena-radius` `--athena-surface-alt` `--grid-columns` `--grid-gap` |
|
|
92
|
-
| Badge, avatar, stat | `.avatar` `.avatar-large` `.avatar-small` `.badge` `.badge-error` `.badge-info` `.badge-pill` `.badge-success` `.badge-warning` `.stat` `.stat-bad` `.stat-good` `.stat-label` `.stat-neutral` `.stat-value` | `--athena-accent` `--athena-accent-fg` `--athena-bg` `--athena-border-width` `--athena-danger` `--athena-fg` `--athena-info` `--athena-line` `--athena-muted` `--athena-radius` `--athena-success` `--athena-surface` `--athena-warning` |
|
|
93
|
-
| Tooltip | `.has-tooltip` `.tooltip-text` `.tooltip-wrap` | `--athena-duration-fast` `--athena-ease-standard` |
|
|
94
|
-
| As a popover it is only drawn while it is open, so it is always visible; the position comes from placePopover() | `.tooltip-text` | - |
|
|
95
|
-
| Combobox (autocomplete, multi select) and chips | `.chip` `.chip-remove` `.combobox` `.combobox-active` `.combobox-chips` `.combobox-empty` `.combobox-input` `.combobox-list` `.combobox-multiple` `.combobox-option` `.combobox-selected` | `--athena-accent` `--athena-accent-fg` `--athena-bg` `--athena-border-width` `--athena-hover` `--athena-line` `--athena-muted` `--athena-radius` `--athena-shadow` `--athena-space-1` |
|
|
96
|
-
| File upload | `.dropzone` `.dropzone-disabled` `.dropzone-input` `.dropzone-over` `.file-item` `.file-list` `.file-status` | `--athena-accent` `--athena-hover` `--athena-line` `--athena-muted` `--athena-radius` |
|
|
97
|
-
| Stepper | `.form-actions` `.stepper` `.stepper-current` `.stepper-done` `.stepper-number` `.stepper-step` `.stepper-steps` | `--athena-accent` `--athena-accent-fg` `--athena-fg` `--athena-line` `--athena-muted` `--athena-space-2` `--athena-success` |
|
|
98
|
-
| Tables | `.athena-table` `.athena-table-edit` `.athena-table-filter` `.athena-table-pager` `.athena-table-select` `.athena-table-wrapper` `.clickable` `.editable` `.selected` `.sortable` | `--athena-accent` `--athena-border-width` `--athena-hover` `--athena-line` `--athena-surface` `--athena-surface-alt` |
|
|
99
|
-
| Table options: density, wrapping, alignment | `.athena-align-center` `.athena-align-right` `.athena-table` `.athena-table-compact` `.athena-table-nowrap` `.athena-table-wrap` | `--athena-focus` `--athena-focus-width` |
|
|
100
|
-
| Charts | `.athena-chart` `.chart-axis` `.chart-bar` `.chart-grid` `.chart-legend` `.chart-slice` `.chart-tick` `.chart-title` | `--athena-bg` `--athena-fg` `--athena-line` `--athena-muted` |
|
|
101
|
-
| Responsive | `.athena-form` `.athena-grid` `.file-item` `.file-progress` `.modal` `.modal-content` `.sidebar` `.sidebar-list` `.sidebar-open` `.sidebar-toggle` `.stepper-title` | - |
|
|
102
|
-
| Reduced motion: a spinner and an indeterminate bar still have to say "busy", but slowly. The transitions read the duration tokens (0). | `.progress-fill` `.progress-indeterminate` `.spinner` | - |
|
|
103
|
-
| Menu submenus | `.has-submenu` `.menu-parent` `.submenu` `.submenu-item` | `--athena-bg` `--athena-border-width` `--athena-hover` `--athena-line` `--athena-radius` `--athena-shadow` |
|
|
104
|
-
| Table: resizable columns, virtual scrolling | `.athena-col-resizer` `.athena-table` `.athena-table-resizable` `.athena-table-scroll` `.athena-table-spacer` `.athena-table-virtual` `.resizing` | `--athena-accent` `--athena-border-width` `--athena-line` `--athena-row-height` `--row-height` |
|
|
105
|
-
| Date range | `.daterange` `.daterange-part` | - |
|
|
106
|
-
| Rich text editor | `.richtext` `.rt-bold` `.rt-button` `.rt-disabled` `.rt-editor` `.rt-empty` `.rt-italic` `.rt-separator` `.rt-source-view` `.rt-strike` `.rt-toolbar` `.rt-underline` `.submenu` | `--athena-accent` `--athena-accent-fg` `--athena-bg` `--athena-border-width` `--athena-fg` `--athena-hover` `--athena-line` `--athena-muted` `--athena-radius` `--athena-surface` |
|
|
107
|
-
| Theme picker (generateThemePicker). The preview is drawn with the colours of the theme it shows. | `.theme-picker` `.theme-picker-description` `.theme-picker-group` `.theme-picker-option` `.theme-picker-options` `.theme-preview` `.theme-preview-bar` `.theme-preview-body` `.theme-preview-button` `.theme-preview-line` | `--athena-accent` `--athena-bg` `--athena-border-width` `--athena-fg` `--athena-focus` `--athena-focus-width` `--athena-line` `--athena-muted` `--athena-radius` `--athena-space-1` `--athena-space-3` `--athena-space-4` |
|
|
108
|
-
| Tables with a data source and row actions | `.athena-button` `.athena-chart` `.athena-chart-sparkline` `.athena-table` `.athena-table-actions` `.athena-table-error` `.athena-table-is-loading` `.athena-table-loading` `.athena-visually-hidden` `.chart-area` `.chart-bar` `.chart-data` `.chart-hidden` `.chart-legend-item` `.chart-line` `.chart-point` `.chart-ring` `.chart-slice` `.chart-swatch` `.chart-tooltip` `.chart-tooltip-box` `.chart-tooltip-text` `.is-off` `.is-visible` `.s1` `.s2` `.s3` `.s4` `.s5` `.s6` `.s7` `.s8` | `--athena-bg` `--athena-danger` `--athena-fg` `--athena-focus` `--athena-focus-width` `--athena-muted` `--series-1` `--series-2` `--series-3` `--series-4` `--series-5` `--series-6` `--series-7` `--series-8` |
|
|
109
|
-
| Menu (generateMenu): a bar, or tabs at the bottom of the screen with sheets for the groups | `.athena-menu` `.athena-menu-list` `.has-active` `.is-active` `.menu-avatar` `.menu-control` `.menu-icon` `.menu-item` `.menu-item-end` `.menu-sheet` | `--athena-accent` `--athena-accent-fg` `--athena-bg` `--athena-border-width` `--athena-fg` `--athena-focus` `--athena-focus-width` `--athena-hover` `--athena-line` `--athena-radius` `--athena-shadow` |
|
|
110
|
-
| Tabs at the bottom (layout "responsive" switches to it under 700px) | `.athena-menu-bottom-tabs` `.athena-menu-list` `.athena-menu-responsive` `.menu-control` `.menu-item` `.menu-item-end` `.menu-sheet` | `--athena-bg` `--athena-border-width` `--athena-line` `--athena-radius` |
|
|
111
|
-
| Menu: groups inside groups, and badges | `.athena-menu` `.athena-menu-bottom-tabs` `.athena-menu-responsive` `.athena-table-placeholder` `.athena-table-status` `.menu-badge` `.menu-badge-bad` `.menu-badge-info` `.menu-badge-ok` `.menu-badge-warn` `.menu-caret` `.menu-sheet` `.menu-sheet-nested` | `--athena-accent` `--athena-accent-fg` `--athena-danger` `--athena-info` `--athena-muted` `--athena-success` `--athena-warning` |
|
|
112
|
-
| Charts: pointer layer, zoom | `.athena-chart` `.chart-hit` `.chart-marker` `.chart-reset` `.chart-selection` | `--athena-accent` `--athena-focus` `--athena-focus-width` `--athena-muted` |
|
|
113
|
-
| Page header, facts, empty state, loading, stat tone and note | `.athena-popover` `.athena-popover-above` `.dialog` `.empty-icon` `.empty-message` `.empty-state` `.empty-title` `.fact` `.facts` `.facts-inline` `.is-bad` `.is-ok` `.is-warn` `.loading-state` `.page-actions` `.page-description` `.page-header` `.page-header-row` `.page-title` `.stat` `.stat-note` `.stat-value` | `--athena-danger` `--athena-duration-base` `--athena-duration-fast` `--athena-ease-out` `--athena-fg` `--athena-muted` `--athena-space-2` `--athena-space-3` `--athena-success` `--athena-warning` |
|
|
114
|
-
| Toasts slide in from the side, and out again when they are closed | `.is-leaving` `.toast` | `--athena-duration-base` `--athena-ease-out` |
|
|
115
|
-
| The panel of an accordion opens and closes smoothly (a browser without ::details-content opens it at once) | `.accordion-item` | `--athena-duration-base` `--athena-ease-standard` |
|
|
116
|
-
| The mark of the active item, and hover, move gently | `.athena-menu` `.menu-control` | `--athena-duration-fast` `--athena-ease-standard` |
|
|
117
|
-
| A place holder for what is loading: a skeleton with a shimmer (generateSkeleton) | `.athena-skeleton` `.athena-skeleton-line` | `--athena-hover` `--athena-radius` `--athena-space-2` `--athena-surface` |
|
|
118
|
-
| A theme or mode change cross-fades instead of flashing (the theme manager sets the class for a moment) | `.athena-switching` | `--athena-duration-slow` `--athena-ease-standard` |
|
|
119
|
-
| Page transitions of the router (router({ transition: true })) | - | `--athena-duration-base` `--athena-ease-standard` |
|
|
120
|
-
| Charts draw themselves when they appear: bars grow, lines are drawn, slices pop in (only the first time, not when a chart streams or is zoomed) | `.athena-chart-animated` `.athena-code` `.athena-widget-grid` `.chart-area` `.chart-bar` `.chart-line` `.chart-point` `.chart-slice` `.code-digits-1` `.code-digits-2` `.code-digits-3` `.code-digits-4` `.code-digits-5` `.code-digits-6` `.code-digits-7` `.code-editor` `.code-editor-input` `.code-line` `.code-tab-1` `.code-tab-10` `.code-tab-11` `.code-tab-12` `.code-tab-13` `.code-tab-14` `.code-tab-15` `.code-tab-16` `.code-tab-2` `.code-tab-3` `.code-tab-4` `.code-tab-5` `.code-tab-6` `.code-tab-7` `.code-tab-8` `.code-tab-9` `.code-wrap` `.has-line-numbers` `.is-dragging` `.is-editable` `.is-failed` `.is-highlighted` `.is-locked` `.is-unknown` `.tok-attribute` `.tok-builtin` `.tok-comment` `.tok-entity` `.tok-function` `.tok-keyword` `.tok-literal` `.tok-meta` `.tok-number` `.tok-operator` `.tok-property` `.tok-punctuation` `.tok-selector` `.tok-string` `.tok-tag` `.tok-type` `.tok-variable` `.widget` `.widget-action` `.widget-actions` `.widget-body` `.widget-handle` `.widget-header` `.widget-note` `.widget-resize` `.widget-resize-e` `.widget-resize-n` `.widget-resize-ne` `.widget-resize-nw` `.widget-resize-s` `.widget-resize-se` `.widget-resize-sw` `.widget-resize-w` `.widget-title` | `--athena-accent` `--athena-accent-fg` `--athena-border` `--athena-border-width` `--athena-duration-fast` `--athena-duration-slow` `--athena-ease-out` `--athena-ease-standard` `--athena-fg` `--athena-focus` `--athena-focus-width` `--athena-hover` `--athena-line` `--athena-muted` `--athena-radius` `--athena-shadow` `--athena-surface` `--athena-surface-alt` `--athena-tok-attribute` `--athena-tok-builtin` `--athena-tok-comment` `--athena-tok-entity` `--athena-tok-function` `--athena-tok-keyword` `--athena-tok-literal` `--athena-tok-meta` `--athena-tok-number` `--athena-tok-operator` `--athena-tok-property` `--athena-tok-punctuation` `--athena-tok-selector` `--athena-tok-string` `--athena-tok-tag` `--athena-tok-type` `--athena-tok-variable` `--code-gutter` |
|
|
121
|
-
| A block: the language, a copy button, the code | `.athena-code` `.code-block` `.code-block-copy` `.code-block-header` `.code-find-button` `.code-find-input` | `--athena-bg` `--athena-border-width` `--athena-fg` `--athena-focus` `--athena-focus-width` `--athena-hover` `--athena-line` `--athena-muted` `--athena-radius` `--athena-surface` |
|
|
122
|
-
| The editor | `.code-completion` `.code-completion-detail` `.code-completions` `.code-editor` `.code-editor-highlight` `.code-editor-input` `.code-editor-scroll` `.code-editor-status` `.code-find` `.code-find-button` `.code-find-count` `.code-find-input` `.code-find-row` `.code-line` `.code-wrap` `.has-line-numbers` `.has-marker` `.is-active` `.is-current` `.is-locked-line` `.is-plain` `.is-readonly` `.marker-error` `.marker-info` `.marker-warning` | `--athena-accent` `--athena-accent-fg` `--athena-bg` `--athena-border` `--athena-border-width` `--athena-danger` `--athena-fg` `--athena-focus` `--athena-focus-width` `--athena-info` `--athena-line` `--athena-muted` `--athena-radius` `--athena-shadow` `--athena-surface` `--athena-surface-alt` `--athena-warning` `--code-completion-left` `--code-completion-top` `--code-editor-max-height` `--code-editor-min-height` `--code-gutter` |
|
|
123
|
-
| The diff view | `.code-diff` `.code-diff-body` `.code-diff-cell` `.code-diff-code` `.code-diff-empty` `.code-diff-header` `.code-diff-mark` `.code-diff-number` `.code-diff-row` `.code-diff-skip` `.code-diff-stat` `.code-line` `.is-added` `.is-empty` `.is-removed` `.is-skip` `.is-split` | `--athena-accent` `--athena-border-width` `--athena-danger` `--athena-line` `--athena-muted` `--athena-radius` `--athena-success` `--athena-surface` |
|
|
1
|
+
# Styling reference
|
|
2
|
+
|
|
3
|
+
Generated by `npm run docs` from `src/res/themes/default/style.css` and `tokens.css`. Do not edit by hand.
|
|
4
|
+
|
|
5
|
+
All Athena UI rules are in the cascade layer `athena`: a plain rule of your application (not in a layer) always wins, whatever its specificity.
|
|
6
|
+
Start with the tokens, they cover most of what people want to change.
|
|
7
|
+
|
|
8
|
+
## Tokens
|
|
9
|
+
|
|
10
|
+
| Variable | Default (light) |
|
|
11
|
+
| --- | --- |
|
|
12
|
+
| `--athena-accent` | `#8e44ad` |
|
|
13
|
+
| `--athena-radius` | `2px` |
|
|
14
|
+
| `--athena-bg` | `#fff` |
|
|
15
|
+
| `--athena-fg` | `#1a1a1a` |
|
|
16
|
+
| `--athena-muted` | `#666` |
|
|
17
|
+
| `--athena-border` | `#000` |
|
|
18
|
+
| `--athena-line` | `#ccc` |
|
|
19
|
+
| `--athena-surface` | `#f2f2f2` |
|
|
20
|
+
| `--athena-surface-alt` | `#fafafa` |
|
|
21
|
+
| `--athena-hover` | `#e8f0fe` |
|
|
22
|
+
| `--athena-overlay` | `rgb(0 0 0 / 40%)` |
|
|
23
|
+
| `--athena-accent` | `#2f6db5` |
|
|
24
|
+
| `--athena-accent-fg` | `#fff` |
|
|
25
|
+
| `--athena-focus` | `#1b4f8f` |
|
|
26
|
+
| `--athena-danger` | `#c0392b` |
|
|
27
|
+
| `--athena-success` | `#1e8449` |
|
|
28
|
+
| `--athena-warning` | `#9a6700` |
|
|
29
|
+
| `--athena-info` | `#2471a3` |
|
|
30
|
+
| `--athena-shadow` | `0 4px 14px rgb(0 0 0 / 18%)` |
|
|
31
|
+
| `--athena-tok-comment` | `#5a6270` |
|
|
32
|
+
| `--athena-tok-string` | `#0b6e3a` |
|
|
33
|
+
| `--athena-tok-number` | `#a24b00` |
|
|
34
|
+
| `--athena-tok-keyword` | `#7a2a9e` |
|
|
35
|
+
| `--athena-tok-literal` | `#0b5fa5` |
|
|
36
|
+
| `--athena-tok-function` | `#1f55b0` |
|
|
37
|
+
| `--athena-tok-type` | `#0f6b6b` |
|
|
38
|
+
| `--athena-tok-property` | `#9b2c5b` |
|
|
39
|
+
| `--athena-tok-tag` | `#a3201f` |
|
|
40
|
+
| `--athena-tok-attribute` | `#8a5300` |
|
|
41
|
+
| `--athena-tok-variable` | `#0a6a8a` |
|
|
42
|
+
| `--athena-tok-selector` | `#7a2a9e` |
|
|
43
|
+
| `--athena-tok-meta` | `#6b4eae` |
|
|
44
|
+
| `--athena-tok-entity` | `#0a6a8a` |
|
|
45
|
+
| `--athena-tok-builtin` | `#0b5fa5` |
|
|
46
|
+
| `--athena-tok-operator` | `#3b4048` |
|
|
47
|
+
| `--athena-tok-punctuation` | `#5a6270` |
|
|
48
|
+
| `--athena-radius` | `6px` |
|
|
49
|
+
| `--athena-border-width` | `1px` |
|
|
50
|
+
| `--athena-space-1` | `4px` |
|
|
51
|
+
| `--athena-space-2` | `8px` |
|
|
52
|
+
| `--athena-space-3` | `12px` |
|
|
53
|
+
| `--athena-space-4` | `16px` |
|
|
54
|
+
| `--grid-gap` | `16px` |
|
|
55
|
+
| `--athena-focus-width` | `2px` |
|
|
56
|
+
| `--athena-dialog-small` | `360px` |
|
|
57
|
+
| `--athena-dialog-medium` | `480px` |
|
|
58
|
+
| `--athena-dialog-large` | `720px` |
|
|
59
|
+
| `--athena-row-height` | `36px` |
|
|
60
|
+
| `--athena-duration-fast` | `120ms` |
|
|
61
|
+
| `--athena-duration-base` | `200ms` |
|
|
62
|
+
| `--athena-duration-slow` | `360ms` |
|
|
63
|
+
| `--athena-ease-standard` | `cubic-bezier(0.2, 0, 0, 1)` |
|
|
64
|
+
| `--athena-ease-in` | `cubic-bezier(0.4, 0, 1, 1)` |
|
|
65
|
+
| `--athena-ease-out` | `cubic-bezier(0, 0, 0.2, 1)` |
|
|
66
|
+
| `--athena-ease-spring` | `linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017 19.4%, 1.077 22.8%, 1.121 26.7%, 1.149 31.2%, 1.159 36.2%, 1.138 49.9%, 1.115 56.3%, 1.043 69.7%, 1.009 81.2%, 0.998 92.1%, 1)` |
|
|
67
|
+
|
|
68
|
+
Dark colours: set `data-mode="dark"` on `<html>` (or let `createThemeManager` do it); without the attribute the system decides. Themes: see `appearance.css`.
|
|
69
|
+
|
|
70
|
+
## Components
|
|
71
|
+
|
|
72
|
+
| Group of rules | Classes | Variables it reads |
|
|
73
|
+
| --- | --- | --- |
|
|
74
|
+
| General | - | `--athena-accent` `--athena-bg` `--athena-border-width` `--athena-fg` `--athena-line` |
|
|
75
|
+
| Header, Wrapper, Footer | `.footer-container` `.header-container` `.wrapper-container` | - |
|
|
76
|
+
| Elements | `.container` `.default-cointainer-bordered` `.menu` | `--athena-border` |
|
|
77
|
+
| Modal (background) | `.modal` `.modal-content` | `--athena-bg` `--athena-border-width` `--athena-fg` `--athena-line` `--athena-overlay` |
|
|
78
|
+
| Modal close button | `.close` | `--athena-fg` `--athena-muted` |
|
|
79
|
+
| Buttons | `.athena-button` `.button-danger` `.button-large` `.button-link` `.button-secondary` `.button-small` | `--athena-accent` `--athena-accent-fg` `--athena-danger` `--athena-fg` `--athena-line` `--athena-radius` `--athena-surface` |
|
|
80
|
+
| Forms | `.athena-form` `.choice` `.choices` `.field` `.field-error` `.field-group` `.field-help` `.field-invalid` `.field-label` `.field-required` `.form-actions` `.form-message` `.form-message-error` `.form-message-success` | `--athena-border-width` `--athena-danger` `--athena-line` `--athena-muted` `--athena-radius` `--athena-space-1` `--athena-space-2` `--athena-space-3` `--athena-success` |
|
|
81
|
+
| Switch: a checkbox drawn as a toggle | `.switch` `.switch-track` | `--athena-accent` `--athena-duration-fast` `--athena-ease-standard` `--athena-line` |
|
|
82
|
+
| Spinner, alerts, toasts, progress | `.alert` `.alert-body` `.alert-close` `.alert-error` `.alert-info` `.alert-success` `.alert-warning` `.button-loading` `.progress-bar` `.progress-error` `.progress-fill` `.progress-indeterminate` `.progress-label` `.progress-success` `.progress-warning` `.spinner` `.spinner-large` `.spinner-small` `.toast` `.toast-container` | `--alert-color` `--athena-accent` `--athena-border-width` `--athena-danger` `--athena-duration-base` `--athena-ease-standard` `--athena-fg` `--athena-info` `--athena-line` `--athena-muted` `--athena-radius` `--athena-shadow` `--athena-space-2` `--athena-space-3` `--athena-success` `--athena-surface` `--athena-surface-alt` `--athena-warning` `--progress-color` |
|
|
83
|
+
| Dialog: the native <dialog> element, opened with showModal() | `.dialog` | `--athena-bg` `--athena-border-width` `--athena-dialog-medium` `--athena-fg` `--athena-line` `--athena-overlay` `--athena-radius` `--athena-shadow` `--dialog-width` |
|
|
84
|
+
| The content fills the dialog up to its edge, so a click on the backdrop is a click on the dialog element itself | `.dialog-body` `.dialog-close` `.dialog-footer` `.dialog-full` `.dialog-inner` `.dialog-large` `.dialog-medium` `.dialog-small` `.dialog-title` | `--athena-dialog-large` `--athena-dialog-medium` `--athena-dialog-small` `--athena-muted` `--athena-space-2` |
|
|
85
|
+
| Tabs | `.tab` `.tab-active` `.tab-list` `.tab-panel` | `--athena-accent` `--athena-border-width` `--athena-fg` `--athena-line` |
|
|
86
|
+
| Breadcrumbs, pagination | `.breadcrumb-item` `.breadcrumb-list` `.page-button` `.page-current` `.pagination` | `--athena-accent` `--athena-accent-fg` `--athena-bg` `--athena-border-width` `--athena-fg` `--athena-line` `--athena-muted` `--athena-space-1` |
|
|
87
|
+
| Accordion: <details> and <summary> | `.accordion-header` `.accordion-icon` `.accordion-item` `.accordion-panel` `.sidebar-parent` | `--athena-accent` `--athena-border-width` `--athena-duration-fast` `--athena-ease-standard` `--athena-fg` `--athena-focus` `--athena-focus-width` `--athena-line` `--athena-surface` |
|
|
88
|
+
| Dropdown | `.dropdown` `.dropdown-menu` `.dropdown-right` | `--athena-bg` `--athena-border-width` `--athena-line` `--athena-radius` `--athena-shadow` |
|
|
89
|
+
| A popover (the dropdown menu, the tooltip) is in the top layer, placed next to its anchor by script through two variables | `.athena-popover` `.athena-popover-above` `.athena-popover-center` `.athena-popover-end` `.dropdown-divider` `.dropdown-item` `.dropdown-menu` | `--athena-fg` `--athena-hover` `--athena-line` `--athena-popover-left` `--athena-popover-top` |
|
|
90
|
+
| Sidebar | `.accordion-icon` `.sidebar` `.sidebar-link` `.sidebar-list` `.sidebar-parent` `.sidebar-sublist` `.sidebar-toggle` | `--athena-accent` `--athena-accent-fg` `--athena-fg` `--athena-hover` `--athena-space-2` |
|
|
91
|
+
| Cards, sections, grid | `.athena-grid` `.card` `.card-body` `.card-footer` `.card-image` `.card-title` | `--athena-bg` `--athena-border-width` `--athena-line` `--athena-radius` `--athena-surface-alt` `--grid-columns` `--grid-gap` |
|
|
92
|
+
| Badge, avatar, stat | `.avatar` `.avatar-large` `.avatar-small` `.badge` `.badge-error` `.badge-info` `.badge-pill` `.badge-success` `.badge-warning` `.stat` `.stat-bad` `.stat-good` `.stat-label` `.stat-neutral` `.stat-value` | `--athena-accent` `--athena-accent-fg` `--athena-bg` `--athena-border-width` `--athena-danger` `--athena-fg` `--athena-info` `--athena-line` `--athena-muted` `--athena-radius` `--athena-success` `--athena-surface` `--athena-warning` |
|
|
93
|
+
| Tooltip | `.has-tooltip` `.tooltip-text` `.tooltip-wrap` | `--athena-duration-fast` `--athena-ease-standard` |
|
|
94
|
+
| As a popover it is only drawn while it is open, so it is always visible; the position comes from placePopover() | `.tooltip-text` | - |
|
|
95
|
+
| Combobox (autocomplete, multi select) and chips | `.chip` `.chip-remove` `.combobox` `.combobox-active` `.combobox-chips` `.combobox-empty` `.combobox-input` `.combobox-list` `.combobox-multiple` `.combobox-option` `.combobox-selected` | `--athena-accent` `--athena-accent-fg` `--athena-bg` `--athena-border-width` `--athena-hover` `--athena-line` `--athena-muted` `--athena-radius` `--athena-shadow` `--athena-space-1` |
|
|
96
|
+
| File upload | `.dropzone` `.dropzone-disabled` `.dropzone-input` `.dropzone-over` `.file-item` `.file-list` `.file-status` | `--athena-accent` `--athena-hover` `--athena-line` `--athena-muted` `--athena-radius` |
|
|
97
|
+
| Stepper | `.form-actions` `.stepper` `.stepper-current` `.stepper-done` `.stepper-number` `.stepper-step` `.stepper-steps` | `--athena-accent` `--athena-accent-fg` `--athena-fg` `--athena-line` `--athena-muted` `--athena-space-2` `--athena-success` |
|
|
98
|
+
| Tables | `.athena-table` `.athena-table-edit` `.athena-table-filter` `.athena-table-pager` `.athena-table-select` `.athena-table-wrapper` `.clickable` `.editable` `.selected` `.sortable` | `--athena-accent` `--athena-border-width` `--athena-hover` `--athena-line` `--athena-surface` `--athena-surface-alt` |
|
|
99
|
+
| Table options: density, wrapping, alignment | `.athena-align-center` `.athena-align-right` `.athena-table` `.athena-table-compact` `.athena-table-nowrap` `.athena-table-wrap` | `--athena-focus` `--athena-focus-width` |
|
|
100
|
+
| Charts | `.athena-chart` `.chart-axis` `.chart-bar` `.chart-grid` `.chart-legend` `.chart-slice` `.chart-tick` `.chart-title` | `--athena-bg` `--athena-fg` `--athena-line` `--athena-muted` |
|
|
101
|
+
| Responsive | `.athena-form` `.athena-grid` `.file-item` `.file-progress` `.modal` `.modal-content` `.sidebar` `.sidebar-list` `.sidebar-open` `.sidebar-toggle` `.stepper-title` | - |
|
|
102
|
+
| Reduced motion: a spinner and an indeterminate bar still have to say "busy", but slowly. The transitions read the duration tokens (0). | `.progress-fill` `.progress-indeterminate` `.spinner` | - |
|
|
103
|
+
| Menu submenus | `.has-submenu` `.menu-parent` `.submenu` `.submenu-item` | `--athena-bg` `--athena-border-width` `--athena-hover` `--athena-line` `--athena-radius` `--athena-shadow` |
|
|
104
|
+
| Table: resizable columns, virtual scrolling | `.athena-col-resizer` `.athena-table` `.athena-table-resizable` `.athena-table-scroll` `.athena-table-spacer` `.athena-table-virtual` `.resizing` | `--athena-accent` `--athena-border-width` `--athena-line` `--athena-row-height` `--row-height` |
|
|
105
|
+
| Date range | `.daterange` `.daterange-part` | - |
|
|
106
|
+
| Rich text editor | `.richtext` `.rt-bold` `.rt-button` `.rt-disabled` `.rt-editor` `.rt-empty` `.rt-italic` `.rt-separator` `.rt-source-view` `.rt-strike` `.rt-toolbar` `.rt-underline` `.submenu` | `--athena-accent` `--athena-accent-fg` `--athena-bg` `--athena-border-width` `--athena-fg` `--athena-hover` `--athena-line` `--athena-muted` `--athena-radius` `--athena-surface` |
|
|
107
|
+
| Theme picker (generateThemePicker). The preview is drawn with the colours of the theme it shows. | `.theme-picker` `.theme-picker-description` `.theme-picker-group` `.theme-picker-option` `.theme-picker-options` `.theme-preview` `.theme-preview-bar` `.theme-preview-body` `.theme-preview-button` `.theme-preview-line` | `--athena-accent` `--athena-bg` `--athena-border-width` `--athena-fg` `--athena-focus` `--athena-focus-width` `--athena-line` `--athena-muted` `--athena-radius` `--athena-space-1` `--athena-space-3` `--athena-space-4` |
|
|
108
|
+
| Tables with a data source and row actions | `.athena-button` `.athena-chart` `.athena-chart-sparkline` `.athena-table` `.athena-table-actions` `.athena-table-error` `.athena-table-is-loading` `.athena-table-loading` `.athena-visually-hidden` `.chart-area` `.chart-bar` `.chart-data` `.chart-hidden` `.chart-legend-item` `.chart-line` `.chart-point` `.chart-ring` `.chart-slice` `.chart-swatch` `.chart-tooltip` `.chart-tooltip-box` `.chart-tooltip-text` `.is-off` `.is-visible` `.s1` `.s2` `.s3` `.s4` `.s5` `.s6` `.s7` `.s8` | `--athena-bg` `--athena-danger` `--athena-fg` `--athena-focus` `--athena-focus-width` `--athena-muted` `--series-1` `--series-2` `--series-3` `--series-4` `--series-5` `--series-6` `--series-7` `--series-8` |
|
|
109
|
+
| Menu (generateMenu): a bar, or tabs at the bottom of the screen with sheets for the groups | `.athena-menu` `.athena-menu-list` `.has-active` `.is-active` `.menu-avatar` `.menu-control` `.menu-icon` `.menu-item` `.menu-item-end` `.menu-sheet` | `--athena-accent` `--athena-accent-fg` `--athena-bg` `--athena-border-width` `--athena-fg` `--athena-focus` `--athena-focus-width` `--athena-hover` `--athena-line` `--athena-radius` `--athena-shadow` |
|
|
110
|
+
| Tabs at the bottom (layout "responsive" switches to it under 700px) | `.athena-menu-bottom-tabs` `.athena-menu-list` `.athena-menu-responsive` `.menu-control` `.menu-item` `.menu-item-end` `.menu-sheet` | `--athena-bg` `--athena-border-width` `--athena-line` `--athena-radius` |
|
|
111
|
+
| Menu: groups inside groups, and badges | `.athena-menu` `.athena-menu-bottom-tabs` `.athena-menu-responsive` `.athena-table-placeholder` `.athena-table-status` `.menu-badge` `.menu-badge-bad` `.menu-badge-info` `.menu-badge-ok` `.menu-badge-warn` `.menu-caret` `.menu-sheet` `.menu-sheet-nested` | `--athena-accent` `--athena-accent-fg` `--athena-danger` `--athena-info` `--athena-muted` `--athena-success` `--athena-warning` |
|
|
112
|
+
| Charts: pointer layer, zoom | `.athena-chart` `.chart-hit` `.chart-marker` `.chart-reset` `.chart-selection` | `--athena-accent` `--athena-focus` `--athena-focus-width` `--athena-muted` |
|
|
113
|
+
| Page header, facts, empty state, loading, stat tone and note | `.athena-popover` `.athena-popover-above` `.dialog` `.empty-icon` `.empty-message` `.empty-state` `.empty-title` `.fact` `.facts` `.facts-inline` `.is-bad` `.is-ok` `.is-warn` `.loading-state` `.page-actions` `.page-description` `.page-header` `.page-header-row` `.page-title` `.stat` `.stat-note` `.stat-value` | `--athena-danger` `--athena-duration-base` `--athena-duration-fast` `--athena-ease-out` `--athena-fg` `--athena-muted` `--athena-space-2` `--athena-space-3` `--athena-success` `--athena-warning` |
|
|
114
|
+
| Toasts slide in from the side, and out again when they are closed | `.is-leaving` `.toast` | `--athena-duration-base` `--athena-ease-out` |
|
|
115
|
+
| The panel of an accordion opens and closes smoothly (a browser without ::details-content opens it at once) | `.accordion-item` | `--athena-duration-base` `--athena-ease-standard` |
|
|
116
|
+
| The mark of the active item, and hover, move gently | `.athena-menu` `.menu-control` | `--athena-duration-fast` `--athena-ease-standard` |
|
|
117
|
+
| A place holder for what is loading: a skeleton with a shimmer (generateSkeleton) | `.athena-skeleton` `.athena-skeleton-line` | `--athena-hover` `--athena-radius` `--athena-space-2` `--athena-surface` |
|
|
118
|
+
| A theme or mode change cross-fades instead of flashing (the theme manager sets the class for a moment) | `.athena-switching` | `--athena-duration-slow` `--athena-ease-standard` |
|
|
119
|
+
| Page transitions of the router (router({ transition: true })) | - | `--athena-duration-base` `--athena-ease-standard` |
|
|
120
|
+
| Charts draw themselves when they appear: bars grow, lines are drawn, slices pop in (only the first time, not when a chart streams or is zoomed) | `.athena-chart-animated` `.athena-code` `.athena-widget-grid` `.chart-area` `.chart-bar` `.chart-line` `.chart-point` `.chart-slice` `.code-digits-1` `.code-digits-2` `.code-digits-3` `.code-digits-4` `.code-digits-5` `.code-digits-6` `.code-digits-7` `.code-editor` `.code-editor-input` `.code-line` `.code-tab-1` `.code-tab-10` `.code-tab-11` `.code-tab-12` `.code-tab-13` `.code-tab-14` `.code-tab-15` `.code-tab-16` `.code-tab-2` `.code-tab-3` `.code-tab-4` `.code-tab-5` `.code-tab-6` `.code-tab-7` `.code-tab-8` `.code-tab-9` `.code-wrap` `.has-line-numbers` `.is-dragging` `.is-editable` `.is-failed` `.is-highlighted` `.is-locked` `.is-unknown` `.tok-attribute` `.tok-builtin` `.tok-comment` `.tok-entity` `.tok-function` `.tok-keyword` `.tok-literal` `.tok-meta` `.tok-number` `.tok-operator` `.tok-property` `.tok-punctuation` `.tok-selector` `.tok-string` `.tok-tag` `.tok-type` `.tok-variable` `.widget` `.widget-action` `.widget-actions` `.widget-body` `.widget-handle` `.widget-header` `.widget-note` `.widget-resize` `.widget-resize-e` `.widget-resize-n` `.widget-resize-ne` `.widget-resize-nw` `.widget-resize-s` `.widget-resize-se` `.widget-resize-sw` `.widget-resize-w` `.widget-title` | `--athena-accent` `--athena-accent-fg` `--athena-border` `--athena-border-width` `--athena-duration-fast` `--athena-duration-slow` `--athena-ease-out` `--athena-ease-standard` `--athena-fg` `--athena-focus` `--athena-focus-width` `--athena-hover` `--athena-line` `--athena-muted` `--athena-radius` `--athena-shadow` `--athena-surface` `--athena-surface-alt` `--athena-tok-attribute` `--athena-tok-builtin` `--athena-tok-comment` `--athena-tok-entity` `--athena-tok-function` `--athena-tok-keyword` `--athena-tok-literal` `--athena-tok-meta` `--athena-tok-number` `--athena-tok-operator` `--athena-tok-property` `--athena-tok-punctuation` `--athena-tok-selector` `--athena-tok-string` `--athena-tok-tag` `--athena-tok-type` `--athena-tok-variable` `--code-gutter` |
|
|
121
|
+
| A block: the language, a copy button, the code | `.athena-code` `.code-block` `.code-block-copy` `.code-block-header` `.code-find-button` `.code-find-input` | `--athena-bg` `--athena-border-width` `--athena-fg` `--athena-focus` `--athena-focus-width` `--athena-hover` `--athena-line` `--athena-muted` `--athena-radius` `--athena-surface` |
|
|
122
|
+
| The editor | `.code-completion` `.code-completion-detail` `.code-completions` `.code-editor` `.code-editor-highlight` `.code-editor-input` `.code-editor-scroll` `.code-editor-status` `.code-find` `.code-find-button` `.code-find-count` `.code-find-input` `.code-find-row` `.code-line` `.code-wrap` `.has-line-numbers` `.has-marker` `.is-active` `.is-current` `.is-locked-line` `.is-plain` `.is-readonly` `.marker-error` `.marker-info` `.marker-warning` | `--athena-accent` `--athena-accent-fg` `--athena-bg` `--athena-border` `--athena-border-width` `--athena-danger` `--athena-fg` `--athena-focus` `--athena-focus-width` `--athena-info` `--athena-line` `--athena-muted` `--athena-radius` `--athena-shadow` `--athena-surface` `--athena-surface-alt` `--athena-warning` `--code-completion-left` `--code-completion-top` `--code-editor-max-height` `--code-editor-min-height` `--code-gutter` |
|
|
123
|
+
| The diff view | `.code-diff` `.code-diff-body` `.code-diff-cell` `.code-diff-code` `.code-diff-empty` `.code-diff-header` `.code-diff-mark` `.code-diff-number` `.code-diff-row` `.code-diff-skip` `.code-diff-stat` `.code-line` `.is-added` `.is-empty` `.is-removed` `.is-skip` `.is-split` | `--athena-accent` `--athena-border-width` `--athena-danger` `--athena-line` `--athena-muted` `--athena-radius` `--athena-success` `--athena-surface` |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "athena-ui-js",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "A small, dependency-free UI framework: forms, tables, charts, menus, dialogs, themes and a router, written as ES modules.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/athena-ui.js",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"test": "node --test tests/*.test.js",
|
|
9
9
|
"test:browser": "node tests/browser/run.mjs",
|
|
10
10
|
"docs": "node scripts/styling-docs.mjs",
|
|
11
|
+
"check:package": "node scripts/check-package.mjs",
|
|
11
12
|
"types": "tsc -p tsconfig.types.json",
|
|
12
13
|
"test:demo": "node --test --test-timeout=600000 demo/tests/demo.test.mjs demo/tests/browser.test.mjs",
|
|
13
14
|
"demo": "node demo/server.mjs",
|
|
@@ -135,6 +136,8 @@
|
|
|
135
136
|
"src/libs/hephaestus/chartGenerator",
|
|
136
137
|
"src/libs/hephaestus/tableGenerator",
|
|
137
138
|
"src/libs/hephaestus/modalGenerator",
|
|
139
|
+
"src/libs/hephaestus/widgetGrid",
|
|
140
|
+
"src/libs/hephaestus/codeGenerator",
|
|
138
141
|
"src/res",
|
|
139
142
|
"src/*.js",
|
|
140
143
|
"!src/example.js",
|
package/src/athena-ui.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
//Author: Csaba Tóth https://github.com/csabatibortoth/
|
|
3
3
|
//LICENCE: MIT
|
|
4
4
|
//Repository: https://github.com/csabatibortoth/athena-ui
|
|
5
|
-
//Version: 2.4.
|
|
5
|
+
//Version: 2.4.1
|
|
6
6
|
|
|
7
7
|
// The whole API as ES module exports. There are no side effects: importing this file does not touch the page, does not load a script and does not
|
|
8
8
|
// put anything on globalThis. For pages that need globals use `athena-ui-js/classic`, and to download only what you use import from the entry points
|