@datum-cloud/activity-ui 0.7.1-dev.1fa076d → 0.7.1-dev.39d494f
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/index.esm.js +53 -11
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +53 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4710,7 +4710,13 @@ const createParseClassName = config => {
|
|
|
4710
4710
|
continue;
|
|
4711
4711
|
}
|
|
4712
4712
|
}
|
|
4713
|
-
if (currentCharacter === '[') bracketDepth++;else if (currentCharacter === ']') bracketDepth--;else if (currentCharacter === '(') parenDepth++;else if (currentCharacter === ')') parenDepth--;
|
|
4713
|
+
if (currentCharacter === '[') bracketDepth++;else if (currentCharacter === ']') bracketDepth--;else if (currentCharacter === '(') parenDepth++;else if (currentCharacter === ')') parenDepth--;else if (currentCharacter === '\\') index++;else if (currentCharacter === '"' || currentCharacter === "'") {
|
|
4714
|
+
// Quoted delimiters do not affect nesting or separate modifiers.
|
|
4715
|
+
while (++index < len) {
|
|
4716
|
+
const quotedCharacter = className[index];
|
|
4717
|
+
if (quotedCharacter === '\\') index++;else if (quotedCharacter === currentCharacter) break;
|
|
4718
|
+
}
|
|
4719
|
+
}
|
|
4714
4720
|
}
|
|
4715
4721
|
const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
|
|
4716
4722
|
// Inline important modifier check
|
|
@@ -4728,7 +4734,13 @@ const createParseClassName = config => {
|
|
|
4728
4734
|
baseClassName = baseClassNameWithImportantModifier.slice(1);
|
|
4729
4735
|
hasImportantModifier = true;
|
|
4730
4736
|
}
|
|
4731
|
-
|
|
4737
|
+
// `maybePostfixModifierPosition` is relative to `baseClassName`, so it must be shifted by
|
|
4738
|
+
// however much the important modifier shortened the name. A leading `!` is removed from
|
|
4739
|
+
// the front, which moves every following index down by one; the position was measured
|
|
4740
|
+
// against `baseClassNameWithImportantModifier`, so without this correction `!text-lg/7`
|
|
4741
|
+
// reports 8 instead of 7 and consumers slice `"text-lg/"`, matching no class group.
|
|
4742
|
+
const importantModifierOffset = hasImportantModifier && baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER) ? IMPORTANT_MODIFIER.length : 0;
|
|
4743
|
+
const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart - importantModifierOffset : undefined;
|
|
4732
4744
|
return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
|
|
4733
4745
|
};
|
|
4734
4746
|
if (prefix) {
|
|
@@ -4961,8 +4973,11 @@ const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
|
|
|
4961
4973
|
const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
|
|
4962
4974
|
const fractionRegex = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/;
|
|
4963
4975
|
const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
|
|
4964
|
-
|
|
4965
|
-
const
|
|
4976
|
+
// Includes Tailwind's `--spacing()` because Tailwind resolves it to `calc(var(--spacing) * n)` before detecting the value's type. Only a value starting with it counts: Tailwind treats an expression like `-1*--spacing(4)` outside of `calc()` as a color.
|
|
4977
|
+
const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|Q|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^--spacing\(.+\)|^0$/;
|
|
4978
|
+
// Case-insensitive because CSS function names are, and includes Tailwind's `--alpha()` because it resolves to a color.
|
|
4979
|
+
const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark|contrast-color|device-cmyk|--alpha)\(.+\)$/i;
|
|
4980
|
+
const maskPositionRegex = /^(?:_*[+-]?(?:\d|\.\d)|[\w-]+\(|_*(?:inherit|initial|revert(?:-layer)?|unset)_*$)/i;
|
|
4966
4981
|
// Shadow always begins with x and y offset separated by underscore optionally prepended by inset
|
|
4967
4982
|
const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
|
|
4968
4983
|
const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
|
|
@@ -4977,6 +4992,9 @@ const isLengthOnly = value =>
|
|
|
4977
4992
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
4978
4993
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
4979
4994
|
lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
|
|
4995
|
+
const isMaskPosition = value =>
|
|
4996
|
+
// Mask stops default to positions for variables and non-color CSS functions, including angles, so color functions need to be excluded explicitly.
|
|
4997
|
+
maskPositionRegex.test(value) && !colorFunctionRegex.test(value);
|
|
4980
4998
|
const isNever = () => false;
|
|
4981
4999
|
const isShadow = value => shadowRegex.test(value);
|
|
4982
5000
|
const isImage = value => imageRegex.test(value);
|
|
@@ -4985,6 +5003,7 @@ const isNamedContainerQuery = value => value.startsWith('@container') && (value[
|
|
|
4985
5003
|
const isArbitrarySize = value => getIsArbitraryValue(value, isLabelSize, isNever);
|
|
4986
5004
|
const isArbitraryValue = value => arbitraryValueRegex.test(value);
|
|
4987
5005
|
const isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
|
|
5006
|
+
const isArbitraryMaskPosition = value => getIsArbitraryValue(value, isLabelMaskPosition, isMaskPosition);
|
|
4988
5007
|
const isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);
|
|
4989
5008
|
const isArbitraryWeight = value => getIsArbitraryValue(value, isLabelWeight, isAny);
|
|
4990
5009
|
const isArbitraryFamilyName = value => getIsArbitraryValue(value, isLabelFamilyName, isNever);
|
|
@@ -4993,6 +5012,7 @@ const isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isIma
|
|
|
4993
5012
|
const isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow);
|
|
4994
5013
|
const isArbitraryVariable = value => arbitraryVariableRegex.test(value);
|
|
4995
5014
|
const isArbitraryVariableLength = value => getIsArbitraryVariable(value, isLabelLength);
|
|
5015
|
+
const isArbitraryVariableMaskPosition = value => getIsArbitraryVariable(value, isLabelMaskPosition, true);
|
|
4996
5016
|
const isArbitraryVariableFamilyName = value => getIsArbitraryVariable(value, isLabelFamilyName);
|
|
4997
5017
|
const isArbitraryVariablePosition = value => getIsArbitraryVariable(value, isLabelPosition);
|
|
4998
5018
|
const isArbitraryVariableSize = value => getIsArbitraryVariable(value, isLabelSize);
|
|
@@ -5025,6 +5045,7 @@ const isLabelPosition = label => label === 'position' || label === 'percentage';
|
|
|
5025
5045
|
const isLabelImage = label => label === 'image' || label === 'url';
|
|
5026
5046
|
const isLabelSize = label => label === 'length' || label === 'size' || label === 'bg-size';
|
|
5027
5047
|
const isLabelLength = label => label === 'length';
|
|
5048
|
+
const isLabelMaskPosition = label => label !== 'color';
|
|
5028
5049
|
const isLabelNumber = label => label === 'number';
|
|
5029
5050
|
const isLabelFamilyName = label => label === 'family-name';
|
|
5030
5051
|
const isLabelWeight = label => label === 'number' || label === 'weight';
|
|
@@ -5105,7 +5126,7 @@ const getDefaultConfig = () => {
|
|
|
5105
5126
|
const scaleBorderWidth = () => ['', isNumber, isArbitraryVariableLength, isArbitraryLength];
|
|
5106
5127
|
const scaleLineStyle = () => ['solid', 'dashed', 'dotted', 'double'];
|
|
5107
5128
|
const scaleBlendMode = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];
|
|
5108
|
-
const scaleMaskImagePosition = () => [isNumber, isPercent,
|
|
5129
|
+
const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariableMaskPosition, isArbitraryMaskPosition];
|
|
5109
5130
|
const scaleBlur = () => [
|
|
5110
5131
|
// Deprecated since Tailwind CSS v4.0.0
|
|
5111
5132
|
'', 'none', themeBlur, isArbitraryVariable, isArbitraryValue];
|
|
@@ -5216,7 +5237,12 @@ const getDefaultConfig = () => {
|
|
|
5216
5237
|
* Screen Reader Only
|
|
5217
5238
|
* @see https://tailwindcss.com/docs/display#screen-reader-only
|
|
5218
5239
|
*/
|
|
5219
|
-
sr: ['sr-only'
|
|
5240
|
+
sr: ['sr-only'],
|
|
5241
|
+
/**
|
|
5242
|
+
* Not Screen Reader Only
|
|
5243
|
+
* @see https://tailwindcss.com/docs/display#screen-reader-only
|
|
5244
|
+
*/
|
|
5245
|
+
'not-sr': ['not-sr-only'],
|
|
5220
5246
|
/**
|
|
5221
5247
|
* Floats
|
|
5222
5248
|
* @see https://tailwindcss.com/docs/float
|
|
@@ -5427,7 +5453,7 @@ const getDefaultConfig = () => {
|
|
|
5427
5453
|
* @see https://tailwindcss.com/docs/flex
|
|
5428
5454
|
*/
|
|
5429
5455
|
flex: [{
|
|
5430
|
-
flex: [isNumber, isFraction, 'auto', 'initial', 'none', isArbitraryValue]
|
|
5456
|
+
flex: [isNumber, isFraction, 'auto', 'initial', 'none', isArbitraryVariable, isArbitraryValue]
|
|
5431
5457
|
}],
|
|
5432
5458
|
/**
|
|
5433
5459
|
* Flex Grow
|
|
@@ -5983,7 +6009,7 @@ const getDefaultConfig = () => {
|
|
|
5983
6009
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
5984
6010
|
*/
|
|
5985
6011
|
'line-clamp': [{
|
|
5986
|
-
'line-clamp': [isNumber, 'none', isArbitraryVariable,
|
|
6012
|
+
'line-clamp': [isNumber, 'none', isArbitraryVariable, isArbitraryValue]
|
|
5987
6013
|
}],
|
|
5988
6014
|
/**
|
|
5989
6015
|
* Line Height
|
|
@@ -6053,7 +6079,7 @@ const getDefaultConfig = () => {
|
|
|
6053
6079
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
6054
6080
|
*/
|
|
6055
6081
|
'text-decoration-thickness': [{
|
|
6056
|
-
decoration: [isNumber, 'from-font', 'auto',
|
|
6082
|
+
decoration: [isNumber, 'from-font', 'auto', isArbitraryVariableLength, isArbitraryVariablePosition, isArbitraryLength]
|
|
6057
6083
|
}],
|
|
6058
6084
|
/**
|
|
6059
6085
|
* Text Decoration Color
|
|
@@ -6828,7 +6854,7 @@ const getDefaultConfig = () => {
|
|
|
6828
6854
|
'mask-radial-to': scaleColor()
|
|
6829
6855
|
}],
|
|
6830
6856
|
'mask-image-radial-shape': [{
|
|
6831
|
-
|
|
6857
|
+
mask: ['circle', 'ellipse']
|
|
6832
6858
|
}],
|
|
6833
6859
|
'mask-image-radial-size': [{
|
|
6834
6860
|
'mask-radial': [{
|
|
@@ -7676,6 +7702,9 @@ const getDefaultConfig = () => {
|
|
|
7676
7702
|
'inset-y': ['inset-bs', 'inset-be', 'top', 'bottom'],
|
|
7677
7703
|
flex: ['basis', 'grow', 'shrink'],
|
|
7678
7704
|
gap: ['gap-x', 'gap-y'],
|
|
7705
|
+
'place-content': ['align-content', 'justify-content'],
|
|
7706
|
+
'place-items': ['align-items', 'justify-items'],
|
|
7707
|
+
'place-self': ['align-self', 'justify-self'],
|
|
7679
7708
|
p: ['px', 'py', 'ps', 'pe', 'pbs', 'pbe', 'pt', 'pr', 'pb', 'pl'],
|
|
7680
7709
|
px: ['ps', 'pe', 'pr', 'pl'],
|
|
7681
7710
|
py: ['pbs', 'pbe', 'pt', 'pb'],
|
|
@@ -7683,7 +7712,6 @@ const getDefaultConfig = () => {
|
|
|
7683
7712
|
mx: ['ms', 'me', 'mr', 'ml'],
|
|
7684
7713
|
my: ['mbs', 'mbe', 'mt', 'mb'],
|
|
7685
7714
|
size: ['w', 'h'],
|
|
7686
|
-
'font-size': ['leading'],
|
|
7687
7715
|
'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],
|
|
7688
7716
|
'fvn-ordinal': ['fvn-normal'],
|
|
7689
7717
|
'fvn-slashed-zero': ['fvn-normal'],
|
|
@@ -7691,6 +7719,11 @@ const getDefaultConfig = () => {
|
|
|
7691
7719
|
'fvn-spacing': ['fvn-normal'],
|
|
7692
7720
|
'fvn-fraction': ['fvn-normal'],
|
|
7693
7721
|
'line-clamp': ['display', 'overflow'],
|
|
7722
|
+
// Tailwind emits these utilities after `sr-only`, so keeping an earlier `relative` or `p-4` undoes the hide. Removing them is safe because `not-sr-only` resets the same properties when the element is revealed.
|
|
7723
|
+
// Border width and min/max sizes stay independent because `not-sr-only` doesn't reset them, so they still apply once the element is revealed. While hidden they don't undo the hide: the element is absolutely positioned and clipped away.
|
|
7724
|
+
// `not-sr-only` only conflicts with `sr-only`: Tailwind emits these utilities after it too, so an earlier `relative` or `p-4` is meant to apply once the element is visible.
|
|
7725
|
+
sr: ['not-sr', 'position', 'size', 'w', 'h', 'p', 'px', 'py', 'ps', 'pe', 'pbs', 'pbe', 'pt', 'pr', 'pb', 'pl', 'm', 'mx', 'my', 'ms', 'me', 'mbs', 'mbe', 'mt', 'mr', 'mb', 'ml', 'overflow', 'overflow-x', 'overflow-y', 'whitespace'],
|
|
7726
|
+
'not-sr': ['sr'],
|
|
7694
7727
|
rounded: ['rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl'],
|
|
7695
7728
|
'rounded-s': ['rounded-ss', 'rounded-es'],
|
|
7696
7729
|
'rounded-e': ['rounded-se', 'rounded-ee'],
|
|
@@ -7705,6 +7738,14 @@ const getDefaultConfig = () => {
|
|
|
7705
7738
|
'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-bs', 'border-color-be', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
|
|
7706
7739
|
'border-color-x': ['border-color-s', 'border-color-e', 'border-color-r', 'border-color-l'],
|
|
7707
7740
|
'border-color-y': ['border-color-bs', 'border-color-be', 'border-color-t', 'border-color-b'],
|
|
7741
|
+
'mask-image-x-from-pos': ['mask-image-r-from-pos', 'mask-image-l-from-pos'],
|
|
7742
|
+
'mask-image-x-to-pos': ['mask-image-r-to-pos', 'mask-image-l-to-pos'],
|
|
7743
|
+
'mask-image-x-from-color': ['mask-image-r-from-color', 'mask-image-l-from-color'],
|
|
7744
|
+
'mask-image-x-to-color': ['mask-image-r-to-color', 'mask-image-l-to-color'],
|
|
7745
|
+
'mask-image-y-from-pos': ['mask-image-t-from-pos', 'mask-image-b-from-pos'],
|
|
7746
|
+
'mask-image-y-to-pos': ['mask-image-t-to-pos', 'mask-image-b-to-pos'],
|
|
7747
|
+
'mask-image-y-from-color': ['mask-image-t-from-color', 'mask-image-b-from-color'],
|
|
7748
|
+
'mask-image-y-to-color': ['mask-image-t-to-color', 'mask-image-b-to-color'],
|
|
7708
7749
|
translate: ['translate-x', 'translate-y', 'translate-none'],
|
|
7709
7750
|
'translate-none': ['translate', 'translate-x', 'translate-y', 'translate-z'],
|
|
7710
7751
|
'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mbs', 'scroll-mbe', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],
|
|
@@ -7719,6 +7760,7 @@ const getDefaultConfig = () => {
|
|
|
7719
7760
|
'touch-pz': ['touch']
|
|
7720
7761
|
},
|
|
7721
7762
|
conflictingClassGroupModifiers: {
|
|
7763
|
+
// Only a font size with a line-height modifier like `text-lg/7` sets `line-height` directly. Without a modifier, font sizes don't conflict with `leading-*`: arbitrary ones only set `font-size`, and the theme ones set `line-height: var(--tw-leading, …)`, so an earlier `leading-*` keeps applying in Tailwind's CSS.
|
|
7722
7764
|
'font-size': ['leading']
|
|
7723
7765
|
},
|
|
7724
7766
|
postfixLookupClassGroups: ['container-type'],
|