@hanzogui/config 2.0.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 -0
- package/dist/cjs/animations.cjs +92 -0
- package/dist/cjs/animations.css.cjs +35 -0
- package/dist/cjs/animations.css.native.js +38 -0
- package/dist/cjs/animations.css.native.js.map +1 -0
- package/dist/cjs/animations.native.js +95 -0
- package/dist/cjs/animations.native.js.map +1 -0
- package/dist/cjs/animations.reanimated.cjs +65 -0
- package/dist/cjs/animations.reanimated.native.js +68 -0
- package/dist/cjs/animations.reanimated.native.js.map +1 -0
- package/dist/cjs/animationsCSS.cjs +56 -0
- package/dist/cjs/animationsCSS.native.js +59 -0
- package/dist/cjs/animationsCSS.native.js.map +1 -0
- package/dist/cjs/animationsMotion.cjs +146 -0
- package/dist/cjs/animationsMotion.native.js +149 -0
- package/dist/cjs/animationsMotion.native.js.map +1 -0
- package/dist/cjs/animationsReactNative.cjs +153 -0
- package/dist/cjs/animationsReactNative.native.js +156 -0
- package/dist/cjs/animationsReactNative.native.js.map +1 -0
- package/dist/cjs/animationsReanimated.cjs +141 -0
- package/dist/cjs/animationsReanimated.native.js +144 -0
- package/dist/cjs/animationsReanimated.native.js.map +1 -0
- package/dist/cjs/config.cjs +45 -0
- package/dist/cjs/config.native.js +50 -0
- package/dist/cjs/config.native.js.map +1 -0
- package/dist/cjs/createGenericFont.cjs +61 -0
- package/dist/cjs/createGenericFont.native.js +71 -0
- package/dist/cjs/createGenericFont.native.js.map +1 -0
- package/dist/cjs/fonts.cjs +91 -0
- package/dist/cjs/fonts.native.js +102 -0
- package/dist/cjs/fonts.native.js.map +1 -0
- package/dist/cjs/index.cjs +40 -0
- package/dist/cjs/index.native.js +43 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/index.reanimated.cjs +35 -0
- package/dist/cjs/index.reanimated.native.js +38 -0
- package/dist/cjs/index.reanimated.native.js.map +1 -0
- package/dist/cjs/media.cjs +75 -0
- package/dist/cjs/media.native.js +78 -0
- package/dist/cjs/media.native.js.map +1 -0
- package/dist/cjs/v3-animations.cjs +26 -0
- package/dist/cjs/v3-animations.native.js +29 -0
- package/dist/cjs/v3-animations.native.js.map +1 -0
- package/dist/cjs/v3.cjs +137 -0
- package/dist/cjs/v3.native.js +144 -0
- package/dist/cjs/v3.native.js.map +1 -0
- package/dist/cjs/v4-animations.cjs +26 -0
- package/dist/cjs/v4-animations.native.js +29 -0
- package/dist/cjs/v4-animations.native.js.map +1 -0
- package/dist/cjs/v4-fonts.cjs +74 -0
- package/dist/cjs/v4-fonts.native.js +90 -0
- package/dist/cjs/v4-fonts.native.js.map +1 -0
- package/dist/cjs/v4-media.cjs +90 -0
- package/dist/cjs/v4-media.native.js +93 -0
- package/dist/cjs/v4-media.native.js.map +1 -0
- package/dist/cjs/v4.cjs +75 -0
- package/dist/cjs/v4.native.js +80 -0
- package/dist/cjs/v4.native.js.map +1 -0
- package/dist/cjs/v5-base.cjs +77 -0
- package/dist/cjs/v5-base.native.js +82 -0
- package/dist/cjs/v5-base.native.js.map +1 -0
- package/dist/cjs/v5-css.cjs +54 -0
- package/dist/cjs/v5-css.native.js +29 -0
- package/dist/cjs/v5-css.native.js.map +1 -0
- package/dist/cjs/v5-fonts.cjs +109 -0
- package/dist/cjs/v5-fonts.native.js +123 -0
- package/dist/cjs/v5-fonts.native.js.map +1 -0
- package/dist/cjs/v5-media.cjs +174 -0
- package/dist/cjs/v5-media.native.js +177 -0
- package/dist/cjs/v5-media.native.js.map +1 -0
- package/dist/cjs/v5-motion.cjs +133 -0
- package/dist/cjs/v5-motion.native.js +136 -0
- package/dist/cjs/v5-motion.native.js.map +1 -0
- package/dist/cjs/v5-reanimated.cjs +129 -0
- package/dist/cjs/v5-reanimated.native.js +132 -0
- package/dist/cjs/v5-reanimated.native.js.map +1 -0
- package/dist/cjs/v5-rn.cjs +139 -0
- package/dist/cjs/v5-rn.native.js +142 -0
- package/dist/cjs/v5-rn.native.js.map +1 -0
- package/dist/cjs/v5-subtle.cjs +19 -0
- package/dist/cjs/v5-subtle.native.js +22 -0
- package/dist/cjs/v5-subtle.native.js.map +1 -0
- package/dist/cjs/v5.cjs +19 -0
- package/dist/cjs/v5.native.js +22 -0
- package/dist/cjs/v5.native.js.map +1 -0
- package/dist/esm/animations.css.mjs +12 -0
- package/dist/esm/animations.css.mjs.map +1 -0
- package/dist/esm/animations.css.native.js +12 -0
- package/dist/esm/animations.css.native.js.map +1 -0
- package/dist/esm/animations.mjs +69 -0
- package/dist/esm/animations.mjs.map +1 -0
- package/dist/esm/animations.native.js +69 -0
- package/dist/esm/animations.native.js.map +1 -0
- package/dist/esm/animations.reanimated.mjs +42 -0
- package/dist/esm/animations.reanimated.mjs.map +1 -0
- package/dist/esm/animations.reanimated.native.js +42 -0
- package/dist/esm/animations.reanimated.native.js.map +1 -0
- package/dist/esm/animationsCSS.mjs +33 -0
- package/dist/esm/animationsCSS.mjs.map +1 -0
- package/dist/esm/animationsCSS.native.js +33 -0
- package/dist/esm/animationsCSS.native.js.map +1 -0
- package/dist/esm/animationsMotion.mjs +123 -0
- package/dist/esm/animationsMotion.mjs.map +1 -0
- package/dist/esm/animationsMotion.native.js +123 -0
- package/dist/esm/animationsMotion.native.js.map +1 -0
- package/dist/esm/animationsReactNative.mjs +130 -0
- package/dist/esm/animationsReactNative.mjs.map +1 -0
- package/dist/esm/animationsReactNative.native.js +130 -0
- package/dist/esm/animationsReactNative.native.js.map +1 -0
- package/dist/esm/animationsReanimated.mjs +118 -0
- package/dist/esm/animationsReanimated.mjs.map +1 -0
- package/dist/esm/animationsReanimated.native.js +118 -0
- package/dist/esm/animationsReanimated.native.js.map +1 -0
- package/dist/esm/config.mjs +22 -0
- package/dist/esm/config.mjs.map +1 -0
- package/dist/esm/config.native.js +24 -0
- package/dist/esm/config.native.js.map +1 -0
- package/dist/esm/createGenericFont.mjs +38 -0
- package/dist/esm/createGenericFont.mjs.map +1 -0
- package/dist/esm/createGenericFont.native.js +45 -0
- package/dist/esm/createGenericFont.native.js.map +1 -0
- package/dist/esm/fonts.mjs +68 -0
- package/dist/esm/fonts.mjs.map +1 -0
- package/dist/esm/fonts.native.js +76 -0
- package/dist/esm/fonts.native.js.map +1 -0
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.mjs +15 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +15 -0
- package/dist/esm/index.native.js.map +1 -0
- package/dist/esm/index.reanimated.mjs +11 -0
- package/dist/esm/index.reanimated.mjs.map +1 -0
- package/dist/esm/index.reanimated.native.js +11 -0
- package/dist/esm/index.reanimated.native.js.map +1 -0
- package/dist/esm/media.mjs +49 -0
- package/dist/esm/media.mjs.map +1 -0
- package/dist/esm/media.native.js +49 -0
- package/dist/esm/media.native.js.map +1 -0
- package/dist/esm/v3-animations.mjs +3 -0
- package/dist/esm/v3-animations.mjs.map +1 -0
- package/dist/esm/v3-animations.native.js +3 -0
- package/dist/esm/v3-animations.native.js.map +1 -0
- package/dist/esm/v3.mjs +106 -0
- package/dist/esm/v3.mjs.map +1 -0
- package/dist/esm/v3.native.js +109 -0
- package/dist/esm/v3.native.js.map +1 -0
- package/dist/esm/v4-animations.mjs +3 -0
- package/dist/esm/v4-animations.mjs.map +1 -0
- package/dist/esm/v4-animations.native.js +3 -0
- package/dist/esm/v4-animations.native.js.map +1 -0
- package/dist/esm/v4-fonts.mjs +50 -0
- package/dist/esm/v4-fonts.mjs.map +1 -0
- package/dist/esm/v4-fonts.native.js +63 -0
- package/dist/esm/v4-fonts.native.js.map +1 -0
- package/dist/esm/v4-media.mjs +65 -0
- package/dist/esm/v4-media.mjs.map +1 -0
- package/dist/esm/v4-media.native.js +65 -0
- package/dist/esm/v4-media.native.js.map +1 -0
- package/dist/esm/v4.mjs +39 -0
- package/dist/esm/v4.mjs.map +1 -0
- package/dist/esm/v4.native.js +41 -0
- package/dist/esm/v4.native.js.map +1 -0
- package/dist/esm/v5-base.mjs +34 -0
- package/dist/esm/v5-base.mjs.map +1 -0
- package/dist/esm/v5-base.native.js +36 -0
- package/dist/esm/v5-base.native.js.map +1 -0
- package/dist/esm/v5-css.mjs +30 -0
- package/dist/esm/v5-css.mjs.map +1 -0
- package/dist/esm/v5-css.native.js +3 -0
- package/dist/esm/v5-css.native.js.map +1 -0
- package/dist/esm/v5-fonts.mjs +85 -0
- package/dist/esm/v5-fonts.mjs.map +1 -0
- package/dist/esm/v5-fonts.native.js +96 -0
- package/dist/esm/v5-fonts.native.js.map +1 -0
- package/dist/esm/v5-media.mjs +149 -0
- package/dist/esm/v5-media.mjs.map +1 -0
- package/dist/esm/v5-media.native.js +149 -0
- package/dist/esm/v5-media.native.js.map +1 -0
- package/dist/esm/v5-motion.mjs +109 -0
- package/dist/esm/v5-motion.mjs.map +1 -0
- package/dist/esm/v5-motion.native.js +109 -0
- package/dist/esm/v5-motion.native.js.map +1 -0
- package/dist/esm/v5-reanimated.mjs +105 -0
- package/dist/esm/v5-reanimated.mjs.map +1 -0
- package/dist/esm/v5-reanimated.native.js +105 -0
- package/dist/esm/v5-reanimated.native.js.map +1 -0
- package/dist/esm/v5-rn.mjs +115 -0
- package/dist/esm/v5-rn.mjs.map +1 -0
- package/dist/esm/v5-rn.native.js +115 -0
- package/dist/esm/v5-rn.native.js.map +1 -0
- package/dist/esm/v5-subtle.mjs +3 -0
- package/dist/esm/v5-subtle.mjs.map +1 -0
- package/dist/esm/v5-subtle.native.js +3 -0
- package/dist/esm/v5-subtle.native.js.map +1 -0
- package/dist/esm/v5.mjs +3 -0
- package/dist/esm/v5.mjs.map +1 -0
- package/dist/esm/v5.native.js +3 -0
- package/dist/esm/v5.native.js.map +1 -0
- package/package.json +137 -0
- package/reanimated/index.cjs +2 -0
- package/reanimated/index.js +2 -0
- package/reanimated/index.native.cjs +2 -0
- package/reanimated/index.native.js +2 -0
- package/reanimated.cjs +1 -0
- package/src/animations.css.ts +11 -0
- package/src/animations.reanimated.ts +41 -0
- package/src/animations.ts +68 -0
- package/src/animationsCSS.ts +33 -0
- package/src/animationsMotion.ts +122 -0
- package/src/animationsReactNative.ts +129 -0
- package/src/animationsReanimated.ts +117 -0
- package/src/config.ts +27 -0
- package/src/createGenericFont.ts +43 -0
- package/src/fonts.ts +71 -0
- package/src/index.reanimated.ts +10 -0
- package/src/index.tsx +16 -0
- package/src/media.ts +32 -0
- package/src/v3-animations.native.ts +1 -0
- package/src/v3-animations.ts +1 -0
- package/src/v3.ts +119 -0
- package/src/v4-animations.native.ts +1 -0
- package/src/v4-animations.ts +1 -0
- package/src/v4-fonts.ts +61 -0
- package/src/v4-media.ts +40 -0
- package/src/v4.ts +47 -0
- package/src/v5-base.ts +80 -0
- package/src/v5-css.native.ts +2 -0
- package/src/v5-css.ts +31 -0
- package/src/v5-fonts.ts +112 -0
- package/src/v5-media.ts +107 -0
- package/src/v5-motion.ts +109 -0
- package/src/v5-reanimated.ts +105 -0
- package/src/v5-rn.ts +115 -0
- package/src/v5-subtle.ts +4 -0
- package/src/v5.ts +7 -0
- package/tsconfig.json +65 -0
- package/types/animations.css.d.ts +10 -0
- package/types/animations.d.ts +67 -0
- package/types/animations.reanimated.d.ts +40 -0
- package/types/animationsCSS.d.ts +28 -0
- package/types/animationsMotion.d.ts +121 -0
- package/types/animationsReactNative.d.ts +128 -0
- package/types/animationsReanimated.d.ts +116 -0
- package/types/config.d.ts +925 -0
- package/types/createGenericFont.d.ts +24 -0
- package/types/fonts.d.ts +47 -0
- package/types/index.d.ts +867 -0
- package/types/index.reanimated.d.ts +967 -0
- package/types/media.d.ts +46 -0
- package/types/v3-animations.d.ts +2 -0
- package/types/v3-animations.native.d.ts +2 -0
- package/types/v3.d.ts +970 -0
- package/types/v4-animations.d.ts +2 -0
- package/types/v4-animations.native.d.ts +2 -0
- package/types/v4-fonts.d.ts +31 -0
- package/types/v4-media.d.ts +63 -0
- package/types/v4.d.ts +283 -0
- package/types/v5-base.d.ts +62 -0
- package/types/v5-css.d.ts +49 -0
- package/types/v5-css.native.d.ts +2 -0
- package/types/v5-fonts.d.ts +32 -0
- package/types/v5-media.d.ts +135 -0
- package/types/v5-motion.d.ts +211 -0
- package/types/v5-reanimated.d.ts +203 -0
- package/types/v5-rn.d.ts +223 -0
- package/types/v5-subtle.d.ts +3 -0
- package/types/v5.d.ts +3 -0
- package/v3/index.cjs +2 -0
- package/v3/index.js +2 -0
- package/v3/index.native.cjs +2 -0
- package/v3/index.native.js +2 -0
- package/v3.cjs +1 -0
- package/v3.d.ts +1 -0
- package/v4/index.cjs +2 -0
- package/v4/index.js +2 -0
- package/v4/index.native.cjs +2 -0
- package/v4/index.native.js +2 -0
- package/v4.cjs +1 -0
- package/v4.d.ts +1 -0
- package/v5/index.cjs +2 -0
- package/v5/index.js +2 -0
- package/v5/index.native.cjs +2 -0
- package/v5/index.native.js +2 -0
- package/v5-css/index.cjs +2 -0
- package/v5-css/index.js +2 -0
- package/v5-css/index.native.cjs +2 -0
- package/v5-css/index.native.js +2 -0
- package/v5-css.cjs +1 -0
- package/v5-css.d.ts +1 -0
- package/v5-motion/index.cjs +2 -0
- package/v5-motion/index.js +2 -0
- package/v5-motion/index.native.cjs +2 -0
- package/v5-motion/index.native.js +2 -0
- package/v5-motion.cjs +1 -0
- package/v5-motion.d.ts +1 -0
- package/v5-reanimated/index.cjs +2 -0
- package/v5-reanimated/index.js +2 -0
- package/v5-reanimated/index.native.cjs +2 -0
- package/v5-reanimated/index.native.js +2 -0
- package/v5-reanimated.cjs +1 -0
- package/v5-reanimated.d.ts +1 -0
- package/v5-rn/index.cjs +2 -0
- package/v5-rn/index.js +2 -0
- package/v5-rn/index.native.cjs +2 -0
- package/v5-rn/index.native.js +2 -0
- package/v5-rn.cjs +1 -0
- package/v5-rn.d.ts +1 -0
- package/v5-subtle/index.cjs +2 -0
- package/v5-subtle/index.js +2 -0
- package/v5-subtle/index.native.cjs +2 -0
- package/v5-subtle/index.native.js +2 -0
- package/v5-subtle.cjs +1 -0
- package/v5-subtle.d.ts +1 -0
- package/v5.cjs +1 -0
- package/v5.d.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { animationsCSS as animations } from './animationsCSS'
|
package/src/v3.ts
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { tokens, themes as themesIn } from '@hanzogui/themes/v3-themes'
|
|
2
|
+
import { animations } from './v3-animations'
|
|
3
|
+
import type { CreateGuiProps } from '@hanzogui/web'
|
|
4
|
+
|
|
5
|
+
import { fonts } from './fonts'
|
|
6
|
+
import { media, mediaQueryDefaultActive } from './media'
|
|
7
|
+
|
|
8
|
+
// fix vite - react native uses global which it doesn't provide
|
|
9
|
+
globalThis['global'] ||= globalThis
|
|
10
|
+
|
|
11
|
+
// v3 shorthands (inlined from deprecated @hanzogui/shorthands/v2)
|
|
12
|
+
export const shorthands = {
|
|
13
|
+
ussel: 'userSelect',
|
|
14
|
+
cur: 'cursor',
|
|
15
|
+
pe: 'pointerEvents',
|
|
16
|
+
col: 'color',
|
|
17
|
+
ff: 'fontFamily',
|
|
18
|
+
fos: 'fontSize',
|
|
19
|
+
fost: 'fontStyle',
|
|
20
|
+
fow: 'fontWeight',
|
|
21
|
+
ls: 'letterSpacing',
|
|
22
|
+
lh: 'lineHeight',
|
|
23
|
+
ta: 'textAlign',
|
|
24
|
+
tt: 'textTransform',
|
|
25
|
+
ww: 'wordWrap',
|
|
26
|
+
ac: 'alignContent',
|
|
27
|
+
ai: 'alignItems',
|
|
28
|
+
als: 'alignSelf',
|
|
29
|
+
b: 'bottom',
|
|
30
|
+
bg: 'backgroundColor',
|
|
31
|
+
bbc: 'borderBottomColor',
|
|
32
|
+
bblr: 'borderBottomLeftRadius',
|
|
33
|
+
bbrr: 'borderBottomRightRadius',
|
|
34
|
+
bbw: 'borderBottomWidth',
|
|
35
|
+
blc: 'borderLeftColor',
|
|
36
|
+
blw: 'borderLeftWidth',
|
|
37
|
+
bc: 'borderColor',
|
|
38
|
+
br: 'borderRadius',
|
|
39
|
+
bs: 'borderStyle',
|
|
40
|
+
brw: 'borderRightWidth',
|
|
41
|
+
brc: 'borderRightColor',
|
|
42
|
+
btc: 'borderTopColor',
|
|
43
|
+
btlr: 'borderTopLeftRadius',
|
|
44
|
+
btrr: 'borderTopRightRadius',
|
|
45
|
+
btw: 'borderTopWidth',
|
|
46
|
+
bw: 'borderWidth',
|
|
47
|
+
dsp: 'display',
|
|
48
|
+
f: 'flex',
|
|
49
|
+
fb: 'flexBasis',
|
|
50
|
+
fd: 'flexDirection',
|
|
51
|
+
fg: 'flexGrow',
|
|
52
|
+
fs: 'flexShrink',
|
|
53
|
+
fw: 'flexWrap',
|
|
54
|
+
h: 'height',
|
|
55
|
+
jc: 'justifyContent',
|
|
56
|
+
l: 'left',
|
|
57
|
+
m: 'margin',
|
|
58
|
+
mah: 'maxHeight',
|
|
59
|
+
maw: 'maxWidth',
|
|
60
|
+
mb: 'marginBottom',
|
|
61
|
+
mih: 'minHeight',
|
|
62
|
+
miw: 'minWidth',
|
|
63
|
+
ml: 'marginLeft',
|
|
64
|
+
mr: 'marginRight',
|
|
65
|
+
mt: 'marginTop',
|
|
66
|
+
mx: 'marginHorizontal',
|
|
67
|
+
my: 'marginVertical',
|
|
68
|
+
o: 'opacity',
|
|
69
|
+
ov: 'overflow',
|
|
70
|
+
p: 'padding',
|
|
71
|
+
pb: 'paddingBottom',
|
|
72
|
+
pl: 'paddingLeft',
|
|
73
|
+
pos: 'position',
|
|
74
|
+
pr: 'paddingRight',
|
|
75
|
+
pt: 'paddingTop',
|
|
76
|
+
px: 'paddingHorizontal',
|
|
77
|
+
py: 'paddingVertical',
|
|
78
|
+
r: 'right',
|
|
79
|
+
shac: 'shadowColor',
|
|
80
|
+
shar: 'shadowRadius',
|
|
81
|
+
shof: 'shadowOffset',
|
|
82
|
+
shop: 'shadowOpacity',
|
|
83
|
+
t: 'top',
|
|
84
|
+
w: 'width',
|
|
85
|
+
zi: 'zIndex',
|
|
86
|
+
} as const
|
|
87
|
+
|
|
88
|
+
export { animations } from './v3-animations'
|
|
89
|
+
export { tokens, themes } from '@hanzogui/themes/v3-themes'
|
|
90
|
+
export { fonts } from './fonts'
|
|
91
|
+
export { media, mediaQueryDefaultActive } from './media'
|
|
92
|
+
|
|
93
|
+
export const selectionStyles = (theme) =>
|
|
94
|
+
theme.color5
|
|
95
|
+
? {
|
|
96
|
+
backgroundColor: theme.color5,
|
|
97
|
+
color: theme.color11,
|
|
98
|
+
}
|
|
99
|
+
: null
|
|
100
|
+
|
|
101
|
+
// tree shake away themes in production
|
|
102
|
+
const themes =
|
|
103
|
+
process.env.HANZO_GUI_OPTIMIZE_THEMES === 'true' ? ({} as typeof themesIn) : themesIn
|
|
104
|
+
|
|
105
|
+
export const config = {
|
|
106
|
+
animations,
|
|
107
|
+
themes,
|
|
108
|
+
media,
|
|
109
|
+
shorthands,
|
|
110
|
+
tokens,
|
|
111
|
+
fonts,
|
|
112
|
+
selectionStyles,
|
|
113
|
+
settings: {
|
|
114
|
+
mediaQueryDefaultActive,
|
|
115
|
+
defaultFont: 'body',
|
|
116
|
+
fastSchemeChange: true,
|
|
117
|
+
shouldAddPrefersColorThemes: true,
|
|
118
|
+
},
|
|
119
|
+
} satisfies CreateGuiProps
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { animationsReactNative as animations } from './animationsReactNative'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { animationsCSS as animations } from './animationsCSS'
|
package/src/v4-fonts.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { FillInFont, GenericFont } from '@hanzogui/core'
|
|
2
|
+
import { createFont, getVariableValue, isWeb } from '@hanzogui/core'
|
|
3
|
+
|
|
4
|
+
export const createSystemFont = <A extends GenericFont>({
|
|
5
|
+
font = {},
|
|
6
|
+
sizeLineHeight = (size) => size + 10,
|
|
7
|
+
sizeSize = (size) => size * 1,
|
|
8
|
+
}: {
|
|
9
|
+
font?: Partial<A>
|
|
10
|
+
sizeLineHeight?: (fontSize: number) => number
|
|
11
|
+
sizeSize?: (size: number) => number
|
|
12
|
+
} = {}): FillInFont<A, keyof typeof defaultSizes> => {
|
|
13
|
+
// merge to allow individual overrides
|
|
14
|
+
const size = Object.fromEntries(
|
|
15
|
+
Object.entries({
|
|
16
|
+
...defaultSizes,
|
|
17
|
+
...font.size,
|
|
18
|
+
}).map(([k, v]) => [k, sizeSize(+v)])
|
|
19
|
+
)
|
|
20
|
+
return createFont({
|
|
21
|
+
family: isWeb
|
|
22
|
+
? '-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'
|
|
23
|
+
: 'System',
|
|
24
|
+
lineHeight: Object.fromEntries(
|
|
25
|
+
Object.entries(size).map(([k, v]) => [k, sizeLineHeight(getVariableValue(v))])
|
|
26
|
+
),
|
|
27
|
+
weight: {
|
|
28
|
+
4: '300',
|
|
29
|
+
},
|
|
30
|
+
letterSpacing: {
|
|
31
|
+
4: 0,
|
|
32
|
+
},
|
|
33
|
+
...(font as any),
|
|
34
|
+
size,
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const defaultSizes = {
|
|
39
|
+
1: 11,
|
|
40
|
+
2: 12,
|
|
41
|
+
3: 13,
|
|
42
|
+
4: 14,
|
|
43
|
+
true: 14,
|
|
44
|
+
5: 16,
|
|
45
|
+
6: 18,
|
|
46
|
+
7: 20,
|
|
47
|
+
8: 23,
|
|
48
|
+
9: 30,
|
|
49
|
+
10: 46,
|
|
50
|
+
11: 55,
|
|
51
|
+
12: 62,
|
|
52
|
+
13: 72,
|
|
53
|
+
14: 92,
|
|
54
|
+
15: 114,
|
|
55
|
+
16: 134,
|
|
56
|
+
} as const
|
|
57
|
+
|
|
58
|
+
export const fonts = {
|
|
59
|
+
body: createSystemFont(),
|
|
60
|
+
heading: createSystemFont({ sizeSize: (n) => n * 1.4 }),
|
|
61
|
+
}
|
package/src/v4-media.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// note order is important!
|
|
2
|
+
// earlier defined = less important
|
|
3
|
+
|
|
4
|
+
export const breakpoints = {
|
|
5
|
+
'2xl': 1536,
|
|
6
|
+
xl: 1280,
|
|
7
|
+
lg: 1024,
|
|
8
|
+
md: 768,
|
|
9
|
+
sm: 640,
|
|
10
|
+
xs: 460,
|
|
11
|
+
'2xs': 340,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const media = {
|
|
15
|
+
maxXs: { maxWidth: breakpoints.xs },
|
|
16
|
+
max2xs: { maxWidth: breakpoints['2xs'] },
|
|
17
|
+
maxSm: { maxWidth: breakpoints.sm },
|
|
18
|
+
maxMd: { maxWidth: breakpoints.md },
|
|
19
|
+
maxLg: { maxWidth: breakpoints.lg },
|
|
20
|
+
maxXl: { maxWidth: breakpoints.xl },
|
|
21
|
+
max2Xl: { maxWidth: breakpoints['2xl'] },
|
|
22
|
+
// for site
|
|
23
|
+
'2xl': { minWidth: breakpoints['2xl'] },
|
|
24
|
+
xl: { minWidth: breakpoints.xl },
|
|
25
|
+
lg: { minWidth: breakpoints.lg },
|
|
26
|
+
md: { minWidth: breakpoints.md },
|
|
27
|
+
sm: { minWidth: breakpoints.sm },
|
|
28
|
+
xs: { minWidth: breakpoints.xs },
|
|
29
|
+
'2xs': { minWidth: breakpoints['2xs'] },
|
|
30
|
+
} as const
|
|
31
|
+
|
|
32
|
+
export const mediaQueryDefaultActive = {
|
|
33
|
+
'2xl': false,
|
|
34
|
+
xl: false,
|
|
35
|
+
lg: false,
|
|
36
|
+
md: false,
|
|
37
|
+
sm: false,
|
|
38
|
+
xs: true,
|
|
39
|
+
'2xs': true,
|
|
40
|
+
}
|
package/src/v4.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { shorthands } from '@hanzogui/shorthands/v4'
|
|
2
|
+
import { tokens, defaultThemes } from '@hanzogui/themes/v4'
|
|
3
|
+
import type { CreateGuiProps } from '@hanzogui/web'
|
|
4
|
+
import { animations } from './v3-animations'
|
|
5
|
+
import { fonts } from './v4-fonts'
|
|
6
|
+
import { media, mediaQueryDefaultActive } from './v4-media'
|
|
7
|
+
|
|
8
|
+
export { shorthands } from '@hanzogui/shorthands/v4'
|
|
9
|
+
export { createThemes } from '@hanzogui/theme-builder'
|
|
10
|
+
export { guiThemes, tokens } from '@hanzogui/themes/v4'
|
|
11
|
+
export { animations } from './v4-animations'
|
|
12
|
+
export { createSystemFont, fonts } from './v4-fonts'
|
|
13
|
+
export { breakpoints, media, mediaQueryDefaultActive } from './v4-media'
|
|
14
|
+
export { defaultThemes as themes } from '@hanzogui/themes/v4'
|
|
15
|
+
|
|
16
|
+
// Configuration:
|
|
17
|
+
|
|
18
|
+
export const selectionStyles = (theme) =>
|
|
19
|
+
theme.color5
|
|
20
|
+
? {
|
|
21
|
+
backgroundColor: theme.color5,
|
|
22
|
+
color: theme.color11,
|
|
23
|
+
}
|
|
24
|
+
: null
|
|
25
|
+
|
|
26
|
+
export const settings = {
|
|
27
|
+
mediaQueryDefaultActive,
|
|
28
|
+
defaultFont: 'body',
|
|
29
|
+
fastSchemeChange: true,
|
|
30
|
+
shouldAddPrefersColorThemes: true,
|
|
31
|
+
allowedStyleValues: 'somewhat-strict-web',
|
|
32
|
+
addThemeClassName: 'html',
|
|
33
|
+
onlyAllowShorthands: true,
|
|
34
|
+
styleCompat: 'legacy',
|
|
35
|
+
defaultPosition: 'relative',
|
|
36
|
+
} satisfies CreateGuiProps['settings']
|
|
37
|
+
|
|
38
|
+
export const defaultConfig = {
|
|
39
|
+
animations,
|
|
40
|
+
media,
|
|
41
|
+
shorthands,
|
|
42
|
+
themes: defaultThemes,
|
|
43
|
+
tokens,
|
|
44
|
+
fonts,
|
|
45
|
+
selectionStyles,
|
|
46
|
+
settings,
|
|
47
|
+
} satisfies CreateGuiProps
|
package/src/v5-base.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { shorthands } from '@hanzogui/shorthands/v4' // v4 same as v5
|
|
2
|
+
import type { Shorthands } from '@hanzogui/shorthands/v4'
|
|
3
|
+
import { themes, tokens } from '@hanzogui/themes/v5'
|
|
4
|
+
import type { V5Themes, V5Tokens } from '@hanzogui/themes/v5'
|
|
5
|
+
import type { CreateGuiProps } from '@hanzogui/web'
|
|
6
|
+
import { fonts } from './v5-fonts'
|
|
7
|
+
import type { V5Fonts } from './v5-fonts'
|
|
8
|
+
import { media, mediaQueryDefaultActive } from './v5-media'
|
|
9
|
+
import type { V5Media } from './v5-media'
|
|
10
|
+
|
|
11
|
+
export { shorthands } from '@hanzogui/shorthands/v4'
|
|
12
|
+
export { createThemes } from '@hanzogui/theme-builder'
|
|
13
|
+
export {
|
|
14
|
+
adjustPalette,
|
|
15
|
+
adjustPalettes,
|
|
16
|
+
createV5Theme,
|
|
17
|
+
defaultChildrenThemes,
|
|
18
|
+
defaultDarkPalette,
|
|
19
|
+
defaultLightPalette,
|
|
20
|
+
hslToString,
|
|
21
|
+
// helpers
|
|
22
|
+
interpolateColor,
|
|
23
|
+
opacify,
|
|
24
|
+
parseHSL,
|
|
25
|
+
tokens,
|
|
26
|
+
type AdjustFn,
|
|
27
|
+
// types
|
|
28
|
+
type HSL,
|
|
29
|
+
type PaletteAdjustments,
|
|
30
|
+
type V5Theme,
|
|
31
|
+
type V5ThemeNames,
|
|
32
|
+
type V5Themes,
|
|
33
|
+
type V5Tokens,
|
|
34
|
+
} from '@hanzogui/themes/v5'
|
|
35
|
+
export { createSystemFont, fonts } from './v5-fonts'
|
|
36
|
+
export type { V5Fonts } from './v5-fonts'
|
|
37
|
+
export { breakpoints, media, mediaQueryDefaultActive } from './v5-media'
|
|
38
|
+
export type { V5Media } from './v5-media'
|
|
39
|
+
|
|
40
|
+
export const selectionStyles = (theme) =>
|
|
41
|
+
theme.color5
|
|
42
|
+
? {
|
|
43
|
+
backgroundColor: theme.color5,
|
|
44
|
+
color: theme.color11,
|
|
45
|
+
}
|
|
46
|
+
: null
|
|
47
|
+
|
|
48
|
+
export const settings = {
|
|
49
|
+
mediaQueryDefaultActive,
|
|
50
|
+
defaultFont: 'body',
|
|
51
|
+
fastSchemeChange: true,
|
|
52
|
+
shouldAddPrefersColorThemes: true,
|
|
53
|
+
allowedStyleValues: 'somewhat-strict-web',
|
|
54
|
+
addThemeClassName: 'html',
|
|
55
|
+
onlyAllowShorthands: true,
|
|
56
|
+
styleCompat: 'react-native',
|
|
57
|
+
} satisfies CreateGuiProps['settings']
|
|
58
|
+
|
|
59
|
+
export type V5Settings = typeof settings
|
|
60
|
+
|
|
61
|
+
export type V5DefaultConfig = {
|
|
62
|
+
media: V5Media
|
|
63
|
+
shorthands: Shorthands
|
|
64
|
+
themes: V5Themes
|
|
65
|
+
tokens: V5Tokens
|
|
66
|
+
fonts: V5Fonts
|
|
67
|
+
selectionStyles: typeof selectionStyles
|
|
68
|
+
settings: V5Settings
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// base config without animations - users must provide their own
|
|
72
|
+
export const defaultConfig: V5DefaultConfig = {
|
|
73
|
+
media,
|
|
74
|
+
shorthands,
|
|
75
|
+
themes,
|
|
76
|
+
tokens,
|
|
77
|
+
fonts,
|
|
78
|
+
selectionStyles,
|
|
79
|
+
settings,
|
|
80
|
+
}
|
package/src/v5-css.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createAnimations } from '@hanzogui/animations-css'
|
|
2
|
+
|
|
3
|
+
const easeOut = 'cubic-bezier(0.25, 0.1, 0.25, 1)'
|
|
4
|
+
const bouncy = 'cubic-bezier(0.175, 0.885, 0.32, 1.275)'
|
|
5
|
+
|
|
6
|
+
export const animationsCSS = createAnimations({
|
|
7
|
+
'0ms': '0ms linear',
|
|
8
|
+
'50ms': '50ms linear',
|
|
9
|
+
'75ms': '75ms linear',
|
|
10
|
+
'100ms': '100ms ease-out',
|
|
11
|
+
'200ms': '200ms ease-out',
|
|
12
|
+
'250ms': '250ms ease-out',
|
|
13
|
+
'300ms': '300ms ease-out',
|
|
14
|
+
'400ms': '400ms ease-out',
|
|
15
|
+
'500ms': '500ms ease-out',
|
|
16
|
+
superBouncy: `300ms cubic-bezier(0.175, 0.885, 0.32, 1.5)`,
|
|
17
|
+
bouncy: `350ms ${bouncy}`,
|
|
18
|
+
superLazy: `600ms ${easeOut}`,
|
|
19
|
+
lazy: `500ms ${easeOut}`,
|
|
20
|
+
medium: `300ms ${easeOut}`,
|
|
21
|
+
slowest: `800ms ${easeOut}`,
|
|
22
|
+
slow: `450ms ${easeOut}`,
|
|
23
|
+
quick: `150ms ${easeOut}`,
|
|
24
|
+
quickLessBouncy: `180ms ${easeOut}`,
|
|
25
|
+
quicker: `120ms ${easeOut}`,
|
|
26
|
+
quickerLessBouncy: `100ms ${easeOut}`,
|
|
27
|
+
quickest: `80ms ${easeOut}`,
|
|
28
|
+
quickestLessBouncy: `60ms ${easeOut}`,
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
export const animations = animationsCSS
|
package/src/v5-fonts.ts
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { FillInFont, GenericFont } from '@hanzogui/core'
|
|
2
|
+
import { createFont, getVariableValue } from '@hanzogui/core'
|
|
3
|
+
|
|
4
|
+
const isWeb = process.env.HANZO_GUI_TARGET === 'web'
|
|
5
|
+
const isNative = process.env.HANZO_GUI_TARGET === 'native'
|
|
6
|
+
|
|
7
|
+
// web sizes
|
|
8
|
+
const webSizes = {
|
|
9
|
+
1: 12,
|
|
10
|
+
2: 13,
|
|
11
|
+
3: 14,
|
|
12
|
+
4: 15,
|
|
13
|
+
true: 15,
|
|
14
|
+
5: 16,
|
|
15
|
+
6: 18,
|
|
16
|
+
7: 22,
|
|
17
|
+
8: 26,
|
|
18
|
+
9: 30,
|
|
19
|
+
10: 40,
|
|
20
|
+
11: 46,
|
|
21
|
+
12: 52,
|
|
22
|
+
13: 60,
|
|
23
|
+
14: 70,
|
|
24
|
+
15: 85,
|
|
25
|
+
16: 100,
|
|
26
|
+
} as const
|
|
27
|
+
|
|
28
|
+
// native sizes aligned with iOS HIG (SF Pro)
|
|
29
|
+
// 4/true = body (17pt), 3 = subheadline (15pt), 2 = caption (12pt)
|
|
30
|
+
const nativeSizes = {
|
|
31
|
+
1: 11,
|
|
32
|
+
2: 12,
|
|
33
|
+
3: 15,
|
|
34
|
+
4: 17,
|
|
35
|
+
true: 17,
|
|
36
|
+
5: 20,
|
|
37
|
+
6: 22,
|
|
38
|
+
7: 24,
|
|
39
|
+
8: 28,
|
|
40
|
+
9: 32,
|
|
41
|
+
10: 40,
|
|
42
|
+
11: 46,
|
|
43
|
+
12: 52,
|
|
44
|
+
13: 60,
|
|
45
|
+
14: 70,
|
|
46
|
+
15: 85,
|
|
47
|
+
16: 100,
|
|
48
|
+
} as const
|
|
49
|
+
|
|
50
|
+
const defaultSizes = isNative ? nativeSizes : webSizes
|
|
51
|
+
|
|
52
|
+
// line height: native per iOS HIG (size + 5), web 150% tapering to ~142% for large sizes
|
|
53
|
+
const defaultLineHeight = (size: number) => {
|
|
54
|
+
if (isNative) return Math.round(size + 5)
|
|
55
|
+
// taper from 1.5 at small sizes to ~1.42 at 40px
|
|
56
|
+
const ratio = 1.5 - Math.max(0, (size - 20) * 0.004)
|
|
57
|
+
return Math.round(size * ratio)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const createSystemFont = <A extends GenericFont>({
|
|
61
|
+
font = {},
|
|
62
|
+
sizeLineHeight = defaultLineHeight,
|
|
63
|
+
sizeSize = (size) => Math.round(size),
|
|
64
|
+
}: {
|
|
65
|
+
font?: Partial<A>
|
|
66
|
+
sizeLineHeight?: (fontSize: number) => number
|
|
67
|
+
sizeSize?: (size: number) => number
|
|
68
|
+
} = {}): FillInFont<A, keyof typeof webSizes> => {
|
|
69
|
+
// merge to allow individual overrides
|
|
70
|
+
const size = Object.fromEntries(
|
|
71
|
+
Object.entries({
|
|
72
|
+
...defaultSizes,
|
|
73
|
+
...font.size,
|
|
74
|
+
}).map(([k, v]) => [k, sizeSize(+v)])
|
|
75
|
+
)
|
|
76
|
+
return createFont({
|
|
77
|
+
family: isWeb
|
|
78
|
+
? '"Geist Sans", "Geist", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'
|
|
79
|
+
: 'Geist',
|
|
80
|
+
lineHeight: Object.fromEntries(
|
|
81
|
+
Object.entries(size).map(([k, v]) => [k, sizeLineHeight(getVariableValue(v))])
|
|
82
|
+
),
|
|
83
|
+
weight: {
|
|
84
|
+
1: '400',
|
|
85
|
+
},
|
|
86
|
+
letterSpacing: {
|
|
87
|
+
4: 0,
|
|
88
|
+
},
|
|
89
|
+
...(font as any),
|
|
90
|
+
size,
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// heading line height: native ~120%, web original
|
|
95
|
+
const headingLineHeight = (size: number) =>
|
|
96
|
+
Math.round(isNative ? size * 1.2 : size * 1.12 + 5)
|
|
97
|
+
|
|
98
|
+
export const fonts = {
|
|
99
|
+
body: createSystemFont(),
|
|
100
|
+
heading: createSystemFont({
|
|
101
|
+
font: {
|
|
102
|
+
weight: {
|
|
103
|
+
0: '600',
|
|
104
|
+
6: '700',
|
|
105
|
+
9: '800',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
sizeLineHeight: headingLineHeight,
|
|
109
|
+
}),
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type V5Fonts = typeof fonts
|
package/src/v5-media.ts
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// note order is important!
|
|
2
|
+
// earlier defined = less important
|
|
3
|
+
|
|
4
|
+
export const breakpoints = {
|
|
5
|
+
// for container queries its really helpful to have small sizes
|
|
6
|
+
100: 100,
|
|
7
|
+
200: 200,
|
|
8
|
+
|
|
9
|
+
xxxs: 260,
|
|
10
|
+
xxs: 340,
|
|
11
|
+
xs: 460,
|
|
12
|
+
sm: 640,
|
|
13
|
+
md: 768,
|
|
14
|
+
lg: 1024,
|
|
15
|
+
xl: 1280,
|
|
16
|
+
xxl: 1536,
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const mediaQueryForceNonOverlap = process.env.HANZO_GUI_TARGET === 'native' ? 1 : 0.02
|
|
20
|
+
|
|
21
|
+
export const media = {
|
|
22
|
+
// always true on native
|
|
23
|
+
touchable:
|
|
24
|
+
process.env.HANZO_GUI_TARGET === 'native'
|
|
25
|
+
? ({ minWidth: 0 } as never)
|
|
26
|
+
: { pointer: 'coarse' },
|
|
27
|
+
|
|
28
|
+
// always false on native (can't hover on touch)
|
|
29
|
+
hoverable:
|
|
30
|
+
process.env.HANZO_GUI_TARGET === 'native'
|
|
31
|
+
? ({ maxWidth: 0 } as never)
|
|
32
|
+
: { hover: 'hover' },
|
|
33
|
+
|
|
34
|
+
// Max-width queries (desktop-first, ordered large-to-small so smaller wins)
|
|
35
|
+
'max-xxl': { maxWidth: breakpoints.xxl - mediaQueryForceNonOverlap },
|
|
36
|
+
'max-xl': { maxWidth: breakpoints.xl - mediaQueryForceNonOverlap },
|
|
37
|
+
'max-lg': { maxWidth: breakpoints.lg - mediaQueryForceNonOverlap },
|
|
38
|
+
'max-md': { maxWidth: breakpoints.md - mediaQueryForceNonOverlap },
|
|
39
|
+
'max-sm': { maxWidth: breakpoints.sm - mediaQueryForceNonOverlap },
|
|
40
|
+
'max-xs': { maxWidth: breakpoints.xs - mediaQueryForceNonOverlap },
|
|
41
|
+
'max-xxs': { maxWidth: breakpoints.xxs - mediaQueryForceNonOverlap },
|
|
42
|
+
'max-xxxs': { maxWidth: breakpoints.xxxs - mediaQueryForceNonOverlap },
|
|
43
|
+
|
|
44
|
+
// for container queries its really helpful to have small sizes
|
|
45
|
+
'max-200': { maxWidth: breakpoints['200'] - mediaQueryForceNonOverlap },
|
|
46
|
+
'max-100': { maxWidth: breakpoints['100'] - mediaQueryForceNonOverlap },
|
|
47
|
+
|
|
48
|
+
// Min-width queries (mobile-first)
|
|
49
|
+
// non-max wins over max though tbh it could go either way
|
|
50
|
+
xxxs: { minWidth: breakpoints.xxxs },
|
|
51
|
+
xxs: { minWidth: breakpoints.xxs },
|
|
52
|
+
xs: { minWidth: breakpoints.xs },
|
|
53
|
+
sm: { minWidth: breakpoints.sm },
|
|
54
|
+
md: { minWidth: breakpoints.md },
|
|
55
|
+
lg: { minWidth: breakpoints.lg },
|
|
56
|
+
xl: { minWidth: breakpoints.xl },
|
|
57
|
+
xxl: { minWidth: breakpoints.xxl },
|
|
58
|
+
|
|
59
|
+
// Height-based queries LAST so they override width queries when both match
|
|
60
|
+
// (later in object = higher CSS specificity)
|
|
61
|
+
// max-height ordered large-to-small so smaller wins (like max-width)
|
|
62
|
+
'max-height-lg': { maxHeight: breakpoints.lg - mediaQueryForceNonOverlap },
|
|
63
|
+
'max-height-md': { maxHeight: breakpoints.md - mediaQueryForceNonOverlap },
|
|
64
|
+
'max-height-sm': { maxHeight: breakpoints.sm - mediaQueryForceNonOverlap },
|
|
65
|
+
'max-height-xs': { maxHeight: breakpoints.xs - mediaQueryForceNonOverlap },
|
|
66
|
+
'max-height-xxs': { maxHeight: breakpoints.xxs - mediaQueryForceNonOverlap },
|
|
67
|
+
'max-height-xxxs': { maxHeight: breakpoints.xxxs - mediaQueryForceNonOverlap },
|
|
68
|
+
|
|
69
|
+
'max-height-200': { maxHeight: breakpoints['200'] - mediaQueryForceNonOverlap },
|
|
70
|
+
'max-height-100': { maxHeight: breakpoints['100'] - mediaQueryForceNonOverlap },
|
|
71
|
+
|
|
72
|
+
'height-sm': { minHeight: breakpoints.sm },
|
|
73
|
+
'height-md': { minHeight: breakpoints.md },
|
|
74
|
+
'height-lg': { minHeight: breakpoints.lg },
|
|
75
|
+
} as const
|
|
76
|
+
|
|
77
|
+
export type V5Media = typeof media
|
|
78
|
+
|
|
79
|
+
export const mediaQueryDefaultActive = {
|
|
80
|
+
touchable: process.env.HANZO_GUI_TARGET === 'native',
|
|
81
|
+
hoverable: process.env.HANZO_GUI_TARGET !== 'native',
|
|
82
|
+
// Max queries
|
|
83
|
+
'max-xxl': true,
|
|
84
|
+
'max-xl': true,
|
|
85
|
+
'max-lg': true,
|
|
86
|
+
'max-md': true,
|
|
87
|
+
'max-sm': true,
|
|
88
|
+
'max-xs': true,
|
|
89
|
+
'max-xxs': false,
|
|
90
|
+
'max-xxxs': false,
|
|
91
|
+
// Min queries
|
|
92
|
+
xxxs: true,
|
|
93
|
+
xxs: true,
|
|
94
|
+
xs: true,
|
|
95
|
+
sm: false,
|
|
96
|
+
md: false,
|
|
97
|
+
lg: false,
|
|
98
|
+
xl: false,
|
|
99
|
+
xxl: false,
|
|
100
|
+
// Height queries (default: iPhone non-max ~844pt)
|
|
101
|
+
'max-height-sm': false,
|
|
102
|
+
'max-height-md': false,
|
|
103
|
+
'max-height-lg': true,
|
|
104
|
+
'height-sm': true,
|
|
105
|
+
'height-md': true,
|
|
106
|
+
'height-lg': false,
|
|
107
|
+
}
|