@hanzo/ui 8.1.21 → 8.2.1
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/dist/backends/gui/index.cjs +5 -5
- package/dist/backends/gui/index.d.ts +0 -1
- package/dist/backends/gui/index.d.ts.map +1 -1
- package/dist/backends/gui/index.js +2 -1
- package/dist/backends/gui/index.js.map +1 -1
- package/dist/gallery.cjs +3 -1
- package/dist/gallery.d.ts.map +1 -1
- package/dist/gallery.html +176 -2
- package/dist/gallery.js +4 -2
- package/dist/gallery.js.map +1 -1
- package/dist/grid.cjs +110 -0
- package/dist/grid.d.ts +61 -0
- package/dist/grid.d.ts.map +1 -0
- package/dist/grid.js +106 -0
- package/dist/grid.js.map +1 -0
- package/dist/index.cjs +3 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.css +174 -0
- package/package.json +7 -1
- package/dist/backends/gui/grid.cjs +0 -73
- package/dist/backends/gui/grid.d.ts +0 -25
- package/dist/backends/gui/grid.d.ts.map +0 -1
- package/dist/backends/gui/grid.js +0 -71
- package/dist/backends/gui/grid.js.map +0 -1
- package/dist/primitives/Grid.cjs +0 -8
- package/dist/primitives/Grid.d.ts +0 -2
- package/dist/primitives/Grid.d.ts.map +0 -1
- package/dist/primitives/Grid.js +0 -5
- package/dist/primitives/Grid.js.map +0 -1
package/dist/styles.css
CHANGED
|
@@ -1686,6 +1686,180 @@
|
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
1688
|
|
|
1689
|
+
[stylesheet-group="0"]{}
|
|
1690
|
+
body{margin:0;}
|
|
1691
|
+
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}
|
|
1692
|
+
html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}
|
|
1693
|
+
input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}
|
|
1694
|
+
[stylesheet-group="1"]{}
|
|
1695
|
+
.css-accessibilityImage-9pa8cd{bottom:0px;height:100%;left:0px;opacity:0;position:absolute;right:0px;top:0px;width:100%;z-index:-1;}
|
|
1696
|
+
.css-text-146c3p1{background-color:rgba(0,0,0,0.00);border:0 solid black;box-sizing:border-box;color:rgba(0,0,0,1.00);display:inline;font:14px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;list-style:none;margin:0px;padding:0px;position:relative;text-align:start;text-decoration:none;white-space:pre-wrap;word-wrap:break-word;}
|
|
1697
|
+
.css-textHasAncestor-1jxf684{background-color:rgba(0,0,0,0.00);border:0 solid black;box-sizing:border-box;color:inherit;display:inline;font:inherit;list-style:none;margin:0px;padding:0px;position:relative;text-align:inherit;text-decoration:none;white-space:inherit;word-wrap:break-word;}
|
|
1698
|
+
.css-textinput-11aywtz{-moz-appearance:textfield;-webkit-appearance:none;background-color:rgba(0,0,0,0.00);border-bottom-left-radius:0px;border-bottom-right-radius:0px;border-top-left-radius:0px;border-top-right-radius:0px;border:0 solid black;box-sizing:border-box;font:14px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;margin:0px;padding:0px;resize:none;}
|
|
1699
|
+
.css-view-g5y9jx{align-content:flex-start;align-items:stretch;background-color:rgba(0,0,0,0.00);border:0 solid black;box-sizing:border-box;display:flex;flex-basis:auto;flex-direction:column;flex-shrink:0;list-style:none;margin:0px;min-height:0px;min-width:0px;padding:0px;position:relative;text-decoration:none;z-index:0;}
|
|
1700
|
+
[stylesheet-group="2"]{}
|
|
1701
|
+
.r-borderColor-1awa8pu{border-bottom-color:rgba(101,119,134,1.00);border-left-color:rgba(101,119,134,1.00);border-right-color:rgba(101,119,134,1.00);border-top-color:rgba(101,119,134,1.00);}
|
|
1702
|
+
.r-borderColor-1d4xg89{border-bottom-color:rgba(170,184,194,1.00);border-left-color:rgba(170,184,194,1.00);border-right-color:rgba(170,184,194,1.00);border-top-color:rgba(170,184,194,1.00);}
|
|
1703
|
+
.r-borderColor-1jyn79y{border-bottom-color:rgba(0,150,136,1.00);border-left-color:rgba(0,150,136,1.00);border-right-color:rgba(0,150,136,1.00);border-top-color:rgba(0,150,136,1.00);}
|
|
1704
|
+
.r-borderColor-4a18lf{border-bottom-color:rgba(255,0,0,1.00);border-left-color:rgba(255,0,0,1.00);border-right-color:rgba(255,0,0,1.00);border-top-color:rgba(255,0,0,1.00);}
|
|
1705
|
+
.r-borderColor-60ke3l{border-bottom-color:rgba(0,128,0,1.00);border-left-color:rgba(0,128,0,1.00);border-right-color:rgba(0,128,0,1.00);border-top-color:rgba(0,128,0,1.00);}
|
|
1706
|
+
.r-borderColor-9x6qib{border-bottom-color:rgba(204,214,221,1.00);border-left-color:rgba(204,214,221,1.00);border-right-color:rgba(204,214,221,1.00);border-top-color:rgba(204,214,221,1.00);}
|
|
1707
|
+
.r-borderColor-fx7oqy{border-bottom-color:rgba(0,0,255,1.00);border-left-color:rgba(0,0,255,1.00);border-right-color:rgba(0,0,255,1.00);border-top-color:rgba(0,0,255,1.00);}
|
|
1708
|
+
.r-borderRadius-1j16mh1{border-bottom-left-radius:100%;border-bottom-right-radius:100%;border-top-left-radius:100%;border-top-right-radius:100%;}
|
|
1709
|
+
.r-borderRadius-1jkafct{border-bottom-left-radius:2px;border-bottom-right-radius:2px;border-top-left-radius:2px;border-top-right-radius:2px;}
|
|
1710
|
+
.r-borderStyle-1phboty{border-bottom-style:solid;border-left-style:solid;border-right-style:solid;border-top-style:solid;}
|
|
1711
|
+
.r-borderWidth-d045u9{border-bottom-width:2px;border-left-width:2px;border-right-width:2px;border-top-width:2px;}
|
|
1712
|
+
.r-borderWidth-rs99b7{border-bottom-width:1px;border-left-width:1px;border-right-width:1px;border-top-width:1px;}
|
|
1713
|
+
.r-display-krxsd3{display:-webkit-box;}
|
|
1714
|
+
.r-display-xoduu5{display:inline-flex;}
|
|
1715
|
+
.r-flex-13awgt0{flex:1;}
|
|
1716
|
+
.r-margin-crgep1{margin:0px;}
|
|
1717
|
+
.r-margin-ywje51{margin:auto;}
|
|
1718
|
+
.r-overflow-1qsk4np{overflow-x:clip;overflow-y:clip;}
|
|
1719
|
+
.r-overflow-1udh08x{overflow-x:hidden;overflow-y:hidden;}
|
|
1720
|
+
.r-padding-edyy15{padding:8px;}
|
|
1721
|
+
.r-padding-t60dpp{padding:0px;}
|
|
1722
|
+
[stylesheet-group="2.2"]{}
|
|
1723
|
+
.r-insetInlineStart-10s2tm5{left:0%;}
|
|
1724
|
+
.r-insetInlineStart-16o8guy{right:100%;}
|
|
1725
|
+
.r-insetInlineStart-dqe1q{right:0%;}
|
|
1726
|
+
.r-insetInlineStart-rci37q{left:100%;}
|
|
1727
|
+
[stylesheet-group="3"]{}
|
|
1728
|
+
.r-WebkitBoxOrient-8akbws{-webkit-box-orient:vertical;}
|
|
1729
|
+
.r-WebkitOverflowScrolling-150rngu{-webkit-overflow-scrolling:touch;}
|
|
1730
|
+
.r-alignItems-1awozwy{align-items:center;}
|
|
1731
|
+
.r-alignSelf-k200y{align-self:flex-start;}
|
|
1732
|
+
.r-animationDuration-17bb2tj{animation-duration:0.75s;}
|
|
1733
|
+
.r-animationDuration-1ay1djp{animation-duration:1s;}
|
|
1734
|
+
.r-animationDuration-9daxd3{animation-duration:250ms;}
|
|
1735
|
+
.r-animationIterationCount-1muvv40{animation-iteration-count:infinite;}
|
|
1736
|
+
.r-animationKeyframes-13aq9py{animation-name:r-animation-1iq689l;}
|
|
1737
|
+
.r-animationKeyframes-1qulhi1{animation-name:r-animation-1pzkwqh;}
|
|
1738
|
+
.r-animationKeyframes-1yef0xd{animation-name:r-animation-11cv4x;}
|
|
1739
|
+
.r-animationKeyframes-ebwn4k{animation-name:r-animation-q67da2;}
|
|
1740
|
+
.r-animationKeyframes-g3mlsw{animation-name:r-animation-t2lo5v;}
|
|
1741
|
+
.r-animationKeyframes-xx3c9p{animation-name:r-animation-imtty0;}
|
|
1742
|
+
.r-animationPlayState-1abnn5w{animation-play-state:paused;}
|
|
1743
|
+
.r-animationTimingFunction-1ldzwu0{animation-timing-function:linear;}
|
|
1744
|
+
.r-animationTimingFunction-leqjx2{animation-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1);}
|
|
1745
|
+
.r-animationTimingFunction-s62m2j{animation-timing-function:cubic-bezier(0.47, 0, 0.745, 0.715);}
|
|
1746
|
+
.r-appearance-30o5oe{-moz-appearance:none;-ms-appearance:none;-webkit-appearance:none;appearance:none;}
|
|
1747
|
+
.r-backgroundColor-11mpjr4{background-color:rgba(223,223,223,1.00);}
|
|
1748
|
+
.r-backgroundColor-11udlyb{background-color:rgba(0,150,136,1.00);}
|
|
1749
|
+
.r-backgroundColor-14lw9ot{background-color:rgba(255,255,255,1.00);}
|
|
1750
|
+
.r-backgroundColor-14sbq61{background-color:rgba(33,150,243,1.00);}
|
|
1751
|
+
.r-backgroundColor-1niwhzg{background-color:rgba(0,0,0,0.00);}
|
|
1752
|
+
.r-backgroundColor-dkge59{background-color:rgba(170,184,194,1.00);}
|
|
1753
|
+
.r-backgroundColor-u92y06{background-color:rgba(255,165,0,1.00);}
|
|
1754
|
+
.r-backgroundImage-rs94m5{background-image:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8cGF0aAogICAgIGQ9Ik0gMC4wNDAzODA1OSwwLjYyNjc3NjcgMC4xNDY0NDY2MSwwLjUyMDcxMDY4IDAuNDI5Mjg5MzIsMC44MDM1NTMzOSAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IE0gMC4yMTcxNTcyOSwwLjgwMzU1MzM5IDAuODUzNTUzMzksMC4xNjcxNTcyOSAwLjk1OTYxOTQxLDAuMjczMjIzMyAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IgogICAgIGlkPSJyZWN0Mzc4MCIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K");}
|
|
1755
|
+
.r-backgroundPosition-1mrlafo{background-position:0;}
|
|
1756
|
+
.r-backgroundPosition-vvn4in{background-position:center;}
|
|
1757
|
+
.r-backgroundRepeat-17leim2{background-repeat:repeat;}
|
|
1758
|
+
.r-backgroundRepeat-u6sd8q{background-repeat:no-repeat;}
|
|
1759
|
+
.r-backgroundSize-1sxrcry{background-size:auto;}
|
|
1760
|
+
.r-backgroundSize-4gszlv{background-size:cover;}
|
|
1761
|
+
.r-backgroundSize-ehq7j7{background-size:contain;}
|
|
1762
|
+
.r-backgroundSize-x3cy2q{background-size:100% 100%;}
|
|
1763
|
+
.r-bottom-1p0dtai{bottom:0px;}
|
|
1764
|
+
.r-boxShadow-1ewcgjf{box-shadow:0px 1px 3px rgba(0,0,0,0.5);}
|
|
1765
|
+
.r-caretColor-van48c{caret-color:transparent;}
|
|
1766
|
+
.r-color-c68hjy{color:rgba(161,161,161,1.00);}
|
|
1767
|
+
.r-color-jwli3a{color:rgba(255,255,255,1.00);}
|
|
1768
|
+
.r-cursor-1ei5mc7{cursor:inherit;}
|
|
1769
|
+
.r-cursor-1loqt21{cursor:pointer;}
|
|
1770
|
+
.r-cursor-7q8q6z{cursor:default;}
|
|
1771
|
+
.r-flexBasis-1mlwlqe{flex-basis:auto;}
|
|
1772
|
+
.r-flexDirection-18u37iz{flex-direction:row;}
|
|
1773
|
+
.r-flexDirection-1d5kdc7{flex-direction:column-reverse;}
|
|
1774
|
+
.r-flexDirection-1euycsn{flex-direction:row-reverse;}
|
|
1775
|
+
.r-flexDirection-eqz5dr{flex-direction:column;}
|
|
1776
|
+
.r-flexGrow-16y2uox{flex-grow:1;}
|
|
1777
|
+
.r-flexShrink-1wbh5a2{flex-shrink:1;}
|
|
1778
|
+
.r-fontFamily-1qd0xha{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;}
|
|
1779
|
+
.r-fontSize-7cikom{font-size:inherit;}
|
|
1780
|
+
.r-fontWeight-majxgm{font-weight:500;}
|
|
1781
|
+
.r-forcedColorAdjust-1c6unfx{forced-color-adjust:none;}
|
|
1782
|
+
.r-height-10ptun7{height:16px;}
|
|
1783
|
+
.r-height-1dernwh{height:70%;}
|
|
1784
|
+
.r-height-1pi2tsx{height:100%;}
|
|
1785
|
+
.r-height-1r8g8re{height:36px;}
|
|
1786
|
+
.r-height-4v7adb{height:5px;}
|
|
1787
|
+
.r-height-z80fyv{height:20px;}
|
|
1788
|
+
.r-justifyContent-1777fci{justify-content:center;}
|
|
1789
|
+
.r-left-1d2f490{left:0px;}
|
|
1790
|
+
.r-maxWidth-dnmrzs{max-width:100%;}
|
|
1791
|
+
.r-opacity-6dt33c{opacity:1;}
|
|
1792
|
+
.r-opacity-orgf3d{opacity:0;}
|
|
1793
|
+
.r-outlineStyle-1ny4l3l{outline-style:none;}
|
|
1794
|
+
.r-overflowX-11yh6sk{overflow-x:hidden;}
|
|
1795
|
+
.r-overflowX-lltvgl{overflow-x:auto;}
|
|
1796
|
+
.r-overflowY-1rnoaur{overflow-y:auto;}
|
|
1797
|
+
.r-overflowY-buy8e9{overflow-y:hidden;}
|
|
1798
|
+
.r-paddingBottom-97e31f{padding-bottom:env(safe-area-inset-bottom);}
|
|
1799
|
+
.r-paddingLeft-bv2aro{padding-left:env(safe-area-inset-left);}
|
|
1800
|
+
.r-paddingRight-hxflta{padding-right:env(safe-area-inset-right);}
|
|
1801
|
+
.r-paddingTop-10xqauy{padding-top:env(safe-area-inset-top);}
|
|
1802
|
+
.r-placeholderTextColor-6taxm2:-ms-input-placeholder{color:var(--placeholderTextColor);opacity:1;}
|
|
1803
|
+
.r-placeholderTextColor-6taxm2::-moz-placeholder{color:var(--placeholderTextColor);opacity:1;}
|
|
1804
|
+
.r-placeholderTextColor-6taxm2::-webkit-input-placeholder{color:var(--placeholderTextColor);opacity:1;}
|
|
1805
|
+
.r-placeholderTextColor-6taxm2::placeholder{color:var(--placeholderTextColor);opacity:1;}
|
|
1806
|
+
.r-pointerEvents-105ug2t{pointer-events:auto!important;}
|
|
1807
|
+
.r-pointerEvents-12vffkv>* {pointer-events:auto;}
|
|
1808
|
+
.r-pointerEvents-12vffkv{pointer-events:none!important;}
|
|
1809
|
+
.r-pointerEvents-633pao>* {pointer-events:none;}
|
|
1810
|
+
.r-pointerEvents-633pao{pointer-events:none!important;}
|
|
1811
|
+
.r-pointerEvents-ah5dr5>* {pointer-events:none;}
|
|
1812
|
+
.r-pointerEvents-ah5dr5{pointer-events:auto!important;}
|
|
1813
|
+
.r-position-1xcajam{position:fixed;}
|
|
1814
|
+
.r-position-gtdqiz{position:-webkit-sticky;position:sticky;}
|
|
1815
|
+
.r-position-u8s1d{position:absolute;}
|
|
1816
|
+
.r-right-zchlnj{right:0px;}
|
|
1817
|
+
.r-scrollSnapAlign-cpa5s6{scroll-snap-align:start;}
|
|
1818
|
+
.r-scrollSnapType-1ocf4r9{scroll-snap-type:y mandatory;}
|
|
1819
|
+
.r-scrollSnapType-mfh4gg{scroll-snap-type:x mandatory;}
|
|
1820
|
+
.r-scrollbarWidth-2eszeu::-webkit-scrollbar{display:none}
|
|
1821
|
+
.r-scrollbarWidth-2eszeu{scrollbar-width:none;}
|
|
1822
|
+
.r-textAlign-1ff274t{text-align:right;}
|
|
1823
|
+
.r-textAlign-fdjqy7{text-align:left;}
|
|
1824
|
+
.r-textAlign-q4m81j{text-align:center;}
|
|
1825
|
+
.r-textOverflow-1udbk01{text-overflow:ellipsis;}
|
|
1826
|
+
.r-textTransform-tsynxw{text-transform:uppercase;}
|
|
1827
|
+
.r-top-ipm5af{top:0px;}
|
|
1828
|
+
.r-touchAction-19z077z{touch-action:none;}
|
|
1829
|
+
.r-touchAction-1otgn73{touch-action:manipulation;}
|
|
1830
|
+
.r-transform-10v3vxq{transform:scaleX(-1);}
|
|
1831
|
+
.r-transform-173mzie{transform:scaleY(-1);}
|
|
1832
|
+
.r-transform-agouwx{transform:translateZ(0);}
|
|
1833
|
+
.r-transform-bi4vy9{transform:translateY(100%);}
|
|
1834
|
+
.r-transform-ghxds0{transform:translateY(0%);}
|
|
1835
|
+
.r-transitionDuration-13tjlyg{transition-duration:0.1s;}
|
|
1836
|
+
.r-transitionDuration-eafdt9{transition-duration:0.15s;}
|
|
1837
|
+
.r-transitionProperty-1i6wzkk{-moz-transition-property:opacity;-webkit-transition-property:opacity;transition-property:opacity;}
|
|
1838
|
+
.r-userSelect-1xnzce8{-moz-user-select:text;-webkit-user-select:text;user-select:text;}
|
|
1839
|
+
.r-userSelect-lrvibr{-moz-user-select:none;-webkit-user-select:none;user-select:none;}
|
|
1840
|
+
.r-visibility-11j9u27{visibility:hidden;}
|
|
1841
|
+
.r-whiteSpace-3s2u2q{white-space:nowrap;}
|
|
1842
|
+
.r-width-13qz1uu{width:100%;}
|
|
1843
|
+
.r-width-19wmn03{width:20px;}
|
|
1844
|
+
.r-width-1acpoxo{width:36px;}
|
|
1845
|
+
.r-width-1janqcz{width:16px;}
|
|
1846
|
+
.r-wordWrap-1iln25a{word-wrap:normal;}
|
|
1847
|
+
.r-zIndex-1wyyakw{z-index:-1;}
|
|
1848
|
+
.r-zIndex-417010{z-index:0;}
|
|
1849
|
+
.r-zIndex-mhe3cw{z-index:10;}
|
|
1850
|
+
.r-zIndex-sfbmgh{z-index:9999;}
|
|
1851
|
+
@-webkit-keyframes r-animation-11cv4x{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}
|
|
1852
|
+
@-webkit-keyframes r-animation-1iq689l{0%{transform:translateY(0%);}100%{transform:translateY(100%);}}
|
|
1853
|
+
@-webkit-keyframes r-animation-1pzkwqh{0%{transform:translateY(100%);}100%{transform:translateY(0%);}}
|
|
1854
|
+
@-webkit-keyframes r-animation-imtty0{0%{opacity:0;}100%{opacity:1;}}
|
|
1855
|
+
@-webkit-keyframes r-animation-q67da2{0%{transform:translateX(-100%);}100%{transform:translateX(400%);}}
|
|
1856
|
+
@-webkit-keyframes r-animation-t2lo5v{0%{opacity:1;}100%{opacity:0;}}
|
|
1857
|
+
@keyframes r-animation-11cv4x{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}
|
|
1858
|
+
@keyframes r-animation-1iq689l{0%{transform:translateY(0%);}100%{transform:translateY(100%);}}
|
|
1859
|
+
@keyframes r-animation-1pzkwqh{0%{transform:translateY(100%);}100%{transform:translateY(0%);}}
|
|
1860
|
+
@keyframes r-animation-imtty0{0%{opacity:0;}100%{opacity:1;}}
|
|
1861
|
+
@keyframes r-animation-q67da2{0%{transform:translateX(-100%);}100%{transform:translateX(400%);}}
|
|
1862
|
+
@keyframes r-animation-t2lo5v{0%{opacity:1;}100%{opacity:0;}}
|
|
1689
1863
|
/* @hanzo/ui motion primitives — the calm, restrained animation vocabulary the
|
|
1690
1864
|
Hanzo surfaces share. One place defines the easing; components apply the class.
|
|
1691
1865
|
`className` forwards to the underlying DOM node on web, so the browser
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/ui",
|
|
3
|
-
"version": "8.1
|
|
3
|
+
"version": "8.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Hanzo UI — the one canonical Hanzo component library, on @hanzo/gui + @hanzo/design. ONE substrate: every component renders through @hanzo/gui primitives, so the same import works on web, native (expo) and desktop (Tauri). Self-contained (theme.css), presentational, host-agnostic, clean-room.",
|
|
6
6
|
"exports": {
|
|
@@ -188,6 +188,11 @@
|
|
|
188
188
|
"types": "./dist/dots.d.ts",
|
|
189
189
|
"import": "./dist/dots.js",
|
|
190
190
|
"require": "./dist/dots.cjs"
|
|
191
|
+
},
|
|
192
|
+
"./grid": {
|
|
193
|
+
"types": "./dist/grid.d.ts",
|
|
194
|
+
"import": "./dist/grid.js",
|
|
195
|
+
"require": "./dist/grid.cjs"
|
|
191
196
|
}
|
|
192
197
|
},
|
|
193
198
|
"main": "./dist/index.cjs",
|
|
@@ -295,6 +300,7 @@
|
|
|
295
300
|
"test": "pnpm run test:unit",
|
|
296
301
|
"test:watch": "vitest",
|
|
297
302
|
"test:responsive": "node scripts/responsive.mjs",
|
|
303
|
+
"test:contain": "node scripts/contain.mjs",
|
|
298
304
|
"test:consumer": "node scripts/consumer-test.mjs",
|
|
299
305
|
"test:unit": "vitest run",
|
|
300
306
|
"test:consumer:webpack": "node scripts/consumer-webpack.mjs"
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
'use client';"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Grid = void 0;
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
/**
|
|
7
|
-
* Grid — a real CSS grid whose tracks come from the CONTAINER, not the children.
|
|
8
|
-
*
|
|
9
|
-
* This exists to kill a specific shipped defect: hand-rolled
|
|
10
|
-
* `width="calc(25% - 7.5px)"` grids that collapse asymmetrically. That shape is
|
|
11
|
-
* broken by construction — each child computes its own width, so the row is only
|
|
12
|
-
* even while every child agrees, and one long word or one `box-sizing` surprise
|
|
13
|
-
* makes the row ragged. Nothing about it can be fixed by tuning the number.
|
|
14
|
-
*
|
|
15
|
-
* Here the parent declares the tracks once and the children have no say. Equal
|
|
16
|
-
* columns are structural, not arithmetic, and no child can widen its own track.
|
|
17
|
-
*
|
|
18
|
-
* Why a plain div and not a gui YStack: gui's box model is Yoga, which is
|
|
19
|
-
* flexbox and has no grid — a YStack would compile its own `display:flex`
|
|
20
|
-
* atomic class and fight the grid. Inline styles, not a stylesheet class, so
|
|
21
|
-
* there is no rule to fail to ship: this package's own checker exists because
|
|
22
|
-
* "class with no rule" has shipped here three times.
|
|
23
|
-
*
|
|
24
|
-
* The two track formulas, both deliberate:
|
|
25
|
-
*
|
|
26
|
-
* auto repeat(auto-fill, minmax(min(Npx, 100%), 1fr))
|
|
27
|
-
* The `min(Npx, 100%)` is what makes it safe below N: a bare
|
|
28
|
-
* `minmax(240px, 1fr)` forces a 240px track inside a 200px phone and
|
|
29
|
-
* overflows the viewport horizontally. Responsive with ZERO breakpoint
|
|
30
|
-
* props — the wrap count follows the container, so the same tree is
|
|
31
|
-
* right at 390 and at 1280.
|
|
32
|
-
*
|
|
33
|
-
* cols repeat(n, minmax(0, 1fr))
|
|
34
|
-
* `1fr` alone means `minmax(auto, 1fr)`, and `auto` floors the track at
|
|
35
|
-
* the content's min-content width — so one long unbroken string pushes
|
|
36
|
-
* its own column wider and every sibling narrower. That IS the ragged
|
|
37
|
-
* row. `minmax(0, 1fr)` is the fix.
|
|
38
|
-
*
|
|
39
|
-
* `[data-slot='grid'] > *` also gets `min-width: 0` in the stylesheet, for the
|
|
40
|
-
* same reason: a grid item's default `min-width: auto` lets its content set the
|
|
41
|
-
* floor and blow the track out.
|
|
42
|
-
*/
|
|
43
|
-
const gui_1 = require("@hanzo/gui");
|
|
44
|
-
/** `'$3'` -> 12. A raw number passes through as px. */
|
|
45
|
-
const space = (v, fallback) => {
|
|
46
|
-
if (v == null)
|
|
47
|
-
return fallback;
|
|
48
|
-
if (typeof v === 'number')
|
|
49
|
-
return v;
|
|
50
|
-
const t = (0, gui_1.getTokenValue)(v, 'space');
|
|
51
|
-
return typeof t === 'number' ? t : fallback;
|
|
52
|
-
};
|
|
53
|
-
const Grid = ({ min = 240, cols, max, gap = '$3', style, ...props }) => {
|
|
54
|
-
const g = space(gap, 12);
|
|
55
|
-
// The track floor, capped. Without `max` it is `min(Npx, 100%)` — N wide, but
|
|
56
|
-
// never wider than the container, which is what keeps a 900px min from
|
|
57
|
-
// overflowing a 390px phone.
|
|
58
|
-
//
|
|
59
|
-
// With `max` the floor also has to be at least "one Mth of the row", so
|
|
60
|
-
// auto-fill can never fit an (M+1)th track: subtract the M-1 gaps first, then
|
|
61
|
-
// divide. Below that width the max() picks Npx again and the grid wraps
|
|
62
|
-
// normally — so the cap costs nothing on small screens, which is the whole
|
|
63
|
-
// point of expressing it as a floor rather than a breakpoint.
|
|
64
|
-
const floor = max
|
|
65
|
-
? `max(min(${min}px, 100%), calc((100% - ${(max - 1) * g}px) / ${max}))`
|
|
66
|
-
: `min(${min}px, 100%)`;
|
|
67
|
-
const columns = cols
|
|
68
|
-
? `repeat(${cols}, minmax(0, 1fr))`
|
|
69
|
-
: `repeat(auto-fill, minmax(${floor}, 1fr))`;
|
|
70
|
-
const grid = { display: 'grid', gridTemplateColumns: columns, gap: g };
|
|
71
|
-
return (0, jsx_runtime_1.jsx)("div", { "data-slot": "grid", style: { ...grid, ...style }, ...props });
|
|
72
|
-
};
|
|
73
|
-
exports.Grid = Grid;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
-
export interface GridProps extends Omit<ComponentProps<'div'>, 'children'> {
|
|
3
|
-
/**
|
|
4
|
-
* Narrowest a column may get before the grid drops one. The whole responsive
|
|
5
|
-
* story: no breakpoints, no props per screen size.
|
|
6
|
-
*/
|
|
7
|
-
min?: number;
|
|
8
|
-
/** Fixed column count. Overrides `min` — use it when the count is the design. */
|
|
9
|
-
cols?: number;
|
|
10
|
-
/**
|
|
11
|
-
* Never exceed this many columns, while still wrapping down on narrow
|
|
12
|
-
* screens. `<Grid min={160} max={4}>` is 2-up on a phone and 4-up on a
|
|
13
|
-
* desktop, with nothing in between to configure.
|
|
14
|
-
*
|
|
15
|
-
* A single `min` cannot express that: 2-up at 390px needs min ~170, and that
|
|
16
|
-
* same 170 gives SIX columns at 1280. Capping is the missing half.
|
|
17
|
-
*/
|
|
18
|
-
max?: number;
|
|
19
|
-
/** A `$n` space token or a raw px number. */
|
|
20
|
-
gap?: number | string;
|
|
21
|
-
children?: ReactNode;
|
|
22
|
-
}
|
|
23
|
-
declare const Grid: ({ min, cols, max, gap, style, ...props }: GridProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export { Grid };
|
|
25
|
-
//# sourceMappingURL=grid.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/grid.tsx"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EAAE,cAAc,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAA;AAErE,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACxE;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,iFAAiF;IACjF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;;;OAOG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,6CAA6C;IAC7C,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAUD,QAAA,MAAM,IAAI,GAAI,0CAAuD,SAAS,4CAmB7E,CAAA;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
/**
|
|
4
|
-
* Grid — a real CSS grid whose tracks come from the CONTAINER, not the children.
|
|
5
|
-
*
|
|
6
|
-
* This exists to kill a specific shipped defect: hand-rolled
|
|
7
|
-
* `width="calc(25% - 7.5px)"` grids that collapse asymmetrically. That shape is
|
|
8
|
-
* broken by construction — each child computes its own width, so the row is only
|
|
9
|
-
* even while every child agrees, and one long word or one `box-sizing` surprise
|
|
10
|
-
* makes the row ragged. Nothing about it can be fixed by tuning the number.
|
|
11
|
-
*
|
|
12
|
-
* Here the parent declares the tracks once and the children have no say. Equal
|
|
13
|
-
* columns are structural, not arithmetic, and no child can widen its own track.
|
|
14
|
-
*
|
|
15
|
-
* Why a plain div and not a gui YStack: gui's box model is Yoga, which is
|
|
16
|
-
* flexbox and has no grid — a YStack would compile its own `display:flex`
|
|
17
|
-
* atomic class and fight the grid. Inline styles, not a stylesheet class, so
|
|
18
|
-
* there is no rule to fail to ship: this package's own checker exists because
|
|
19
|
-
* "class with no rule" has shipped here three times.
|
|
20
|
-
*
|
|
21
|
-
* The two track formulas, both deliberate:
|
|
22
|
-
*
|
|
23
|
-
* auto repeat(auto-fill, minmax(min(Npx, 100%), 1fr))
|
|
24
|
-
* The `min(Npx, 100%)` is what makes it safe below N: a bare
|
|
25
|
-
* `minmax(240px, 1fr)` forces a 240px track inside a 200px phone and
|
|
26
|
-
* overflows the viewport horizontally. Responsive with ZERO breakpoint
|
|
27
|
-
* props — the wrap count follows the container, so the same tree is
|
|
28
|
-
* right at 390 and at 1280.
|
|
29
|
-
*
|
|
30
|
-
* cols repeat(n, minmax(0, 1fr))
|
|
31
|
-
* `1fr` alone means `minmax(auto, 1fr)`, and `auto` floors the track at
|
|
32
|
-
* the content's min-content width — so one long unbroken string pushes
|
|
33
|
-
* its own column wider and every sibling narrower. That IS the ragged
|
|
34
|
-
* row. `minmax(0, 1fr)` is the fix.
|
|
35
|
-
*
|
|
36
|
-
* `[data-slot='grid'] > *` also gets `min-width: 0` in the stylesheet, for the
|
|
37
|
-
* same reason: a grid item's default `min-width: auto` lets its content set the
|
|
38
|
-
* floor and blow the track out.
|
|
39
|
-
*/
|
|
40
|
-
import { getTokenValue } from '@hanzo/gui';
|
|
41
|
-
/** `'$3'` -> 12. A raw number passes through as px. */
|
|
42
|
-
const space = (v, fallback) => {
|
|
43
|
-
if (v == null)
|
|
44
|
-
return fallback;
|
|
45
|
-
if (typeof v === 'number')
|
|
46
|
-
return v;
|
|
47
|
-
const t = getTokenValue(v, 'space');
|
|
48
|
-
return typeof t === 'number' ? t : fallback;
|
|
49
|
-
};
|
|
50
|
-
const Grid = ({ min = 240, cols, max, gap = '$3', style, ...props }) => {
|
|
51
|
-
const g = space(gap, 12);
|
|
52
|
-
// The track floor, capped. Without `max` it is `min(Npx, 100%)` — N wide, but
|
|
53
|
-
// never wider than the container, which is what keeps a 900px min from
|
|
54
|
-
// overflowing a 390px phone.
|
|
55
|
-
//
|
|
56
|
-
// With `max` the floor also has to be at least "one Mth of the row", so
|
|
57
|
-
// auto-fill can never fit an (M+1)th track: subtract the M-1 gaps first, then
|
|
58
|
-
// divide. Below that width the max() picks Npx again and the grid wraps
|
|
59
|
-
// normally — so the cap costs nothing on small screens, which is the whole
|
|
60
|
-
// point of expressing it as a floor rather than a breakpoint.
|
|
61
|
-
const floor = max
|
|
62
|
-
? `max(min(${min}px, 100%), calc((100% - ${(max - 1) * g}px) / ${max}))`
|
|
63
|
-
: `min(${min}px, 100%)`;
|
|
64
|
-
const columns = cols
|
|
65
|
-
? `repeat(${cols}, minmax(0, 1fr))`
|
|
66
|
-
: `repeat(auto-fill, minmax(${floor}, 1fr))`;
|
|
67
|
-
const grid = { display: 'grid', gridTemplateColumns: columns, gap: g };
|
|
68
|
-
return _jsx("div", { "data-slot": "grid", style: { ...grid, ...style }, ...props });
|
|
69
|
-
};
|
|
70
|
-
export { Grid };
|
|
71
|
-
//# sourceMappingURL=grid.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grid.js","sourceRoot":"","sources":["../../../src/backends/gui/grid.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAyB1C,uDAAuD;AACvD,MAAM,KAAK,GAAG,CAAC,CAA8B,EAAE,QAAgB,EAAU,EAAE;IACzE,IAAI,CAAC,IAAI,IAAI;QAAE,OAAO,QAAQ,CAAA;IAC9B,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,CAAC,CAAA;IACnC,MAAM,CAAC,GAAG,aAAa,CAAC,CAAU,EAAE,OAAO,CAAC,CAAA;IAC5C,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;AAC7C,CAAC,CAAA;AAED,MAAM,IAAI,GAAG,CAAC,EAAE,GAAG,GAAG,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,EAAa,EAAE,EAAE;IAChF,MAAM,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;IACxB,8EAA8E;IAC9E,uEAAuE;IACvE,6BAA6B;IAC7B,EAAE;IACF,wEAAwE;IACxE,8EAA8E;IAC9E,wEAAwE;IACxE,2EAA2E;IAC3E,8DAA8D;IAC9D,MAAM,KAAK,GAAG,GAAG;QACf,CAAC,CAAC,WAAW,GAAG,2BAA2B,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,SAAS,GAAG,IAAI;QACxE,CAAC,CAAC,OAAO,GAAG,WAAW,CAAA;IACzB,MAAM,OAAO,GAAG,IAAI;QAClB,CAAC,CAAC,UAAU,IAAI,mBAAmB;QACnC,CAAC,CAAC,4BAA4B,KAAK,SAAS,CAAA;IAC9C,MAAM,IAAI,GAAkB,EAAE,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,CAAA;IACrF,OAAO,2BAAe,MAAM,EAAC,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,EAAE,KAAM,KAAK,GAAI,CAAA;AAC1E,CAAC,CAAA;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
package/dist/primitives/Grid.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
'use client';"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Grid = void 0;
|
|
4
|
-
// GENERATED by scripts/gen-primitives.mjs — do not edit. Per-member entrypoint
|
|
5
|
-
// for hosts that modularize `@hanzo/ui` imports. Source of truth:
|
|
6
|
-
// src/backends/gui/index.ts. Re-run: node scripts/gen-primitives.mjs
|
|
7
|
-
var grid_1 = require("../backends/gui/grid.cjs");
|
|
8
|
-
Object.defineProperty(exports, "Grid", { enumerable: true, get: function () { return grid_1.Grid; } });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../src/primitives/Grid.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA"}
|
package/dist/primitives/Grid.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// GENERATED by scripts/gen-primitives.mjs — do not edit. Per-member entrypoint
|
|
2
|
-
// for hosts that modularize `@hanzo/ui` imports. Source of truth:
|
|
3
|
-
// src/backends/gui/index.ts. Re-run: node scripts/gen-primitives.mjs
|
|
4
|
-
export { Grid } from '../backends/gui/grid.js';
|
|
5
|
-
//# sourceMappingURL=Grid.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.js","sourceRoot":"","sources":["../../src/primitives/Grid.tsx"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,kEAAkE;AAClE,qEAAqE;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA"}
|