@inc2734/unitone-css 1.2.2 → 1.3.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/app.css +1 -1
- package/dist/layout-primitives/both-sides/react.js +1 -1
- package/dist/layout-primitives/center/react.js +1 -1
- package/dist/layout-primitives/cluster/react.js +1 -1
- package/dist/layout-primitives/container/react.js +1 -1
- package/dist/layout-primitives/decorator/react.js +1 -1
- package/dist/layout-primitives/gutters/react.js +1 -1
- package/dist/layout-primitives/layers/react.js +1 -1
- package/dist/layout-primitives/marquee/react.js +1 -1
- package/dist/layout-primitives/reel/react.js +1 -1
- package/dist/layout-primitives/responsive-grid/react.js +1 -1
- package/dist/layout-primitives/stack/react.js +1 -1
- package/dist/layout-primitives/switcher/react.js +1 -1
- package/dist/layout-primitives/text/react.js +1 -1
- package/dist/layout-primitives/texture/react.js +1 -1
- package/dist/layout-primitives/vertical-ends/react.js +1 -1
- package/package.json +1 -1
- package/src/behaviors/_fluid-reference.scss +26 -0
- package/src/behaviors/_font-size.scss +0 -9
- package/src/behaviors/_index.scss +2 -0
- package/src/layout-primitives/both-sides/index.jsx +12 -1
- package/src/layout-primitives/center/index.jsx +11 -1
- package/src/layout-primitives/cluster/index.jsx +4 -0
- package/src/layout-primitives/container/index.jsx +12 -1
- package/src/layout-primitives/decorator/index.jsx +2 -0
- package/src/layout-primitives/gutters/index.jsx +7 -2
- package/src/layout-primitives/layers/index.jsx +4 -0
- package/src/layout-primitives/marquee/index.jsx +13 -1
- package/src/layout-primitives/reel/index.jsx +12 -1
- package/src/layout-primitives/responsive-grid/index.jsx +4 -0
- package/src/layout-primitives/stack/index.jsx +4 -0
- package/src/layout-primitives/switcher/index.jsx +4 -0
- package/src/layout-primitives/text/index.jsx +4 -0
- package/src/layout-primitives/texture/index.jsx +8 -1
- package/src/layout-primitives/vertical-ends/index.jsx +10 -1
- package/src/settings/_root.scss +18 -91
- package/src/utilities/_font-size.scss +0 -10
- package/src/variables/_index.scss +128 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("react");function e(){return e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)({}).hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},e.apply(null,arguments)}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var n=o.call(t,e);if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function n(t,e,r){return(e=o(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var
|
|
1
|
+
"use strict";var t=require("react");function e(){return e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)({}).hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},e.apply(null,arguments)}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var n=o.call(t,e);if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function n(t,e,r){return(e=o(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i=["texture","textureColor","textureGap","textureSize","textureTop","textureRight","textureBottom","textureLeft","textureBorderRadius","textureBorderTopLeftRadius","textureBorderTopRightRadius","textureBorderBottomLeftRadius","textureBorderBottomRightRadius","textureBandTopSize","textureBandBottomSize","containerType","fluidReference","style"];function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,o)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach(function(e){n(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}exports.Texture=function(r){var o=r.texture,n=r.textureColor,u=r.textureGap,c=r.textureSize,d=r.textureTop,l=r.textureRight,f=r.textureBottom,p=r.textureLeft,s=r.textureBorderRadius,x=r.textureBorderTopLeftRadius,b=r.textureBorderTopRightRadius,y=r.textureBorderBottomLeftRadius,v=r.textureBorderBottomRightRadius,m=r.textureBandTopSize,O=r.textureBandBottomSize,g=r.containerType,B=r.fluidReference,h=r.style,j=function(t,e){if(null==t)return{};var r,o,n=function(t,e){if(null==t)return{};var r={};for(var o in t)if({}.hasOwnProperty.call(t,o)){if(-1!==e.indexOf(o))continue;r[o]=t[o]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}(r,i);return h=a(a({},h),{},{"--unitone--texture-color":""!==n?n:void 0,"--unitone--texture-gap":""!==u?u:void 0,"--unitone--texture-size":""!==c?c:void 0,"--unitone--texture-top":""!==d?d:void 0,"--unitone--texture-right":""!==l?l:void 0,"--unitone--texture-bottom":""!==f?f:void 0,"--unitone--texture-left":""!==p?p:void 0,"--unitone--texture-border-radius":""!==s?s:void 0,"--unitone--texture-border-top-left-radius":""!==x?x:void 0,"--unitone--texture-border-top-right-radius":""!==b?b:void 0,"--unitone--texture-border-bottom-left-radius":""!==y?y:void 0,"--unitone--texture-border-bottom-right-radius":""!==v?v:void 0,"--unitone--texture-band-top-size":""!==m?m:void 0,"--unitone--texture-band-bottom-size":""!==O?O:void 0}),t.createElement("div",e({"data-unitone-layout":["texture",""!==(null!=o?o:"")?"-texture:".concat(o):void 0,""!==(null!=g?g:"")?"-container-type:".concat(g):void 0,""!==(null!=B?B:"")?"-fluid-reference:".concat(B):void 0].filter(Boolean).join(" "),style:h},j),j.children)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var e=require("react");function r(){return r=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},r.apply(null,arguments)}function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e){var r=function(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r);if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==t(r)?r:r+""}function o(e,r,t){return(r=n(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var i=["gap","alignItems","containerType","fluidReference","style"];function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}exports.VerticalEnds=function(t){var n=t.gap,l=t.alignItems,u=t.containerType,a=t.fluidReference,f=t.style,y=function(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==r.indexOf(n))continue;t[n]=e[n]}return t}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],-1===r.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(t,i);return f=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?c(Object(t),!0).forEach(function(r){o(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}({},f),e.createElement("div",r({"data-unitone-layout":["vertical-ends",""!==(null!=n?n:"")?"-gap:".concat(n):void 0,""!==(null!=l?l:"")?"-align-items:".concat(l):void 0,""!==(null!=u?u:"")?"-container-type:".concat(u):void 0,""!==(null!=a?a:"")?"-fluid-reference:".concat(a):void 0].filter(Boolean).join(" "),style:f},y),y.children)};
|
package/package.json
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@use '../variables' as variables;
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Spacing tokens require a unitless real-number value of 100cqw,
|
|
5
|
+
* so they cannot be defined at :root.
|
|
6
|
+
*/
|
|
7
|
+
@mixin fluid-reference() {
|
|
8
|
+
[data-unitone-layout~="-fluid-reference\:cqw"] {
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A value to get the unitless px value in trigonometric functions. (For Safari)
|
|
12
|
+
*/
|
|
13
|
+
--unitone--property--100cqw: 100cqw;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 100cqw unitless px real value.
|
|
17
|
+
*/
|
|
18
|
+
--unitone--result--100cqw-px: calc(tan(atan2(var(--unitone--property--100cqw), 1px)));
|
|
19
|
+
|
|
20
|
+
--unitone--global--gutters: #{ variables.generate-global-gutters('container') };
|
|
21
|
+
|
|
22
|
+
@include variables.font-size-tokens('container');
|
|
23
|
+
@include variables.spacing-tokens('container');
|
|
24
|
+
@include variables.padding-tokens('container');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -7,14 +7,5 @@
|
|
|
7
7
|
[data-unitone-layout~="-font-size\:#{ $name }"][data-unitone-layout~="-fluid-typography"] {
|
|
8
8
|
font-size: var(--unitone--font-size-#{ $name }-fluid);
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
:where(
|
|
12
|
-
[data-unitone-layout~="-container-type\:inline-size"],
|
|
13
|
-
.-container-type\:inline-size
|
|
14
|
-
) {
|
|
15
|
-
[data-unitone-layout~="-font-size\:#{ $name }"][data-unitone-layout~="-fluid-typography"] {
|
|
16
|
-
font-size: var(--unitone--font-size-#{ $name }-fluid-c);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
10
|
}
|
|
20
11
|
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
@use './background-clip';
|
|
8
8
|
@use './container-type';
|
|
9
9
|
@use './divider';
|
|
10
|
+
@use './fluid-reference';
|
|
10
11
|
@use './font-size';
|
|
11
12
|
@use './gap';
|
|
12
13
|
@use './gutters';
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
@include background-clip.background-clip();
|
|
32
33
|
@include container-type.container-type();
|
|
33
34
|
@include divider.divider();
|
|
35
|
+
@include fluid-reference.fluid-reference();
|
|
34
36
|
@include font-size.font-size();
|
|
35
37
|
@include gap.gap();
|
|
36
38
|
@include gutters.gutters();
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
export const BothSides = ({
|
|
3
|
+
export const BothSides = ({
|
|
4
|
+
gap,
|
|
5
|
+
columnGap,
|
|
6
|
+
rowGap,
|
|
7
|
+
alignItems,
|
|
8
|
+
containerType,
|
|
9
|
+
fluidReference,
|
|
10
|
+
style,
|
|
11
|
+
...props
|
|
12
|
+
}) => {
|
|
4
13
|
style = {
|
|
5
14
|
...style,
|
|
6
15
|
};
|
|
@@ -13,6 +22,8 @@ export const BothSides = ({ gap, columnGap, rowGap, alignItems, style, ...props
|
|
|
13
22
|
'' !== (columnGap ?? '') ? `-column-gap:${columnGap}` : undefined,
|
|
14
23
|
'' !== (rowGap ?? '') ? `-row-gap:${rowGap}` : undefined,
|
|
15
24
|
'' !== (alignItems ?? '') ? `-align-items:${alignItems}` : undefined,
|
|
25
|
+
'' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
|
|
26
|
+
'' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
|
|
16
27
|
]
|
|
17
28
|
.filter(Boolean)
|
|
18
29
|
.join(' ')}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
export const Center = ({
|
|
3
|
+
export const Center = ({
|
|
4
|
+
withText,
|
|
5
|
+
gutters,
|
|
6
|
+
maxWidth,
|
|
7
|
+
containerType,
|
|
8
|
+
fluidReference,
|
|
9
|
+
style,
|
|
10
|
+
...props
|
|
11
|
+
}) => {
|
|
4
12
|
style = {
|
|
5
13
|
...style,
|
|
6
14
|
'--unitone--max-width': '' !== maxWidth ? maxWidth : undefined,
|
|
@@ -12,6 +20,8 @@ export const Center = ({ withText, gutters, maxWidth, style, ...props }) => {
|
|
|
12
20
|
'center',
|
|
13
21
|
true === withText ? `-with-text` : undefined,
|
|
14
22
|
'' !== (gutters ?? '') ? `-gutters:${gutters}` : undefined,
|
|
23
|
+
'' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
|
|
24
|
+
'' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
|
|
15
25
|
]
|
|
16
26
|
.filter(Boolean)
|
|
17
27
|
.join(' ')}
|
|
@@ -11,6 +11,8 @@ export const Cluster = ({
|
|
|
11
11
|
rowGap,
|
|
12
12
|
justifyContent,
|
|
13
13
|
nowrap,
|
|
14
|
+
containerType,
|
|
15
|
+
fluidReference,
|
|
14
16
|
tagName = 'div',
|
|
15
17
|
style,
|
|
16
18
|
...props
|
|
@@ -34,6 +36,8 @@ export const Cluster = ({
|
|
|
34
36
|
'' !== (rowGap ?? '') ? `-row-gap:${rowGap}` : undefined,
|
|
35
37
|
'' !== (alignItems ?? '') ? `-align-items:${alignItems}` : undefined,
|
|
36
38
|
'' !== (justifyContent ?? '') ? `-justify-content:${justifyContent}` : undefined,
|
|
39
|
+
'' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
|
|
40
|
+
'' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
|
|
37
41
|
nowrap ? '-nowrap' : undefined,
|
|
38
42
|
]
|
|
39
43
|
.filter(Boolean)
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
export const Container = ({
|
|
3
|
+
export const Container = ({
|
|
4
|
+
align,
|
|
5
|
+
gutters,
|
|
6
|
+
maxWidth,
|
|
7
|
+
text,
|
|
8
|
+
containerType,
|
|
9
|
+
fluidReference,
|
|
10
|
+
style,
|
|
11
|
+
...props
|
|
12
|
+
}) => {
|
|
4
13
|
style = {
|
|
5
14
|
...style,
|
|
6
15
|
'--unitone--max-width': '' !== maxWidth ? maxWidth : undefined,
|
|
@@ -12,6 +21,8 @@ export const Container = ({ align, gutters, maxWidth, text, style, ...props }) =
|
|
|
12
21
|
'container',
|
|
13
22
|
'' !== (align ?? '') ? `-align:${align}` : undefined,
|
|
14
23
|
'' !== (gutters ?? '') ? `-gutters:${gutters}` : undefined,
|
|
24
|
+
'' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
|
|
25
|
+
'' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
|
|
15
26
|
]
|
|
16
27
|
.filter(Boolean)
|
|
17
28
|
.join(' ')}
|
|
@@ -17,6 +17,7 @@ export const Decorator = ({
|
|
|
17
17
|
gap,
|
|
18
18
|
alignContent,
|
|
19
19
|
containerType,
|
|
20
|
+
fluidReference,
|
|
20
21
|
justifyItems,
|
|
21
22
|
shadow,
|
|
22
23
|
position,
|
|
@@ -67,6 +68,7 @@ export const Decorator = ({
|
|
|
67
68
|
'' !== (gap ?? '') ? `-gap:${gap}` : undefined,
|
|
68
69
|
'' !== (alignContent ?? '') ? `-align-content:${alignContent}` : undefined,
|
|
69
70
|
'' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
|
|
71
|
+
'' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
|
|
70
72
|
'' !== (justifyItems ?? '') ? `-justify-items:${justifyItems}` : undefined,
|
|
71
73
|
'' !== (padding ?? '') ? `-padding:${padding}` : undefined,
|
|
72
74
|
'' !== (paddingTop ?? '') ? `-padding-top:${paddingTop}` : undefined,
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
export const Gutters = ({ padding, style, ...props }) => {
|
|
3
|
+
export const Gutters = ({ padding, containerType, fluidReference, style, ...props }) => {
|
|
4
4
|
return (
|
|
5
5
|
<div
|
|
6
|
-
data-unitone-layout={[
|
|
6
|
+
data-unitone-layout={[
|
|
7
|
+
'gutters',
|
|
8
|
+
'' !== (padding ?? '') ? `-padding:${padding}` : undefined,
|
|
9
|
+
'' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
|
|
10
|
+
'' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
|
|
11
|
+
]
|
|
7
12
|
.filter(Boolean)
|
|
8
13
|
.join(' ')}
|
|
9
14
|
style={style}
|
|
@@ -15,6 +15,8 @@ export const Layers = ({
|
|
|
15
15
|
rows,
|
|
16
16
|
rowTrackSize,
|
|
17
17
|
queryContext,
|
|
18
|
+
containerType,
|
|
19
|
+
fluidReference,
|
|
18
20
|
style,
|
|
19
21
|
...props
|
|
20
22
|
}) => {
|
|
@@ -40,6 +42,8 @@ export const Layers = ({
|
|
|
40
42
|
'' !== (columnGap ?? '') ? `-column-gap:${columnGap}` : undefined,
|
|
41
43
|
'' !== (rowGap ?? '') ? `-row-gap:${rowGap}` : undefined,
|
|
42
44
|
queryContext ? `@${queryContext}` : undefined,
|
|
45
|
+
'' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
|
|
46
|
+
'' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
|
|
43
47
|
]
|
|
44
48
|
.filter(Boolean)
|
|
45
49
|
.join(' ')}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
export const Marquee = ({
|
|
3
|
+
export const Marquee = ({
|
|
4
|
+
duration,
|
|
5
|
+
gap,
|
|
6
|
+
itemWidth,
|
|
7
|
+
reverse,
|
|
8
|
+
pauseOnHover,
|
|
9
|
+
containerType,
|
|
10
|
+
fluidReference,
|
|
11
|
+
style,
|
|
12
|
+
...props
|
|
13
|
+
}) => {
|
|
4
14
|
style = {
|
|
5
15
|
...style,
|
|
6
16
|
'--unitone--animation-duration': '' !== duration ? duration : undefined,
|
|
@@ -13,6 +23,8 @@ export const Marquee = ({ duration, gap, itemWidth, reverse, pauseOnHover, style
|
|
|
13
23
|
'marquee-wrapper',
|
|
14
24
|
reverse ? '-reverse' : undefined,
|
|
15
25
|
pauseOnHover ? '-pause-on-hover' : undefined,
|
|
26
|
+
'' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
|
|
27
|
+
'' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
|
|
16
28
|
]
|
|
17
29
|
.filter(Boolean)
|
|
18
30
|
.join(' ')}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
export const Reel = ({
|
|
3
|
+
export const Reel = ({
|
|
4
|
+
gap,
|
|
5
|
+
height,
|
|
6
|
+
itemWidth,
|
|
7
|
+
noBar,
|
|
8
|
+
containerType,
|
|
9
|
+
fluidReference,
|
|
10
|
+
style,
|
|
11
|
+
...props
|
|
12
|
+
}) => {
|
|
4
13
|
style = {
|
|
5
14
|
...style,
|
|
6
15
|
'--unitone--height': '' !== height ? height : undefined,
|
|
@@ -13,6 +22,8 @@ export const Reel = ({ gap, height, itemWidth, noBar, style, ...props }) => {
|
|
|
13
22
|
'reel',
|
|
14
23
|
'' !== (gap ?? '') ? `-gap:${gap}` : undefined,
|
|
15
24
|
noBar ? '-no-bar' : undefined,
|
|
25
|
+
'' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
|
|
26
|
+
'' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
|
|
16
27
|
]
|
|
17
28
|
.filter(Boolean)
|
|
18
29
|
.join(' ')}
|
|
@@ -10,6 +10,8 @@ export const ResponsiveGrid = ({
|
|
|
10
10
|
dividerColor,
|
|
11
11
|
stairs,
|
|
12
12
|
stairsUp,
|
|
13
|
+
containerType,
|
|
14
|
+
fluidReference,
|
|
13
15
|
style,
|
|
14
16
|
...props
|
|
15
17
|
}) => {
|
|
@@ -30,6 +32,8 @@ export const ResponsiveGrid = ({
|
|
|
30
32
|
'' !== (divider ?? '') ? `-divider:${divider}` : undefined,
|
|
31
33
|
'' !== (stairs ?? '') ? `-stairs:${stairs}` : undefined,
|
|
32
34
|
'' !== (stairsUp ?? '') ? `-stairs-up:${stairsUp}` : undefined,
|
|
35
|
+
'' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
|
|
36
|
+
'' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
|
|
33
37
|
]
|
|
34
38
|
.filter(Boolean)
|
|
35
39
|
.join(' ')}
|
|
@@ -8,6 +8,8 @@ export const Stack = ({
|
|
|
8
8
|
dividerWidth,
|
|
9
9
|
dividerStyle,
|
|
10
10
|
dividerColor,
|
|
11
|
+
containerType,
|
|
12
|
+
fluidReference,
|
|
11
13
|
tagName = 'div',
|
|
12
14
|
style,
|
|
13
15
|
...props
|
|
@@ -29,6 +31,8 @@ export const Stack = ({
|
|
|
29
31
|
'' !== (divider ?? '') ? `-divider:${divider}` : undefined,
|
|
30
32
|
'' !== (gap ?? '') ? `-gap:${gap}` : undefined,
|
|
31
33
|
negative ? '-negative' : undefined,
|
|
34
|
+
'' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
|
|
35
|
+
'' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
|
|
32
36
|
]
|
|
33
37
|
.filter(Boolean)
|
|
34
38
|
.join(' ')}
|
|
@@ -10,6 +10,8 @@ export const Switcher = ({
|
|
|
10
10
|
alignItems,
|
|
11
11
|
stairs,
|
|
12
12
|
stairsUp,
|
|
13
|
+
containerType,
|
|
14
|
+
fluidReference,
|
|
13
15
|
style,
|
|
14
16
|
...props
|
|
15
17
|
}) => {
|
|
@@ -29,6 +31,8 @@ export const Switcher = ({
|
|
|
29
31
|
'' !== (alignItems ?? '') ? `-align-items:${alignItems}` : undefined,
|
|
30
32
|
'' !== (stairs ?? '') ? `-stairs:${stairs}` : undefined,
|
|
31
33
|
'' !== (stairsUp ?? '') ? `-stairs-up:${stairsUp}` : undefined,
|
|
34
|
+
'' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
|
|
35
|
+
'' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
|
|
32
36
|
]
|
|
33
37
|
.filter(Boolean)
|
|
34
38
|
.join(' ')}
|
|
@@ -8,6 +8,8 @@ export const Text = ({
|
|
|
8
8
|
gutters,
|
|
9
9
|
maxWidth,
|
|
10
10
|
columnWidth,
|
|
11
|
+
containerType,
|
|
12
|
+
fluidReference,
|
|
11
13
|
style,
|
|
12
14
|
...props
|
|
13
15
|
}) => {
|
|
@@ -26,6 +28,8 @@ export const Text = ({
|
|
|
26
28
|
applyGap ? '-gap' : undefined,
|
|
27
29
|
'' !== (gap ?? '') ? `-gap:${gap}` : undefined,
|
|
28
30
|
'' !== (gutters ?? '') ? `-gutters:${gutters}` : undefined,
|
|
31
|
+
'' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
|
|
32
|
+
'' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
|
|
29
33
|
]
|
|
30
34
|
.filter(Boolean)
|
|
31
35
|
.join(' ')}
|
|
@@ -16,6 +16,8 @@ export const Texture = ({
|
|
|
16
16
|
textureBorderBottomRightRadius,
|
|
17
17
|
textureBandTopSize,
|
|
18
18
|
textureBandBottomSize,
|
|
19
|
+
containerType,
|
|
20
|
+
fluidReference,
|
|
19
21
|
style,
|
|
20
22
|
...props
|
|
21
23
|
}) => {
|
|
@@ -45,7 +47,12 @@ export const Texture = ({
|
|
|
45
47
|
|
|
46
48
|
return (
|
|
47
49
|
<div
|
|
48
|
-
data-unitone-layout={[
|
|
50
|
+
data-unitone-layout={[
|
|
51
|
+
'texture',
|
|
52
|
+
'' !== (texture ?? '') ? `-texture:${texture}` : undefined,
|
|
53
|
+
'' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
|
|
54
|
+
'' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
|
|
55
|
+
]
|
|
49
56
|
.filter(Boolean)
|
|
50
57
|
.join(' ')}
|
|
51
58
|
style={style}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
export const VerticalEnds = ({
|
|
3
|
+
export const VerticalEnds = ({
|
|
4
|
+
gap,
|
|
5
|
+
alignItems,
|
|
6
|
+
containerType,
|
|
7
|
+
fluidReference,
|
|
8
|
+
style,
|
|
9
|
+
...props
|
|
10
|
+
}) => {
|
|
4
11
|
style = {
|
|
5
12
|
...style,
|
|
6
13
|
};
|
|
@@ -11,6 +18,8 @@ export const VerticalEnds = ({ gap, alignItems, style, ...props }) => {
|
|
|
11
18
|
'vertical-ends',
|
|
12
19
|
'' !== (gap ?? '') ? `-gap:${gap}` : undefined,
|
|
13
20
|
'' !== (alignItems ?? '') ? `-align-items:${alignItems}` : undefined,
|
|
21
|
+
'' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
|
|
22
|
+
'' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
|
|
14
23
|
]
|
|
15
24
|
.filter(Boolean)
|
|
16
25
|
.join(' ')}
|
package/src/settings/_root.scss
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
@use 'sass:list';
|
|
2
|
-
@use 'sass:math';
|
|
3
2
|
@use '../variables' as variables;
|
|
4
3
|
|
|
5
4
|
@property --unitone--property--1em {
|
|
@@ -20,6 +19,12 @@
|
|
|
20
19
|
initial-value: 0px;
|
|
21
20
|
}
|
|
22
21
|
|
|
22
|
+
@property --unitone--property--100cqw {
|
|
23
|
+
syntax: "<length>";
|
|
24
|
+
inherits: false;
|
|
25
|
+
initial-value: 0px;
|
|
26
|
+
}
|
|
27
|
+
|
|
23
28
|
@property --unitone--result--1em-px {
|
|
24
29
|
syntax: "<number> | <length>";
|
|
25
30
|
inherits: false;
|
|
@@ -38,40 +43,12 @@
|
|
|
38
43
|
initial-value: 0;
|
|
39
44
|
}
|
|
40
45
|
|
|
41
|
-
@
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
#{ $max }
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@function _generate-spacing($max) {
|
|
50
|
-
$quotient: math.div(variables.$min-breakpoint, variables.$max-breakpoint);
|
|
51
|
-
$min: calc(var(--unitone--em1) + #{ $max } * #{ $quotient });
|
|
52
|
-
@return _generate-fluid-spacing(#{ $min }, #{ $max });
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@function _generate-padding($max) {
|
|
56
|
-
$quotient: math.div(variables.$min-breakpoint, variables.$max-breakpoint);
|
|
57
|
-
$min: calc(var(--unitone--em1) + #{ $max } * #{ $quotient } * .2);
|
|
58
|
-
@return _generate-fluid-spacing(#{ $min }, #{ $max });
|
|
46
|
+
@property --unitone--result--100cqw-px {
|
|
47
|
+
syntax: "<number> | <length>";
|
|
48
|
+
inherits: false;
|
|
49
|
+
initial-value: 0;
|
|
59
50
|
}
|
|
60
51
|
|
|
61
|
-
$font-sizes: (
|
|
62
|
-
-3: 2xs,
|
|
63
|
-
-2: xs,
|
|
64
|
-
-1: s,
|
|
65
|
-
0: m,
|
|
66
|
-
1: l,
|
|
67
|
-
2: xl,
|
|
68
|
-
3: 2xl,
|
|
69
|
-
4: 3xl,
|
|
70
|
-
5: 4xl,
|
|
71
|
-
6: 5xl,
|
|
72
|
-
7: 6xl,
|
|
73
|
-
);
|
|
74
|
-
|
|
75
52
|
* {
|
|
76
53
|
/**
|
|
77
54
|
* A value to get the unitless px value in trigonometric functions. (For Safari)
|
|
@@ -81,6 +58,10 @@ $font-sizes: (
|
|
|
81
58
|
|
|
82
59
|
/**
|
|
83
60
|
* em unitless px real value
|
|
61
|
+
*
|
|
62
|
+
* Firefox may invalidate font-size: var(...) when this registered custom
|
|
63
|
+
* property depends on 1em. It is reset to 0 in the Firefox fallback in
|
|
64
|
+
* variables.line-height().
|
|
84
65
|
*/
|
|
85
66
|
--unitone--result--1em-px: calc(tan(atan2(var(--unitone--property--1em), 1px)));
|
|
86
67
|
|
|
@@ -160,11 +141,7 @@ $font-sizes: (
|
|
|
160
141
|
* Font size tokens.
|
|
161
142
|
*/
|
|
162
143
|
:root {
|
|
163
|
-
@
|
|
164
|
-
--unitone--font-size-#{ $name }: #{ variables.font-size-rem($level) };
|
|
165
|
-
--unitone--font-size-#{ $name }-fluid: #{ variables.font-size-fluid($level) };
|
|
166
|
-
--unitone--font-size-#{ $name }-fluid-c: #{ variables.font-size-fluid($level, 'container') };
|
|
167
|
-
}
|
|
144
|
+
@include variables.font-size-tokens();
|
|
168
145
|
}
|
|
169
146
|
|
|
170
147
|
/**
|
|
@@ -231,32 +208,7 @@ $font-sizes: (
|
|
|
231
208
|
* Modular scales for spaces.
|
|
232
209
|
*/
|
|
233
210
|
:root {
|
|
234
|
-
|
|
235
|
-
--unitone--s-2: var(--unitone--em-2);
|
|
236
|
-
--unitone--s-1: var(--unitone--em-1);
|
|
237
|
-
--unitone--s0: var(--unitone--em0);
|
|
238
|
-
--unitone--s1: var(--unitone--em1);
|
|
239
|
-
--unitone--s2: #{ _generate-spacing(var(--unitone--em2)) };
|
|
240
|
-
--unitone--s3: #{ _generate-spacing(var(--unitone--em3)) };
|
|
241
|
-
--unitone--s4: #{ _generate-spacing(var(--unitone--em4)) };
|
|
242
|
-
--unitone--s5: #{ _generate-spacing(var(--unitone--em5)) };
|
|
243
|
-
--unitone--s6: #{ _generate-spacing(var(--unitone--em6)) };
|
|
244
|
-
--unitone--s7: #{ _generate-spacing(var(--unitone--em7)) };
|
|
245
|
-
|
|
246
|
-
--unitone--s1s: #{ _generate-fluid-spacing(var(--unitone--em-1), var(--unitone--em1)) };
|
|
247
|
-
--unitone--s2s: #{ _generate-fluid-spacing(var(--unitone--em-1), var(--unitone--em2)) };
|
|
248
|
-
--unitone--s3s: #{ _generate-fluid-spacing(var(--unitone--em-1), var(--unitone--em3)) };
|
|
249
|
-
--unitone--s4s: #{ _generate-fluid-spacing(var(--unitone--em-1), var(--unitone--em4)) };
|
|
250
|
-
--unitone--s5s: #{ _generate-fluid-spacing(var(--unitone--em-1), var(--unitone--em5)) };
|
|
251
|
-
--unitone--s6s: #{ _generate-fluid-spacing(var(--unitone--em-1), var(--unitone--em6)) };
|
|
252
|
-
--unitone--s7s: #{ _generate-fluid-spacing(var(--unitone--em-1), var(--unitone--em7)) };
|
|
253
|
-
|
|
254
|
-
--unitone--s2m: #{ _generate-fluid-spacing(var(--unitone--em1), var(--unitone--em2)) };
|
|
255
|
-
--unitone--s3m: #{ _generate-fluid-spacing(var(--unitone--em1), var(--unitone--em3)) };
|
|
256
|
-
--unitone--s4m: #{ _generate-fluid-spacing(var(--unitone--em1), var(--unitone--em4)) };
|
|
257
|
-
--unitone--s5m: #{ _generate-fluid-spacing(var(--unitone--em1), var(--unitone--em5)) };
|
|
258
|
-
--unitone--s6m: #{ _generate-fluid-spacing(var(--unitone--em1), var(--unitone--em6)) };
|
|
259
|
-
--unitone--s7m: #{ _generate-fluid-spacing(var(--unitone--em1), var(--unitone--em7)) };
|
|
211
|
+
@include variables.spacing-tokens();
|
|
260
212
|
}
|
|
261
213
|
|
|
262
214
|
/**
|
|
@@ -266,32 +218,7 @@ $font-sizes: (
|
|
|
266
218
|
* For this reason, we prepare special scales.
|
|
267
219
|
*/
|
|
268
220
|
:root {
|
|
269
|
-
|
|
270
|
-
--unitone--p-2: var(--unitone--em-2);
|
|
271
|
-
--unitone--p-1: var(--unitone--em-1);
|
|
272
|
-
--unitone--p0: var(--unitone--em0);
|
|
273
|
-
--unitone--p1: var(--unitone--em1);
|
|
274
|
-
--unitone--p2: #{ _generate-padding(var(--unitone--em2)) };
|
|
275
|
-
--unitone--p3: #{ _generate-padding(var(--unitone--em3)) };
|
|
276
|
-
--unitone--p4: #{ _generate-padding(var(--unitone--em4)) };
|
|
277
|
-
--unitone--p5: #{ _generate-padding(var(--unitone--em5)) };
|
|
278
|
-
--unitone--p6: #{ _generate-padding(var(--unitone--em6)) };
|
|
279
|
-
--unitone--p7: #{ _generate-padding(var(--unitone--em7)) };
|
|
280
|
-
|
|
281
|
-
--unitone--p1s: var(--unitone--s1s);
|
|
282
|
-
--unitone--p2s: var(--unitone--s2s);
|
|
283
|
-
--unitone--p3s: var(--unitone--s3s);
|
|
284
|
-
--unitone--p4s: var(--unitone--s4s);
|
|
285
|
-
--unitone--p5s: var(--unitone--s5s);
|
|
286
|
-
--unitone--p6s: var(--unitone--s6s);
|
|
287
|
-
--unitone--p7s: var(--unitone--s7s);
|
|
288
|
-
|
|
289
|
-
--unitone--p2m: var(--unitone--s2m);
|
|
290
|
-
--unitone--p3m: var(--unitone--s3m);
|
|
291
|
-
--unitone--p4m: var(--unitone--s4m);
|
|
292
|
-
--unitone--p5m: var(--unitone--s5m);
|
|
293
|
-
--unitone--p6m: var(--unitone--s6m);
|
|
294
|
-
--unitone--p7m: var(--unitone--s7m);
|
|
221
|
+
@include variables.padding-tokens();
|
|
295
222
|
}
|
|
296
223
|
|
|
297
224
|
/**
|
|
@@ -301,7 +228,7 @@ $font-sizes: (
|
|
|
301
228
|
/**
|
|
302
229
|
* Default gutters
|
|
303
230
|
*/
|
|
304
|
-
--unitone--global--gutters:
|
|
231
|
+
--unitone--global--gutters: #{ variables.generate-global-gutters() };
|
|
305
232
|
|
|
306
233
|
/**
|
|
307
234
|
* Max width of the container.
|
|
@@ -7,14 +7,4 @@
|
|
|
7
7
|
.-font-size\:#{ $name }.-fluid-typography {
|
|
8
8
|
font-size: var(--unitone--font-size-#{ $name }-fluid) !important;
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
:where(
|
|
12
|
-
[data-unitone-layout~="-container-type\:inline-size"],
|
|
13
|
-
.-container-type\:inline-size
|
|
14
|
-
) {
|
|
15
|
-
.-font-size\:#{ $name }[data-unitone-layout~="-fluid-typography"],
|
|
16
|
-
.-font-size\:#{ $name }.-fluid-typography {
|
|
17
|
-
font-size: var(--unitone--font-size-#{ $name }-fluid-c) !important;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
10
|
}
|