rnwind 0.0.1 → 0.0.3
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/lib/cjs/core/parser/animation.cjs +427 -0
- package/lib/cjs/core/parser/animation.cjs.map +1 -0
- package/lib/cjs/core/parser/animation.d.ts +126 -0
- package/lib/cjs/core/parser/border-dispatcher.cjs +180 -0
- package/lib/cjs/core/parser/border-dispatcher.cjs.map +1 -0
- package/lib/cjs/core/parser/border-dispatcher.d.ts +15 -0
- package/lib/cjs/core/parser/case-convert.cjs +15 -0
- package/lib/cjs/core/parser/case-convert.cjs.map +1 -0
- package/lib/cjs/core/parser/case-convert.d.ts +6 -0
- package/lib/cjs/core/parser/color-properties-dispatcher.cjs +84 -0
- package/lib/cjs/core/parser/color-properties-dispatcher.cjs.map +1 -0
- package/lib/cjs/core/parser/color-properties-dispatcher.d.ts +19 -0
- package/lib/cjs/core/parser/color.cjs +193 -0
- package/lib/cjs/core/parser/color.cjs.map +1 -0
- package/lib/cjs/core/parser/color.d.ts +12 -0
- package/lib/cjs/core/parser/constants.cjs +21 -0
- package/lib/cjs/core/parser/constants.cjs.map +1 -0
- package/lib/cjs/core/parser/constants.d.ts +8 -0
- package/lib/cjs/core/parser/declaration.cjs +347 -0
- package/lib/cjs/core/parser/declaration.cjs.map +1 -0
- package/lib/cjs/core/parser/declaration.d.ts +15 -0
- package/lib/cjs/core/parser/gradient.cjs +132 -0
- package/lib/cjs/core/parser/gradient.cjs.map +1 -0
- package/lib/cjs/core/parser/gradient.d.ts +59 -0
- package/lib/cjs/core/parser/haptics.cjs +73 -0
- package/lib/cjs/core/parser/haptics.cjs.map +1 -0
- package/lib/cjs/core/parser/haptics.d.ts +47 -0
- package/lib/cjs/core/parser/index.d.ts +8 -0
- package/lib/cjs/core/parser/keyframes.cjs +95 -0
- package/lib/cjs/core/parser/keyframes.cjs.map +1 -0
- package/lib/cjs/core/parser/keyframes.d.ts +26 -0
- package/lib/cjs/core/parser/layout-dispatcher.cjs +120 -0
- package/lib/cjs/core/parser/layout-dispatcher.cjs.map +1 -0
- package/lib/cjs/core/parser/layout-dispatcher.d.ts +14 -0
- package/lib/cjs/core/parser/length.cjs +110 -0
- package/lib/cjs/core/parser/length.cjs.map +1 -0
- package/lib/cjs/core/parser/length.d.ts +51 -0
- package/lib/cjs/core/parser/motion-dispatcher.cjs +77 -0
- package/lib/cjs/core/parser/motion-dispatcher.cjs.map +1 -0
- package/lib/cjs/core/parser/motion-dispatcher.d.ts +11 -0
- package/lib/cjs/core/parser/property.cjs +22 -0
- package/lib/cjs/core/parser/property.cjs.map +1 -0
- package/lib/cjs/core/parser/property.d.ts +8 -0
- package/lib/cjs/core/parser/safe-area.cjs +404 -0
- package/lib/cjs/core/parser/safe-area.cjs.map +1 -0
- package/lib/cjs/core/parser/safe-area.d.ts +39 -0
- package/lib/cjs/core/parser/selector.cjs +22 -0
- package/lib/cjs/core/parser/selector.cjs.map +1 -0
- package/lib/cjs/core/parser/selector.d.ts +11 -0
- package/lib/cjs/core/parser/shorthand.cjs +188 -0
- package/lib/cjs/core/parser/shorthand.cjs.map +1 -0
- package/lib/cjs/core/parser/shorthand.d.ts +67 -0
- package/lib/cjs/core/parser/text-truncate.cjs +78 -0
- package/lib/cjs/core/parser/text-truncate.cjs.map +1 -0
- package/lib/cjs/core/parser/text-truncate.d.ts +44 -0
- package/lib/cjs/core/parser/theme-vars.cjs +467 -0
- package/lib/cjs/core/parser/theme-vars.cjs.map +1 -0
- package/lib/cjs/core/parser/theme-vars.d.ts +82 -0
- package/lib/cjs/core/parser/tokens.cjs +486 -0
- package/lib/cjs/core/parser/tokens.cjs.map +1 -0
- package/lib/cjs/core/parser/tokens.d.ts +45 -0
- package/lib/cjs/core/parser/transform.cjs +198 -0
- package/lib/cjs/core/parser/transform.cjs.map +1 -0
- package/lib/cjs/core/parser/transform.d.ts +36 -0
- package/lib/cjs/core/parser/tw-parser.cjs +1680 -0
- package/lib/cjs/core/parser/tw-parser.cjs.map +1 -0
- package/lib/cjs/core/parser/tw-parser.d.ts +210 -0
- package/lib/cjs/core/parser/types.d.ts +37 -0
- package/lib/cjs/core/parser/typography-dispatcher.cjs +108 -0
- package/lib/cjs/core/parser/typography-dispatcher.cjs.map +1 -0
- package/lib/cjs/core/parser/typography-dispatcher.d.ts +11 -0
- package/lib/cjs/core/parser/typography.cjs +97 -0
- package/lib/cjs/core/parser/typography.cjs.map +1 -0
- package/lib/cjs/core/parser/typography.d.ts +43 -0
- package/lib/cjs/core/style-builder/build-style.cjs +444 -0
- package/lib/cjs/core/style-builder/build-style.cjs.map +1 -0
- package/lib/cjs/core/style-builder/build-style.d.ts +54 -0
- package/lib/cjs/core/style-builder/index.d.ts +3 -0
- package/lib/cjs/core/style-builder/union-builder.cjs +326 -0
- package/lib/cjs/core/style-builder/union-builder.cjs.map +1 -0
- package/lib/cjs/core/style-builder/union-builder.d.ts +128 -0
- package/lib/cjs/core/types.d.ts +14 -0
- package/lib/cjs/metro/dts.cjs +127 -0
- package/lib/cjs/metro/dts.cjs.map +1 -0
- package/lib/cjs/metro/dts.d.ts +16 -0
- package/lib/cjs/metro/index.cjs +19 -0
- package/lib/cjs/metro/index.cjs.map +1 -0
- package/lib/cjs/metro/index.d.ts +9 -0
- package/lib/cjs/metro/resolver.cjs +47 -0
- package/lib/cjs/metro/resolver.cjs.map +1 -0
- package/lib/cjs/metro/resolver.d.ts +22 -0
- package/lib/cjs/metro/state.cjs +301 -0
- package/lib/cjs/metro/state.cjs.map +1 -0
- package/lib/cjs/metro/state.d.ts +88 -0
- package/lib/cjs/metro/transform-ast.cjs +1472 -0
- package/lib/cjs/metro/transform-ast.cjs.map +1 -0
- package/lib/cjs/metro/transform-ast.d.ts +88 -0
- package/lib/cjs/metro/transformer.cjs +372 -0
- package/lib/cjs/metro/transformer.cjs.map +1 -0
- package/lib/cjs/metro/transformer.d.ts +47 -0
- package/lib/cjs/metro/warn-unknown-classes.cjs +86 -0
- package/lib/cjs/metro/warn-unknown-classes.cjs.map +1 -0
- package/lib/cjs/metro/warn-unknown-classes.d.ts +21 -0
- package/lib/cjs/metro/with-config.cjs +196 -0
- package/lib/cjs/metro/with-config.cjs.map +1 -0
- package/lib/cjs/metro/with-config.d.ts +79 -0
- package/lib/cjs/runtime/chain-handlers.cjs +37 -0
- package/lib/cjs/runtime/chain-handlers.cjs.map +1 -0
- package/lib/cjs/runtime/chain-handlers.d.ts +33 -0
- package/lib/cjs/runtime/components/rnwind-provider.cjs +98 -0
- package/lib/cjs/runtime/components/rnwind-provider.cjs.map +1 -0
- package/lib/cjs/runtime/components/rnwind-provider.d.ts +84 -0
- package/lib/cjs/runtime/gradient-types.d.ts +58 -0
- package/lib/cjs/runtime/haptics.cjs +113 -0
- package/lib/cjs/runtime/haptics.cjs.map +1 -0
- package/lib/cjs/runtime/haptics.d.ts +48 -0
- package/lib/cjs/runtime/hooks/use-css.cjs +21 -0
- package/lib/cjs/runtime/hooks/use-css.cjs.map +1 -0
- package/lib/cjs/runtime/hooks/use-css.d.ts +11 -0
- package/lib/cjs/runtime/hooks/use-interact.cjs +46 -0
- package/lib/cjs/runtime/hooks/use-interact.cjs.map +1 -0
- package/lib/cjs/runtime/hooks/use-interact.d.ts +42 -0
- package/lib/cjs/runtime/hooks/use-scheme.cjs +68 -0
- package/lib/cjs/runtime/hooks/use-scheme.cjs.map +1 -0
- package/lib/cjs/runtime/hooks/use-scheme.d.ts +34 -0
- package/lib/cjs/runtime/index.cjs +45 -0
- package/lib/cjs/runtime/index.cjs.map +1 -0
- package/lib/cjs/runtime/index.d.ts +27 -0
- package/lib/cjs/runtime/interactive-box.cjs +35 -0
- package/lib/cjs/runtime/interactive-box.cjs.map +1 -0
- package/lib/cjs/runtime/interactive-box.d.ts +40 -0
- package/lib/cjs/runtime/lookup-css.cjs +542 -0
- package/lib/cjs/runtime/lookup-css.cjs.map +1 -0
- package/lib/cjs/runtime/lookup-css.d.ts +164 -0
- package/lib/cjs/runtime/types.d.ts +29 -0
- package/lib/cjs/testing/index.cjs +367 -0
- package/lib/cjs/testing/index.cjs.map +1 -0
- package/lib/cjs/testing/index.d.ts +145 -0
- package/lib/esm/core/parser/animation.d.ts +126 -0
- package/lib/esm/core/parser/animation.mjs +408 -0
- package/lib/esm/core/parser/animation.mjs.map +1 -0
- package/lib/esm/core/parser/border-dispatcher.d.ts +15 -0
- package/lib/esm/core/parser/border-dispatcher.mjs +178 -0
- package/lib/esm/core/parser/border-dispatcher.mjs.map +1 -0
- package/lib/esm/core/parser/case-convert.d.ts +6 -0
- package/lib/esm/core/parser/case-convert.mjs +13 -0
- package/lib/esm/core/parser/case-convert.mjs.map +1 -0
- package/lib/esm/core/parser/color-properties-dispatcher.d.ts +19 -0
- package/lib/esm/core/parser/color-properties-dispatcher.mjs +82 -0
- package/lib/esm/core/parser/color-properties-dispatcher.mjs.map +1 -0
- package/lib/esm/core/parser/color.d.ts +12 -0
- package/lib/esm/core/parser/color.mjs +191 -0
- package/lib/esm/core/parser/color.mjs.map +1 -0
- package/lib/esm/core/parser/constants.d.ts +8 -0
- package/lib/esm/core/parser/constants.mjs +13 -0
- package/lib/esm/core/parser/constants.mjs.map +1 -0
- package/lib/esm/core/parser/declaration.d.ts +15 -0
- package/lib/esm/core/parser/declaration.mjs +345 -0
- package/lib/esm/core/parser/declaration.mjs.map +1 -0
- package/lib/esm/core/parser/gradient.d.ts +59 -0
- package/lib/esm/core/parser/gradient.mjs +130 -0
- package/lib/esm/core/parser/gradient.mjs.map +1 -0
- package/lib/esm/core/parser/haptics.d.ts +47 -0
- package/lib/esm/core/parser/haptics.mjs +71 -0
- package/lib/esm/core/parser/haptics.mjs.map +1 -0
- package/lib/esm/core/parser/index.d.ts +8 -0
- package/lib/esm/core/parser/keyframes.d.ts +26 -0
- package/lib/esm/core/parser/keyframes.mjs +91 -0
- package/lib/esm/core/parser/keyframes.mjs.map +1 -0
- package/lib/esm/core/parser/layout-dispatcher.d.ts +14 -0
- package/lib/esm/core/parser/layout-dispatcher.mjs +118 -0
- package/lib/esm/core/parser/layout-dispatcher.mjs.map +1 -0
- package/lib/esm/core/parser/length.d.ts +51 -0
- package/lib/esm/core/parser/length.mjs +104 -0
- package/lib/esm/core/parser/length.mjs.map +1 -0
- package/lib/esm/core/parser/motion-dispatcher.d.ts +11 -0
- package/lib/esm/core/parser/motion-dispatcher.mjs +75 -0
- package/lib/esm/core/parser/motion-dispatcher.mjs.map +1 -0
- package/lib/esm/core/parser/property.d.ts +8 -0
- package/lib/esm/core/parser/property.mjs +20 -0
- package/lib/esm/core/parser/property.mjs.map +1 -0
- package/lib/esm/core/parser/safe-area.d.ts +39 -0
- package/lib/esm/core/parser/safe-area.mjs +402 -0
- package/lib/esm/core/parser/safe-area.mjs.map +1 -0
- package/lib/esm/core/parser/selector.d.ts +11 -0
- package/lib/esm/core/parser/selector.mjs +20 -0
- package/lib/esm/core/parser/selector.mjs.map +1 -0
- package/lib/esm/core/parser/shorthand.d.ts +67 -0
- package/lib/esm/core/parser/shorthand.mjs +180 -0
- package/lib/esm/core/parser/shorthand.mjs.map +1 -0
- package/lib/esm/core/parser/text-truncate.d.ts +44 -0
- package/lib/esm/core/parser/text-truncate.mjs +75 -0
- package/lib/esm/core/parser/text-truncate.mjs.map +1 -0
- package/lib/esm/core/parser/theme-vars.d.ts +82 -0
- package/lib/esm/core/parser/theme-vars.mjs +461 -0
- package/lib/esm/core/parser/theme-vars.mjs.map +1 -0
- package/lib/esm/core/parser/tokens.d.ts +45 -0
- package/lib/esm/core/parser/tokens.mjs +480 -0
- package/lib/esm/core/parser/tokens.mjs.map +1 -0
- package/lib/esm/core/parser/transform.d.ts +36 -0
- package/lib/esm/core/parser/transform.mjs +193 -0
- package/lib/esm/core/parser/transform.mjs.map +1 -0
- package/lib/esm/core/parser/tw-parser.d.ts +210 -0
- package/lib/esm/core/parser/tw-parser.mjs +1678 -0
- package/lib/esm/core/parser/tw-parser.mjs.map +1 -0
- package/lib/esm/core/parser/types.d.ts +37 -0
- package/lib/esm/core/parser/typography-dispatcher.d.ts +11 -0
- package/lib/esm/core/parser/typography-dispatcher.mjs +106 -0
- package/lib/esm/core/parser/typography-dispatcher.mjs.map +1 -0
- package/lib/esm/core/parser/typography.d.ts +43 -0
- package/lib/esm/core/parser/typography.mjs +91 -0
- package/lib/esm/core/parser/typography.mjs.map +1 -0
- package/lib/esm/core/style-builder/build-style.d.ts +54 -0
- package/lib/esm/core/style-builder/build-style.mjs +442 -0
- package/lib/esm/core/style-builder/build-style.mjs.map +1 -0
- package/lib/esm/core/style-builder/index.d.ts +3 -0
- package/lib/esm/core/style-builder/union-builder.d.ts +128 -0
- package/lib/esm/core/style-builder/union-builder.mjs +324 -0
- package/lib/esm/core/style-builder/union-builder.mjs.map +1 -0
- package/lib/esm/core/types.d.ts +14 -0
- package/lib/esm/metro/dts.d.ts +16 -0
- package/lib/esm/metro/dts.mjs +125 -0
- package/lib/esm/metro/dts.mjs.map +1 -0
- package/lib/esm/metro/index.d.ts +9 -0
- package/lib/esm/metro/index.mjs +6 -0
- package/lib/esm/metro/index.mjs.map +1 -0
- package/lib/esm/metro/resolver.d.ts +22 -0
- package/lib/esm/metro/resolver.mjs +43 -0
- package/lib/esm/metro/resolver.mjs.map +1 -0
- package/lib/esm/metro/state.d.ts +88 -0
- package/lib/esm/metro/state.mjs +291 -0
- package/lib/esm/metro/state.mjs.map +1 -0
- package/lib/esm/metro/transform-ast.d.ts +88 -0
- package/lib/esm/metro/transform-ast.mjs +1451 -0
- package/lib/esm/metro/transform-ast.mjs.map +1 -0
- package/lib/esm/metro/transformer.d.ts +47 -0
- package/lib/esm/metro/transformer.mjs +349 -0
- package/lib/esm/metro/transformer.mjs.map +1 -0
- package/lib/esm/metro/warn-unknown-classes.d.ts +21 -0
- package/lib/esm/metro/warn-unknown-classes.mjs +84 -0
- package/lib/esm/metro/warn-unknown-classes.mjs.map +1 -0
- package/lib/esm/metro/with-config.d.ts +79 -0
- package/lib/esm/metro/with-config.mjs +194 -0
- package/lib/esm/metro/with-config.mjs.map +1 -0
- package/lib/esm/runtime/chain-handlers.d.ts +33 -0
- package/lib/esm/runtime/chain-handlers.mjs +34 -0
- package/lib/esm/runtime/chain-handlers.mjs.map +1 -0
- package/lib/esm/runtime/components/rnwind-provider.d.ts +84 -0
- package/lib/esm/runtime/components/rnwind-provider.mjs +94 -0
- package/lib/esm/runtime/components/rnwind-provider.mjs.map +1 -0
- package/lib/esm/runtime/gradient-types.d.ts +58 -0
- package/lib/esm/runtime/haptics.d.ts +48 -0
- package/lib/esm/runtime/haptics.mjs +110 -0
- package/lib/esm/runtime/haptics.mjs.map +1 -0
- package/lib/esm/runtime/hooks/use-css.d.ts +11 -0
- package/lib/esm/runtime/hooks/use-css.mjs +19 -0
- package/lib/esm/runtime/hooks/use-css.mjs.map +1 -0
- package/lib/esm/runtime/hooks/use-interact.d.ts +42 -0
- package/lib/esm/runtime/hooks/use-interact.mjs +44 -0
- package/lib/esm/runtime/hooks/use-interact.mjs.map +1 -0
- package/lib/esm/runtime/hooks/use-scheme.d.ts +34 -0
- package/lib/esm/runtime/hooks/use-scheme.mjs +63 -0
- package/lib/esm/runtime/hooks/use-scheme.mjs.map +1 -0
- package/lib/esm/runtime/index.d.ts +27 -0
- package/lib/esm/runtime/index.mjs +18 -0
- package/lib/esm/runtime/index.mjs.map +1 -0
- package/lib/esm/runtime/interactive-box.d.ts +40 -0
- package/lib/esm/runtime/interactive-box.mjs +33 -0
- package/lib/esm/runtime/interactive-box.mjs.map +1 -0
- package/lib/esm/runtime/lookup-css.d.ts +164 -0
- package/lib/esm/runtime/lookup-css.mjs +531 -0
- package/lib/esm/runtime/lookup-css.mjs.map +1 -0
- package/lib/esm/runtime/types.d.ts +29 -0
- package/lib/esm/testing/index.d.ts +145 -0
- package/lib/esm/testing/index.mjs +344 -0
- package/lib/esm/testing/index.mjs.map +1 -0
- package/package.json +80 -13
- package/preset.css +1171 -0
- package/src/core/parser/animation.ts +404 -0
- package/src/core/parser/border-dispatcher.ts +176 -0
- package/src/core/parser/case-convert.ts +10 -0
- package/src/core/parser/color-properties-dispatcher.ts +78 -0
- package/src/core/parser/color.ts +191 -0
- package/src/core/parser/constants.ts +11 -0
- package/src/core/parser/declaration.ts +340 -0
- package/src/core/parser/gradient.ts +148 -0
- package/src/core/parser/haptics.ts +88 -0
- package/src/core/parser/index.ts +8 -0
- package/src/core/parser/keyframes.ts +84 -0
- package/src/core/parser/layout-dispatcher.ts +111 -0
- package/src/core/parser/length.ts +114 -0
- package/src/core/parser/motion-dispatcher.ts +89 -0
- package/src/core/parser/property.ts +15 -0
- package/src/core/parser/safe-area.ts +404 -0
- package/src/core/parser/selector.ts +17 -0
- package/src/core/parser/shorthand.ts +182 -0
- package/src/core/parser/text-truncate.ts +79 -0
- package/src/core/parser/theme-vars.ts +465 -0
- package/src/core/parser/tokens.ts +456 -0
- package/src/core/parser/transform.ts +195 -0
- package/src/core/parser/tw-parser.ts +1828 -0
- package/src/core/parser/types.ts +45 -0
- package/src/core/parser/typography-dispatcher.ts +97 -0
- package/src/core/parser/typography.ts +83 -0
- package/src/core/style-builder/build-style.ts +500 -0
- package/src/core/style-builder/index.ts +3 -0
- package/src/core/style-builder/union-builder.ts +328 -0
- package/src/core/types.ts +15 -0
- package/src/metro/dts.ts +128 -0
- package/src/metro/index.ts +9 -0
- package/src/metro/resolver.ts +42 -0
- package/src/metro/state.ts +305 -0
- package/src/metro/transform-ast.ts +1729 -0
- package/src/metro/transformer.ts +372 -0
- package/src/metro/warn-unknown-classes.ts +79 -0
- package/src/metro/with-config.ts +251 -0
- package/src/runtime/chain-handlers.ts +47 -0
- package/src/runtime/components/rnwind-provider.tsx +144 -0
- package/src/runtime/gradient-types.ts +60 -0
- package/src/runtime/haptics.ts +120 -0
- package/src/runtime/hooks/use-css.ts +16 -0
- package/src/runtime/hooks/use-interact.ts +65 -0
- package/src/runtime/hooks/use-scheme.ts +63 -0
- package/src/runtime/index.ts +54 -0
- package/src/runtime/interactive-box.tsx +57 -0
- package/src/runtime/lookup-css.ts +628 -0
- package/src/runtime/types.ts +32 -0
- package/src/testing/index.ts +507 -0
- package/src/types/tailwindcss-node.d.ts +33 -0
- package/src/index.ts +0 -1
package/preset.css
ADDED
|
@@ -0,0 +1,1171 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* rnwind preset — built-in enter / exit / layout animation utilities for
|
|
3
|
+
* React Native Reanimated v4+.
|
|
4
|
+
*
|
|
5
|
+
* Import from your theme CSS alongside Tailwind:
|
|
6
|
+
*
|
|
7
|
+
* @import 'tailwindcss';
|
|
8
|
+
* @import 'rnwind/css';
|
|
9
|
+
*
|
|
10
|
+
* Every utility here is a functional `@utility name-*` declaration, so the
|
|
11
|
+
* Tailwind VSCode extension offers autocompletion for every duration value
|
|
12
|
+
* you pass. Durations accept three shapes:
|
|
13
|
+
*
|
|
14
|
+
* enter-fade -> default duration (--duration-normal, 220ms)
|
|
15
|
+
* enter-fade-fast -> named token (--duration-fast, 120ms)
|
|
16
|
+
* enter-fade-500 -> bare integer (milliseconds)
|
|
17
|
+
* enter-fade-[250ms] -> arbitrary CSS <time> literal
|
|
18
|
+
*
|
|
19
|
+
* The same pattern applies to every `enter-*`, `exit-*`, and `layout-*`
|
|
20
|
+
* utility. Shortcuts (`enter-fade`, `exit-fade`, `layout`) stay available as
|
|
21
|
+
* zero-config entry points.
|
|
22
|
+
*
|
|
23
|
+
* At runtime, rnwind lowers these to the longhand `animationName` /
|
|
24
|
+
* `animationDuration` / `transitionProperty` / etc. style props so
|
|
25
|
+
* Reanimated v4's CSS engine picks them up on the UI thread without any
|
|
26
|
+
* imperative wiring.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
@theme {
|
|
30
|
+
/* Duration scale — pairs with `enter-*-<name>`, `exit-*-<name>`,
|
|
31
|
+
`layout-<name>`, and is also visible to Tailwind's own `duration-*`. */
|
|
32
|
+
--duration-instant: 80ms;
|
|
33
|
+
--duration-fast: 120ms;
|
|
34
|
+
--duration-normal: 220ms;
|
|
35
|
+
--duration-slow: 420ms;
|
|
36
|
+
--duration-slower: 640ms;
|
|
37
|
+
|
|
38
|
+
/* Easing scale — referenced by every built-in utility. React Native
|
|
39
|
+
Reanimated's CSS engine accepts only the predefined web keywords
|
|
40
|
+
(`linear`, `ease`, `ease-in`, `ease-out`, `ease-in-out`, `step-start`,
|
|
41
|
+
`step-end`) — `cubic-bezier(...)` is rejected as a transition timing
|
|
42
|
+
function. Users targeting web can override these in their own `@theme`
|
|
43
|
+
block to get the spring-y curves. */
|
|
44
|
+
/* `--rnw-hairline` is a sentinel pixel value the rnwind chunker
|
|
45
|
+
replaces with a runtime reference to React Native's
|
|
46
|
+
`StyleSheet.hairlineWidth` — the thinnest line the device can draw
|
|
47
|
+
(1 on @1x, 0.5 on @2x retina, ~0.33 on @3x). Use it via the
|
|
48
|
+
`*-hairline` utilities below. The literal value here is unique
|
|
49
|
+
enough to never collide with a real intentional border width. */
|
|
50
|
+
--rnw-hairline: 0.0009765625px;
|
|
51
|
+
|
|
52
|
+
--rnw-ease-out: ease-out;
|
|
53
|
+
--rnw-ease-in: ease-in;
|
|
54
|
+
--rnw-ease-spring: ease-in-out;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* ------------------------------------------------------------------
|
|
58
|
+
Keyframes. Prefixed with `rnw-` so they never collide with a
|
|
59
|
+
user's own keyframes.
|
|
60
|
+
------------------------------------------------------------------ */
|
|
61
|
+
|
|
62
|
+
@keyframes rnw-fade-in {
|
|
63
|
+
from {
|
|
64
|
+
opacity: 0;
|
|
65
|
+
}
|
|
66
|
+
to {
|
|
67
|
+
opacity: 1;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@keyframes rnw-fade-out {
|
|
72
|
+
from {
|
|
73
|
+
opacity: 1;
|
|
74
|
+
}
|
|
75
|
+
to {
|
|
76
|
+
opacity: 0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@keyframes rnw-zoom-in {
|
|
81
|
+
from {
|
|
82
|
+
transform: scale(0.9);
|
|
83
|
+
opacity: 0;
|
|
84
|
+
}
|
|
85
|
+
to {
|
|
86
|
+
transform: scale(1);
|
|
87
|
+
opacity: 1;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@keyframes rnw-zoom-out {
|
|
92
|
+
from {
|
|
93
|
+
transform: scale(1);
|
|
94
|
+
opacity: 1;
|
|
95
|
+
}
|
|
96
|
+
to {
|
|
97
|
+
transform: scale(0.9);
|
|
98
|
+
opacity: 0;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@keyframes rnw-slide-in-up {
|
|
103
|
+
from {
|
|
104
|
+
transform: translateY(20px);
|
|
105
|
+
opacity: 0;
|
|
106
|
+
}
|
|
107
|
+
to {
|
|
108
|
+
transform: translateY(0);
|
|
109
|
+
opacity: 1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@keyframes rnw-slide-in-down {
|
|
114
|
+
from {
|
|
115
|
+
transform: translateY(-20px);
|
|
116
|
+
opacity: 0;
|
|
117
|
+
}
|
|
118
|
+
to {
|
|
119
|
+
transform: translateY(0);
|
|
120
|
+
opacity: 1;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@keyframes rnw-slide-in-left {
|
|
125
|
+
from {
|
|
126
|
+
transform: translateX(-20px);
|
|
127
|
+
opacity: 0;
|
|
128
|
+
}
|
|
129
|
+
to {
|
|
130
|
+
transform: translateX(0);
|
|
131
|
+
opacity: 1;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@keyframes rnw-slide-in-right {
|
|
136
|
+
from {
|
|
137
|
+
transform: translateX(20px);
|
|
138
|
+
opacity: 0;
|
|
139
|
+
}
|
|
140
|
+
to {
|
|
141
|
+
transform: translateX(0);
|
|
142
|
+
opacity: 1;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@keyframes rnw-slide-out-up {
|
|
147
|
+
from {
|
|
148
|
+
transform: translateY(0);
|
|
149
|
+
opacity: 1;
|
|
150
|
+
}
|
|
151
|
+
to {
|
|
152
|
+
transform: translateY(-20px);
|
|
153
|
+
opacity: 0;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@keyframes rnw-slide-out-down {
|
|
158
|
+
from {
|
|
159
|
+
transform: translateY(0);
|
|
160
|
+
opacity: 1;
|
|
161
|
+
}
|
|
162
|
+
to {
|
|
163
|
+
transform: translateY(20px);
|
|
164
|
+
opacity: 0;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@keyframes rnw-slide-out-left {
|
|
169
|
+
from {
|
|
170
|
+
transform: translateX(0);
|
|
171
|
+
opacity: 1;
|
|
172
|
+
}
|
|
173
|
+
to {
|
|
174
|
+
transform: translateX(-20px);
|
|
175
|
+
opacity: 0;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
@keyframes rnw-slide-out-right {
|
|
180
|
+
from {
|
|
181
|
+
transform: translateX(0);
|
|
182
|
+
opacity: 1;
|
|
183
|
+
}
|
|
184
|
+
to {
|
|
185
|
+
transform: translateX(20px);
|
|
186
|
+
opacity: 0;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@keyframes rnw-bounce-in {
|
|
191
|
+
0% {
|
|
192
|
+
transform: scale(0.3);
|
|
193
|
+
opacity: 0;
|
|
194
|
+
}
|
|
195
|
+
50% {
|
|
196
|
+
transform: scale(1.05);
|
|
197
|
+
opacity: 1;
|
|
198
|
+
}
|
|
199
|
+
70% {
|
|
200
|
+
transform: scale(0.95);
|
|
201
|
+
}
|
|
202
|
+
100% {
|
|
203
|
+
transform: scale(1);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* ------------------------------------------------------------------
|
|
208
|
+
Enter animations — mount-time utilities.
|
|
209
|
+
|
|
210
|
+
Default: --duration-normal + --rnw-ease-out, fill-mode: both.
|
|
211
|
+
Suffixes accept the duration scale (named, integer ms, arbitrary).
|
|
212
|
+
------------------------------------------------------------------ */
|
|
213
|
+
|
|
214
|
+
@utility enter-fade {
|
|
215
|
+
animation-name: rnw-fade-in;
|
|
216
|
+
animation-duration: var(--duration-normal);
|
|
217
|
+
animation-timing-function: var(--rnw-ease-out);
|
|
218
|
+
animation-fill-mode: both;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
@utility enter-fade-* {
|
|
222
|
+
animation-name: rnw-fade-in;
|
|
223
|
+
animation-duration: --value(--duration-*);
|
|
224
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
225
|
+
animation-duration: --value([*]);
|
|
226
|
+
animation-timing-function: var(--rnw-ease-out);
|
|
227
|
+
animation-fill-mode: both;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@utility enter-zoom {
|
|
231
|
+
animation-name: rnw-zoom-in;
|
|
232
|
+
animation-duration: var(--duration-normal);
|
|
233
|
+
animation-timing-function: var(--rnw-ease-out);
|
|
234
|
+
animation-fill-mode: both;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@utility enter-zoom-* {
|
|
238
|
+
animation-name: rnw-zoom-in;
|
|
239
|
+
animation-duration: --value(--duration-*);
|
|
240
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
241
|
+
animation-duration: --value([*]);
|
|
242
|
+
animation-timing-function: var(--rnw-ease-out);
|
|
243
|
+
animation-fill-mode: both;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
@utility enter-slide-up {
|
|
247
|
+
animation-name: rnw-slide-in-up;
|
|
248
|
+
animation-duration: var(--duration-normal);
|
|
249
|
+
animation-timing-function: var(--rnw-ease-out);
|
|
250
|
+
animation-fill-mode: both;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
@utility enter-slide-up-* {
|
|
254
|
+
animation-name: rnw-slide-in-up;
|
|
255
|
+
animation-duration: --value(--duration-*);
|
|
256
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
257
|
+
animation-duration: --value([*]);
|
|
258
|
+
animation-timing-function: var(--rnw-ease-out);
|
|
259
|
+
animation-fill-mode: both;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
@utility enter-slide-down {
|
|
263
|
+
animation-name: rnw-slide-in-down;
|
|
264
|
+
animation-duration: var(--duration-normal);
|
|
265
|
+
animation-timing-function: var(--rnw-ease-out);
|
|
266
|
+
animation-fill-mode: both;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
@utility enter-slide-down-* {
|
|
270
|
+
animation-name: rnw-slide-in-down;
|
|
271
|
+
animation-duration: --value(--duration-*);
|
|
272
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
273
|
+
animation-duration: --value([*]);
|
|
274
|
+
animation-timing-function: var(--rnw-ease-out);
|
|
275
|
+
animation-fill-mode: both;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@utility enter-slide-left {
|
|
279
|
+
animation-name: rnw-slide-in-left;
|
|
280
|
+
animation-duration: var(--duration-normal);
|
|
281
|
+
animation-timing-function: var(--rnw-ease-out);
|
|
282
|
+
animation-fill-mode: both;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@utility enter-slide-left-* {
|
|
286
|
+
animation-name: rnw-slide-in-left;
|
|
287
|
+
animation-duration: --value(--duration-*);
|
|
288
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
289
|
+
animation-duration: --value([*]);
|
|
290
|
+
animation-timing-function: var(--rnw-ease-out);
|
|
291
|
+
animation-fill-mode: both;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
@utility enter-slide-right {
|
|
295
|
+
animation-name: rnw-slide-in-right;
|
|
296
|
+
animation-duration: var(--duration-normal);
|
|
297
|
+
animation-timing-function: var(--rnw-ease-out);
|
|
298
|
+
animation-fill-mode: both;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
@utility enter-slide-right-* {
|
|
302
|
+
animation-name: rnw-slide-in-right;
|
|
303
|
+
animation-duration: --value(--duration-*);
|
|
304
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
305
|
+
animation-duration: --value([*]);
|
|
306
|
+
animation-timing-function: var(--rnw-ease-out);
|
|
307
|
+
animation-fill-mode: both;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
@utility enter-bounce {
|
|
311
|
+
animation-name: rnw-bounce-in;
|
|
312
|
+
animation-duration: var(--duration-slow);
|
|
313
|
+
animation-timing-function: var(--rnw-ease-spring);
|
|
314
|
+
animation-fill-mode: both;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
@utility enter-bounce-* {
|
|
318
|
+
animation-name: rnw-bounce-in;
|
|
319
|
+
animation-duration: --value(--duration-*);
|
|
320
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
321
|
+
animation-duration: --value([*]);
|
|
322
|
+
animation-timing-function: var(--rnw-ease-spring);
|
|
323
|
+
animation-fill-mode: both;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/* ------------------------------------------------------------------
|
|
327
|
+
Exit animations — unmount-time utilities.
|
|
328
|
+
|
|
329
|
+
Default: --duration-fast + --rnw-ease-in, fill-mode: forwards so the
|
|
330
|
+
final frame sticks until React actually unmounts the component.
|
|
331
|
+
------------------------------------------------------------------ */
|
|
332
|
+
|
|
333
|
+
@utility exit-fade {
|
|
334
|
+
animation-name: rnw-fade-out;
|
|
335
|
+
animation-duration: var(--duration-fast);
|
|
336
|
+
animation-timing-function: var(--rnw-ease-in);
|
|
337
|
+
animation-fill-mode: forwards;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
@utility exit-fade-* {
|
|
341
|
+
animation-name: rnw-fade-out;
|
|
342
|
+
animation-duration: --value(--duration-*);
|
|
343
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
344
|
+
animation-duration: --value([*]);
|
|
345
|
+
animation-timing-function: var(--rnw-ease-in);
|
|
346
|
+
animation-fill-mode: forwards;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
@utility exit-zoom {
|
|
350
|
+
animation-name: rnw-zoom-out;
|
|
351
|
+
animation-duration: var(--duration-fast);
|
|
352
|
+
animation-timing-function: var(--rnw-ease-in);
|
|
353
|
+
animation-fill-mode: forwards;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
@utility exit-zoom-* {
|
|
357
|
+
animation-name: rnw-zoom-out;
|
|
358
|
+
animation-duration: --value(--duration-*);
|
|
359
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
360
|
+
animation-duration: --value([*]);
|
|
361
|
+
animation-timing-function: var(--rnw-ease-in);
|
|
362
|
+
animation-fill-mode: forwards;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
@utility exit-slide-up {
|
|
366
|
+
animation-name: rnw-slide-out-up;
|
|
367
|
+
animation-duration: var(--duration-fast);
|
|
368
|
+
animation-timing-function: var(--rnw-ease-in);
|
|
369
|
+
animation-fill-mode: forwards;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
@utility exit-slide-up-* {
|
|
373
|
+
animation-name: rnw-slide-out-up;
|
|
374
|
+
animation-duration: --value(--duration-*);
|
|
375
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
376
|
+
animation-duration: --value([*]);
|
|
377
|
+
animation-timing-function: var(--rnw-ease-in);
|
|
378
|
+
animation-fill-mode: forwards;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
@utility exit-slide-down {
|
|
382
|
+
animation-name: rnw-slide-out-down;
|
|
383
|
+
animation-duration: var(--duration-fast);
|
|
384
|
+
animation-timing-function: var(--rnw-ease-in);
|
|
385
|
+
animation-fill-mode: forwards;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
@utility exit-slide-down-* {
|
|
389
|
+
animation-name: rnw-slide-out-down;
|
|
390
|
+
animation-duration: --value(--duration-*);
|
|
391
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
392
|
+
animation-duration: --value([*]);
|
|
393
|
+
animation-timing-function: var(--rnw-ease-in);
|
|
394
|
+
animation-fill-mode: forwards;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
@utility exit-slide-left {
|
|
398
|
+
animation-name: rnw-slide-out-left;
|
|
399
|
+
animation-duration: var(--duration-fast);
|
|
400
|
+
animation-timing-function: var(--rnw-ease-in);
|
|
401
|
+
animation-fill-mode: forwards;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
@utility exit-slide-left-* {
|
|
405
|
+
animation-name: rnw-slide-out-left;
|
|
406
|
+
animation-duration: --value(--duration-*);
|
|
407
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
408
|
+
animation-duration: --value([*]);
|
|
409
|
+
animation-timing-function: var(--rnw-ease-in);
|
|
410
|
+
animation-fill-mode: forwards;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
@utility exit-slide-right {
|
|
414
|
+
animation-name: rnw-slide-out-right;
|
|
415
|
+
animation-duration: var(--duration-fast);
|
|
416
|
+
animation-timing-function: var(--rnw-ease-in);
|
|
417
|
+
animation-fill-mode: forwards;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
@utility exit-slide-right-* {
|
|
421
|
+
animation-name: rnw-slide-out-right;
|
|
422
|
+
animation-duration: --value(--duration-*);
|
|
423
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
424
|
+
animation-duration: --value([*]);
|
|
425
|
+
animation-timing-function: var(--rnw-ease-in);
|
|
426
|
+
animation-fill-mode: forwards;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/* ------------------------------------------------------------------
|
|
430
|
+
Layout transitions — `transition-*` longhands for change-in-place
|
|
431
|
+
animations. Pair with any tweenable rnwind utility (width, height,
|
|
432
|
+
transform, margin, padding, opacity, background-color, …) to get
|
|
433
|
+
smooth UI-thread transitions between states.
|
|
434
|
+
------------------------------------------------------------------ */
|
|
435
|
+
|
|
436
|
+
@utility layout {
|
|
437
|
+
transition-property: all;
|
|
438
|
+
transition-duration: var(--duration-normal);
|
|
439
|
+
transition-timing-function: var(--rnw-ease-out);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
@utility layout-* {
|
|
443
|
+
transition-property: all;
|
|
444
|
+
transition-duration: --value(--duration-*);
|
|
445
|
+
transition-duration: calc(--value(integer) * 1ms);
|
|
446
|
+
transition-duration: --value([*]);
|
|
447
|
+
transition-timing-function: var(--rnw-ease-out);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
@utility layout-spring {
|
|
451
|
+
transition-property: all;
|
|
452
|
+
transition-duration: var(--duration-slow);
|
|
453
|
+
transition-timing-function: var(--rnw-ease-spring);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
@utility layout-spring-* {
|
|
457
|
+
transition-property: all;
|
|
458
|
+
transition-duration: --value(--duration-*);
|
|
459
|
+
transition-duration: calc(--value(integer) * 1ms);
|
|
460
|
+
transition-duration: --value([*]);
|
|
461
|
+
transition-timing-function: var(--rnw-ease-spring);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/* ------------------------------------------------------------------
|
|
465
|
+
Looping animations + iteration-count composer.
|
|
466
|
+
|
|
467
|
+
repeat-<n> → animation-iteration-count: <n> (2, 5, 10, …)
|
|
468
|
+
repeat-infinite → animation-iteration-count: infinite
|
|
469
|
+
repeat-[<v>] → animation-iteration-count: <v> (arbitrary)
|
|
470
|
+
|
|
471
|
+
Combine with any `enter-*` utility (or your own keyframe via
|
|
472
|
+
`@utility my-anim { animation-name: my-kf; … }`) to make it loop.
|
|
473
|
+
|
|
474
|
+
Built-in looping utilities `loop-pulse`, `loop-spin`, `loop-bounce`
|
|
475
|
+
ship with iteration-count baked in for one-class demos.
|
|
476
|
+
------------------------------------------------------------------ */
|
|
477
|
+
|
|
478
|
+
@keyframes rnw-pulse {
|
|
479
|
+
0%,
|
|
480
|
+
100% {
|
|
481
|
+
opacity: 1;
|
|
482
|
+
}
|
|
483
|
+
50% {
|
|
484
|
+
opacity: 0.5;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
@keyframes rnw-spin {
|
|
489
|
+
from {
|
|
490
|
+
transform: rotate(0deg);
|
|
491
|
+
}
|
|
492
|
+
to {
|
|
493
|
+
transform: rotate(360deg);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
@keyframes rnw-bounce {
|
|
498
|
+
0%,
|
|
499
|
+
100% {
|
|
500
|
+
transform: translateY(0);
|
|
501
|
+
}
|
|
502
|
+
50% {
|
|
503
|
+
transform: translateY(-12px);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
@utility repeat-infinite {
|
|
508
|
+
animation-iteration-count: infinite;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
@utility repeat-* {
|
|
512
|
+
animation-iteration-count: --value(integer);
|
|
513
|
+
animation-iteration-count: --value([*]);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
@utility loop-pulse {
|
|
517
|
+
animation-name: rnw-pulse;
|
|
518
|
+
animation-duration: 2s;
|
|
519
|
+
animation-iteration-count: infinite;
|
|
520
|
+
animation-timing-function: ease-in-out;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
@utility loop-pulse-* {
|
|
524
|
+
animation-name: rnw-pulse;
|
|
525
|
+
animation-duration: --value(--duration-*);
|
|
526
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
527
|
+
animation-duration: --value([*]);
|
|
528
|
+
animation-iteration-count: infinite;
|
|
529
|
+
animation-timing-function: ease-in-out;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
@utility loop-spin {
|
|
533
|
+
animation-name: rnw-spin;
|
|
534
|
+
animation-duration: 1s;
|
|
535
|
+
animation-iteration-count: infinite;
|
|
536
|
+
animation-timing-function: linear;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
@utility loop-spin-* {
|
|
540
|
+
animation-name: rnw-spin;
|
|
541
|
+
animation-duration: --value(--duration-*);
|
|
542
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
543
|
+
animation-duration: --value([*]);
|
|
544
|
+
animation-iteration-count: infinite;
|
|
545
|
+
animation-timing-function: linear;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
@utility loop-bounce {
|
|
549
|
+
animation-name: rnw-bounce;
|
|
550
|
+
animation-duration: 1s;
|
|
551
|
+
animation-iteration-count: infinite;
|
|
552
|
+
animation-timing-function: ease-in-out;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
@utility loop-bounce-* {
|
|
556
|
+
animation-name: rnw-bounce;
|
|
557
|
+
animation-duration: --value(--duration-*);
|
|
558
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
559
|
+
animation-duration: --value([*]);
|
|
560
|
+
animation-iteration-count: infinite;
|
|
561
|
+
animation-timing-function: ease-in-out;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
/* ------------------------------------------------------------------
|
|
565
|
+
Hairline utilities. Each emits the sentinel `var(--rnw-hairline)`,
|
|
566
|
+
which the rnwind chunker recognises and replaces with a JS reference
|
|
567
|
+
to `StyleSheet.hairlineWidth` at code-generation time. Use them
|
|
568
|
+
anywhere you'd write `border-1`, `w-px`, `p-px`, etc. but want the
|
|
569
|
+
thinnest possible line for the device.
|
|
570
|
+
|
|
571
|
+
Examples:
|
|
572
|
+
<View className="border-hairline border-border" /> // 1-physical-pixel border
|
|
573
|
+
<View className="border-t-hairline border-border" /> // top divider only
|
|
574
|
+
<View className="h-hairline bg-border w-full" /> // full-width separator line
|
|
575
|
+
------------------------------------------------------------------ */
|
|
576
|
+
|
|
577
|
+
/* Border widths */
|
|
578
|
+
@utility border-hairline {
|
|
579
|
+
border-width: var(--rnw-hairline);
|
|
580
|
+
}
|
|
581
|
+
@utility border-x-hairline {
|
|
582
|
+
border-inline-width: var(--rnw-hairline);
|
|
583
|
+
}
|
|
584
|
+
@utility border-y-hairline {
|
|
585
|
+
border-block-width: var(--rnw-hairline);
|
|
586
|
+
}
|
|
587
|
+
@utility border-t-hairline {
|
|
588
|
+
border-top-width: var(--rnw-hairline);
|
|
589
|
+
}
|
|
590
|
+
@utility border-r-hairline {
|
|
591
|
+
border-right-width: var(--rnw-hairline);
|
|
592
|
+
}
|
|
593
|
+
@utility border-b-hairline {
|
|
594
|
+
border-bottom-width: var(--rnw-hairline);
|
|
595
|
+
}
|
|
596
|
+
@utility border-l-hairline {
|
|
597
|
+
border-left-width: var(--rnw-hairline);
|
|
598
|
+
}
|
|
599
|
+
@utility border-s-hairline {
|
|
600
|
+
border-inline-start-width: var(--rnw-hairline);
|
|
601
|
+
}
|
|
602
|
+
@utility border-e-hairline {
|
|
603
|
+
border-inline-end-width: var(--rnw-hairline);
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
/* Sizing */
|
|
607
|
+
@utility w-hairline {
|
|
608
|
+
width: var(--rnw-hairline);
|
|
609
|
+
}
|
|
610
|
+
@utility h-hairline {
|
|
611
|
+
height: var(--rnw-hairline);
|
|
612
|
+
}
|
|
613
|
+
@utility size-hairline {
|
|
614
|
+
width: var(--rnw-hairline);
|
|
615
|
+
height: var(--rnw-hairline);
|
|
616
|
+
}
|
|
617
|
+
@utility min-w-hairline {
|
|
618
|
+
min-width: var(--rnw-hairline);
|
|
619
|
+
}
|
|
620
|
+
@utility min-h-hairline {
|
|
621
|
+
min-height: var(--rnw-hairline);
|
|
622
|
+
}
|
|
623
|
+
@utility max-w-hairline {
|
|
624
|
+
max-width: var(--rnw-hairline);
|
|
625
|
+
}
|
|
626
|
+
@utility max-h-hairline {
|
|
627
|
+
max-height: var(--rnw-hairline);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/* Padding */
|
|
631
|
+
@utility p-hairline {
|
|
632
|
+
padding: var(--rnw-hairline);
|
|
633
|
+
}
|
|
634
|
+
@utility px-hairline {
|
|
635
|
+
padding-inline: var(--rnw-hairline);
|
|
636
|
+
}
|
|
637
|
+
@utility py-hairline {
|
|
638
|
+
padding-block: var(--rnw-hairline);
|
|
639
|
+
}
|
|
640
|
+
@utility pt-hairline {
|
|
641
|
+
padding-top: var(--rnw-hairline);
|
|
642
|
+
}
|
|
643
|
+
@utility pr-hairline {
|
|
644
|
+
padding-right: var(--rnw-hairline);
|
|
645
|
+
}
|
|
646
|
+
@utility pb-hairline {
|
|
647
|
+
padding-bottom: var(--rnw-hairline);
|
|
648
|
+
}
|
|
649
|
+
@utility pl-hairline {
|
|
650
|
+
padding-left: var(--rnw-hairline);
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
/* Margin */
|
|
654
|
+
@utility m-hairline {
|
|
655
|
+
margin: var(--rnw-hairline);
|
|
656
|
+
}
|
|
657
|
+
@utility mx-hairline {
|
|
658
|
+
margin-inline: var(--rnw-hairline);
|
|
659
|
+
}
|
|
660
|
+
@utility my-hairline {
|
|
661
|
+
margin-block: var(--rnw-hairline);
|
|
662
|
+
}
|
|
663
|
+
@utility mt-hairline {
|
|
664
|
+
margin-top: var(--rnw-hairline);
|
|
665
|
+
}
|
|
666
|
+
@utility mr-hairline {
|
|
667
|
+
margin-right: var(--rnw-hairline);
|
|
668
|
+
}
|
|
669
|
+
@utility mb-hairline {
|
|
670
|
+
margin-bottom: var(--rnw-hairline);
|
|
671
|
+
}
|
|
672
|
+
@utility ml-hairline {
|
|
673
|
+
margin-left: var(--rnw-hairline);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
/* Gap */
|
|
677
|
+
@utility gap-hairline {
|
|
678
|
+
gap: var(--rnw-hairline);
|
|
679
|
+
}
|
|
680
|
+
@utility gap-x-hairline {
|
|
681
|
+
column-gap: var(--rnw-hairline);
|
|
682
|
+
}
|
|
683
|
+
@utility gap-y-hairline {
|
|
684
|
+
row-gap: var(--rnw-hairline);
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
/* Inset */
|
|
688
|
+
@utility top-hairline {
|
|
689
|
+
top: var(--rnw-hairline);
|
|
690
|
+
}
|
|
691
|
+
@utility right-hairline {
|
|
692
|
+
right: var(--rnw-hairline);
|
|
693
|
+
}
|
|
694
|
+
@utility bottom-hairline {
|
|
695
|
+
bottom: var(--rnw-hairline);
|
|
696
|
+
}
|
|
697
|
+
@utility left-hairline {
|
|
698
|
+
left: var(--rnw-hairline);
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
/* ------------------------------------------------------------------
|
|
702
|
+
Safe-area utilities. Each declaration uses the standard CSS
|
|
703
|
+
`env(safe-area-inset-*)` function so rnwind's parser can detect the
|
|
704
|
+
intent and flag the atom as insets-dependent. At runtime, lookupCss
|
|
705
|
+
reads the current insets from `SchemeProvider` (via `useInsets()`)
|
|
706
|
+
and substitutes the correct numeric value per side.
|
|
707
|
+
|
|
708
|
+
Pure `env(...)` → take the inset for the named side.
|
|
709
|
+
`max(env(...), n)` → `*-safe-or-n` — falls back to `n` when
|
|
710
|
+
the inset is smaller (useful when
|
|
711
|
+
devices without notches would otherwise
|
|
712
|
+
leave a tiny margin).
|
|
713
|
+
`calc(env(...) + n)` → `*-safe-offset-n` — stacks `n` on top of
|
|
714
|
+
the inset.
|
|
715
|
+
|
|
716
|
+
Matches the NativeWind `tailwindcss-safe-area` class set. See
|
|
717
|
+
https://github.com/jarvekz/tailwindcss-safe-area for the full
|
|
718
|
+
reference table.
|
|
719
|
+
------------------------------------------------------------------ */
|
|
720
|
+
|
|
721
|
+
/* Padding — all four sides */
|
|
722
|
+
@utility p-safe {
|
|
723
|
+
padding-top: env(safe-area-inset-top);
|
|
724
|
+
padding-right: env(safe-area-inset-right);
|
|
725
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
726
|
+
padding-left: env(safe-area-inset-left);
|
|
727
|
+
}
|
|
728
|
+
@utility p-safe-or-* {
|
|
729
|
+
padding-top: max(env(safe-area-inset-top), calc(var(--spacing) * --value(integer)));
|
|
730
|
+
padding-right: max(env(safe-area-inset-right), calc(var(--spacing) * --value(integer)));
|
|
731
|
+
padding-bottom: max(env(safe-area-inset-bottom), calc(var(--spacing) * --value(integer)));
|
|
732
|
+
padding-left: max(env(safe-area-inset-left), calc(var(--spacing) * --value(integer)));
|
|
733
|
+
padding-top: max(env(safe-area-inset-top), --value([*]));
|
|
734
|
+
padding-right: max(env(safe-area-inset-right), --value([*]));
|
|
735
|
+
padding-bottom: max(env(safe-area-inset-bottom), --value([*]));
|
|
736
|
+
padding-left: max(env(safe-area-inset-left), --value([*]));
|
|
737
|
+
}
|
|
738
|
+
@utility p-safe-offset-* {
|
|
739
|
+
padding-top: calc(env(safe-area-inset-top) + calc(var(--spacing) * --value(integer)));
|
|
740
|
+
padding-right: calc(env(safe-area-inset-right) + calc(var(--spacing) * --value(integer)));
|
|
741
|
+
padding-bottom: calc(env(safe-area-inset-bottom) + calc(var(--spacing) * --value(integer)));
|
|
742
|
+
padding-left: calc(env(safe-area-inset-left) + calc(var(--spacing) * --value(integer)));
|
|
743
|
+
padding-top: calc(env(safe-area-inset-top) + --value([*]));
|
|
744
|
+
padding-right: calc(env(safe-area-inset-right) + --value([*]));
|
|
745
|
+
padding-bottom: calc(env(safe-area-inset-bottom) + --value([*]));
|
|
746
|
+
padding-left: calc(env(safe-area-inset-left) + --value([*]));
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/* Padding — horizontal / vertical */
|
|
750
|
+
@utility px-safe {
|
|
751
|
+
padding-left: env(safe-area-inset-left);
|
|
752
|
+
padding-right: env(safe-area-inset-right);
|
|
753
|
+
}
|
|
754
|
+
@utility px-safe-or-* {
|
|
755
|
+
padding-left: max(env(safe-area-inset-left), calc(var(--spacing) * --value(integer)));
|
|
756
|
+
padding-right: max(env(safe-area-inset-right), calc(var(--spacing) * --value(integer)));
|
|
757
|
+
padding-left: max(env(safe-area-inset-left), --value([*]));
|
|
758
|
+
padding-right: max(env(safe-area-inset-right), --value([*]));
|
|
759
|
+
}
|
|
760
|
+
@utility px-safe-offset-* {
|
|
761
|
+
padding-left: calc(env(safe-area-inset-left) + calc(var(--spacing) * --value(integer)));
|
|
762
|
+
padding-right: calc(env(safe-area-inset-right) + calc(var(--spacing) * --value(integer)));
|
|
763
|
+
padding-left: calc(env(safe-area-inset-left) + --value([*]));
|
|
764
|
+
padding-right: calc(env(safe-area-inset-right) + --value([*]));
|
|
765
|
+
}
|
|
766
|
+
@utility py-safe {
|
|
767
|
+
padding-top: env(safe-area-inset-top);
|
|
768
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
769
|
+
}
|
|
770
|
+
@utility py-safe-or-* {
|
|
771
|
+
padding-top: max(env(safe-area-inset-top), calc(var(--spacing) * --value(integer)));
|
|
772
|
+
padding-bottom: max(env(safe-area-inset-bottom), calc(var(--spacing) * --value(integer)));
|
|
773
|
+
padding-top: max(env(safe-area-inset-top), --value([*]));
|
|
774
|
+
padding-bottom: max(env(safe-area-inset-bottom), --value([*]));
|
|
775
|
+
}
|
|
776
|
+
@utility py-safe-offset-* {
|
|
777
|
+
padding-top: calc(env(safe-area-inset-top) + calc(var(--spacing) * --value(integer)));
|
|
778
|
+
padding-bottom: calc(env(safe-area-inset-bottom) + calc(var(--spacing) * --value(integer)));
|
|
779
|
+
padding-top: calc(env(safe-area-inset-top) + --value([*]));
|
|
780
|
+
padding-bottom: calc(env(safe-area-inset-bottom) + --value([*]));
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
/* Padding — logical start / end */
|
|
784
|
+
@utility ps-safe {
|
|
785
|
+
padding-inline-start: env(safe-area-inset-left);
|
|
786
|
+
}
|
|
787
|
+
@utility ps-safe-or-* {
|
|
788
|
+
padding-inline-start: max(env(safe-area-inset-left), calc(var(--spacing) * --value(integer)));
|
|
789
|
+
padding-inline-start: max(env(safe-area-inset-left), --value([*]));
|
|
790
|
+
}
|
|
791
|
+
@utility ps-safe-offset-* {
|
|
792
|
+
padding-inline-start: calc(env(safe-area-inset-left) + calc(var(--spacing) * --value(integer)));
|
|
793
|
+
padding-inline-start: calc(env(safe-area-inset-left) + --value([*]));
|
|
794
|
+
}
|
|
795
|
+
@utility pe-safe {
|
|
796
|
+
padding-inline-end: env(safe-area-inset-right);
|
|
797
|
+
}
|
|
798
|
+
@utility pe-safe-or-* {
|
|
799
|
+
padding-inline-end: max(env(safe-area-inset-right), calc(var(--spacing) * --value(integer)));
|
|
800
|
+
padding-inline-end: max(env(safe-area-inset-right), --value([*]));
|
|
801
|
+
}
|
|
802
|
+
@utility pe-safe-offset-* {
|
|
803
|
+
padding-inline-end: calc(env(safe-area-inset-right) + calc(var(--spacing) * --value(integer)));
|
|
804
|
+
padding-inline-end: calc(env(safe-area-inset-right) + --value([*]));
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
/* Padding — single side */
|
|
808
|
+
@utility pt-safe {
|
|
809
|
+
padding-top: env(safe-area-inset-top);
|
|
810
|
+
}
|
|
811
|
+
@utility pt-safe-or-* {
|
|
812
|
+
padding-top: max(env(safe-area-inset-top), calc(var(--spacing) * --value(integer)));
|
|
813
|
+
padding-top: max(env(safe-area-inset-top), --value([*]));
|
|
814
|
+
}
|
|
815
|
+
@utility pt-safe-offset-* {
|
|
816
|
+
padding-top: calc(env(safe-area-inset-top) + calc(var(--spacing) * --value(integer)));
|
|
817
|
+
padding-top: calc(env(safe-area-inset-top) + --value([*]));
|
|
818
|
+
}
|
|
819
|
+
@utility pr-safe {
|
|
820
|
+
padding-right: env(safe-area-inset-right);
|
|
821
|
+
}
|
|
822
|
+
@utility pr-safe-or-* {
|
|
823
|
+
padding-right: max(env(safe-area-inset-right), calc(var(--spacing) * --value(integer)));
|
|
824
|
+
padding-right: max(env(safe-area-inset-right), --value([*]));
|
|
825
|
+
}
|
|
826
|
+
@utility pr-safe-offset-* {
|
|
827
|
+
padding-right: calc(env(safe-area-inset-right) + calc(var(--spacing) * --value(integer)));
|
|
828
|
+
padding-right: calc(env(safe-area-inset-right) + --value([*]));
|
|
829
|
+
}
|
|
830
|
+
@utility pb-safe {
|
|
831
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
832
|
+
}
|
|
833
|
+
@utility pb-safe-or-* {
|
|
834
|
+
padding-bottom: max(env(safe-area-inset-bottom), calc(var(--spacing) * --value(integer)));
|
|
835
|
+
padding-bottom: max(env(safe-area-inset-bottom), --value([*]));
|
|
836
|
+
}
|
|
837
|
+
@utility pb-safe-offset-* {
|
|
838
|
+
padding-bottom: calc(env(safe-area-inset-bottom) + calc(var(--spacing) * --value(integer)));
|
|
839
|
+
padding-bottom: calc(env(safe-area-inset-bottom) + --value([*]));
|
|
840
|
+
}
|
|
841
|
+
@utility pl-safe {
|
|
842
|
+
padding-left: env(safe-area-inset-left);
|
|
843
|
+
}
|
|
844
|
+
@utility pl-safe-or-* {
|
|
845
|
+
padding-left: max(env(safe-area-inset-left), calc(var(--spacing) * --value(integer)));
|
|
846
|
+
padding-left: max(env(safe-area-inset-left), --value([*]));
|
|
847
|
+
}
|
|
848
|
+
@utility pl-safe-offset-* {
|
|
849
|
+
padding-left: calc(env(safe-area-inset-left) + calc(var(--spacing) * --value(integer)));
|
|
850
|
+
padding-left: calc(env(safe-area-inset-left) + --value([*]));
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
/* Margin — all four sides */
|
|
854
|
+
@utility m-safe {
|
|
855
|
+
margin-top: env(safe-area-inset-top);
|
|
856
|
+
margin-right: env(safe-area-inset-right);
|
|
857
|
+
margin-bottom: env(safe-area-inset-bottom);
|
|
858
|
+
margin-left: env(safe-area-inset-left);
|
|
859
|
+
}
|
|
860
|
+
@utility m-safe-or-* {
|
|
861
|
+
margin-top: max(env(safe-area-inset-top), calc(var(--spacing) * --value(integer)));
|
|
862
|
+
margin-right: max(env(safe-area-inset-right), calc(var(--spacing) * --value(integer)));
|
|
863
|
+
margin-bottom: max(env(safe-area-inset-bottom), calc(var(--spacing) * --value(integer)));
|
|
864
|
+
margin-left: max(env(safe-area-inset-left), calc(var(--spacing) * --value(integer)));
|
|
865
|
+
margin-top: max(env(safe-area-inset-top), --value([*]));
|
|
866
|
+
margin-right: max(env(safe-area-inset-right), --value([*]));
|
|
867
|
+
margin-bottom: max(env(safe-area-inset-bottom), --value([*]));
|
|
868
|
+
margin-left: max(env(safe-area-inset-left), --value([*]));
|
|
869
|
+
}
|
|
870
|
+
@utility m-safe-offset-* {
|
|
871
|
+
margin-top: calc(env(safe-area-inset-top) + calc(var(--spacing) * --value(integer)));
|
|
872
|
+
margin-right: calc(env(safe-area-inset-right) + calc(var(--spacing) * --value(integer)));
|
|
873
|
+
margin-bottom: calc(env(safe-area-inset-bottom) + calc(var(--spacing) * --value(integer)));
|
|
874
|
+
margin-left: calc(env(safe-area-inset-left) + calc(var(--spacing) * --value(integer)));
|
|
875
|
+
margin-top: calc(env(safe-area-inset-top) + --value([*]));
|
|
876
|
+
margin-right: calc(env(safe-area-inset-right) + --value([*]));
|
|
877
|
+
margin-bottom: calc(env(safe-area-inset-bottom) + --value([*]));
|
|
878
|
+
margin-left: calc(env(safe-area-inset-left) + --value([*]));
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
/* Margin — horizontal / vertical */
|
|
882
|
+
@utility mx-safe {
|
|
883
|
+
margin-left: env(safe-area-inset-left);
|
|
884
|
+
margin-right: env(safe-area-inset-right);
|
|
885
|
+
}
|
|
886
|
+
@utility mx-safe-or-* {
|
|
887
|
+
margin-left: max(env(safe-area-inset-left), calc(var(--spacing) * --value(integer)));
|
|
888
|
+
margin-right: max(env(safe-area-inset-right), calc(var(--spacing) * --value(integer)));
|
|
889
|
+
margin-left: max(env(safe-area-inset-left), --value([*]));
|
|
890
|
+
margin-right: max(env(safe-area-inset-right), --value([*]));
|
|
891
|
+
}
|
|
892
|
+
@utility mx-safe-offset-* {
|
|
893
|
+
margin-left: calc(env(safe-area-inset-left) + calc(var(--spacing) * --value(integer)));
|
|
894
|
+
margin-right: calc(env(safe-area-inset-right) + calc(var(--spacing) * --value(integer)));
|
|
895
|
+
margin-left: calc(env(safe-area-inset-left) + --value([*]));
|
|
896
|
+
margin-right: calc(env(safe-area-inset-right) + --value([*]));
|
|
897
|
+
}
|
|
898
|
+
@utility my-safe {
|
|
899
|
+
margin-top: env(safe-area-inset-top);
|
|
900
|
+
margin-bottom: env(safe-area-inset-bottom);
|
|
901
|
+
}
|
|
902
|
+
@utility my-safe-or-* {
|
|
903
|
+
margin-top: max(env(safe-area-inset-top), calc(var(--spacing) * --value(integer)));
|
|
904
|
+
margin-bottom: max(env(safe-area-inset-bottom), calc(var(--spacing) * --value(integer)));
|
|
905
|
+
margin-top: max(env(safe-area-inset-top), --value([*]));
|
|
906
|
+
margin-bottom: max(env(safe-area-inset-bottom), --value([*]));
|
|
907
|
+
}
|
|
908
|
+
@utility my-safe-offset-* {
|
|
909
|
+
margin-top: calc(env(safe-area-inset-top) + calc(var(--spacing) * --value(integer)));
|
|
910
|
+
margin-bottom: calc(env(safe-area-inset-bottom) + calc(var(--spacing) * --value(integer)));
|
|
911
|
+
margin-top: calc(env(safe-area-inset-top) + --value([*]));
|
|
912
|
+
margin-bottom: calc(env(safe-area-inset-bottom) + --value([*]));
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
/* Margin — logical start / end */
|
|
916
|
+
@utility ms-safe {
|
|
917
|
+
margin-inline-start: env(safe-area-inset-left);
|
|
918
|
+
}
|
|
919
|
+
@utility ms-safe-or-* {
|
|
920
|
+
margin-inline-start: max(env(safe-area-inset-left), calc(var(--spacing) * --value(integer)));
|
|
921
|
+
margin-inline-start: max(env(safe-area-inset-left), --value([*]));
|
|
922
|
+
}
|
|
923
|
+
@utility ms-safe-offset-* {
|
|
924
|
+
margin-inline-start: calc(env(safe-area-inset-left) + calc(var(--spacing) * --value(integer)));
|
|
925
|
+
margin-inline-start: calc(env(safe-area-inset-left) + --value([*]));
|
|
926
|
+
}
|
|
927
|
+
@utility me-safe {
|
|
928
|
+
margin-inline-end: env(safe-area-inset-right);
|
|
929
|
+
}
|
|
930
|
+
@utility me-safe-or-* {
|
|
931
|
+
margin-inline-end: max(env(safe-area-inset-right), calc(var(--spacing) * --value(integer)));
|
|
932
|
+
margin-inline-end: max(env(safe-area-inset-right), --value([*]));
|
|
933
|
+
}
|
|
934
|
+
@utility me-safe-offset-* {
|
|
935
|
+
margin-inline-end: calc(env(safe-area-inset-right) + calc(var(--spacing) * --value(integer)));
|
|
936
|
+
margin-inline-end: calc(env(safe-area-inset-right) + --value([*]));
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
/* Margin — single side */
|
|
940
|
+
@utility mt-safe {
|
|
941
|
+
margin-top: env(safe-area-inset-top);
|
|
942
|
+
}
|
|
943
|
+
@utility mt-safe-or-* {
|
|
944
|
+
margin-top: max(env(safe-area-inset-top), calc(var(--spacing) * --value(integer)));
|
|
945
|
+
margin-top: max(env(safe-area-inset-top), --value([*]));
|
|
946
|
+
}
|
|
947
|
+
@utility mt-safe-offset-* {
|
|
948
|
+
margin-top: calc(env(safe-area-inset-top) + calc(var(--spacing) * --value(integer)));
|
|
949
|
+
margin-top: calc(env(safe-area-inset-top) + --value([*]));
|
|
950
|
+
}
|
|
951
|
+
@utility mr-safe {
|
|
952
|
+
margin-right: env(safe-area-inset-right);
|
|
953
|
+
}
|
|
954
|
+
@utility mr-safe-or-* {
|
|
955
|
+
margin-right: max(env(safe-area-inset-right), calc(var(--spacing) * --value(integer)));
|
|
956
|
+
margin-right: max(env(safe-area-inset-right), --value([*]));
|
|
957
|
+
}
|
|
958
|
+
@utility mr-safe-offset-* {
|
|
959
|
+
margin-right: calc(env(safe-area-inset-right) + calc(var(--spacing) * --value(integer)));
|
|
960
|
+
margin-right: calc(env(safe-area-inset-right) + --value([*]));
|
|
961
|
+
}
|
|
962
|
+
@utility mb-safe {
|
|
963
|
+
margin-bottom: env(safe-area-inset-bottom);
|
|
964
|
+
}
|
|
965
|
+
@utility mb-safe-or-* {
|
|
966
|
+
margin-bottom: max(env(safe-area-inset-bottom), calc(var(--spacing) * --value(integer)));
|
|
967
|
+
margin-bottom: max(env(safe-area-inset-bottom), --value([*]));
|
|
968
|
+
}
|
|
969
|
+
@utility mb-safe-offset-* {
|
|
970
|
+
margin-bottom: calc(env(safe-area-inset-bottom) + calc(var(--spacing) * --value(integer)));
|
|
971
|
+
margin-bottom: calc(env(safe-area-inset-bottom) + --value([*]));
|
|
972
|
+
}
|
|
973
|
+
@utility ml-safe {
|
|
974
|
+
margin-left: env(safe-area-inset-left);
|
|
975
|
+
}
|
|
976
|
+
@utility ml-safe-or-* {
|
|
977
|
+
margin-left: max(env(safe-area-inset-left), calc(var(--spacing) * --value(integer)));
|
|
978
|
+
margin-left: max(env(safe-area-inset-left), --value([*]));
|
|
979
|
+
}
|
|
980
|
+
@utility ml-safe-offset-* {
|
|
981
|
+
margin-left: calc(env(safe-area-inset-left) + calc(var(--spacing) * --value(integer)));
|
|
982
|
+
margin-left: calc(env(safe-area-inset-left) + --value([*]));
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
/* Inset — four sides */
|
|
986
|
+
@utility inset-safe {
|
|
987
|
+
top: env(safe-area-inset-top);
|
|
988
|
+
right: env(safe-area-inset-right);
|
|
989
|
+
bottom: env(safe-area-inset-bottom);
|
|
990
|
+
left: env(safe-area-inset-left);
|
|
991
|
+
}
|
|
992
|
+
@utility inset-safe-or-* {
|
|
993
|
+
top: max(env(safe-area-inset-top), calc(var(--spacing) * --value(integer)));
|
|
994
|
+
right: max(env(safe-area-inset-right), calc(var(--spacing) * --value(integer)));
|
|
995
|
+
bottom: max(env(safe-area-inset-bottom), calc(var(--spacing) * --value(integer)));
|
|
996
|
+
left: max(env(safe-area-inset-left), calc(var(--spacing) * --value(integer)));
|
|
997
|
+
top: max(env(safe-area-inset-top), --value([*]));
|
|
998
|
+
right: max(env(safe-area-inset-right), --value([*]));
|
|
999
|
+
bottom: max(env(safe-area-inset-bottom), --value([*]));
|
|
1000
|
+
left: max(env(safe-area-inset-left), --value([*]));
|
|
1001
|
+
}
|
|
1002
|
+
@utility inset-safe-offset-* {
|
|
1003
|
+
top: calc(env(safe-area-inset-top) + calc(var(--spacing) * --value(integer)));
|
|
1004
|
+
right: calc(env(safe-area-inset-right) + calc(var(--spacing) * --value(integer)));
|
|
1005
|
+
bottom: calc(env(safe-area-inset-bottom) + calc(var(--spacing) * --value(integer)));
|
|
1006
|
+
left: calc(env(safe-area-inset-left) + calc(var(--spacing) * --value(integer)));
|
|
1007
|
+
top: calc(env(safe-area-inset-top) + --value([*]));
|
|
1008
|
+
right: calc(env(safe-area-inset-right) + --value([*]));
|
|
1009
|
+
bottom: calc(env(safe-area-inset-bottom) + --value([*]));
|
|
1010
|
+
left: calc(env(safe-area-inset-left) + --value([*]));
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
/* Inset — horizontal / vertical */
|
|
1014
|
+
@utility inset-x-safe {
|
|
1015
|
+
left: env(safe-area-inset-left);
|
|
1016
|
+
right: env(safe-area-inset-right);
|
|
1017
|
+
}
|
|
1018
|
+
@utility inset-x-safe-or-* {
|
|
1019
|
+
left: max(env(safe-area-inset-left), calc(var(--spacing) * --value(integer)));
|
|
1020
|
+
right: max(env(safe-area-inset-right), calc(var(--spacing) * --value(integer)));
|
|
1021
|
+
left: max(env(safe-area-inset-left), --value([*]));
|
|
1022
|
+
right: max(env(safe-area-inset-right), --value([*]));
|
|
1023
|
+
}
|
|
1024
|
+
@utility inset-x-safe-offset-* {
|
|
1025
|
+
left: calc(env(safe-area-inset-left) + calc(var(--spacing) * --value(integer)));
|
|
1026
|
+
right: calc(env(safe-area-inset-right) + calc(var(--spacing) * --value(integer)));
|
|
1027
|
+
left: calc(env(safe-area-inset-left) + --value([*]));
|
|
1028
|
+
right: calc(env(safe-area-inset-right) + --value([*]));
|
|
1029
|
+
}
|
|
1030
|
+
@utility inset-y-safe {
|
|
1031
|
+
top: env(safe-area-inset-top);
|
|
1032
|
+
bottom: env(safe-area-inset-bottom);
|
|
1033
|
+
}
|
|
1034
|
+
@utility inset-y-safe-or-* {
|
|
1035
|
+
top: max(env(safe-area-inset-top), calc(var(--spacing) * --value(integer)));
|
|
1036
|
+
bottom: max(env(safe-area-inset-bottom), calc(var(--spacing) * --value(integer)));
|
|
1037
|
+
top: max(env(safe-area-inset-top), --value([*]));
|
|
1038
|
+
bottom: max(env(safe-area-inset-bottom), --value([*]));
|
|
1039
|
+
}
|
|
1040
|
+
@utility inset-y-safe-offset-* {
|
|
1041
|
+
top: calc(env(safe-area-inset-top) + calc(var(--spacing) * --value(integer)));
|
|
1042
|
+
bottom: calc(env(safe-area-inset-bottom) + calc(var(--spacing) * --value(integer)));
|
|
1043
|
+
top: calc(env(safe-area-inset-top) + --value([*]));
|
|
1044
|
+
bottom: calc(env(safe-area-inset-bottom) + --value([*]));
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
/* Inset — single side */
|
|
1048
|
+
@utility top-safe {
|
|
1049
|
+
top: env(safe-area-inset-top);
|
|
1050
|
+
}
|
|
1051
|
+
@utility top-safe-or-* {
|
|
1052
|
+
top: max(env(safe-area-inset-top), calc(var(--spacing) * --value(integer)));
|
|
1053
|
+
top: max(env(safe-area-inset-top), --value([*]));
|
|
1054
|
+
}
|
|
1055
|
+
@utility top-safe-offset-* {
|
|
1056
|
+
top: calc(env(safe-area-inset-top) + calc(var(--spacing) * --value(integer)));
|
|
1057
|
+
top: calc(env(safe-area-inset-top) + --value([*]));
|
|
1058
|
+
}
|
|
1059
|
+
@utility right-safe {
|
|
1060
|
+
right: env(safe-area-inset-right);
|
|
1061
|
+
}
|
|
1062
|
+
@utility right-safe-or-* {
|
|
1063
|
+
right: max(env(safe-area-inset-right), calc(var(--spacing) * --value(integer)));
|
|
1064
|
+
right: max(env(safe-area-inset-right), --value([*]));
|
|
1065
|
+
}
|
|
1066
|
+
@utility right-safe-offset-* {
|
|
1067
|
+
right: calc(env(safe-area-inset-right) + calc(var(--spacing) * --value(integer)));
|
|
1068
|
+
right: calc(env(safe-area-inset-right) + --value([*]));
|
|
1069
|
+
}
|
|
1070
|
+
@utility bottom-safe {
|
|
1071
|
+
bottom: env(safe-area-inset-bottom);
|
|
1072
|
+
}
|
|
1073
|
+
@utility bottom-safe-or-* {
|
|
1074
|
+
bottom: max(env(safe-area-inset-bottom), calc(var(--spacing) * --value(integer)));
|
|
1075
|
+
bottom: max(env(safe-area-inset-bottom), --value([*]));
|
|
1076
|
+
}
|
|
1077
|
+
@utility bottom-safe-offset-* {
|
|
1078
|
+
bottom: calc(env(safe-area-inset-bottom) + calc(var(--spacing) * --value(integer)));
|
|
1079
|
+
bottom: calc(env(safe-area-inset-bottom) + --value([*]));
|
|
1080
|
+
}
|
|
1081
|
+
@utility left-safe {
|
|
1082
|
+
left: env(safe-area-inset-left);
|
|
1083
|
+
}
|
|
1084
|
+
@utility left-safe-or-* {
|
|
1085
|
+
left: max(env(safe-area-inset-left), calc(var(--spacing) * --value(integer)));
|
|
1086
|
+
left: max(env(safe-area-inset-left), --value([*]));
|
|
1087
|
+
}
|
|
1088
|
+
@utility left-safe-offset-* {
|
|
1089
|
+
left: calc(env(safe-area-inset-left) + calc(var(--spacing) * --value(integer)));
|
|
1090
|
+
left: calc(env(safe-area-inset-left) + --value([*]));
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
/* Inset — logical start / end */
|
|
1094
|
+
@utility start-safe {
|
|
1095
|
+
inset-inline-start: env(safe-area-inset-left);
|
|
1096
|
+
}
|
|
1097
|
+
@utility start-safe-or-* {
|
|
1098
|
+
inset-inline-start: max(env(safe-area-inset-left), calc(var(--spacing) * --value(integer)));
|
|
1099
|
+
inset-inline-start: max(env(safe-area-inset-left), --value([*]));
|
|
1100
|
+
}
|
|
1101
|
+
@utility start-safe-offset-* {
|
|
1102
|
+
inset-inline-start: calc(env(safe-area-inset-left) + calc(var(--spacing) * --value(integer)));
|
|
1103
|
+
inset-inline-start: calc(env(safe-area-inset-left) + --value([*]));
|
|
1104
|
+
}
|
|
1105
|
+
@utility end-safe {
|
|
1106
|
+
inset-inline-end: env(safe-area-inset-right);
|
|
1107
|
+
}
|
|
1108
|
+
@utility end-safe-or-* {
|
|
1109
|
+
inset-inline-end: max(env(safe-area-inset-right), calc(var(--spacing) * --value(integer)));
|
|
1110
|
+
inset-inline-end: max(env(safe-area-inset-right), --value([*]));
|
|
1111
|
+
}
|
|
1112
|
+
@utility end-safe-offset-* {
|
|
1113
|
+
inset-inline-end: calc(env(safe-area-inset-right) + calc(var(--spacing) * --value(integer)));
|
|
1114
|
+
inset-inline-end: calc(env(safe-area-inset-right) + --value([*]));
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
/* Screen-height minus safe insets. On React Native we don't have a
|
|
1118
|
+
`100vh` runtime — the parser maps these to the viewport height we
|
|
1119
|
+
receive through `Dimensions.get('window')` at render time, so the
|
|
1120
|
+
subtraction here resolves at runtime in the safe-atom resolver. */
|
|
1121
|
+
@utility h-screen-safe {
|
|
1122
|
+
height: calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)));
|
|
1123
|
+
}
|
|
1124
|
+
@utility min-h-screen-safe {
|
|
1125
|
+
min-height: calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)));
|
|
1126
|
+
}
|
|
1127
|
+
@utility max-h-screen-safe {
|
|
1128
|
+
max-height: calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)));
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
/* ────────────────────────────────────────────────────────────────
|
|
1132
|
+
* Haptics
|
|
1133
|
+
*
|
|
1134
|
+
* Each class emits a `--rnwind-haptic: <kind>[-<style>]` marker that
|
|
1135
|
+
* rnwind's parser surfaces as a `HapticRequest` into `hapticAtoms`.
|
|
1136
|
+
* The transformer then strips the atom from the className and wires
|
|
1137
|
+
* a call to the `onHaptics` callback registered on `<SchemeProvider>`:
|
|
1138
|
+
*
|
|
1139
|
+
* Bare haptic-* → fires ONCE on mount.
|
|
1140
|
+
* Variant active:haptic-* → fires on every press-in.
|
|
1141
|
+
*
|
|
1142
|
+
* The preset only DECLARES the classes; nothing here is visible in
|
|
1143
|
+
* the compiled style — the marker is consumed at transform time.
|
|
1144
|
+
* ──────────────────────────────────────────────────────────────── */
|
|
1145
|
+
@utility haptic-light {
|
|
1146
|
+
--rnwind-haptic: impact-Light;
|
|
1147
|
+
}
|
|
1148
|
+
@utility haptic-medium {
|
|
1149
|
+
--rnwind-haptic: impact-Medium;
|
|
1150
|
+
}
|
|
1151
|
+
@utility haptic-heavy {
|
|
1152
|
+
--rnwind-haptic: impact-Heavy;
|
|
1153
|
+
}
|
|
1154
|
+
@utility haptic-soft {
|
|
1155
|
+
--rnwind-haptic: impact-Soft;
|
|
1156
|
+
}
|
|
1157
|
+
@utility haptic-rigid {
|
|
1158
|
+
--rnwind-haptic: impact-Rigid;
|
|
1159
|
+
}
|
|
1160
|
+
@utility haptic-success {
|
|
1161
|
+
--rnwind-haptic: notification-Success;
|
|
1162
|
+
}
|
|
1163
|
+
@utility haptic-warning {
|
|
1164
|
+
--rnwind-haptic: notification-Warning;
|
|
1165
|
+
}
|
|
1166
|
+
@utility haptic-error {
|
|
1167
|
+
--rnwind-haptic: notification-Error;
|
|
1168
|
+
}
|
|
1169
|
+
@utility haptic-selection {
|
|
1170
|
+
--rnwind-haptic: selection;
|
|
1171
|
+
}
|