@likec4/styles 1.59.3 → 1.59.4

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/dev.mjs CHANGED
@@ -1,8 +1,4 @@
1
1
  import { likec4preset } from '@likec4/style-preset/src'
2
- import {
3
- pluginRemoveNegativeSpacing,
4
- pluginStrictTokensScope,
5
- } from '@pandabox/panda-plugins'
6
2
  import { defineConfig as pandaDefineConfig } from '@pandacss/dev'
7
3
 
8
4
  /**
@@ -18,48 +14,9 @@ export function defineConfig(config) {
18
14
  ],
19
15
  cssVarRoot: ':where(:root,:host)',
20
16
  forceConsistentTypeExtension: true,
21
- // hash: isProduction,
22
- // globalVars: {},
23
- // hash: true,
24
17
  strictTokens: true,
25
18
  validation: 'error',
26
19
  jsxFramework: 'react',
27
- plugins: [
28
- // // @ts-ignore
29
- // // pluginRemoveUnusedCss(),
30
- // // @ts-ignore
31
- pluginStrictTokensScope({
32
- categories: [
33
- 'fonts',
34
- 'colors',
35
- 'animations',
36
- 'easings',
37
- 'spacing',
38
- 'fontWeights',
39
- // 'cursor',
40
- // 'fontSizes',
41
- // 'sizes',
42
- // 'lineHeights',
43
- 'shadows',
44
- // 'zIndex',
45
- // 'opacity',
46
- 'radii',
47
- // 'borders',
48
- // 'durations',
49
- // 'letterSpacings',
50
- // 'gradients',
51
- // 'assets',
52
- // 'borderWidths',
53
- // 'aspectRatios',
54
- 'containerNames',
55
- ],
56
- props: [
57
- 'textStyle',
58
- 'layerStyle',
59
- ],
60
- }),
61
- pluginRemoveNegativeSpacing({ spacingTokenType: true, tokenType: true }),
62
- ],
63
20
  ...config,
64
21
  })
65
22
  }
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable */
2
- import type { DistributiveOmit, HTMLPandaProps, JsxStyleProps, Pretty } from '../types';
2
+ import type { DistributiveOmit, JsxStyleProps, Pretty } from '../types';
3
3
 
4
4
  declare const isCssProperty: (value: string) => boolean;
5
5
 
package/dist/jsx/txt.mjs CHANGED
@@ -5,7 +5,7 @@ import { getTxtStyle } from '../patterns/txt.mjs';
5
5
  import { styled } from './factory.mjs';
6
6
 
