@sylwellsoftware/fray 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +198 -30
- package/colors/README.md +28 -13
- package/colors/gray/colors.css +54 -26
- package/colors/green/colors.css +54 -26
- package/colors/iceblue/colors.css +54 -26
- package/colors/ocean/colors.css +54 -26
- package/colors/orange/colors.css +54 -26
- package/colors/purple/colors.css +54 -26
- package/colors/red/colors.css +54 -26
- package/colors/yellow/colors.css +54 -26
- package/dist/Components/component.d.ts.map +1 -1
- package/dist/Components/data/descriptionList.d.ts.map +1 -1
- package/dist/Components/data/listview/listview.d.ts.map +1 -1
- package/dist/Components/data/table/DataTable.d.ts.map +1 -1
- package/dist/Components/data/table/FilterPanel.d.ts.map +1 -1
- package/dist/Components/data/table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Components/data/treeview/treeview.d.ts.map +1 -1
- package/dist/Components/dialog/dialog.d.ts.map +1 -1
- package/dist/Components/layout/panel.d.ts +0 -1
- package/dist/Components/layout/panel.d.ts.map +1 -1
- package/dist/Components/layout/sidebar.d.ts +0 -1
- package/dist/Components/layout/sidebar.d.ts.map +1 -1
- package/dist/Components/layout/tabpanel/tab.d.ts +2 -0
- package/dist/Components/layout/tabpanel/tab.d.ts.map +1 -1
- package/dist/Components/layout/tabpanel/tabline.d.ts.map +1 -1
- package/dist/Components/layout/tabpanel/tabpanel.d.ts +9 -1
- package/dist/Components/layout/tabpanel/tabpanel.d.ts.map +1 -1
- package/dist/Components/lineinputs/checkbox/Checkbox.d.ts +0 -1
- package/dist/Components/lineinputs/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/Components/lineinputs/dropdown.d.ts.map +1 -1
- package/dist/Components/lineinputs/radio.d.ts +51 -0
- package/dist/Components/lineinputs/radio.d.ts.map +1 -0
- package/dist/Components/lineinputs/textbox.d.ts.map +1 -1
- package/dist/Components/lineinputs/toggle.d.ts.map +1 -1
- package/dist/Components/menu/toolbar.d.ts +0 -1
- package/dist/Components/menu/toolbar.d.ts.map +1 -1
- package/dist/Components/status/progressBar.d.ts.map +1 -1
- package/dist/Components/theme/stylesheetPicker.d.ts.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2485 -1456
- package/dist/index.js.map +1 -1
- package/dist/{jsx-dev-runtime-pzseD2Sz.js → jsx-dev-runtime-Kf1Dhu-y.js} +412 -469
- package/dist/jsx-dev-runtime-Kf1Dhu-y.js.map +1 -0
- package/dist/jsx-dev-runtime.js +1 -1
- package/dist/jsx-runtime.js +1 -1
- package/dist/routing/RouteLink.d.ts +17 -0
- package/dist/routing/RouteLink.d.ts.map +1 -0
- package/dist/routing/RouteQuery.d.ts +18 -0
- package/dist/routing/RouteQuery.d.ts.map +1 -0
- package/dist/routing/RouteScope.d.ts +17 -0
- package/dist/routing/RouteScope.d.ts.map +1 -0
- package/dist/routing/RouteValue.d.ts +18 -0
- package/dist/routing/RouteValue.d.ts.map +1 -0
- package/dist/routing/navigationAdapter.d.ts +33 -0
- package/dist/routing/navigationAdapter.d.ts.map +1 -0
- package/dist/routing/route.d.ts +64 -0
- package/dist/routing/route.d.ts.map +1 -0
- package/dist/routing/router.d.ts +109 -0
- package/dist/routing/router.d.ts.map +1 -0
- package/dist/runtime.d.ts +5 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/styling/baseStyleDefinitions.d.ts +0 -82
- package/dist/styling/baseStyleDefinitions.d.ts.map +1 -1
- package/dist/styling/theme.d.ts +3 -3
- package/dist/styling/theme.d.ts.map +1 -1
- package/package.json +3 -3
- package/styles/structural.css +220 -429
- package/themes/README.md +68 -66
- package/themes/dark.css +60 -1
- package/themes/java/theme.css +422 -135
- package/themes/light.css +60 -1
- package/themes/minimal/theme.css +420 -125
- package/themes/shiny/theme.css +492 -294
- package/dist/jsx-dev-runtime-pzseD2Sz.js.map +0 -1
package/themes/README.md
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
# Fray structural, theme, and color CSS
|
|
2
2
|
|
|
3
|
-
Fray
|
|
4
|
-
|
|
5
|
-
1.
|
|
6
|
-
|
|
7
|
-
for the default
|
|
8
|
-
2.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
3.
|
|
12
|
-
|
|
13
|
-
`green`, `gray`, `orange`, `purple`, `red`, and `yellow`.
|
|
3
|
+
Fray separates three stylesheet responsibilities:
|
|
4
|
+
|
|
5
|
+
1. `styles/structural.css` contains generated layout, flow, sizing,
|
|
6
|
+
positioning, overflow, interaction mechanics, and justified structural
|
|
7
|
+
hooks for the default component hosts.
|
|
8
|
+
2. `themes/<name>/theme.css` contains typography, spacing, geometry, surfaces,
|
|
9
|
+
depth, native-element presentation, reusable trait presentation, and the
|
|
10
|
+
mapping from palette values to semantic UI variables.
|
|
11
|
+
3. `colors/<name>/colors.css` contains primary, secondary, and neutral color
|
|
12
|
+
ramps and contrast/color primitives only.
|
|
14
13
|
|
|
15
14
|
Load the three artifacts independently:
|
|
16
15
|
|
|
@@ -20,65 +19,68 @@ import '@sylwellsoftware/fray/colors/ocean/colors.css'
|
|
|
20
19
|
import '@sylwellsoftware/fray/themes/shiny/theme.css'
|
|
21
20
|
```
|
|
22
21
|
|
|
23
|
-
`ThemePicker` and `ColorPicker`
|
|
24
|
-
`
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
their own option catalogs and URLs. The defaults resolve against Fray's
|
|
28
|
-
published package layout and therefore work for direct ESM/CDN loading. A
|
|
29
|
-
bundler cannot expose a universal runtime URL for package CSS; bundled
|
|
30
|
-
applications should import or emit each CSS asset as a URL and pass remapped
|
|
31
|
-
options to the pickers.
|
|
32
|
-
|
|
33
|
-
## Variable hierarchy
|
|
34
|
-
|
|
35
|
-
The public contract is exported as the machine-readable
|
|
36
|
-
`frayThemeVariableCatalog`. Every entry records its layer, family, value kind,
|
|
37
|
-
description, and optional fallback.
|
|
38
|
-
|
|
39
|
-
| Level | Representative variables | Purpose |
|
|
40
|
-
| --- | --- | --- |
|
|
41
|
-
| Palette | `--fray-color-primary`, `--fray-color-surface`, `--fray-color-text`, `--fray-color-border`, `--fray-color-focus` | Replaceable color-scheme primitives and semantic colors |
|
|
42
|
-
| Global theme | `--fray-font-*`, `--fray-space-*`, `--fray-radius-*`, `--fray-ui-*` | Shared typography, rhythm, shape, and surface treatment |
|
|
43
|
-
| Generic families | `--fray-header-*`, `--fray-button-*`, `--fray-input-*`, `--fray-panel-*`, `--fray-selection-*` | Defaults inherited by related controls |
|
|
44
|
-
| Family variants | `--fray-table-header-*`, `--fray-panel-header-*`, `--fray-toggle-button-*`, `--fray-tab-button-*`, `--fray-dropdown-trigger-*` | Optional narrow overrides for a theme that differentiates one family member |
|
|
45
|
-
| Component escape hatches | `--fray-checkbox-*`, `--fray-progress-*`, `--fray-dialog-*` | Behavior that is not meaningfully shared with a broader family |
|
|
46
|
-
|
|
47
|
-
Structural rules use the most-specific variable and fall back through the
|
|
48
|
-
family. A custom table-like component can follow the same pattern:
|
|
22
|
+
`ThemePicker` and `ColorPicker` replace separate
|
|
23
|
+
`link[data-fray-stylesheet]` elements and update the `data-theme` and
|
|
24
|
+
`data-color` root attributes. The link metadata retains its Fray prefix because
|
|
25
|
+
it is operational/diagnostic metadata rather than theme vocabulary.
|
|
49
26
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
27
|
+
## Selectors and scope
|
|
28
|
+
|
|
29
|
+
Themes target native elements directly and expose reusable prefix-free traits:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
buttonlike inputlike datacomponentlike
|
|
33
|
+
headerlike coloredlike panellike
|
|
34
|
+
toolbarlike selectshell
|
|
35
|
+
|
|
36
|
+
buttonshell buttoninner
|
|
37
|
+
inputshell inputinner
|
|
38
|
+
datacomponentshell datacomponentinner
|
|
39
|
+
headershell headerinner
|
|
40
|
+
panelshell panelinner
|
|
41
|
+
toolbarshell toolbarinner
|
|
42
|
+
coloredshell coloredinner
|
|
61
43
|
```
|
|
62
44
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
45
|
+
`like` means a complete single-node treatment. `shell` means an independently
|
|
46
|
+
rendered outer region; `inner` means an independently rendered content region.
|
|
47
|
+
Components do not add wrappers solely to obtain these traits.
|
|
48
|
+
|
|
49
|
+
Every theme uses a named cascade layer. A zero-specificity boundary rule seeds
|
|
50
|
+
its inherited variables on `:root` or the matching `[data-theme]`. Presentation
|
|
51
|
+
selectors live in `@scope`; nested theme roots and `[data-theme-exclude]` stop
|
|
52
|
+
the outer theme's selectors. This separation is deliberate because scope
|
|
53
|
+
limits do not stop custom-property inheritance. Low-specificity `:where()`
|
|
54
|
+
groups let application CSS override both kinds of rule.
|
|
66
55
|
|
|
67
|
-
|
|
56
|
+
Themes do not select `data-fray-component` or `data-part`. The former is
|
|
57
|
+
diagnostic metadata. The latter is restricted to component-owned structural
|
|
58
|
+
or behavioral mechanics that cannot be expressed through native structure,
|
|
59
|
+
roles, ARIA state, or a justified public trait.
|
|
68
60
|
|
|
69
|
-
Variables
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
61
|
+
## Variables
|
|
62
|
+
|
|
63
|
+
The active color file supplies only `--palette-*`. The active theme maps those
|
|
64
|
+
values to prefix-free semantic families such as `--ui-*`, `--header-*`,
|
|
65
|
+
`--button-*`, `--input-*`, `--panel-*`, and `--selection-*`. Generated
|
|
66
|
+
structural CSS may consume these variables where configurable host names make
|
|
67
|
+
a direct theme selector inappropriate.
|
|
68
|
+
|
|
69
|
+
Custom colored content can set:
|
|
70
|
+
|
|
71
|
+
```css
|
|
72
|
+
.severity-block {
|
|
73
|
+
--colored-light: #ffd7d2;
|
|
74
|
+
--colored-base: #c8332a;
|
|
75
|
+
--colored-dark: #721710;
|
|
76
|
+
--colored-contrast: white;
|
|
77
|
+
}
|
|
78
|
+
```
|
|
76
79
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
permitted in `theme.css`.
|
|
80
|
+
An element carrying `coloredlike`, `coloredshell`, or `coloredinner` then lets
|
|
81
|
+
each theme decide whether to use a flat fill, gradient, other treatment, or no
|
|
82
|
+
special polish. When no values are supplied, the primary palette is used.
|
|
81
83
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
`frayThemeVariableCatalog` publishes the palette and theme variable contract.
|
|
85
|
+
The top-level `themes/light.css` and `themes/dark.css` files remain temporary
|
|
86
|
+
compatibility bundles; new integrations use the separated files.
|
package/themes/dark.css
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
@charset "utf-8";
|
|
2
|
+
|
|
3
|
+
@layer theme {
|
|
4
|
+
:where(:root:not([data-theme]), [data-theme="dark"]) {
|
|
2
5
|
color-scheme: dark;
|
|
3
6
|
--ui-text-color: #edf3f8;
|
|
4
7
|
--ui-input-bg: #202b36;
|
|
@@ -36,4 +39,60 @@
|
|
|
36
39
|
--error-color: #ff8b9d;
|
|
37
40
|
--cbx-o-border: 1px solid #a9b6c3;
|
|
38
41
|
--cbx-border-radius: 0.2rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@scope (:root:not([data-theme]), [data-theme="dark"]) to ([data-theme], [data-theme-exclude]) {
|
|
45
|
+
|
|
46
|
+
:where(button) {
|
|
47
|
+
min-height: 2rem;
|
|
48
|
+
padding: 0.25rem 0.5rem;
|
|
49
|
+
color: var(--button-color);
|
|
50
|
+
background: var(--button-background);
|
|
51
|
+
border: var(--button-border);
|
|
52
|
+
border-radius: var(--ui-border-radius, 0.375rem);
|
|
53
|
+
box-shadow: var(--button-shadow);
|
|
54
|
+
font: inherit;
|
|
55
|
+
font-size: var(--ui-font-size, inherit);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:where(button):hover:not(:disabled) {
|
|
59
|
+
background: var(--button-background-hover);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:where(button):disabled {
|
|
63
|
+
color: var(--ui-input-text-color-disabled);
|
|
64
|
+
background: var(--button-background-disabled);
|
|
65
|
+
border: var(--button-border-disabled);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:where(input:not([type="checkbox"]), select, textarea) {
|
|
69
|
+
min-height: 2rem;
|
|
70
|
+
padding: 0.25rem 0.5rem;
|
|
71
|
+
color: var(--ui-text-color);
|
|
72
|
+
background: var(--ui-input-bg);
|
|
73
|
+
border: var(--ui-input-border);
|
|
74
|
+
border-radius: var(--ui-border-radius, 0.375rem);
|
|
75
|
+
box-shadow: var(--input-shadow);
|
|
76
|
+
box-sizing: border-box;
|
|
77
|
+
font: inherit;
|
|
78
|
+
font-size: var(--ui-font-size, inherit);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:where(button, input, select, textarea):focus-visible {
|
|
82
|
+
outline: 2px solid var(--ui-accent-color);
|
|
83
|
+
outline-offset: 1px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:where(.checkboxshell) {
|
|
87
|
+
color: var(--ui-text-color);
|
|
88
|
+
background: var(--ui-input-bg);
|
|
89
|
+
border: var(--cbx-o-border);
|
|
90
|
+
border-radius: var(--cbx-border-radius);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:where(input[type="checkbox"]:checked + .checkboxshell) {
|
|
94
|
+
color: #102030;
|
|
95
|
+
background: var(--ui-accent-color);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
39
98
|
}
|