@inc2734/unitone-css 1.3.0 → 1.4.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.
Files changed (50) hide show
  1. package/dist/app.css +1 -1
  2. package/dist/layout-primitives/both-sides/react.js +1 -1
  3. package/dist/layout-primitives/center/react.js +1 -1
  4. package/dist/layout-primitives/cluster/react.js +1 -1
  5. package/dist/layout-primitives/container/react.js +1 -1
  6. package/dist/layout-primitives/decorator/react.js +1 -1
  7. package/dist/layout-primitives/frame/react.js +1 -1
  8. package/dist/layout-primitives/gutters/react.js +1 -1
  9. package/dist/layout-primitives/layers/react.js +1 -1
  10. package/dist/layout-primitives/marquee/react.js +1 -1
  11. package/dist/layout-primitives/reel/react.js +1 -1
  12. package/dist/layout-primitives/responsive-grid/react.js +1 -1
  13. package/dist/layout-primitives/stack/react.js +1 -1
  14. package/dist/layout-primitives/switcher/react.js +1 -1
  15. package/dist/layout-primitives/text/react.js +1 -1
  16. package/dist/layout-primitives/texture/react.js +1 -1
  17. package/dist/layout-primitives/vertical-ends/react.js +1 -1
  18. package/dist/layout-primitives/vertical-writing/react.js +1 -1
  19. package/package.json +1 -1
  20. package/src/behaviors/_fluid-reference.scss +8 -21
  21. package/src/behaviors/_index.scss +3 -1
  22. package/src/behaviors/_responsive-context.scss +96 -0
  23. package/src/layout-primitives/both-sides/index.jsx +1 -12
  24. package/src/layout-primitives/center/index.jsx +1 -11
  25. package/src/layout-primitives/cluster/index.jsx +0 -4
  26. package/src/layout-primitives/container/_index.scss +2 -0
  27. package/src/layout-primitives/container/index.jsx +3 -1
  28. package/src/layout-primitives/decorator/index.jsx +3 -1
  29. package/src/layout-primitives/frame/_index.scss +4 -10
  30. package/src/layout-primitives/frame/index.jsx +1 -1
  31. package/src/layout-primitives/gutters/index.jsx +2 -7
  32. package/src/layout-primitives/layers/_index.scss +7 -12
  33. package/src/layout-primitives/layers/index.jsx +4 -2
  34. package/src/layout-primitives/marquee/index.jsx +1 -13
  35. package/src/layout-primitives/reel/index.jsx +1 -12
  36. package/src/layout-primitives/responsive-grid/_index.scss +2 -0
  37. package/src/layout-primitives/responsive-grid/index.jsx +3 -1
  38. package/src/layout-primitives/stack/_index.scss +2 -0
  39. package/src/layout-primitives/stack/index.jsx +3 -1
  40. package/src/layout-primitives/switcher/_index.scss +2 -0
  41. package/src/layout-primitives/switcher/index.jsx +3 -1
  42. package/src/layout-primitives/text/_index.scss +2 -0
  43. package/src/layout-primitives/text/index.jsx +3 -1
  44. package/src/layout-primitives/texture/index.jsx +1 -8
  45. package/src/layout-primitives/vertical-ends/_index.scss +2 -0
  46. package/src/layout-primitives/vertical-ends/index.jsx +3 -1
  47. package/src/layout-primitives/vertical-writing/_index.scss +9 -21
  48. package/src/layout-primitives/vertical-writing/index.jsx +2 -2
  49. package/src/settings/_root.scss +4 -0
  50. package/src/variables/_index.scss +128 -75
