@sigx/lynx-zero 0.4.9 → 0.5.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/LICENSE +21 -21
- package/README.md +25 -25
- package/dist/styles/tokens.css +98 -98
- package/dist/theme/ThemeProvider.d.ts +25 -1
- package/dist/theme/ThemeProvider.d.ts.map +1 -1
- package/dist/theme/ThemeProvider.js +17 -0
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/package.json +13 -8
- package/src/components/SwiperIndicator.tsx +519 -519
- package/src/contract.ts +136 -136
- package/src/index.ts +101 -101
- package/src/layout/Center.tsx +41 -41
- package/src/layout/Col.tsx +53 -53
- package/src/layout/Row.tsx +53 -53
- package/src/layout/ScrollView.tsx +38 -38
- package/src/layout/Spacer.tsx +18 -18
- package/src/preset/index.ts +77 -77
- package/src/shared/press.ts +6 -6
- package/src/shared/styles.ts +82 -82
- package/src/shared/tabs-selection.ts +57 -57
- package/src/styles/tokens.css +98 -98
- package/src/theme/StatusBarSync.tsx +104 -104
- package/src/theme/ThemeProvider.tsx +532 -492
- package/src/theme/color-mix.ts +68 -68
- package/src/theme/registry.ts +290 -290
- package/src/theme/theme-state.ts +112 -112
- package/src/theme/use-screen-theme.ts +42 -42
- package/src/theme/use-theme-colors.ts +99 -99
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025-2026 Andreas Ekdahl
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 Andreas Ekdahl
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
# @sigx/lynx-zero
|
|
2
|
-
|
|
3
|
-
Design-system-neutral UI foundation for sigx-lynx. Design-system packages
|
|
4
|
-
(`@sigx/lynx-daisyui`, `@sigx/lynx-heroui`, …) build on it; apps normally
|
|
5
|
-
import from their chosen design system, which re-exports what it uses from
|
|
6
|
-
here.
|
|
7
|
-
|
|
8
|
-
What lives here (growing per the phases in
|
|
9
|
-
[signalxjs/lynx#219](https://github.com/signalxjs/lynx/issues/219)):
|
|
10
|
-
|
|
11
|
-
- **The shared contract** (`SizeScale`, `ColorVariant`, `ColorToken`,
|
|
12
|
-
common prop fragments like `WithColor`/`WithDisabled`/`PressEvent`) —
|
|
13
|
-
the vocabulary every design system agrees on, so switching an app from
|
|
14
|
-
one DS to another is mostly an import swap.
|
|
15
|
-
- **Token-name conventions** — every theme resolves against the same CSS
|
|
16
|
-
custom-property names (`--color-*`, `--radius-*`, `--size-*`, `--text-*`).
|
|
17
|
-
- **Style utilities** — `resolveBoxStyle`, `resolveSpacing`,
|
|
18
|
-
`resolveColorToken`.
|
|
19
|
-
- **Press-feedback defaults** — `PRESSED_SCALE`, `PRESSED_OPACITY`.
|
|
20
|
-
- *(Later phases)* layout primitives (`Row`, `Col`, `Center`, `Spacer`,
|
|
21
|
-
`ScrollView`) and the theme engine (`ThemeProvider`, `themeController`,
|
|
22
|
-
theme registry).
|
|
23
|
-
|
|
24
|
-
What deliberately does **not** live here: visual components, component CSS,
|
|
25
|
-
class-name recipes, theme palettes — those are per-design-system.
|
|
1
|
+
# @sigx/lynx-zero
|
|
2
|
+
|
|
3
|
+
Design-system-neutral UI foundation for sigx-lynx. Design-system packages
|
|
4
|
+
(`@sigx/lynx-daisyui`, `@sigx/lynx-heroui`, …) build on it; apps normally
|
|
5
|
+
import from their chosen design system, which re-exports what it uses from
|
|
6
|
+
here.
|
|
7
|
+
|
|
8
|
+
What lives here (growing per the phases in
|
|
9
|
+
[signalxjs/lynx#219](https://github.com/signalxjs/lynx/issues/219)):
|
|
10
|
+
|
|
11
|
+
- **The shared contract** (`SizeScale`, `ColorVariant`, `ColorToken`,
|
|
12
|
+
common prop fragments like `WithColor`/`WithDisabled`/`PressEvent`) —
|
|
13
|
+
the vocabulary every design system agrees on, so switching an app from
|
|
14
|
+
one DS to another is mostly an import swap.
|
|
15
|
+
- **Token-name conventions** — every theme resolves against the same CSS
|
|
16
|
+
custom-property names (`--color-*`, `--radius-*`, `--size-*`, `--text-*`).
|
|
17
|
+
- **Style utilities** — `resolveBoxStyle`, `resolveSpacing`,
|
|
18
|
+
`resolveColorToken`.
|
|
19
|
+
- **Press-feedback defaults** — `PRESSED_SCALE`, `PRESSED_OPACITY`.
|
|
20
|
+
- *(Later phases)* layout primitives (`Row`, `Col`, `Center`, `Spacer`,
|
|
21
|
+
`ScrollView`) and the theme engine (`ThemeProvider`, `themeController`,
|
|
22
|
+
theme registry).
|
|
23
|
+
|
|
24
|
+
What deliberately does **not** live here: visual components, component CSS,
|
|
25
|
+
class-name recipes, theme palettes — those are per-design-system.
|
package/dist/styles/tokens.css
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
/* Theme-agnostic structural design tokens.
|
|
2
|
-
*
|
|
3
|
-
* Theme COLORS come from the theme registry (seeded by the design-system package) and are
|
|
4
|
-
* applied as inline CSS custom properties by <ThemeProvider>. These
|
|
5
|
-
* radius / sizing / component tokens are identical across themes, so they
|
|
6
|
-
* ship once here under the `.lynx-zero` base class that <ThemeProvider> puts on
|
|
7
|
-
* its host view; CSS inheritance propagates them to every descendant. A theme
|
|
8
|
-
* may still override roundness via its `radius` field. */
|
|
9
|
-
|
|
10
|
-
.lynx-zero {
|
|
11
|
-
/* ── Roundness (DaisyUI v5 contract) ── */
|
|
12
|
-
--radius-selector: 8px;
|
|
13
|
-
--radius-field: 8px;
|
|
14
|
-
--radius-box: 16px;
|
|
15
|
-
|
|
16
|
-
/* ── Base size units (DaisyUI v5 contract) ──
|
|
17
|
-
* A theme's `sizes` ({ field, selector }) overrides these; <ThemeProvider>
|
|
18
|
-
* re-derives the component dimensions below from them in JS. We deliberately
|
|
19
|
-
* do NOT use `calc(var() * n)` in CSS — it's unproven in Lynx's runtime CSS
|
|
20
|
-
* engine. Defaults below are base 4px × the per-token multiples shown. */
|
|
21
|
-
--size-selector: 4px;
|
|
22
|
-
--size-field: 4px;
|
|
23
|
-
|
|
24
|
-
/* ── Field sizing scale (button / input / select) — field × 6/8/12/16 ── */
|
|
25
|
-
--size-xs: 24px;
|
|
26
|
-
--size-sm: 32px;
|
|
27
|
-
--size-md: 48px;
|
|
28
|
-
--size-lg: 64px;
|
|
29
|
-
|
|
30
|
-
/* ── Text ramp (public <Text> / <Heading> sizes) ──
|
|
31
|
-
* The xs→3xl scale the `text-*` utilities resolve to (the daisy preset maps
|
|
32
|
-
* Tailwind's fontSize keys onto these vars). Literal px so they resolve on
|
|
33
|
-
* the first paint, like every other structural token. Anchored on a 17px
|
|
34
|
-
* base — the iOS HIG Body size, so bare <Text> (the default) reads as native
|
|
35
|
-
* body — and stepped as an even ~1.2 modular scale (each step ≈1.17–1.21×).
|
|
36
|
-
*
|
|
37
|
-
* The controller's `fontScale` multiplies this ramp app-wide; <ThemeProvider>
|
|
38
|
-
* re-emits the literals in JS (no `calc(var() * n)` — unproven in Lynx).
|
|
39
|
-
* NOTE: keep in sync with FONT_DEFAULTS in theme/ThemeProvider.tsx. */
|
|
40
|
-
--text-xs: 12px;
|
|
41
|
-
--text-sm: 14px;
|
|
42
|
-
--text-base: 17px;
|
|
43
|
-
--text-lg: 20px;
|
|
44
|
-
--text-xl: 24px;
|
|
45
|
-
--text-2xl: 28px;
|
|
46
|
-
--text-3xl: 34px;
|
|
47
|
-
|
|
48
|
-
/* ── Font sizes (control-internal: button / input / badge labels) ──
|
|
49
|
-
* A separate axis from the text ramp above and deliberately NOT scaled with
|
|
50
|
-
* it — control chrome stays fixed. Kept as independent literals (no
|
|
51
|
-
* var→var indirection; unproven in Lynx) even though values mirror the ramp. */
|
|
52
|
-
--font-xs: 12px;
|
|
53
|
-
--font-sm: 14px;
|
|
54
|
-
--font-md: 14px;
|
|
55
|
-
--font-lg: 18px;
|
|
56
|
-
|
|
57
|
-
/* ── Spacing ── */
|
|
58
|
-
--padding-btn-xs: 8px;
|
|
59
|
-
--padding-btn-sm: 12px;
|
|
60
|
-
--padding-btn-md: 16px;
|
|
61
|
-
--padding-btn-lg: 24px;
|
|
62
|
-
--padding-box: 16px;
|
|
63
|
-
--padding-box-compact: 8px;
|
|
64
|
-
--gap-box: 8px;
|
|
65
|
-
|
|
66
|
-
/* ── Borders ── */
|
|
67
|
-
--border-btn: 1px;
|
|
68
|
-
--border-card: 1px;
|
|
69
|
-
|
|
70
|
-
/* ── Selector-driven sizes (checkbox / toggle / badge) — selector × the
|
|
71
|
-
* multiples shown; <ThemeProvider> re-derives these from `sizes.selector`. ── */
|
|
72
|
-
--checkbox-xs: 16px; /* ×4 */
|
|
73
|
-
--checkbox-sm: 20px; /* ×5 */
|
|
74
|
-
--checkbox-md: 24px; /* ×6 */
|
|
75
|
-
--checkbox-lg: 32px; /* ×8 */
|
|
76
|
-
--toggle-width-xs: 32px; /* ×8 */
|
|
77
|
-
--toggle-width-sm: 40px; /* ×10 */
|
|
78
|
-
--toggle-width-md: 48px; /* ×12 */
|
|
79
|
-
--toggle-width-lg: 56px; /* ×14 */
|
|
80
|
-
--toggle-height-xs: 24px; /* ×6 */
|
|
81
|
-
--toggle-height-sm: 24px; /* ×6 */
|
|
82
|
-
--toggle-height-md: 28px; /* ×7 */
|
|
83
|
-
--toggle-height-lg: 32px; /* ×8 */
|
|
84
|
-
--toggle-thumb-xs: 16px; /* ×4 */
|
|
85
|
-
--toggle-thumb-sm: 16px; /* ×4 */
|
|
86
|
-
--toggle-thumb-md: 20px; /* ×5 */
|
|
87
|
-
--toggle-thumb-lg: 24px; /* ×6 */
|
|
88
|
-
--badge-xs: 16px; /* ×4 */
|
|
89
|
-
--badge-sm: 20px; /* ×5 */
|
|
90
|
-
--badge-md: 24px; /* ×6 */
|
|
91
|
-
--badge-lg: 32px; /* ×8 */
|
|
92
|
-
--step-indicator: 32px;
|
|
93
|
-
--progress-height: 8px;
|
|
94
|
-
--modal-max-width: 400px;
|
|
95
|
-
|
|
96
|
-
/* ── Opacity ── */
|
|
97
|
-
--disabled-opacity: 0.5;
|
|
98
|
-
}
|
|
1
|
+
/* Theme-agnostic structural design tokens.
|
|
2
|
+
*
|
|
3
|
+
* Theme COLORS come from the theme registry (seeded by the design-system package) and are
|
|
4
|
+
* applied as inline CSS custom properties by <ThemeProvider>. These
|
|
5
|
+
* radius / sizing / component tokens are identical across themes, so they
|
|
6
|
+
* ship once here under the `.lynx-zero` base class that <ThemeProvider> puts on
|
|
7
|
+
* its host view; CSS inheritance propagates them to every descendant. A theme
|
|
8
|
+
* may still override roundness via its `radius` field. */
|
|
9
|
+
|
|
10
|
+
.lynx-zero {
|
|
11
|
+
/* ── Roundness (DaisyUI v5 contract) ── */
|
|
12
|
+
--radius-selector: 8px;
|
|
13
|
+
--radius-field: 8px;
|
|
14
|
+
--radius-box: 16px;
|
|
15
|
+
|
|
16
|
+
/* ── Base size units (DaisyUI v5 contract) ──
|
|
17
|
+
* A theme's `sizes` ({ field, selector }) overrides these; <ThemeProvider>
|
|
18
|
+
* re-derives the component dimensions below from them in JS. We deliberately
|
|
19
|
+
* do NOT use `calc(var() * n)` in CSS — it's unproven in Lynx's runtime CSS
|
|
20
|
+
* engine. Defaults below are base 4px × the per-token multiples shown. */
|
|
21
|
+
--size-selector: 4px;
|
|
22
|
+
--size-field: 4px;
|
|
23
|
+
|
|
24
|
+
/* ── Field sizing scale (button / input / select) — field × 6/8/12/16 ── */
|
|
25
|
+
--size-xs: 24px;
|
|
26
|
+
--size-sm: 32px;
|
|
27
|
+
--size-md: 48px;
|
|
28
|
+
--size-lg: 64px;
|
|
29
|
+
|
|
30
|
+
/* ── Text ramp (public <Text> / <Heading> sizes) ──
|
|
31
|
+
* The xs→3xl scale the `text-*` utilities resolve to (the daisy preset maps
|
|
32
|
+
* Tailwind's fontSize keys onto these vars). Literal px so they resolve on
|
|
33
|
+
* the first paint, like every other structural token. Anchored on a 17px
|
|
34
|
+
* base — the iOS HIG Body size, so bare <Text> (the default) reads as native
|
|
35
|
+
* body — and stepped as an even ~1.2 modular scale (each step ≈1.17–1.21×).
|
|
36
|
+
*
|
|
37
|
+
* The controller's `fontScale` multiplies this ramp app-wide; <ThemeProvider>
|
|
38
|
+
* re-emits the literals in JS (no `calc(var() * n)` — unproven in Lynx).
|
|
39
|
+
* NOTE: keep in sync with FONT_DEFAULTS in theme/ThemeProvider.tsx. */
|
|
40
|
+
--text-xs: 12px;
|
|
41
|
+
--text-sm: 14px;
|
|
42
|
+
--text-base: 17px;
|
|
43
|
+
--text-lg: 20px;
|
|
44
|
+
--text-xl: 24px;
|
|
45
|
+
--text-2xl: 28px;
|
|
46
|
+
--text-3xl: 34px;
|
|
47
|
+
|
|
48
|
+
/* ── Font sizes (control-internal: button / input / badge labels) ──
|
|
49
|
+
* A separate axis from the text ramp above and deliberately NOT scaled with
|
|
50
|
+
* it — control chrome stays fixed. Kept as independent literals (no
|
|
51
|
+
* var→var indirection; unproven in Lynx) even though values mirror the ramp. */
|
|
52
|
+
--font-xs: 12px;
|
|
53
|
+
--font-sm: 14px;
|
|
54
|
+
--font-md: 14px;
|
|
55
|
+
--font-lg: 18px;
|
|
56
|
+
|
|
57
|
+
/* ── Spacing ── */
|
|
58
|
+
--padding-btn-xs: 8px;
|
|
59
|
+
--padding-btn-sm: 12px;
|
|
60
|
+
--padding-btn-md: 16px;
|
|
61
|
+
--padding-btn-lg: 24px;
|
|
62
|
+
--padding-box: 16px;
|
|
63
|
+
--padding-box-compact: 8px;
|
|
64
|
+
--gap-box: 8px;
|
|
65
|
+
|
|
66
|
+
/* ── Borders ── */
|
|
67
|
+
--border-btn: 1px;
|
|
68
|
+
--border-card: 1px;
|
|
69
|
+
|
|
70
|
+
/* ── Selector-driven sizes (checkbox / toggle / badge) — selector × the
|
|
71
|
+
* multiples shown; <ThemeProvider> re-derives these from `sizes.selector`. ── */
|
|
72
|
+
--checkbox-xs: 16px; /* ×4 */
|
|
73
|
+
--checkbox-sm: 20px; /* ×5 */
|
|
74
|
+
--checkbox-md: 24px; /* ×6 */
|
|
75
|
+
--checkbox-lg: 32px; /* ×8 */
|
|
76
|
+
--toggle-width-xs: 32px; /* ×8 */
|
|
77
|
+
--toggle-width-sm: 40px; /* ×10 */
|
|
78
|
+
--toggle-width-md: 48px; /* ×12 */
|
|
79
|
+
--toggle-width-lg: 56px; /* ×14 */
|
|
80
|
+
--toggle-height-xs: 24px; /* ×6 */
|
|
81
|
+
--toggle-height-sm: 24px; /* ×6 */
|
|
82
|
+
--toggle-height-md: 28px; /* ×7 */
|
|
83
|
+
--toggle-height-lg: 32px; /* ×8 */
|
|
84
|
+
--toggle-thumb-xs: 16px; /* ×4 */
|
|
85
|
+
--toggle-thumb-sm: 16px; /* ×4 */
|
|
86
|
+
--toggle-thumb-md: 20px; /* ×5 */
|
|
87
|
+
--toggle-thumb-lg: 24px; /* ×6 */
|
|
88
|
+
--badge-xs: 16px; /* ×4 */
|
|
89
|
+
--badge-sm: 20px; /* ×5 */
|
|
90
|
+
--badge-md: 24px; /* ×6 */
|
|
91
|
+
--badge-lg: 32px; /* ×8 */
|
|
92
|
+
--step-indicator: 32px;
|
|
93
|
+
--progress-height: 8px;
|
|
94
|
+
--modal-max-width: 400px;
|
|
95
|
+
|
|
96
|
+
/* ── Opacity ── */
|
|
97
|
+
--disabled-opacity: 0.5;
|
|
98
|
+
}
|
|
@@ -34,6 +34,23 @@
|
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
36
|
import { type Define } from '@sigx/lynx';
|
|
37
|
+
import { type IconColorResolver } from '@sigx/lynx-icons/context';
|
|
38
|
+
import type { ColorToken } from '../contract.js';
|
|
39
|
+
/**
|
|
40
|
+
* Declaration-merge a typed `variant` prop onto `<Icon>` (and the pinned
|
|
41
|
+
* adapters). `@sigx/lynx-icons` has no notion of variants; the foundation owns
|
|
42
|
+
* the concept so every design system inherits it. The merge fires the moment
|
|
43
|
+
* any consumer imports anything from `@sigx/lynx-zero` (or a DS that re-exports
|
|
44
|
+
* it). `<ThemeProvider>` provides the resolver that turns the variant into the
|
|
45
|
+
* active theme's hex (below).
|
|
46
|
+
*/
|
|
47
|
+
declare module '@sigx/lynx-icons' {
|
|
48
|
+
interface IconPropsExtensions {
|
|
49
|
+
/** Semantic color token applied as the icon's `fill`, resolved to the
|
|
50
|
+
* active theme's hex via `useIconColorResolver`. */
|
|
51
|
+
variant?: ColorToken;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
37
54
|
/**
|
|
38
55
|
* Theme class applied to the provider's host view. Plain string — a design
|
|
39
56
|
* system layers a literal union on top for autocomplete (e.g. daisyui's
|
|
@@ -120,7 +137,14 @@ Define.Prop<'initial', ThemeName, false>
|
|
|
120
137
|
/** Extra classes appended to the theme class on the host view. */
|
|
121
138
|
& Define.Prop<'class', string, false>
|
|
122
139
|
/** Extra inline style on the host view. Merged after the base flex-fill defaults. */
|
|
123
|
-
& Define.Prop<'style', Record<string, string | number>, false>
|
|
140
|
+
& Define.Prop<'style', Record<string, string | number>, false>
|
|
141
|
+
/**
|
|
142
|
+
* Override the icon-color resolver this scope provides. By default the
|
|
143
|
+
* provider resolves an `<Icon variant>` to the active theme's palette hex
|
|
144
|
+
* — design-system-agnostic, works for any registered theme. Supply this to
|
|
145
|
+
* customize the mapping (e.g. a DS-specific token aliasing).
|
|
146
|
+
*/
|
|
147
|
+
& Define.Prop<'iconColorResolver', IconColorResolver, false> & Define.Slot<'default'>;
|
|
124
148
|
/**
|
|
125
149
|
* Wraps children in a `<view class={theme}>` so the CSS variables defined
|
|
126
150
|
* inside the theme class inherit down to every descendant.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EASH,KAAK,MAAM,EACd,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EASH,KAAK,MAAM,EACd,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAwB,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACxF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAmBjD;;;;;;;GAOG;AACH,OAAO,QAAQ,kBAAkB,CAAC;IAC9B,UAAU,mBAAmB;QACzB;6DACqD;QACrD,OAAO,CAAC,EAAE,UAAU,CAAC;KACxB;CACJ;AA0GD;;;;;GAKG;AAEH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,EAAE,CAAC;AAEpC,MAAM,WAAW,eAAe;IAC5B,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC;;;OAGG;IACH,GAAG,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IAC3B;;;;OAIG;IACH,MAAM,IAAI,IAAI,CAAC;IACf;;;OAGG;IACH,YAAY,IAAI,IAAI,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,kEAA2D,CAAC;AAmBjF,MAAM,MAAM,kBAAkB;AAC1B;;;;;GAKG;AACD,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC;AAC1C;;;;GAIG;GACD,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC;AACxC;;;;GAIG;GACD,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC;AACvC;;;;;GAKG;GACD,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC;AACzC,kEAAkE;GAChE,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC;AACrC,qFAAqF;GACnF,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,CAAC;AAC9D;;;;;GAKG;GACD,MAAM,CAAC,IAAI,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,KAAK,CAAC,GAC1D,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAE7B;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa;;EA6LxB,CAAC;AAGH,OAAO,EACH,UAAU,EACV,aAAa,EACb,WAAW,EACX,YAAY,EACZ,MAAM,EACN,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,OAAO,GACV,MAAM,eAAe,CAAC;AACvB,YAAY,EACR,KAAK,EACL,YAAY,EACZ,WAAW,EACX,UAAU,EACV,YAAY,GACf,MAAM,eAAe,CAAC"}
|
|
@@ -36,6 +36,9 @@ import { jsx as _jsx } from "@sigx/lynx/jsx-runtime";
|
|
|
36
36
|
*/
|
|
37
37
|
import { component, defineInjectable, defineProvide, effect, onMounted, onUnmounted, signal, untrack, } from '@sigx/lynx';
|
|
38
38
|
import { useSystemColorScheme } from '@sigx/lynx-appearance';
|
|
39
|
+
// CSS-free subpath: just the resolver DI key + type — importing the icons
|
|
40
|
+
// barrel here would drag Icon's font-face/svg/codepoint assets into zero's barrel.
|
|
41
|
+
import { useIconColorResolver } from '@sigx/lynx-icons/context';
|
|
39
42
|
import { colorsOf, fallbackPalette, hasStaticCss, pickThemeFor, radiusOf, sizesOf, variantOf, } from './registry.js';
|
|
40
43
|
import { globalThemeState, makeThemeController, normalizeFontScale, themeController, } from './theme-state.js';
|
|
41
44
|
// Control dimensions are expressed as multiples of two base units
|
|
@@ -224,6 +227,20 @@ export const ThemeProvider = component(({ props, slots }) => {
|
|
|
224
227
|
defineProvide(useTheme, () => controller);
|
|
225
228
|
// Re-provide this scope's current scale so nested providers inherit it.
|
|
226
229
|
defineProvide(useAmbientFontScale, () => state.fontScale);
|
|
230
|
+
// Icon-color resolver for this scope: map `<Icon variant>` to the active
|
|
231
|
+
// theme's palette hex (SVG fills can't read CSS vars, so the hex is
|
|
232
|
+
// substituted into `fill=` at render). Design-system-agnostic — reads the
|
|
233
|
+
// registered palette for whatever theme this scope shows, so daisy and hero
|
|
234
|
+
// icons both theme correctly, per sub-scope. A consumer can override via the
|
|
235
|
+
// `iconColorResolver` prop. Reading `state.name` re-runs icons on theme flip.
|
|
236
|
+
const defaultIconResolver = (iconProps) => {
|
|
237
|
+
const variant = iconProps.variant;
|
|
238
|
+
if (!variant)
|
|
239
|
+
return undefined;
|
|
240
|
+
const palette = colorsOf(state.name) ?? fallbackPalette();
|
|
241
|
+
return palette?.[variant];
|
|
242
|
+
};
|
|
243
|
+
defineProvide(useIconColorResolver, () => props.iconColorResolver ?? defaultIconResolver);
|
|
227
244
|
// Follow the system color scheme while `following`. Reactive: re-runs when
|
|
228
245
|
// `following` flips true (e.g. `controller.followSystem()`, including the
|
|
229
246
|
// headless `themeController`) or when the OS scheme changes, and writes the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.js","sourceRoot":"","sources":["../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EACH,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,MAAM,EACN,SAAS,EACT,WAAW,EACX,MAAM,EACN,OAAO,GAEV,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"ThemeProvider.js","sourceRoot":"","sources":["../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EACH,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,MAAM,EACN,SAAS,EACT,WAAW,EACX,MAAM,EACN,OAAO,GAEV,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,0EAA0E;AAC1E,mFAAmF;AACnF,OAAO,EAAE,oBAAoB,EAA0B,MAAM,0BAA0B,CAAC;AAExF,OAAO,EACH,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,SAAS,GACZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,GAElB,MAAM,kBAAkB,CAAC;AA2B1B,kEAAkE;AAClE,6EAA6E;AAC7E,yEAAyE;AACzE,+EAA+E;AAC/E,4EAA4E;AAC5E,2EAA2E;AAC3E,MAAM,WAAW,GAA2B,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AAC7E,MAAM,cAAc,GAA2B;IAC3C,aAAa,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa,EAAE,C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AAG,OAAO,CAAC,cAAc,CAAC,CAAC;QAC1C,CAAC;QACD,IAAI,KAAK,CAAC,KAAK;YAAE,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QAEnD,OAAO,CACH,eACI,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,aAAa,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,EACvE,KAAK,EAAE,KAAK,YAEX,KAAK,CAAC,OAAO,EAAE,EAAE,GACf,CACV,CAAC;IACN,CAAC,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,uEAAuE;AACvE,OAAO,EACH,UAAU,EACV,aAAa,EACb,WAAW,EACX,YAAY,EACZ,MAAM,EACN,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,OAAO,GACV,MAAM,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sigx/lynx-zero",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Design-system-neutral UI foundation for sigx-lynx — the shared props/token contract and style utilities that design-system packages (daisyui, heroui, …) build on",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
"import": "./dist/preset/index.js",
|
|
20
20
|
"default": "./dist/preset/index.js"
|
|
21
21
|
},
|
|
22
|
+
"./registry": {
|
|
23
|
+
"types": "./dist/theme/registry.d.ts",
|
|
24
|
+
"import": "./dist/theme/registry.js"
|
|
25
|
+
},
|
|
22
26
|
"./styles/tokens.css": "./dist/styles/tokens.css"
|
|
23
27
|
},
|
|
24
28
|
"files": [
|
|
@@ -36,14 +40,15 @@
|
|
|
36
40
|
"author": "Andreas Ekdahl",
|
|
37
41
|
"license": "MIT",
|
|
38
42
|
"dependencies": {
|
|
39
|
-
"@sigx/lynx": "^0.
|
|
40
|
-
"@sigx/lynx-
|
|
41
|
-
"@sigx/lynx-
|
|
42
|
-
"@sigx/lynx-gestures": "^0.
|
|
43
|
+
"@sigx/lynx": "^0.5.0",
|
|
44
|
+
"@sigx/lynx-appearance": "^0.5.0",
|
|
45
|
+
"@sigx/lynx-icons": "^0.5.0",
|
|
46
|
+
"@sigx/lynx-gestures": "^0.5.0",
|
|
47
|
+
"@sigx/lynx-motion": "^0.5.0"
|
|
43
48
|
},
|
|
44
49
|
"peerDependencies": {
|
|
45
50
|
"tailwindcss": "^3.0.0 || ^4.0.0",
|
|
46
|
-
"@sigx/lynx-navigation": "^0.
|
|
51
|
+
"@sigx/lynx-navigation": "^0.5.0"
|
|
47
52
|
},
|
|
48
53
|
"peerDependenciesMeta": {
|
|
49
54
|
"@sigx/lynx-navigation": {
|
|
@@ -57,8 +62,8 @@
|
|
|
57
62
|
"@typescript/native-preview": "7.0.0-dev.20260521.1",
|
|
58
63
|
"tailwindcss": "^4.0.0",
|
|
59
64
|
"typescript": "^6.0.3",
|
|
60
|
-
"@sigx/lynx-navigation": "^0.
|
|
61
|
-
"@sigx/lynx-testing": "^0.
|
|
65
|
+
"@sigx/lynx-navigation": "^0.5.0",
|
|
66
|
+
"@sigx/lynx-testing": "^0.5.0"
|
|
62
67
|
},
|
|
63
68
|
"repository": {
|
|
64
69
|
"type": "git",
|