@d4gger/design-system 4.0.1 → 4.1.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 +3 -0
- package/dist/_internal/props/propDef.cjs +2 -1
- package/dist/_internal/props/propDef.cjs.map +2 -2
- package/dist/_internal/props/propDef.d.cts.map +1 -1
- package/dist/_internal/props/propDef.d.mts.map +1 -1
- package/dist/_internal/props/propDef.d.ts.map +1 -1
- package/dist/_internal/props/propDef.js +2 -1
- package/dist/_internal/props/propDef.js.map +2 -2
- package/dist/components/alert.css +12 -0
- package/dist/components/box.css +0 -12
- package/dist/components/config-drawer.css +9 -1
- package/dist/components/configDrawer/ConfigDrawer.cjs +1 -0
- package/dist/components/configDrawer/ConfigDrawer.cjs.map +2 -2
- package/dist/components/configDrawer/ConfigDrawer.d.cts.map +1 -1
- package/dist/components/configDrawer/ConfigDrawer.d.mts.map +1 -1
- package/dist/components/configDrawer/ConfigDrawer.d.ts.map +1 -1
- package/dist/components/configDrawer/ConfigDrawer.js +1 -0
- package/dist/components/configDrawer/ConfigDrawer.js.map +2 -2
- package/dist/components/drawer.css +4 -2
- package/dist/components/flex/Flex.cjs +5 -4
- package/dist/components/flex/Flex.cjs.map +2 -2
- package/dist/components/flex/Flex.d.cts.map +1 -1
- package/dist/components/flex/Flex.d.mts.map +1 -1
- package/dist/components/flex/Flex.d.ts.map +1 -1
- package/dist/components/flex/Flex.js +5 -4
- package/dist/components/flex/Flex.js.map +2 -2
- package/dist/components/grid/Grid.cjs +5 -5
- package/dist/components/grid/Grid.cjs.map +2 -2
- package/dist/components/grid/Grid.d.cts.map +1 -1
- package/dist/components/grid/Grid.d.mts.map +1 -1
- package/dist/components/grid/Grid.d.ts.map +1 -1
- package/dist/components/grid/Grid.js +5 -5
- package/dist/components/grid/Grid.js.map +2 -2
- package/dist/components/input-otp.css +24 -0
- package/dist/components/inputOtp/InputOtp.cjs +2 -1
- package/dist/components/inputOtp/InputOtp.cjs.map +2 -2
- package/dist/components/inputOtp/InputOtp.d.cts +8 -0
- package/dist/components/inputOtp/InputOtp.d.cts.map +1 -1
- package/dist/components/inputOtp/InputOtp.d.mts +8 -0
- package/dist/components/inputOtp/InputOtp.d.mts.map +1 -1
- package/dist/components/inputOtp/InputOtp.d.ts +8 -0
- package/dist/components/inputOtp/InputOtp.d.ts.map +1 -1
- package/dist/components/inputOtp/InputOtp.js +2 -1
- package/dist/components/inputOtp/InputOtp.js.map +2 -2
- package/dist/components/inputOtp/inputOtp.props.cjs +4 -0
- package/dist/components/inputOtp/inputOtp.props.cjs.map +2 -2
- package/dist/components/inputOtp/inputOtp.props.d.cts +4 -0
- package/dist/components/inputOtp/inputOtp.props.d.cts.map +1 -1
- package/dist/components/inputOtp/inputOtp.props.d.mts +4 -0
- package/dist/components/inputOtp/inputOtp.props.d.mts.map +1 -1
- package/dist/components/inputOtp/inputOtp.props.d.ts +4 -0
- package/dist/components/inputOtp/inputOtp.props.d.ts.map +1 -1
- package/dist/components/inputOtp/inputOtp.props.js +4 -0
- package/dist/components/inputOtp/inputOtp.props.js.map +2 -2
- package/dist/components/link.css +21 -0
- package/dist/components/rich-text-editor.css +2 -0
- package/dist/components/richTextEditor/EditorTools.cjs +98 -44
- package/dist/components/richTextEditor/EditorTools.cjs.map +2 -2
- package/dist/components/richTextEditor/EditorTools.d.cts +51 -1
- package/dist/components/richTextEditor/EditorTools.d.cts.map +1 -1
- package/dist/components/richTextEditor/EditorTools.d.mts +51 -1
- package/dist/components/richTextEditor/EditorTools.d.mts.map +1 -1
- package/dist/components/richTextEditor/EditorTools.d.ts +51 -1
- package/dist/components/richTextEditor/EditorTools.d.ts.map +1 -1
- package/dist/components/richTextEditor/EditorTools.js +98 -44
- package/dist/components/richTextEditor/EditorTools.js.map +2 -2
- package/dist/components/richTextEditor/MentionSuggestions.cjs +6 -7
- package/dist/components/richTextEditor/MentionSuggestions.cjs.map +2 -2
- package/dist/components/richTextEditor/MentionSuggestions.d.cts +3 -1
- package/dist/components/richTextEditor/MentionSuggestions.d.cts.map +1 -1
- package/dist/components/richTextEditor/MentionSuggestions.d.mts +3 -1
- package/dist/components/richTextEditor/MentionSuggestions.d.mts.map +1 -1
- package/dist/components/richTextEditor/MentionSuggestions.d.ts +3 -1
- package/dist/components/richTextEditor/MentionSuggestions.d.ts.map +1 -1
- package/dist/components/richTextEditor/MentionSuggestions.js +6 -7
- package/dist/components/richTextEditor/MentionSuggestions.js.map +2 -2
- package/dist/components/richTextEditor/RichTextEditor.cjs +17 -10
- package/dist/components/richTextEditor/RichTextEditor.cjs.map +3 -3
- package/dist/components/richTextEditor/RichTextEditor.d.cts +2 -1
- package/dist/components/richTextEditor/RichTextEditor.d.cts.map +1 -1
- package/dist/components/richTextEditor/RichTextEditor.d.mts +2 -1
- package/dist/components/richTextEditor/RichTextEditor.d.mts.map +1 -1
- package/dist/components/richTextEditor/RichTextEditor.d.ts +2 -1
- package/dist/components/richTextEditor/RichTextEditor.d.ts.map +1 -1
- package/dist/components/richTextEditor/RichTextEditor.js +17 -10
- package/dist/components/richTextEditor/RichTextEditor.js.map +3 -3
- package/dist/components/segmented-control.css +14 -5
- package/dist/docs/component-index.json +1 -1
- package/dist/docs/components/alert.md +4 -0
- package/dist/docs/components/box.md +3 -1
- package/dist/docs/components/config-drawer.md +3 -1
- package/dist/docs/components/grid.md +2 -0
- package/dist/docs/components/input-otp.md +10 -2
- package/dist/docs/components/layout-props.md +4 -1
- package/dist/docs/components/link.md +4 -0
- package/dist/docs/components/rich-text-editor.md +6 -1
- package/dist/docs/components/segmented-control.md +3 -2
- package/dist/docs/consumer-guide.md +96 -0
- package/dist/foundations/telegram/index.cjs +20 -0
- package/dist/foundations/telegram/index.cjs.map +7 -0
- package/dist/foundations/telegram/index.d.cts +3 -0
- package/dist/foundations/telegram/index.d.cts.map +1 -0
- package/dist/foundations/telegram/index.d.mts +3 -0
- package/dist/foundations/telegram/index.d.mts.map +1 -0
- package/dist/foundations/telegram/index.d.ts +3 -0
- package/dist/foundations/telegram/index.d.ts.map +1 -0
- package/dist/foundations/telegram/index.js +3 -0
- package/dist/foundations/telegram/index.js.map +7 -0
- package/dist/foundations/telegram/theme-params.cjs +160 -0
- package/dist/foundations/telegram/theme-params.cjs.map +7 -0
- package/dist/foundations/telegram/theme-params.d.cts +124 -0
- package/dist/foundations/telegram/theme-params.d.cts.map +1 -0
- package/dist/foundations/telegram/theme-params.d.mts +124 -0
- package/dist/foundations/telegram/theme-params.d.mts.map +1 -0
- package/dist/foundations/telegram/theme-params.d.ts +124 -0
- package/dist/foundations/telegram/theme-params.d.ts.map +1 -0
- package/dist/foundations/telegram/theme-params.js +140 -0
- package/dist/foundations/telegram/theme-params.js.map +7 -0
- package/dist/foundations/telegram/viewport.cjs +81 -0
- package/dist/foundations/telegram/viewport.cjs.map +7 -0
- package/dist/foundations/telegram/viewport.d.cts +57 -0
- package/dist/foundations/telegram/viewport.d.cts.map +1 -0
- package/dist/foundations/telegram/viewport.d.mts +57 -0
- package/dist/foundations/telegram/viewport.d.mts.map +1 -0
- package/dist/foundations/telegram/viewport.d.ts +57 -0
- package/dist/foundations/telegram/viewport.d.ts.map +1 -0
- package/dist/foundations/telegram/viewport.js +61 -0
- package/dist/foundations/telegram/viewport.js.map +7 -0
- package/dist/layout/Layout.cjs +13 -9
- package/dist/layout/Layout.cjs.map +2 -2
- package/dist/layout/Layout.d.cts.map +1 -1
- package/dist/layout/Layout.d.mts.map +1 -1
- package/dist/layout/Layout.d.ts.map +1 -1
- package/dist/layout/Layout.js +13 -9
- package/dist/layout/Layout.js.map +2 -2
- package/dist/layout/grid-area.cjs +32 -0
- package/dist/layout/grid-area.cjs.map +7 -0
- package/dist/layout/grid-area.d.cts +12 -0
- package/dist/layout/grid-area.d.cts.map +1 -0
- package/dist/layout/grid-area.d.mts +12 -0
- package/dist/layout/grid-area.d.mts.map +1 -0
- package/dist/layout/grid-area.d.ts +12 -0
- package/dist/layout/grid-area.d.ts.map +1 -0
- package/dist/layout/grid-area.js +12 -0
- package/dist/layout/grid-area.js.map +7 -0
- package/dist/styles.css +11368 -12137
- package/dist/telegram.css +93 -0
- package/dist/tokens.cjs +968 -0
- package/dist/tokens.d.cts +964 -0
- package/dist/tokens.d.mts +964 -0
- package/dist/tokens.d.ts +964 -0
- package/dist/tokens.js +964 -0
- package/dist/tokens.json +964 -0
- package/dist/utilities.css +2 -3
- package/package.json +26 -2
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* D4gger Telegram Mini App adapter (opt-in, additive).
|
|
3
|
+
*
|
|
4
|
+
* Import AFTER the core bundle in a Mini App entry:
|
|
5
|
+
*
|
|
6
|
+
* import '@d4gger/design-system/styles.css'
|
|
7
|
+
* import '@d4gger/design-system/telegram.css'
|
|
8
|
+
*
|
|
9
|
+
* Every `var(--tg-*)` reference below falls back to standard-web behavior,
|
|
10
|
+
* so this file is a no-op outside a Telegram WebView (Telegram's script sets
|
|
11
|
+
* its `--tg-*` vars on `:root` as soon as it loads). The `qa:telegram-vars`
|
|
12
|
+
* package check enforces that invariant: each `--tg-*` reference must carry
|
|
13
|
+
* a fallback, and this file must never declare a `--tg-*` variable
|
|
14
|
+
* (Telegram owns that namespace — referenced, never declared, same
|
|
15
|
+
* relationship the package already has with `--radix-*`).
|
|
16
|
+
*
|
|
17
|
+
* Two layers, and no colours:
|
|
18
|
+
* 1. Viewport + content-safe-area bindings (`--dsx-tg-*` aliases).
|
|
19
|
+
* The stable-height and base safe-area aliases already ship in the
|
|
20
|
+
* core `globals.css` compliance layer; this file adds the stable
|
|
21
|
+
* aliases for composition plus the content-safe-area inset variant
|
|
22
|
+
* (inside Telegram's own bottom chrome).
|
|
23
|
+
* 2. A low-end motion guard for small WebViews.
|
|
24
|
+
*
|
|
25
|
+
* Telegram's palette reaches the DS through ONE path, the `./telegram`
|
|
26
|
+
* subpath's `applyTelegramThemeParams` (G-35). A CSS-only colour bridge
|
|
27
|
+
* cannot work: the theme rules re-declare every token on `<body>`, and a
|
|
28
|
+
* token cannot fall back to itself.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
:root {
|
|
32
|
+
--dsx-tg-viewport-height: var(--tg-viewport-height, 100vh);
|
|
33
|
+
--dsx-tg-viewport-stable-height: var(--tg-viewport-stable-height, 100vh);
|
|
34
|
+
--dsx-tg-content-safe-area-inset-top: var(
|
|
35
|
+
--tg-content-safe-area-inset-top,
|
|
36
|
+
var(--dsx-safe-area-inset-top, env(safe-area-inset-top, 0px))
|
|
37
|
+
);
|
|
38
|
+
--dsx-tg-content-safe-area-inset-right: var(
|
|
39
|
+
--tg-content-safe-area-inset-right,
|
|
40
|
+
var(--dsx-safe-area-inset-right, env(safe-area-inset-right, 0px))
|
|
41
|
+
);
|
|
42
|
+
--dsx-tg-content-safe-area-inset-bottom: var(
|
|
43
|
+
--tg-content-safe-area-inset-bottom,
|
|
44
|
+
var(--dsx-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))
|
|
45
|
+
);
|
|
46
|
+
--dsx-tg-content-safe-area-inset-left: var(
|
|
47
|
+
--tg-content-safe-area-inset-left,
|
|
48
|
+
var(--dsx-safe-area-inset-left, env(safe-area-inset-left, 0px))
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Low-end motion guard for small WebViews. The OS-level
|
|
53
|
+
* `prefers-reduced-motion` signal is already honored globally by
|
|
54
|
+
* `motion.css` / `brand-effects.css` themselves; what they lack is an
|
|
55
|
+
* app-set kill-switch for low-end Android WebViews where the OS signal
|
|
56
|
+
* never fires. Setting `data-tg-motion="reduced"` on the Mini App root
|
|
57
|
+
* (the app decides, e.g. via `navigator.hardwareConcurrency` /
|
|
58
|
+
* device-memory heuristics) applies the same treatment motion.css uses,
|
|
59
|
+
* mirrored class-for-class: entrances resolve to their resting state,
|
|
60
|
+
* continuous loops go static, ember motes hide, and collapse skips its
|
|
61
|
+
* transition without cancelling the exit it animates.
|
|
62
|
+
* 60fps guidance for Mini Apps: keep this marker available, avoid
|
|
63
|
+
* `brand-effects.css` inside the WebView, and keep per-frame work (orbit
|
|
64
|
+
* satellites, scan sweeps, starfields) off small screens. */
|
|
65
|
+
[data-tg-mini-app][data-tg-motion='reduced'] .dsx-motion-fade,
|
|
66
|
+
[data-tg-mini-app][data-tg-motion='reduced'] .dsx-motion-converge,
|
|
67
|
+
[data-tg-mini-app][data-tg-motion='reduced'] .dsx-motion-rift,
|
|
68
|
+
[data-tg-mini-app][data-tg-motion='reduced'] .dsx-motion-stagger > *,
|
|
69
|
+
[data-tg-mini-app][data-tg-motion='reduced'] .dsx-motion-orbit,
|
|
70
|
+
[data-tg-mini-app][data-tg-motion='reduced'] .dsx-motion-pulse,
|
|
71
|
+
[data-tg-mini-app][data-tg-motion='reduced'] .dsx-motion-scan,
|
|
72
|
+
[data-tg-mini-app][data-tg-motion='reduced'] .dsx-motion-glow,
|
|
73
|
+
[data-tg-mini-app][data-tg-motion='reduced'] .dsx-motion-drift,
|
|
74
|
+
[data-tg-mini-app][data-tg-motion='reduced'] .dsx-motion-starfield::before,
|
|
75
|
+
[data-tg-mini-app][data-tg-motion='reduced'] .dsx-motion-aurora::after,
|
|
76
|
+
[data-tg-mini-app][data-tg-motion='reduced'] .dsx-motion-twinkle,
|
|
77
|
+
[data-tg-mini-app][data-tg-motion='reduced'] .dsx-brand-ambient,
|
|
78
|
+
[data-tg-mini-app][data-tg-motion='reduced'] .dsx-brand-starfield,
|
|
79
|
+
[data-tg-mini-app][data-tg-motion='reduced'] .dsx-brand-shimmer {
|
|
80
|
+
animation: none;
|
|
81
|
+
opacity: 1;
|
|
82
|
+
filter: none;
|
|
83
|
+
transform: none;
|
|
84
|
+
clip-path: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
[data-tg-mini-app][data-tg-motion='reduced'] .dsx-motion-collapse {
|
|
88
|
+
animation: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
[data-tg-mini-app][data-tg-motion='reduced'] .dsx-motion-ember__mote {
|
|
92
|
+
display: none;
|
|
93
|
+
}
|