@@ -1 +1 @@
1
- "use strict";var e=require("react");function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t.apply(null,arguments)}function r(e){return r="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},r(e)}function n(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}function o(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=["center","column","applyGap","gap","gutters","maxWidth","columnWidth","containerType","fluidReference","style"];function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach(function(t){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}exports.Text=function(r){var n=r.center,o=r.column,c=r.applyGap,l=r.gap,a=r.gutters,f=r.maxWidth,p=r.columnWidth,y=r.containerType,b=r.fluidReference,s=r.style,v=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(r,i);return s=u(u({},s),{},{"--unitone--max-width":""!==f?f:void 0,"--unitone--column-width":""!==p?p:void 0}),e.createElement("div",t({"data-unitone-layout":["text",n?"-center":void 0,o?"-column":void 0,c?"-gap":void 0,""!==(null!=l?l:"")?"-gap:".concat(l):void 0,""!==(null!=a?a:"")?"-gutters:".concat(a):void 0,""!==(null!=y?y:"")?"-container-type:".concat(y):void 0,""!==(null!=b?b:"")?"-fluid-reference:".concat(b):void 0].filter(Boolean).join(" "),style:s},v),v.children)};
1
+ "use strict";var e=require("react");function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t.apply(null,arguments)}function r(e){return r="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},r(e)}function n(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}function o(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=["center","column","applyGap","gap","gutters","maxWidth","columnWidth","containerType","responsiveContext","fluidReference","style"];function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach(function(t){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}exports.Text=function(r){var n=r.center,o=r.column,c=r.applyGap,l=r.gap,a=r.gutters,f=r.maxWidth,p=r.columnWidth,y=r.containerType,s=r.responsiveContext,b=r.fluidReference,v=r.style,m=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(r,i);return v=u(u({},v),{},{"--unitone--max-width":""!==f?f:void 0,"--unitone--column-width":""!==p?p:void 0}),e.createElement("div",t({"data-unitone-layout":["text",n?"-center":void 0,o?"-column":void 0,c?"-gap":void 0,""!==(null!=l?l:"")?"-gap:".concat(l):void 0,""!==(null!=a?a:"")?"-gutters:".concat(a):void 0,""!==(null!=y?y:"")?"-container-type:".concat(y):void 0,"container"===s?"-responsive-context:container":void 0,""!==(null!=b?b:"")?"-fluid-reference:".concat(b):void 0].filter(Boolean).join(" "),style:v},m),m.children)};
@@ -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 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
+ "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 u=["texture","textureColor","textureGap","textureSize","textureTop","textureRight","textureBottom","textureLeft","textureBorderRadius","textureBorderTopLeftRadius","textureBorderTopRightRadius","textureBorderBottomLeftRadius","textureBorderBottomRightRadius","textureBandTopSize","textureBandBottomSize","style"];function i(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?i(Object(r),!0).forEach(function(e){n(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(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,i=r.textureGap,d=r.textureSize,l=r.textureTop,c=r.textureRight,f=r.textureBottom,s=r.textureLeft,x=r.textureBorderRadius,b=r.textureBorderTopLeftRadius,p=r.textureBorderTopRightRadius,y=r.textureBorderBottomLeftRadius,v=r.textureBorderBottomRightRadius,m=r.textureBandTopSize,O=r.textureBandBottomSize,g=r.style,B=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 u=Object.getOwnPropertySymbols(t);for(o=0;o<u.length;o++)r=u[o],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}(r,u);return g=a(a({},g),{},{"--unitone--texture-color":""!==n?n:void 0,"--unitone--texture-gap":""!==i?i:void 0,"--unitone--texture-size":""!==d?d:void 0,"--unitone--texture-top":""!==l?l:void 0,"--unitone--texture-right":""!==c?c:void 0,"--unitone--texture-bottom":""!==f?f:void 0,"--unitone--texture-left":""!==s?s:void 0,"--unitone--texture-border-radius":""!==x?x:void 0,"--unitone--texture-border-top-left-radius":""!==b?b:void 0,"--unitone--texture-border-top-right-radius":""!==p?p: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].filter(Boolean).join(" "),style:g},B),B.children)};
@@ -1 +1 @@
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)};
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","responsiveContext","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.responsiveContext,f=t.fluidReference,s=t.style,p=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 s=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}({},s),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,"container"===a?"-responsive-context:container":void 0,""!==(null!=f?f:"")?"-fluid-reference:".concat(f):void 0].filter(Boolean).join(" "),style:s},p),p.children)};
@@ -1 +1 @@
1
- "use strict";var e=require("react");function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){if(e){if("string"==typeof e)return t(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}function r(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,l=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(e,t)||n(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){u=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(u)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var l="data-unitone-layout",u="".concat(200,"px 0px"),c=function(e,t){return e.filter(function(e){return!t.includes(e)})},d=function(e,t){var n,r=t.filter(Boolean).join(" ");(null!==(n=e.getAttribute(l))&&void 0!==n?n:"")!==r&&e.setAttribute(l,r)},s=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.getValue,a=r.delay,l=!0,u=new ResizeObserver(h(function(e){var r,a=o(e);try{for(a.s();!(r=a.n()).done;){var u=r.value,c=null==i?void 0:i(u);l?(n=c,l=!1):void 0!==c&&c===n||(t(u.target,u),n=c)}}catch(e){a.e(e)}finally{a.f()}},void 0===a?250:a));return u.observe(e),u},f=function(e,t,n){var r=new MutationObserver(function(t){requestAnimationFrame(function(){null!=e&&e.isConnected&&n(t)})});return r.observe(e,t),r},v=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getResizeValue,a=n.delay,l=void 0===a?250:a,c=n.observeResize,d=void 0===c||c,v=n.observeIntersection,y=void 0!==v&&v,p=n.observeDirectChildrenResize,g=void 0!==p&&p,m=n.targetMutation,w=n.directChildMutation,O=y&&"undefined"!=typeof IntersectionObserver,A=!O||b(e),S=O&&!A,E=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;null!=n&&n.isConnected&&(!O||A?(S=!1,t(n)):S=!0)},C=function(e,t){var n,r=0;return function(){var i,o;null!==(o=n=null==e||null===(i=e.ownerDocument)||void 0===i?void 0:i.defaultView)&&void 0!==o&&o.requestAnimationFrame?r||(r=n.requestAnimationFrame(function(){r=0,n=null,null!=e&&e.isConnected&&t(e)})):t(e)}}(e,E),j=function(){null!=e&&e.isConnected&&(!O||A?(S=!0,C()):S=!0)},z=function(){},N=d?g?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getValue,i=n.delay,a=void 0===i?250:i,l=n.onChildList,u=new WeakMap,c=new Set,d=new ResizeObserver(h(function(n){var i,a=!1,l=o(n);try{for(l.s();!(i=l.n()).done;){var c=i.value,d=null==r?void 0:r(c);u.has(c.target)?(void 0!==d&&d===u.get(c.target)||(a=!0),u.set(c.target,d)):u.set(c.target,d)}}catch(e){l.e(e)}finally{l.f()}a&&t(e)},a)),s=function(){var t;Array.from(c).forEach(function(t){t.parentElement!==e&&(d.unobserve(t),c.delete(t),u.delete(t))}),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach(function(e){c.has(e)||(d.observe(e),c.add(e))})};d.observe(e),s();var v=f(e,{childList:!0},function(n){n.some(function(e){return"childList"===e.type})&&(s(),null==l||l(n),t(e))});return{resizeObserver:d,mutationObserver:v}}(e,j,{getValue:r,delay:l,onChildList:function(){z()}}):{resizeObserver:s(e,j,{getValue:r,delay:l})}:{mutationObserver:null};O&&function(e,t){var n=new IntersectionObserver(function(e){var n=i(e,1)[0];n&&t(n)},{rootMargin:u});n.observe(e)}(e,function(e){(A=e.isIntersecting)&&S&&j()}),null!=m&&m.options&&f(e,m.options,function(e){var t,n;(null!==(t=null===(n=m.shouldApply)||void 0===n?void 0:n.call(m,e))&&void 0!==t?t:0<e.length)&&j()});var M=null!=w&&w.attributeFilter&&w.shouldApply?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.attributeFilter,i=n.shouldApply,o=n.attributeOldValue,a=void 0===o||o,l=new MutationObserver(function(n){requestAnimationFrame(function(){null!=e&&e.isConnected&&n.some(function(t){return"attributes"===t.type&&t.target.parentElement===e&&i(t)})&&t(e)})}),u=function(){var t;l.disconnect(),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach(function(e){l.observe(e,{attributes:!0,attributeFilter:r,attributeOldValue:a})})};return u(),{observer:l,syncObservedChildren:u}}(e,j,{attributeFilter:w.attributeFilter,shouldApply:w.shouldApply,attributeOldValue:w.attributeOldValue}):null;M&&(z=M.syncObservedChildren),!N.mutationObserver&&M&&f(e,{childList:!0},function(e){e.some(function(e){return"childList"===e.type})&&(z(),j())}),O&&!A||E(e)},y=function(e){var t;return parseInt(null===(t=e.contentRect)||void 0===t?void 0:t.width)},b=function(e){var t;if(!function(e){return!(null==e||!e.isConnected)&&0<e.getClientRects().length}(e))return!1;var n=null==e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;if(!n)return!0;var r=e.getBoundingClientRect(),i=n.innerWidth,o=n.innerHeight;return r.bottom>-200&&r.right>0&&r.top<o+200&&r.left<i};function h(e,t){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this;clearTimeout(n),n=setTimeout(function(){e.apply(a,i)},t)}}var p=function(e){return e.some(function(e){return"attributes"===e.type||"childList"===e.type&&[].concat(r(e.addedNodes),r(e.removedNodes)).some(function(e){return!function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE&&["vertical-writing__thresholder","vertical-writing:initialized","vertical-writing:safari"].includes(e.getAttribute("data-unitone-layout"))}(e)})})},g=function(e){if(e){var t,n,i=(null!==(t=e.getAttribute(l))&&void 0!==t?t:"").split(/\s+/).filter(Boolean),o=c(i,["vertical-writing:safari","-force-switch"]),a=c(i,["vertical-writing:initialized","vertical-writing:safari","-force-switch"]);if(d(e,o),Array.from(e.children).reverse().some(function(e){if(!["absolute","fixed"].includes(getComputedStyle(e).position)&&"none"!==getComputedStyle(e).display)return n=e,!0}),n){var u=getComputedStyle(e),s=String(u.getPropertyValue("--unitone--threshold")).trim(),f=!1;if(s){var v=e.ownerDocument.createElement("div");v.setAttribute(l,"vertical-writing__thresholder"),e.appendChild(v),f=v.offsetWidth>=e.offsetWidth,v.remove()}if(f)a.push("-force-switch");else e.getBoundingClientRect().left>n.getBoundingClientRect().left&&a.push("vertical-writing:safari");d(e,[].concat(r(a),["vertical-writing:initialized"])),requestAnimationFrame(function(){var t;if(null!=e&&e.isConnected&&null!==(t=e.parentNode)&&void 0!==t&&t.style){if(f)return void(e.parentNode.style.height="");var r=e.getBoundingClientRect(),i=n.getBoundingClientRect(),o=r.top+r.height,a=i.top+i.height;e.parentNode.style.height=o!==a?"".concat(Math.ceil(a-r.top),"px"):""}})}else d(e,[].concat(r(a),["vertical-writing:initialized"]))}},m=Symbol.for("@inc2734/unitone-css/layout-initializers"),w=function(){return"undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof MutationObserver||"undefined"==typeof Node?null:(globalThis[m]||(globalThis[m]={initializers:new Map,pendingNodes:new Set,observer:null,rafId:0,hasDOMContentLoadedListener:!1}),globalThis[m])},O=function(e,t){var n,r;if(e.enabled()&&(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE){var i=new Set;null!==(n=t.matches)&&void 0!==n&&n.call(t,e.selector)&&i.add(t),null===(r=t.querySelectorAll)||void 0===r||r.call(t,e.selector).forEach(function(e){i.add(e)}),i.forEach(function(t){e.initialized.has(t)||(e.initialize(t),e.initialized.add(t))})}},A=function(e){var t=w();t&&t.initializers.forEach(function(t){O(t,e)})},S=function(){var e=w();e&&(e.pendingNodes.forEach(function(e){A(e)}),e.pendingNodes.clear(),e.rafId=0)},E=function(){var e=w();e&&!e.observer&&document.body&&(A(document.body),e.observer=new MutationObserver(function(t){t.forEach(function(t){t.addedNodes.forEach(function(t){(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE&&e.pendingNodes.add(t)})}),!e.rafId&&0<e.pendingNodes.size&&(e.rafId=requestAnimationFrame(S))}),e.observer.observe(document.body,{childList:!0,subtree:!0}))};function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C.apply(null,arguments)}function j(e){return j="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},j(e)}function z(e){var t=function(e,t){if("object"!=j(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==j(t)?t:t+""}function N(e,t,n){return(t=z(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){var t=e.key,n=e.selector,r=e.initialize,i=e.enabled,o=void 0===i?function(){return!0}:i,a=w();if(a&&!a.initializers.has(t)){var l={selector:n,initialize:r,enabled:o,initialized:new WeakSet};a.initializers.set(t,l),a.observer?O(l,document.body):"loading"!==document.readyState?E():a.hasDOMContentLoadedListener||(document.addEventListener("DOMContentLoaded",E,{once:!0}),a.hasDOMContentLoadedListener=!0)}}({key:"layout-primitives/vertical-writing",selector:'[data-unitone-layout~="vertical-writing"]',initialize:function(e){v(e,function(e){var t;null!==(t=e.parentNode)&&void 0!==t&&t.style&&(e.parentNode.style.height=""),g(e)},{getResizeValue:y,observeIntersection:!0,targetMutation:{options:{attributes:!0,attributeFilter:["style"],childList:!0,subtree:!0},shouldApply:p}})}});var M=["textOrientation","gap","maxHeight","switchWritingMode","threshold","style","queryContext"];function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach(function(t){N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}exports.VerticalWriting=function(t){var n=t.textOrientation,r=t.gap,i=t.maxHeight,o=t.switchWritingMode,a=t.threshold,l=t.style,u=t.queryContext,c=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,M);return l=I(I({},l),{},{"--unitone--max-height":""!==i?i:void 0,"--unitone--threshold":""!==a?a:void 0}),e.createElement("div",{"data-unitone-layout":"vertical-writing-wrapper"},e.createElement("div",C({"data-unitone-layout":["vertical-writing",""!==(null!=n?n:"")?"-text-orientation:".concat(n):void 0,""!==(null!=r?r:"")?"-gap:".concat(r):void 0,o?"-switch":void 0,u?"@".concat(u):void 0].filter(Boolean).join(" "),style:l},c),c.children))};
1
+ "use strict";var e=require("react");function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){if(e){if("string"==typeof e)return t(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}function r(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,l=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(e,t)||n(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){u=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(u)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var l="data-unitone-layout",u="".concat(200,"px 0px"),c=function(e,t){return e.filter(function(e){return!t.includes(e)})},d=function(e,t){var n,r=t.filter(Boolean).join(" ");(null!==(n=e.getAttribute(l))&&void 0!==n?n:"")!==r&&e.setAttribute(l,r)},s=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.getValue,a=r.delay,l=!0,u=new ResizeObserver(h(function(e){var r,a=o(e);try{for(a.s();!(r=a.n()).done;){var u=r.value,c=null==i?void 0:i(u);l?(n=c,l=!1):void 0!==c&&c===n||(t(u.target,u),n=c)}}catch(e){a.e(e)}finally{a.f()}},void 0===a?250:a));return u.observe(e),u},f=function(e,t,n){var r=new MutationObserver(function(t){requestAnimationFrame(function(){null!=e&&e.isConnected&&n(t)})});return r.observe(e,t),r},v=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getResizeValue,a=n.delay,l=void 0===a?250:a,c=n.observeResize,d=void 0===c||c,v=n.observeIntersection,y=void 0!==v&&v,p=n.observeDirectChildrenResize,g=void 0!==p&&p,m=n.targetMutation,w=n.directChildMutation,O=y&&"undefined"!=typeof IntersectionObserver,A=!O||b(e),S=O&&!A,E=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;null!=n&&n.isConnected&&(!O||A?(S=!1,t(n)):S=!0)},C=function(e,t){var n,r=0;return function(){var i,o;null!==(o=n=null==e||null===(i=e.ownerDocument)||void 0===i?void 0:i.defaultView)&&void 0!==o&&o.requestAnimationFrame?r||(r=n.requestAnimationFrame(function(){r=0,n=null,null!=e&&e.isConnected&&t(e)})):t(e)}}(e,E),j=function(){null!=e&&e.isConnected&&(!O||A?(S=!0,C()):S=!0)},z=function(){},N=d?g?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getValue,i=n.delay,a=void 0===i?250:i,l=n.onChildList,u=new WeakMap,c=new Set,d=new ResizeObserver(h(function(n){var i,a=!1,l=o(n);try{for(l.s();!(i=l.n()).done;){var c=i.value,d=null==r?void 0:r(c);u.has(c.target)?(void 0!==d&&d===u.get(c.target)||(a=!0),u.set(c.target,d)):u.set(c.target,d)}}catch(e){l.e(e)}finally{l.f()}a&&t(e)},a)),s=function(){var t;Array.from(c).forEach(function(t){t.parentElement!==e&&(d.unobserve(t),c.delete(t),u.delete(t))}),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach(function(e){c.has(e)||(d.observe(e),c.add(e))})};d.observe(e),s();var v=f(e,{childList:!0},function(n){n.some(function(e){return"childList"===e.type})&&(s(),null==l||l(n),t(e))});return{resizeObserver:d,mutationObserver:v}}(e,j,{getValue:r,delay:l,onChildList:function(){z()}}):{resizeObserver:s(e,j,{getValue:r,delay:l})}:{mutationObserver:null};O&&function(e,t){var n=new IntersectionObserver(function(e){var n=i(e,1)[0];n&&t(n)},{rootMargin:u});n.observe(e)}(e,function(e){(A=e.isIntersecting)&&S&&j()}),null!=m&&m.options&&f(e,m.options,function(e){var t,n;(null!==(t=null===(n=m.shouldApply)||void 0===n?void 0:n.call(m,e))&&void 0!==t?t:0<e.length)&&j()});var M=null!=w&&w.attributeFilter&&w.shouldApply?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.attributeFilter,i=n.shouldApply,o=n.attributeOldValue,a=void 0===o||o,l=new MutationObserver(function(n){requestAnimationFrame(function(){null!=e&&e.isConnected&&n.some(function(t){return"attributes"===t.type&&t.target.parentElement===e&&i(t)})&&t(e)})}),u=function(){var t;l.disconnect(),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach(function(e){l.observe(e,{attributes:!0,attributeFilter:r,attributeOldValue:a})})};return u(),{observer:l,syncObservedChildren:u}}(e,j,{attributeFilter:w.attributeFilter,shouldApply:w.shouldApply,attributeOldValue:w.attributeOldValue}):null;M&&(z=M.syncObservedChildren),!N.mutationObserver&&M&&f(e,{childList:!0},function(e){e.some(function(e){return"childList"===e.type})&&(z(),j())}),O&&!A||E(e)},y=function(e){var t;return parseInt(null===(t=e.contentRect)||void 0===t?void 0:t.width)},b=function(e){var t;if(!function(e){return!(null==e||!e.isConnected)&&0<e.getClientRects().length}(e))return!1;var n=null==e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;if(!n)return!0;var r=e.getBoundingClientRect(),i=n.innerWidth,o=n.innerHeight;return r.bottom>-200&&r.right>0&&r.top<o+200&&r.left<i};function h(e,t){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this;clearTimeout(n),n=setTimeout(function(){e.apply(a,i)},t)}}var p=function(e){return e.some(function(e){return"attributes"===e.type||"childList"===e.type&&[].concat(r(e.addedNodes),r(e.removedNodes)).some(function(e){return!function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE&&["vertical-writing__thresholder","vertical-writing:initialized","vertical-writing:safari"].includes(e.getAttribute("data-unitone-layout"))}(e)})})},g=function(e){if(e){var t,n,i=(null!==(t=e.getAttribute(l))&&void 0!==t?t:"").split(/\s+/).filter(Boolean),o=c(i,["vertical-writing:safari","-force-switch"]),a=c(i,["vertical-writing:initialized","vertical-writing:safari","-force-switch"]);if(d(e,o),Array.from(e.children).reverse().some(function(e){if(!["absolute","fixed"].includes(getComputedStyle(e).position)&&"none"!==getComputedStyle(e).display)return n=e,!0}),n){var u=getComputedStyle(e),s=String(u.getPropertyValue("--unitone--threshold")).trim(),f=!1;if(s){var v=e.ownerDocument.createElement("div");v.setAttribute(l,"vertical-writing__thresholder"),e.appendChild(v),f=v.offsetWidth>=e.offsetWidth,v.remove()}if(f)a.push("-force-switch");else e.getBoundingClientRect().left>n.getBoundingClientRect().left&&a.push("vertical-writing:safari");d(e,[].concat(r(a),["vertical-writing:initialized"])),requestAnimationFrame(function(){var t;if(null!=e&&e.isConnected&&null!==(t=e.parentNode)&&void 0!==t&&t.style){if(f)return void(e.parentNode.style.height="");var r=e.getBoundingClientRect(),i=n.getBoundingClientRect(),o=r.top+r.height,a=i.top+i.height;e.parentNode.style.height=o!==a?"".concat(Math.ceil(a-r.top),"px"):""}})}else d(e,[].concat(r(a),["vertical-writing:initialized"]))}},m=Symbol.for("@inc2734/unitone-css/layout-initializers"),w=function(){return"undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof MutationObserver||"undefined"==typeof Node?null:(globalThis[m]||(globalThis[m]={initializers:new Map,pendingNodes:new Set,observer:null,rafId:0,hasDOMContentLoadedListener:!1}),globalThis[m])},O=function(e,t){var n,r;if(e.enabled()&&(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE){var i=new Set;null!==(n=t.matches)&&void 0!==n&&n.call(t,e.selector)&&i.add(t),null===(r=t.querySelectorAll)||void 0===r||r.call(t,e.selector).forEach(function(e){i.add(e)}),i.forEach(function(t){e.initialized.has(t)||(e.initialize(t),e.initialized.add(t))})}},A=function(e){var t=w();t&&t.initializers.forEach(function(t){O(t,e)})},S=function(){var e=w();e&&(e.pendingNodes.forEach(function(e){A(e)}),e.pendingNodes.clear(),e.rafId=0)},E=function(){var e=w();e&&!e.observer&&document.body&&(A(document.body),e.observer=new MutationObserver(function(t){t.forEach(function(t){t.addedNodes.forEach(function(t){(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE&&e.pendingNodes.add(t)})}),!e.rafId&&0<e.pendingNodes.size&&(e.rafId=requestAnimationFrame(S))}),e.observer.observe(document.body,{childList:!0,subtree:!0}))};function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C.apply(null,arguments)}function j(e){return j="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},j(e)}function z(e){var t=function(e,t){if("object"!=j(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==j(t)?t:t+""}function N(e,t,n){return(t=z(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){var t=e.key,n=e.selector,r=e.initialize,i=e.enabled,o=void 0===i?function(){return!0}:i,a=w();if(a&&!a.initializers.has(t)){var l={selector:n,initialize:r,enabled:o,initialized:new WeakSet};a.initializers.set(t,l),a.observer?O(l,document.body):"loading"!==document.readyState?E():a.hasDOMContentLoadedListener||(document.addEventListener("DOMContentLoaded",E,{once:!0}),a.hasDOMContentLoadedListener=!0)}}({key:"layout-primitives/vertical-writing",selector:'[data-unitone-layout~="vertical-writing"]',initialize:function(e){v(e,function(e){var t;null!==(t=e.parentNode)&&void 0!==t&&t.style&&(e.parentNode.style.height=""),g(e)},{getResizeValue:y,observeIntersection:!0,targetMutation:{options:{attributes:!0,attributeFilter:["style"],childList:!0,subtree:!0},shouldApply:p}})}});var M=["textOrientation","gap","maxHeight","switchWritingMode","threshold","queryContext","style"];function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach(function(t){N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}exports.VerticalWriting=function(t){var n=t.textOrientation,r=t.gap,i=t.maxHeight,o=t.switchWritingMode,a=t.threshold,l=t.queryContext,u=t.style,c=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,M);return u=I(I({},u),{},{"--unitone--max-height":""!==i?i:void 0,"--unitone--threshold":""!==a?a:void 0}),e.createElement("div",{"data-unitone-layout":"vertical-writing-wrapper"},e.createElement("div",C({"data-unitone-layout":["vertical-writing",""!==(null!=n?n:"")?"-text-orientation:".concat(n):void 0,""!==(null!=r?r:"")?"-gap:".concat(r):void 0,o?"-switch":void 0,"container"===l?"@container":void 0].filter(Boolean).join(" "),style:u},c),c.children))};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inc2734/unitone-css",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "",
5
5
  "engines": {
6
6
  "node": ">=20.19.0",
@@ -1,26 +1,13 @@
1
- @use '../variables' as variables;
1
+ @use './responsive-context';
2
2
 
3
- /**
4
- * Spacing tokens require a unitless real-number value of 100cqw,
5
- * so they cannot be defined at :root.
6
- */
3
+ // @deprecated Kept for backward compatibility.
4
+ // Use responsive-context instead.
7
5
  @mixin fluid-reference() {
6
+ /**
7
+ * @deprecated Kept for backward compatibility.
8
+ * Use -responsive-context:container on an ancestor instead.
9
+ */
8
10
  [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');
11
+ @include responsive-context.fluid-tokens();
25
12
  }
26
13
  }
@@ -20,6 +20,7 @@
20
20
  @use './overflow';
21
21
  @use './padding';
22
22
  @use './position';
23
+ @use './responsive-context';
23
24
  @use './stairs';
24
25
  @use './text-orientation';
25
26
 
@@ -44,6 +45,7 @@
44
45
  @include negative-gap.negative-gap();
45
46
  @include overflow.overflow();
46
47
  @include padding.padding();
47
- @include stairs.stairs();
48
48
  @include position.position();
49
+ @include responsive-context.responsive-context();
50
+ @include stairs.stairs();
49
51
  @include text-orientation.text-orientation();
@@ -0,0 +1,96 @@
1
+ @use '../variables' as variables;
2
+
3
+ // Declaration-only entrypoint, also used by the legacy fluid-reference behavior.
4
+ // Keep measurements and their consumers on the same element: registered
5
+ // measurements do not inherit, and var() is resolved before inheritance.
6
+ @mixin fluid-tokens() {
7
+ /**
8
+ * A value to get the unitless px value in trigonometric functions. (For Safari)
9
+ */
10
+ --unitone--property--100cqw: 100cqw;
11
+
12
+ /**
13
+ * 100cqw unitless px real value.
14
+ */
15
+ --unitone--result--100cqw-px: calc(tan(atan2(var(--unitone--property--100cqw), 1px)));
16
+
17
+ --unitone--global--gutters: #{ variables.generate-global-gutters($width: var(--unitone--property--100cqw)) };
18
+
19
+ @include variables.font-size-tokens(
20
+ $width: var(--unitone--property--100cqw),
21
+ $include-static: false
22
+ );
23
+
24
+ @include variables.spacing-tokens(
25
+ $width: var(--unitone--result--100cqw-px),
26
+ $include-static: false
27
+ );
28
+
29
+ @include variables.padding-tokens(
30
+ $width: var(--unitone--result--100cqw-px),
31
+ $include-static: false
32
+ );
33
+ }
34
+
35
+ @mixin responsive-context() {
36
+ /**
37
+ * Pair the container context with -container-type:inline-size:
38
+ * <div class="-container-type:inline-size -responsive-context:container">
39
+ * <div data-unitone-layout="frame -switch">...</div>
40
+ * </div>
41
+ * The context is active only when both markers are on the same element.
42
+ * An unpaired context marker is ignored; the existing context continues
43
+ * to apply, using the viewport when there is no active ancestor context.
44
+ * Nested pairs use the nearest eligible query container for descendants.
45
+ * The selectors check markers, not the computed container-type property.
46
+ * Without an eligible query container, 100cqw uses 100svw, and container
47
+ * size queries do not match. There is no automatic media-query fallback.
48
+ */
49
+ // Recalculate fluid values at each boundary; static tokens remain inherited.
50
+ :is(
51
+ [data-unitone-layout~="-responsive-context:container"],
52
+ .-responsive-context\:container
53
+ ):where(
54
+ [data-unitone-layout~="-container-type:inline-size"],
55
+ .-container-type\:inline-size
56
+ ) > * {
57
+ @include fluid-tokens();
58
+ }
59
+ }
60
+
61
+ // Query the primitive itself. If it is also a query container, use inherited
62
+ // custom properties to keep its children's layout tied to the same result.
63
+ @mixin responsive-query($condition) {
64
+ // Exclude descendants of paired contexts from media queries even when their
65
+ // container query does not match. A context does not affect itself.
66
+ &:where(:not(
67
+ [data-unitone-layout~="@container"],
68
+ :is(
69
+ [data-unitone-layout~="-responsive-context:container"],
70
+ .-responsive-context\:container
71
+ ):where(
72
+ [data-unitone-layout~="-container-type:inline-size"],
73
+ .-container-type\:inline-size
74
+ ) *
75
+ )) {
76
+ @media #{ $condition } {
77
+ @content;
78
+ }
79
+ }
80
+
81
+ // Select container queries explicitly or through an ancestor context.
82
+ &:where(
83
+ [data-unitone-layout~="@container"],
84
+ :is(
85
+ [data-unitone-layout~="-responsive-context:container"],
86
+ .-responsive-context\:container
87
+ ):where(
88
+ [data-unitone-layout~="-container-type:inline-size"],
89
+ .-container-type\:inline-size
90
+ ) *
91
+ ) {
92
+ @container #{ $condition } {
93
+ @content;
94
+ }
95
+ }
96
+ }
@@ -1,15 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- export const BothSides = ({
4
- gap,
5
- columnGap,
6
- rowGap,
7
- alignItems,
8
- containerType,
9
- fluidReference,
10
- style,
11
- ...props
12
- }) => {
3
+ export const BothSides = ({ gap, columnGap, rowGap, alignItems, style, ...props }) => {
13
4
  style = {
14
5
  ...style,
15
6
  };
@@ -22,8 +13,6 @@ export const BothSides = ({
22
13
  '' !== (columnGap ?? '') ? `-column-gap:${columnGap}` : undefined,
23
14
  '' !== (rowGap ?? '') ? `-row-gap:${rowGap}` : undefined,
24
15
  '' !== (alignItems ?? '') ? `-align-items:${alignItems}` : undefined,
25
- '' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
26
- '' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
27
16
  ]
28
17
  .filter(Boolean)
29
18
  .join(' ')}
@@ -1,14 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- export const Center = ({
4
- withText,
5
- gutters,
6
- maxWidth,
7
- containerType,
8
- fluidReference,
9
- style,
10
- ...props
11
- }) => {
3
+ export const Center = ({ withText, gutters, maxWidth, style, ...props }) => {
12
4
  style = {
13
5
  ...style,
14
6
  '--unitone--max-width': '' !== maxWidth ? maxWidth : undefined,
@@ -20,8 +12,6 @@ export const Center = ({
20
12
  'center',
21
13
  true === withText ? `-with-text` : undefined,
22
14
  '' !== (gutters ?? '') ? `-gutters:${gutters}` : undefined,
23
- '' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
24
- '' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
25
15
  ]
26
16
  .filter(Boolean)
27
17
  .join(' ')}
@@ -11,8 +11,6 @@ export const Cluster = ({
11
11
  rowGap,
12
12
  justifyContent,
13
13
  nowrap,
14
- containerType,
15
- fluidReference,
16
14
  tagName = 'div',
17
15
  style,
18
16
  ...props
@@ -36,8 +34,6 @@ export const Cluster = ({
36
34
  '' !== (rowGap ?? '') ? `-row-gap:${rowGap}` : undefined,
37
35
  '' !== (alignItems ?? '') ? `-align-items:${alignItems}` : undefined,
38
36
  '' !== (justifyContent ?? '') ? `-justify-content:${justifyContent}` : undefined,
39
- '' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
40
- '' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
41
37
  nowrap ? '-nowrap' : undefined,
42
38
  ]
43
39
  .filter(Boolean)
@@ -1,7 +1,9 @@
1
1
  @mixin abstract-container() {
2
2
  --unitone--gutters: var(--unitone--global--gutters);
3
3
  --unitone--max-width: var(--unitone--container-max-width);
4
+ --unitone--container-type: initial;
4
5
 
6
+ container-type: var(--unitone--container-type);
5
7
  box-sizing: content-box;
6
8
  margin-right: auto;
7
9
  margin-left: auto;
@@ -6,7 +6,8 @@ export const Container = ({
6
6
  maxWidth,
7
7
  text,
8
8
  containerType,
9
- fluidReference,
9
+ responsiveContext,
10
+ fluidReference, // @deprecated Kept for backward compatibility. Use responsiveContext on an ancestor instead.
10
11
  style,
11
12
  ...props
12
13
  }) => {
@@ -22,6 +23,7 @@ export const Container = ({
22
23
  '' !== (align ?? '') ? `-align:${align}` : undefined,
23
24
  '' !== (gutters ?? '') ? `-gutters:${gutters}` : undefined,
24
25
  '' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
26
+ 'container' === responsiveContext ? '-responsive-context:container' : undefined,
25
27
  '' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
26
28
  ]
27
29
  .filter(Boolean)
@@ -17,7 +17,8 @@ export const Decorator = ({
17
17
  gap,
18
18
  alignContent,
19
19
  containerType,
20
- fluidReference,
20
+ responsiveContext,
21
+ fluidReference, // @deprecated Kept for backward compatibility. Use responsiveContext on an ancestor instead.
21
22
  justifyItems,
22
23
  shadow,
23
24
  position,
@@ -68,6 +69,7 @@ export const Decorator = ({
68
69
  '' !== (gap ?? '') ? `-gap:${gap}` : undefined,
69
70
  '' !== (alignContent ?? '') ? `-align-content:${alignContent}` : undefined,
70
71
  '' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
72
+ 'container' === responsiveContext ? '-responsive-context:container' : undefined,
71
73
  '' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
72
74
  '' !== (justifyItems ?? '') ? `-justify-items:${justifyItems}` : undefined,
73
75
  '' !== (padding ?? '') ? `-padding:${padding}` : undefined,
@@ -1,3 +1,5 @@
1
+ @use '../../behaviors/responsive-context';
2
+
1
3
  @mixin abstract-frame() {
2
4
  --unitone--ratio: 16/9;
3
5
 
@@ -25,16 +27,8 @@
25
27
  }
26
28
 
27
29
  &[data-unitone-layout~="-switch"] {
28
- &:where(:not([data-unitone-layout~="@container"])) {
29
- @media (orientation: portrait) and (width < 600px) {
30
- aspect-ratio: calc(1 / (var(--unitone--ratio))) !important;
31
- }
32
- }
33
-
34
- &:where([data-unitone-layout~="@container"]) {
35
- @container (width < 600px) {
36
- aspect-ratio: calc(1 / (var(--unitone--ratio))) !important;
37
- }
30
+ @include responsive-context.responsive-query('(width < 600px)') {
31
+ aspect-ratio: calc(1 / (var(--unitone--ratio))) !important;
38
32
  }
39
33
  }
40
34
  }
@@ -11,7 +11,7 @@ export const Frame = ({ ratio, switchRatio, queryContext, style, ...props }) =>
11
11
  data-unitone-layout={[
12
12
  'frame',
13
13
  switchRatio ? `-switch` : undefined,
14
- queryContext ? `@${queryContext}` : undefined,
14
+ 'container' === queryContext ? '@container' : undefined,
15
15
  ]
16
16
  .filter(Boolean)
17
17
  .join(' ')}
@@ -1,14 +1,9 @@
1
1
  import React from 'react';
2
2
 
3
- export const Gutters = ({ padding, containerType, fluidReference, style, ...props }) => {
3
+ export const Gutters = ({ padding, style, ...props }) => {
4
4
  return (
5
5
  <div
6
- data-unitone-layout={[
7
- 'gutters',
8
- '' !== (padding ?? '') ? `-padding:${padding}` : undefined,
9
- '' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
10
- '' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
11
- ]
6
+ data-unitone-layout={['gutters', '' !== (padding ?? '') ? `-padding:${padding}` : undefined]
12
7
  .filter(Boolean)
13
8
  .join(' ')}
14
9
  style={style}
@@ -1,3 +1,5 @@
1
+ @use '../../behaviors/responsive-context';
2
+
1
3
  @mixin abstract-layers() {
2
4
  --unitone--columns: var(--unitone--grid-columns);
3
5
  --unitone--rows: var(--unitone--grid-rows);
@@ -7,7 +9,9 @@
7
9
  --unitone--row-gap: var(--unitone--gap, 1lh);
8
10
  --unitone--min-height: 0;
9
11
  --unitone--blur: 75px;
12
+ --unitone--container-type: initial;
10
13
 
14
+ container-type: var(--unitone--container-type);
11
15
  display: grid;
12
16
  grid-template-columns: repeat(var(--unitone--columns), 1fr);
13
17
  grid-template-rows: repeat(
@@ -19,18 +23,9 @@
19
23
  min-height: var(--unitone--min-height);
20
24
 
21
25
  &[data-unitone-layout~="-portrait"] {
22
- &:where(:not([data-unitone-layout~="@container"])) {
23
- @media (orientation: portrait) and (width < 600px) {
24
- --unitone--columns: var(--unitone--grid-rows);
25
- --unitone--rows: var(--unitone--grid-columns);
26
- }
27
- }
28
-
29
- &:where([data-unitone-layout~="@container"]) {
30
- @container (width < 600px) {
31
- --unitone--columns: var(--unitone--grid-rows);
32
- --unitone--rows: var(--unitone--grid-columns);
33
- }
26
+ @include responsive-context.responsive-query('(width < 600px)') {
27
+ --unitone--columns: var(--unitone--grid-rows);
28
+ --unitone--rows: var(--unitone--grid-columns);
34
29
  }
35
30
  }
36
31
 
@@ -16,7 +16,8 @@ export const Layers = ({
16
16
  rowTrackSize,
17
17
  queryContext,
18
18
  containerType,
19
- fluidReference,
19
+ responsiveContext,
20
+ fluidReference, // @deprecated Kept for backward compatibility. Use responsiveContext on an ancestor instead.
20
21
  style,
21
22
  ...props
22
23
  }) => {
@@ -41,8 +42,9 @@ export const Layers = ({
41
42
  '' !== (gap ?? '') ? `-gap:${gap}` : undefined,
42
43
  '' !== (columnGap ?? '') ? `-column-gap:${columnGap}` : undefined,
43
44
  '' !== (rowGap ?? '') ? `-row-gap:${rowGap}` : undefined,
44
- queryContext ? `@${queryContext}` : undefined,
45
+ 'container' === queryContext ? '@container' : undefined,
45
46
  '' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
47
+ 'container' === responsiveContext ? '-responsive-context:container' : undefined,
46
48
  '' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
47
49
  ]
48
50
  .filter(Boolean)
@@ -1,16 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- export const Marquee = ({
4
- duration,
5
- gap,
6
- itemWidth,
7
- reverse,
8
- pauseOnHover,
9
- containerType,
10
- fluidReference,
11
- style,
12
- ...props
13
- }) => {
3
+ export const Marquee = ({ duration, gap, itemWidth, reverse, pauseOnHover, style, ...props }) => {
14
4
  style = {
15
5
  ...style,
16
6
  '--unitone--animation-duration': '' !== duration ? duration : undefined,
@@ -23,8 +13,6 @@ export const Marquee = ({
23
13
  'marquee-wrapper',
24
14
  reverse ? '-reverse' : undefined,
25
15
  pauseOnHover ? '-pause-on-hover' : undefined,
26
- '' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
27
- '' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
28
16
  ]
29
17
  .filter(Boolean)
30
18
  .join(' ')}
@@ -1,15 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- export const Reel = ({
4
- gap,
5
- height,
6
- itemWidth,
7
- noBar,
8
- containerType,
9
- fluidReference,
10
- style,
11
- ...props
12
- }) => {
3
+ export const Reel = ({ gap, height, itemWidth, noBar, style, ...props }) => {
13
4
  style = {
14
5
  ...style,
15
6
  '--unitone--height': '' !== height ? height : undefined,
@@ -22,8 +13,6 @@ export const Reel = ({
22
13
  'reel',
23
14
  '' !== (gap ?? '') ? `-gap:${gap}` : undefined,
24
15
  noBar ? '-no-bar' : undefined,
25
- '' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
26
- '' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
27
16
  ]
28
17
  .filter(Boolean)
29
18
  .join(' ')}
@@ -4,7 +4,9 @@
4
4
  --unitone--gap: var(--unitone--global--gap);
5
5
  --unitone--column-gap: var(--unitone--gap);
6
6
  --unitone--row-gap: var(--unitone--gap);
7
+ --unitone--container-type: initial;
7
8
 
9
+ container-type: var(--unitone--container-type);
8
10
  display: grid;
9
11
  column-gap: var(--unitone--column-gap);
10
12
  row-gap: var(--unitone--row-gap);
@@ -11,7 +11,8 @@ export const ResponsiveGrid = ({
11
11
  stairs,
12
12
  stairsUp,
13
13
  containerType,
14
- fluidReference,
14
+ responsiveContext,
15
+ fluidReference, // @deprecated Kept for backward compatibility. Use responsiveContext on an ancestor instead.
15
16
  style,
16
17
  ...props
17
18
  }) => {
@@ -33,6 +34,7 @@ export const ResponsiveGrid = ({
33
34
  '' !== (stairs ?? '') ? `-stairs:${stairs}` : undefined,
34
35
  '' !== (stairsUp ?? '') ? `-stairs-up:${stairsUp}` : undefined,
35
36
  '' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
37
+ 'container' === responsiveContext ? '-responsive-context:container' : undefined,
36
38
  '' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
37
39
  ]
38
40
  .filter(Boolean)
@@ -1,6 +1,8 @@
1
1
  @mixin abstract-stack() {
2
2
  --unitone--gap: var(--unitone--global--text-gap);
3
+ --unitone--container-type: initial;
3
4
 
5
+ container-type: var(--unitone--container-type);
4
6
  display: flex;
5
7
  flex-direction: column;
6
8
  gap: var(--unitone--gap);
@@ -9,7 +9,8 @@ export const Stack = ({
9
9
  dividerStyle,
10
10
  dividerColor,
11
11
  containerType,
12
- fluidReference,
12
+ responsiveContext,
13
+ fluidReference, // @deprecated Kept for backward compatibility. Use responsiveContext on an ancestor instead.
13
14
  tagName = 'div',
14
15
  style,
15
16
  ...props
@@ -32,6 +33,7 @@ export const Stack = ({
32
33
  '' !== (gap ?? '') ? `-gap:${gap}` : undefined,
33
34
  negative ? '-negative' : undefined,
34
35
  '' !== (containerType ?? '') ? `-container-type:${containerType}` : undefined,
36
+ 'container' === responsiveContext ? '-responsive-context:container' : undefined,
35
37
  '' !== (fluidReference ?? '') ? `-fluid-reference:${fluidReference}` : undefined,
36
38
  ]
37
39
  .filter(Boolean)
@@ -4,7 +4,9 @@
4
4
  --unitone--row-gap: var(--unitone--gap);
5
5
  --unitone--threshold: var(--unitone--measure);
6
6
  --unitone--align-items: stretch;
7
+ --unitone--container-type: initial;
7
8
 
9
+ container-type: var(--unitone--container-type);
8
10
  display: flex;
9
11
  flex-wrap: wrap;
10
12
  column-gap: var(--unitone--column-gap);