7
7
  export const Txt = /* @__PURE__ */ forwardRef(function Txt(props, ref) {
8
- const [patternProps, restProps] = splitProps(props, ["inline","dimmed","noUserSelect","lh","size","likec4color"])
8
+ const [patternProps, restProps] = splitProps(props, ["inline","medium","semibold","dimmed","nouserselect","lh","size","fw","likec4color"])
9
9
 
10
10
  const styleProps = getTxtStyle(patternProps)
11
11
  const mergedProps = { ref, ...styleProps, ...restProps }
@@ -7,10 +7,13 @@ import type { Tokens } from '../tokens/index.d.mts';
7
7
 
8
8
  export interface TxtProperties {
9
9
  inline?: ConditionalValue<boolean>
10
+ medium?: ConditionalValue<boolean>
11
+ semibold?: ConditionalValue<boolean>
10
12
  dimmed?: ConditionalValue<boolean>
11
- noUserSelect?: ConditionalValue<boolean>
13
+ nouserselect?: ConditionalValue<boolean>
12
14
  lh?: ConditionalValue<Tokens["lineHeights"]>
13
15
  size?: ConditionalValue<Tokens["fontSizes"]>
16
+ fw?: ConditionalValue<Tokens["fontWeights"]>
14
17
  likec4color?: ConditionalValue<"amber" | "blue" | "gray" | "slate" | "green" | "indigo" | "muted" | "primary" | "red" | "secondary" | "sky">
15
18
  }
16
19
 
@@ -3,27 +3,32 @@ import { css } from '../css/index.mjs';
3
3
 
4
4
  const txtConfig = {
5
5
  transform(props, _helpers) {
6
- const { inline, size, dimmed, lh, likec4color, noUserSelect, ...rest } = props;
6
+ const { inline, size, dimmed, lh, fw, likec4color, nouserselect, medium, semibold, ...rest } = props;
7
7
  if (dimmed && likec4color) {
8
8
  throw new Error("dimmed and likec4color are mutually exclusive");
9
9
  }
10
- const hasNoTextStyle = rest["textStyle"] == null;
10
+ const hasNoTextStyle = !(typeof rest["textStyle"] === "string" && rest["textStyle"] !== "");
11
+ const hasLhOrFw = !!lh || !!fw;
11
12
  return {
12
13
  cursor: "default",
13
14
  ...inline && { display: "inline-block" },
14
15
  ...likec4color && { "data-likec4-color": likec4color },
15
- ...noUserSelect && { userSelect: "none" },
16
- ...lh && { lineHeight: lh },
17
- ...hasNoTextStyle ? {
16
+ ...nouserselect && { userSelect: "none" },
17
+ ...hasNoTextStyle && !hasLhOrFw && {
18
18
  textStyle: dimmed ? `dimmed.${size}` : size
19
- } : {
20
- fontSize: size,
21
- color: dimmed ? "text.dimmed" : "text"
22
19
  },
20
+ ...hasNoTextStyle && hasLhOrFw && {
21
+ fontSize: size
22
+ // color: dimmed ? 'text.dimmed' : 'text',
23
+ },
24
+ ...medium && { fontWeight: "medium" },
25
+ ...semibold && { fontWeight: "semibold" },
26
+ ...lh && { lineHeight: lh },
27
+ ...fw && { fontWeight: fw },
23
28
  ...rest
24
29
  };
25
30
  },
26
- defaultValues:{inline:false,dimmed:false,size:'md',noUserSelect:false}}
31
+ defaultValues:{size:'md'}}
27
32
 
28
33
  export const getTxtStyle = (styles = {}) => {
29
34
  const _styles = getPatternStyles(txtConfig, styles)
@@ -0,0 +1,31 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index.d.mts';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types.d.mts';
4
+
5
+ interface EmptyBoxVariant {
6
+ fullsize: boolean
7
+ }
8
+
9
+ type EmptyBoxVariantMap = {
10
+ [key in keyof EmptyBoxVariant]: Array<EmptyBoxVariant[key]>
11
+ }
12
+
13
+
14
+
15
+ export type EmptyBoxVariantProps = {
16
+ [key in keyof EmptyBoxVariant]?: ConditionalValue<EmptyBoxVariant[key]> | undefined
17
+ }
18
+
19
+ export interface EmptyBoxRecipe {
20
+
21
+ __type: EmptyBoxVariantProps
22
+ (props?: EmptyBoxVariantProps): string
23
+ raw: (props?: EmptyBoxVariantProps) => EmptyBoxVariantProps
24
+ variantMap: EmptyBoxVariantMap
25
+ variantKeys: Array<keyof EmptyBoxVariant>
26
+ splitVariantProps<Props extends EmptyBoxVariantProps>(props: Props): [EmptyBoxVariantProps, Pretty<DistributiveOmit<Props, keyof EmptyBoxVariantProps>>]
27
+ getVariantProps: (props?: EmptyBoxVariantProps) => EmptyBoxVariantProps
28
+ }
29
+
30
+
31
+ export declare const emptyBox: EmptyBoxRecipe
@@ -0,0 +1,28 @@
1
+ import { memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe, mergeRecipes } from './create-recipe.mjs';
3
+
4
+ const emptyBoxFn = /* @__PURE__ */ createRecipe('empty-box', {}, [])
5
+
6
+ const emptyBoxVariantMap = {
7
+ "fullsize": [
8
+ "true"
9
+ ]
10
+ }
11
+
12
+ const emptyBoxVariantKeys = Object.keys(emptyBoxVariantMap)
13
+
14
+ export const emptyBox = /* @__PURE__ */ Object.assign(memo(emptyBoxFn.recipeFn), {
15
+ __recipe__: true,
16
+ __name__: 'emptyBox',
17
+ __getCompoundVariantCss__: emptyBoxFn.__getCompoundVariantCss__,
18
+ raw: (props) => props,
19
+ variantKeys: emptyBoxVariantKeys,
20
+ variantMap: emptyBoxVariantMap,
21
+ merge(recipe) {
22
+ return mergeRecipes(this, recipe)
23
+ },
24
+ splitVariantProps(props) {
25
+ return splitProps(props, emptyBoxVariantKeys)
26
+ },
27
+ getVariantProps: emptyBoxFn.getVariantProps,
28
+ })
@@ -0,0 +1,33 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index.d.mts';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types.d.mts';
4
+
5
+ interface FloatingWindowVariant {
6
+
7
+ }
8
+
9
+ type FloatingWindowVariantMap = {
10
+ [key in keyof FloatingWindowVariant]: Array<FloatingWindowVariant[key]>
11
+ }
12
+
13
+
14
+
15
+ export type FloatingWindowVariantProps = {
16
+ [key in keyof FloatingWindowVariant]?: ConditionalValue<FloatingWindowVariant[key]> | undefined
17
+ }
18
+
19
+ export interface FloatingWindowRecipe {
20
+
21
+ __type: FloatingWindowVariantProps
22
+ (props?: FloatingWindowVariantProps): string
23
+ raw: (props?: FloatingWindowVariantProps) => FloatingWindowVariantProps
24
+ variantMap: FloatingWindowVariantMap
25
+ variantKeys: Array<keyof FloatingWindowVariant>
26
+ splitVariantProps<Props extends FloatingWindowVariantProps>(props: Props): [FloatingWindowVariantProps, Pretty<DistributiveOmit<Props, keyof FloatingWindowVariantProps>>]
27
+ getVariantProps: (props?: FloatingWindowVariantProps) => FloatingWindowVariantProps
28
+ }
29
+
30
+ /**
31
+ * Recipe for Floating Window
32
+ */
33
+ export declare const floatingWindow: FloatingWindowRecipe
@@ -0,0 +1,24 @@
1
+ import { memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe, mergeRecipes } from './create-recipe.mjs';
3
+
4
+ const floatingWindowFn = /* @__PURE__ */ createRecipe('likec4-floating-window', {}, [])
5
+
6
+ const floatingWindowVariantMap = {}
7
+
8
+ const floatingWindowVariantKeys = Object.keys(floatingWindowVariantMap)
9
+
10
+ export const floatingWindow = /* @__PURE__ */ Object.assign(memo(floatingWindowFn.recipeFn), {
11
+ __recipe__: true,
12
+ __name__: 'floatingWindow',
13
+ __getCompoundVariantCss__: floatingWindowFn.__getCompoundVariantCss__,
14
+ raw: (props) => props,
15
+ variantKeys: floatingWindowVariantKeys,
16
+ variantMap: floatingWindowVariantMap,
17
+ merge(recipe) {
18
+ return mergeRecipes(this, recipe)
19
+ },
20
+ splitVariantProps(props) {
21
+ return splitProps(props, floatingWindowVariantKeys)
22
+ },
23
+ getVariantProps: floatingWindowFn.getVariantProps,
24
+ })
@@ -8,6 +8,8 @@ export * from './edge-path.d.mts';
8
8
  export * from './element-node.d.mts';
9
9
  export * from './element-node-data.d.mts';
10
10
  export * from './element-shape-recipe.d.mts';
11
+ export * from './empty-box.d.mts';
12
+ export * from './floating-window.d.mts';
11
13
  export * from './likec4tag.d.mts';
12
14
  export * from './markdown-block.d.mts';
13
15
  export * from './navigation-panel-action-icon.d.mts';
@@ -7,6 +7,8 @@ export * from './edge-path.mjs';
7
7
  export * from './element-node.mjs';
8
8
  export * from './element-node-data.mjs';
9
9
  export * from './element-shape-recipe.mjs';
10
+ export * from './empty-box.mjs';
11
+ export * from './floating-window.mjs';
10
12
  export * from './likec4tag.mjs';
11
13
  export * from './markdown-block.mjs';
12
14
  export * from './navigation-panel-action-icon.mjs';