thread-ui 0.13.0 → 0.14.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 (166) hide show
  1. package/README.md +13 -7
  2. package/dist/components/content-display/carousel/carousel-context.d.ts +117 -9
  3. package/dist/components/content-display/carousel/carousel.d.ts +1 -1
  4. package/dist/components/content-display/carousel/carousel.js +19 -4
  5. package/dist/components/content-display/carousel/carousel.js.map +1 -1
  6. package/dist/components/content-display/carousel/carousel.types.d.ts +10 -9
  7. package/dist/components/content-display/carousel/components/carousel-controls.js +1 -1
  8. package/dist/components/content-display/carousel/components/carousel-controls.js.map +1 -1
  9. package/dist/components/content-display/carousel/components/carousel-header.d.ts +1 -1
  10. package/dist/components/content-display/carousel/components/carousel-header.js +6 -13
  11. package/dist/components/content-display/carousel/components/carousel-header.js.map +1 -1
  12. package/dist/components/content-display/carousel/components/carousel-item.js +1 -5
  13. package/dist/components/content-display/carousel/components/carousel-item.js.map +1 -1
  14. package/dist/components/content-display/gallery/components/gallery-content.js +3 -4
  15. package/dist/components/content-display/gallery/components/gallery-content.js.map +1 -1
  16. package/dist/components/content-display/gallery/gallery-context.d.ts +117 -9
  17. package/dist/components/content-display/gallery/gallery.d.ts +1 -1
  18. package/dist/components/content-display/gallery/gallery.js +2 -1
  19. package/dist/components/content-display/gallery/gallery.js.map +1 -1
  20. package/dist/components/content-display/gallery/gallery.types.d.ts +4 -5
  21. package/dist/components/content-display/lightbox/components/lightbox-title.js +5 -8
  22. package/dist/components/content-display/lightbox/components/lightbox-title.js.map +1 -1
  23. package/dist/components/content-display/lightbox/lightbox-context.d.ts +44 -2
  24. package/dist/components/content-display/lightbox/lightbox.types.d.ts +1 -1
  25. package/dist/components/layouts/column-layout/column-layout.d.ts +2 -2
  26. package/dist/components/layouts/column-layout/column-layout.js +6 -6
  27. package/dist/components/layouts/column-layout/column-layout.js.map +1 -1
  28. package/dist/components/layouts/column-layout/column-layout.types.d.ts +4 -7
  29. package/dist/components/layouts/footer/footer.d.ts +3 -3
  30. package/dist/components/layouts/footer/footer.js +4 -4
  31. package/dist/components/layouts/footer/footer.js.map +1 -1
  32. package/dist/components/layouts/footer/footer.types.d.ts +1 -1
  33. package/dist/components/layouts/layout-component.types.d.ts +2 -1
  34. package/dist/components/layouts/masonry-layout/masonry-layout.d.ts +1 -1
  35. package/dist/components/layouts/masonry-layout/masonry-layout.js +3 -3
  36. package/dist/components/layouts/masonry-layout/masonry-layout.js.map +1 -1
  37. package/dist/components/layouts/masonry-layout/masonry-layout.types.d.ts +4 -6
  38. package/dist/components/media-display/info-card/info-card.js +2 -2
  39. package/dist/components/media-display/info-card/info-card.js.map +1 -1
  40. package/dist/components/media-display/info-card/info-card.types.d.ts +1 -1
  41. package/dist/components/typography/heading/heading.js +1 -1
  42. package/dist/components/typography/heading/heading.js.map +1 -1
  43. package/dist/components/typography/page-header/page-header.d.ts +3 -3
  44. package/dist/components/typography/page-header/page-header.js +5 -5
  45. package/dist/components/typography/page-header/page-header.js.map +1 -1
  46. package/dist/components/typography/page-header/page-header.types.d.ts +3 -3
  47. package/dist/components/ui/button/button-recipe.js +11 -10
  48. package/dist/components/ui/button/button-recipe.js.map +1 -1
  49. package/dist/components/ui/card/card.d.ts +1 -1
  50. package/dist/components/ui/card/card.js +14 -9
  51. package/dist/components/ui/card/card.js.map +1 -1
  52. package/dist/components/ui/card/card.types.d.ts +2 -0
  53. package/dist/components/ui/loaders/skeleton-layout/skeleton-layout.types.d.ts +1 -1
  54. package/dist/components/ui/modal/modal-context.d.ts +2 -2
  55. package/dist/internal-components/content-header/content-header.d.ts +12 -0
  56. package/dist/internal-components/content-header/content-header.js +36 -0
  57. package/dist/internal-components/content-header/content-header.js.map +1 -0
  58. package/dist/internal-components/content-header/content-header.types.d.ts +32 -0
  59. package/dist/internal-components/content-header/content-header.types.js +2 -0
  60. package/dist/internal-components/content-header/content-header.types.js.map +1 -0
  61. package/dist/internal-components/content-header/index.d.ts +2 -0
  62. package/dist/internal-components/content-header/index.js +2 -0
  63. package/dist/internal-components/content-header/index.js.map +1 -0
  64. package/dist/internal-components/index.d.ts +2 -0
  65. package/dist/internal-components/index.js +2 -0
  66. package/dist/internal-components/index.js.map +1 -1
  67. package/dist/internal-components/modal-primitive/modal-primitive.d.ts +1 -1
  68. package/dist/internal-components/modal-primitive/modal-primitive.js +3 -2
  69. package/dist/internal-components/modal-primitive/modal-primitive.js.map +1 -1
  70. package/dist/internal-components/modal-primitive/modal-primitive.types.d.ts +2 -0
  71. package/dist/internal-components/surface/index.d.ts +2 -0
  72. package/dist/internal-components/surface/index.js +2 -0
  73. package/dist/internal-components/surface/index.js.map +1 -0
  74. package/dist/internal-components/surface/surface.d.ts +3 -0
  75. package/dist/internal-components/surface/surface.js +11 -0
  76. package/dist/internal-components/surface/surface.js.map +1 -0
  77. package/dist/internal-components/surface/surface.types.d.ts +15 -0
  78. package/dist/internal-components/surface/surface.types.js +2 -0
  79. package/dist/internal-components/surface/surface.types.js.map +1 -0
  80. package/dist/styled-system/recipes/button.js +6 -6
  81. package/dist/styled-system/tokens/index.js +8 -0
  82. package/dist/styled-system/tokens/tokens.d.ts +1 -1
  83. package/dist/styles/panda.css +1 -1
  84. package/dist/styles/theme.css +6 -0
  85. package/dist/theme/css-name-configurations/theme-css-names.d.ts +1 -0
  86. package/dist/theme/css-name-configurations/theme-css-names.js +3 -0
  87. package/dist/theme/css-name-configurations/theme-css-names.js.map +1 -1
  88. package/dist/theme/default-theme.js +2 -0
  89. package/dist/theme/default-theme.js.map +1 -1
  90. package/dist/theme/theme-surface-system.d.ts +2 -1
  91. package/dist/theme/theme-surface-system.js.map +1 -1
  92. package/dist/types/colors/utility-color-options.types.d.ts +1 -1
  93. package/dist/types/theme/theme.types.d.ts +1 -0
  94. package/dist/utils/theme-utilities/get-colored-text-color/get-colored-text-color.js +2 -0
  95. package/dist/utils/theme-utilities/get-colored-text-color/get-colored-text-color.js.map +1 -1
  96. package/dist/utils/theme-utilities/get-surface-styles/get-surface-styles.d.ts +2 -3
  97. package/dist/utils/theme-utilities/get-surface-styles/get-surface-styles.js.map +1 -1
  98. package/dist/utils/theme-utilities/get-text-color-styles/get-text-color-styles.js +1 -0
  99. package/dist/utils/theme-utilities/get-text-color-styles/get-text-color-styles.js.map +1 -1
  100. package/dist/utils/theme-utilities/get-utility-size-value/get-utility-size-value.d.ts +1 -1
  101. package/package.json +1 -1
  102. package/dist/styled-system/css/conditions..js +0 -36
  103. package/dist/styled-system/css/conditions.mjs +0 -36
  104. package/dist/styled-system/css/css..js +0 -45
  105. package/dist/styled-system/css/css.mjs +0 -45
  106. package/dist/styled-system/css/cva..js +0 -87
  107. package/dist/styled-system/css/cva.mjs +0 -87
  108. package/dist/styled-system/css/cx..js +0 -15
  109. package/dist/styled-system/css/cx.mjs +0 -15
  110. package/dist/styled-system/css/index..js +0 -4
  111. package/dist/styled-system/css/index.mjs +0 -4
  112. package/dist/styled-system/css/sva..js +0 -46
  113. package/dist/styled-system/css/sva.mjs +0 -46
  114. package/dist/styled-system/helpers..js +0 -316
  115. package/dist/styled-system/helpers.mjs +0 -316
  116. package/dist/styled-system/patterns/aspect-ratio..js +0 -38
  117. package/dist/styled-system/patterns/aspect-ratio.mjs +0 -38
  118. package/dist/styled-system/patterns/bleed..js +0 -24
  119. package/dist/styled-system/patterns/bleed.mjs +0 -24
  120. package/dist/styled-system/patterns/box..js +0 -15
  121. package/dist/styled-system/patterns/box.mjs +0 -15
  122. package/dist/styled-system/patterns/center..js +0 -21
  123. package/dist/styled-system/patterns/center.mjs +0 -21
  124. package/dist/styled-system/patterns/circle..js +0 -25
  125. package/dist/styled-system/patterns/circle.mjs +0 -25
  126. package/dist/styled-system/patterns/container..js +0 -22
  127. package/dist/styled-system/patterns/container.mjs +0 -22
  128. package/dist/styled-system/patterns/cq..js +0 -21
  129. package/dist/styled-system/patterns/cq.mjs +0 -21
  130. package/dist/styled-system/patterns/divider..js +0 -25
  131. package/dist/styled-system/patterns/divider.mjs +0 -25
  132. package/dist/styled-system/patterns/flex..js +0 -26
  133. package/dist/styled-system/patterns/flex.mjs +0 -26
  134. package/dist/styled-system/patterns/float..js +0 -52
  135. package/dist/styled-system/patterns/float.mjs +0 -52
  136. package/dist/styled-system/patterns/grid-item..js +0 -25
  137. package/dist/styled-system/patterns/grid-item.mjs +0 -25
  138. package/dist/styled-system/patterns/grid..js +0 -27
  139. package/dist/styled-system/patterns/grid.mjs +0 -27
  140. package/dist/styled-system/patterns/hstack..js +0 -24
  141. package/dist/styled-system/patterns/hstack.mjs +0 -24
  142. package/dist/styled-system/patterns/index..js +0 -20
  143. package/dist/styled-system/patterns/index.mjs +0 -20
  144. package/dist/styled-system/patterns/link-overlay..js +0 -24
  145. package/dist/styled-system/patterns/link-overlay.mjs +0 -24
  146. package/dist/styled-system/patterns/spacer..js +0 -21
  147. package/dist/styled-system/patterns/spacer.mjs +0 -21
  148. package/dist/styled-system/patterns/square..js +0 -24
  149. package/dist/styled-system/patterns/square.mjs +0 -24
  150. package/dist/styled-system/patterns/stack..js +0 -24
  151. package/dist/styled-system/patterns/stack.mjs +0 -24
  152. package/dist/styled-system/patterns/visually-hidden..js +0 -18
  153. package/dist/styled-system/patterns/visually-hidden.mjs +0 -18
  154. package/dist/styled-system/patterns/vstack..js +0 -24
  155. package/dist/styled-system/patterns/vstack.mjs +0 -24
  156. package/dist/styled-system/patterns/wrap..js +0 -25
  157. package/dist/styled-system/patterns/wrap.mjs +0 -25
  158. package/dist/styled-system/recipes/button..js +0 -445
  159. package/dist/styled-system/recipes/button.mjs +0 -445
  160. package/dist/styled-system/recipes/create-recipe..js +0 -82
  161. package/dist/styled-system/recipes/create-recipe.mjs +0 -82
  162. package/dist/styled-system/recipes/index..js +0 -1
  163. package/dist/styled-system/recipes/index.mjs +0 -1
  164. package/dist/styled-system/styles.css +0 -1
  165. package/dist/styled-system/tokens/index..js +0 -2104
  166. package/dist/styled-system/tokens/index.mjs +0 -2164
@@ -1,24 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers..js';
2
- import { css } from '../css/index..js';
3
-
4
- const bleedConfig = {
5
- transform(props, { map, isCssUnit, isCssVar }) {
6
- const { inline, block, ...rest } = props;
7
- const valueFn = (v) => isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
8
- return {
9
- "--bleed-x": map(inline, valueFn),
10
- "--bleed-y": map(block, valueFn),
11
- marginInline: "calc(var(--bleed-x, 0) * -1)",
12
- marginBlock: "calc(var(--bleed-y, 0) * -1)",
13
- ...rest
14
- };
15
- },
16
- defaultValues:{inline:'0',block:'0'}}
17
-
18
- export const getBleedStyle = (styles = {}) => {
19
- const _styles = getPatternStyles(bleedConfig, styles)
20
- return bleedConfig.transform(_styles, patternFns)
21
- }
22
-
23
- export const bleed = (styles) => css(getBleedStyle(styles))
24
- bleed.raw = getBleedStyle
@@ -1,24 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers.mjs';
2
- import { css } from '../css/index.mjs';
3
-
4
- const bleedConfig = {
5
- transform(props, { map, isCssUnit, isCssVar }) {
6
- const { inline, block, ...rest } = props;
7
- const valueFn = (v) => isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
8
- return {
9
- "--bleed-x": map(inline, valueFn),
10
- "--bleed-y": map(block, valueFn),
11
- marginInline: "calc(var(--bleed-x, 0) * -1)",
12
- marginBlock: "calc(var(--bleed-y, 0) * -1)",
13
- ...rest
14
- };
15
- },
16
- defaultValues:{inline:'0',block:'0'}}
17
-
18
- export const getBleedStyle = (styles = {}) => {
19
- const _styles = getPatternStyles(bleedConfig, styles)
20
- return bleedConfig.transform(_styles, patternFns)
21
- }
22
-
23
- export const bleed = (styles) => css(getBleedStyle(styles))
24
- bleed.raw = getBleedStyle
@@ -1,15 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers..js';
2
- import { css } from '../css/index..js';
3
-
4
- const boxConfig = {
5
- transform(props) {
6
- return props;
7
- }}
8
-
9
- export const getBoxStyle = (styles = {}) => {
10
- const _styles = getPatternStyles(boxConfig, styles)
11
- return boxConfig.transform(_styles, patternFns)
12
- }
13
-
14
- export const box = (styles) => css(getBoxStyle(styles))
15
- box.raw = getBoxStyle
@@ -1,15 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers.mjs';
2
- import { css } from '../css/index.mjs';
3
-
4
- const boxConfig = {
5
- transform(props) {
6
- return props;
7
- }}
8
-
9
- export const getBoxStyle = (styles = {}) => {
10
- const _styles = getPatternStyles(boxConfig, styles)
11
- return boxConfig.transform(_styles, patternFns)
12
- }
13
-
14
- export const box = (styles) => css(getBoxStyle(styles))
15
- box.raw = getBoxStyle
@@ -1,21 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers..js';
2
- import { css } from '../css/index..js';
3
-
4
- const centerConfig = {
5
- transform(props) {
6
- const { inline, ...rest } = props;
7
- return {
8
- display: inline ? "inline-flex" : "flex",
9
- alignItems: "center",
10
- justifyContent: "center",
11
- ...rest
12
- };
13
- }}
14
-
15
- export const getCenterStyle = (styles = {}) => {
16
- const _styles = getPatternStyles(centerConfig, styles)
17
- return centerConfig.transform(_styles, patternFns)
18
- }
19
-
20
- export const center = (styles) => css(getCenterStyle(styles))
21
- center.raw = getCenterStyle
@@ -1,21 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers.mjs';
2
- import { css } from '../css/index.mjs';
3
-
4
- const centerConfig = {
5
- transform(props) {
6
- const { inline, ...rest } = props;
7
- return {
8
- display: inline ? "inline-flex" : "flex",
9
- alignItems: "center",
10
- justifyContent: "center",
11
- ...rest
12
- };
13
- }}
14
-
15
- export const getCenterStyle = (styles = {}) => {
16
- const _styles = getPatternStyles(centerConfig, styles)
17
- return centerConfig.transform(_styles, patternFns)
18
- }
19
-
20
- export const center = (styles) => css(getCenterStyle(styles))
21
- center.raw = getCenterStyle
@@ -1,25 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers..js';
2
- import { css } from '../css/index..js';
3
-
4
- const circleConfig = {
5
- transform(props) {
6
- const { size, ...rest } = props;
7
- return {
8
- display: "flex",
9
- alignItems: "center",
10
- justifyContent: "center",
11
- flex: "0 0 auto",
12
- width: size,
13
- height: size,
14
- borderRadius: "9999px",
15
- ...rest
16
- };
17
- }}
18
-
19
- export const getCircleStyle = (styles = {}) => {
20
- const _styles = getPatternStyles(circleConfig, styles)
21
- return circleConfig.transform(_styles, patternFns)
22
- }
23
-
24
- export const circle = (styles) => css(getCircleStyle(styles))
25
- circle.raw = getCircleStyle
@@ -1,25 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers.mjs';
2
- import { css } from '../css/index.mjs';
3
-
4
- const circleConfig = {
5
- transform(props) {
6
- const { size, ...rest } = props;
7
- return {
8
- display: "flex",
9
- alignItems: "center",
10
- justifyContent: "center",
11
- flex: "0 0 auto",
12
- width: size,
13
- height: size,
14
- borderRadius: "9999px",
15
- ...rest
16
- };
17
- }}
18
-
19
- export const getCircleStyle = (styles = {}) => {
20
- const _styles = getPatternStyles(circleConfig, styles)
21
- return circleConfig.transform(_styles, patternFns)
22
- }
23
-
24
- export const circle = (styles) => css(getCircleStyle(styles))
25
- circle.raw = getCircleStyle
@@ -1,22 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers..js';
2
- import { css } from '../css/index..js';
3
-
4
- const containerConfig = {
5
- transform(props) {
6
- return {
7
- width: "100%",
8
- marginRight: "auto",
9
- marginLeft: "auto",
10
- maxWidth: "1400px",
11
- paddingRight: "2rem",
12
- paddingLeft: "2rem"
13
- };
14
- }}
15
-
16
- export const getContainerStyle = (styles = {}) => {
17
- const _styles = getPatternStyles(containerConfig, styles)
18
- return containerConfig.transform(_styles, patternFns)
19
- }
20
-
21
- export const container = (styles) => css(getContainerStyle(styles))
22
- container.raw = getContainerStyle
@@ -1,22 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers.mjs';
2
- import { css } from '../css/index.mjs';
3
-
4
- const containerConfig = {
5
- transform(props) {
6
- return {
7
- width: "100%",
8
- marginRight: "auto",
9
- marginLeft: "auto",
10
- maxWidth: "1400px",
11
- paddingRight: "2rem",
12
- paddingLeft: "2rem"
13
- };
14
- }}
15
-
16
- export const getContainerStyle = (styles = {}) => {
17
- const _styles = getPatternStyles(containerConfig, styles)
18
- return containerConfig.transform(_styles, patternFns)
19
- }
20
-
21
- export const container = (styles) => css(getContainerStyle(styles))
22
- container.raw = getContainerStyle
@@ -1,21 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers..js';
2
- import { css } from '../css/index..js';
3
-
4
- const cqConfig = {
5
- transform(props) {
6
- const { name, type, ...rest } = props;
7
- return {
8
- containerType: type,
9
- containerName: name,
10
- ...rest
11
- };
12
- },
13
- defaultValues:{type:'inline-size'}}
14
-
15
- export const getCqStyle = (styles = {}) => {
16
- const _styles = getPatternStyles(cqConfig, styles)
17
- return cqConfig.transform(_styles, patternFns)
18
- }
19
-
20
- export const cq = (styles) => css(getCqStyle(styles))
21
- cq.raw = getCqStyle
@@ -1,21 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers.mjs';
2
- import { css } from '../css/index.mjs';
3
-
4
- const cqConfig = {
5
- transform(props) {
6
- const { name, type, ...rest } = props;
7
- return {
8
- containerType: type,
9
- containerName: name,
10
- ...rest
11
- };
12
- },
13
- defaultValues:{type:'inline-size'}}
14
-
15
- export const getCqStyle = (styles = {}) => {
16
- const _styles = getPatternStyles(cqConfig, styles)
17
- return cqConfig.transform(_styles, patternFns)
18
- }
19
-
20
- export const cq = (styles) => css(getCqStyle(styles))
21
- cq.raw = getCqStyle
@@ -1,25 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers..js';
2
- import { css } from '../css/index..js';
3
-
4
- const dividerConfig = {
5
- transform(props, { map }) {
6
- const { orientation, thickness, color, ...rest } = props;
7
- return {
8
- "--thickness": thickness,
9
- width: map(orientation, (v) => v === "vertical" ? void 0 : "100%"),
10
- height: map(orientation, (v) => v === "horizontal" ? void 0 : "100%"),
11
- borderBlockEndWidth: map(orientation, (v) => v === "horizontal" ? "var(--thickness)" : void 0),
12
- borderInlineEndWidth: map(orientation, (v) => v === "vertical" ? "var(--thickness)" : void 0),
13
- borderColor: color,
14
- ...rest
15
- };
16
- },
17
- defaultValues:{orientation:'horizontal',thickness:'1px'}}
18
-
19
- export const getDividerStyle = (styles = {}) => {
20
- const _styles = getPatternStyles(dividerConfig, styles)
21
- return dividerConfig.transform(_styles, patternFns)
22
- }
23
-
24
- export const divider = (styles) => css(getDividerStyle(styles))
25
- divider.raw = getDividerStyle
@@ -1,25 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers.mjs';
2
- import { css } from '../css/index.mjs';
3
-
4
- const dividerConfig = {
5
- transform(props, { map }) {
6
- const { orientation, thickness, color, ...rest } = props;
7
- return {
8
- "--thickness": thickness,
9
- width: map(orientation, (v) => v === "vertical" ? void 0 : "100%"),
10
- height: map(orientation, (v) => v === "horizontal" ? void 0 : "100%"),
11
- borderBlockEndWidth: map(orientation, (v) => v === "horizontal" ? "var(--thickness)" : void 0),
12
- borderInlineEndWidth: map(orientation, (v) => v === "vertical" ? "var(--thickness)" : void 0),
13
- borderColor: color,
14
- ...rest
15
- };
16
- },
17
- defaultValues:{orientation:'horizontal',thickness:'1px'}}
18
-
19
- export const getDividerStyle = (styles = {}) => {
20
- const _styles = getPatternStyles(dividerConfig, styles)
21
- return dividerConfig.transform(_styles, patternFns)
22
- }
23
-
24
- export const divider = (styles) => css(getDividerStyle(styles))
25
- divider.raw = getDividerStyle
@@ -1,26 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers..js';
2
- import { css } from '../css/index..js';
3
-
4
- const flexConfig = {
5
- transform(props) {
6
- const { direction, align, justify, wrap: wrap2, basis, grow, shrink, ...rest } = props;
7
- return {
8
- display: "flex",
9
- flexDirection: direction,
10
- alignItems: align,
11
- justifyContent: justify,
12
- flexWrap: wrap2,
13
- flexBasis: basis,
14
- flexGrow: grow,
15
- flexShrink: shrink,
16
- ...rest
17
- };
18
- }}
19
-
20
- export const getFlexStyle = (styles = {}) => {
21
- const _styles = getPatternStyles(flexConfig, styles)
22
- return flexConfig.transform(_styles, patternFns)
23
- }
24
-
25
- export const flex = (styles) => css(getFlexStyle(styles))
26
- flex.raw = getFlexStyle
@@ -1,26 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers.mjs';
2
- import { css } from '../css/index.mjs';
3
-
4
- const flexConfig = {
5
- transform(props) {
6
- const { direction, align, justify, wrap: wrap2, basis, grow, shrink, ...rest } = props;
7
- return {
8
- display: "flex",
9
- flexDirection: direction,
10
- alignItems: align,
11
- justifyContent: justify,
12
- flexWrap: wrap2,
13
- flexBasis: basis,
14
- flexGrow: grow,
15
- flexShrink: shrink,
16
- ...rest
17
- };
18
- }}
19
-
20
- export const getFlexStyle = (styles = {}) => {
21
- const _styles = getPatternStyles(flexConfig, styles)
22
- return flexConfig.transform(_styles, patternFns)
23
- }
24
-
25
- export const flex = (styles) => css(getFlexStyle(styles))
26
- flex.raw = getFlexStyle
@@ -1,52 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers..js';
2
- import { css } from '../css/index..js';
3
-
4
- const floatConfig = {
5
- transform(props, { map }) {
6
- const { offset, offsetX, offsetY, placement, ...rest } = props;
7
- return {
8
- display: "inline-flex",
9
- justifyContent: "center",
10
- alignItems: "center",
11
- position: "absolute",
12
- insetBlockStart: map(placement, (v) => {
13
- const [side] = v.split("-");
14
- const map2 = { top: offsetY, middle: "50%", bottom: "auto" };
15
- return map2[side];
16
- }),
17
- insetBlockEnd: map(placement, (v) => {
18
- const [side] = v.split("-");
19
- const map2 = { top: "auto", middle: "50%", bottom: offsetY };
20
- return map2[side];
21
- }),
22
- insetInlineStart: map(placement, (v) => {
23
- const [, align] = v.split("-");
24
- const map2 = { start: offsetX, center: "50%", end: "auto" };
25
- return map2[align];
26
- }),
27
- insetInlineEnd: map(placement, (v) => {
28
- const [, align] = v.split("-");
29
- const map2 = { start: "auto", center: "50%", end: offsetX };
30
- return map2[align];
31
- }),
32
- translate: map(placement, (v) => {
33
- const [side, align] = v.split("-");
34
- const mapX = { start: "-50%", center: "-50%", end: "50%" };
35
- const mapY = { top: "-50%", middle: "-50%", bottom: "50%" };
36
- return `${mapX[align]} ${mapY[side]}`;
37
- }),
38
- ...rest
39
- };
40
- },
41
- defaultValues(props) {
42
- const offset = props.offset || "0";
43
- return { offset, offsetX: offset, offsetY: offset, placement: "top-end" };
44
- }}
45
-
46
- export const getFloatStyle = (styles = {}) => {
47
- const _styles = getPatternStyles(floatConfig, styles)
48
- return floatConfig.transform(_styles, patternFns)
49
- }
50
-
51
- export const float = (styles) => css(getFloatStyle(styles))
52
- float.raw = getFloatStyle
@@ -1,52 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers.mjs';
2
- import { css } from '../css/index.mjs';
3
-
4
- const floatConfig = {
5
- transform(props, { map }) {
6
- const { offset, offsetX, offsetY, placement, ...rest } = props;
7
- return {
8
- display: "inline-flex",
9
- justifyContent: "center",
10
- alignItems: "center",
11
- position: "absolute",
12
- insetBlockStart: map(placement, (v) => {
13
- const [side] = v.split("-");
14
- const map2 = { top: offsetY, middle: "50%", bottom: "auto" };
15
- return map2[side];
16
- }),
17
- insetBlockEnd: map(placement, (v) => {
18
- const [side] = v.split("-");
19
- const map2 = { top: "auto", middle: "50%", bottom: offsetY };
20
- return map2[side];
21
- }),
22
- insetInlineStart: map(placement, (v) => {
23
- const [, align] = v.split("-");
24
- const map2 = { start: offsetX, center: "50%", end: "auto" };
25
- return map2[align];
26
- }),
27
- insetInlineEnd: map(placement, (v) => {
28
- const [, align] = v.split("-");
29
- const map2 = { start: "auto", center: "50%", end: offsetX };
30
- return map2[align];
31
- }),
32
- translate: map(placement, (v) => {
33
- const [side, align] = v.split("-");
34
- const mapX = { start: "-50%", center: "-50%", end: "50%" };
35
- const mapY = { top: "-50%", middle: "-50%", bottom: "50%" };
36
- return `${mapX[align]} ${mapY[side]}`;
37
- }),
38
- ...rest
39
- };
40
- },
41
- defaultValues(props) {
42
- const offset = props.offset || "0";
43
- return { offset, offsetX: offset, offsetY: offset, placement: "top-end" };
44
- }}
45
-
46
- export const getFloatStyle = (styles = {}) => {
47
- const _styles = getPatternStyles(floatConfig, styles)
48
- return floatConfig.transform(_styles, patternFns)
49
- }
50
-
51
- export const float = (styles) => css(getFloatStyle(styles))
52
- float.raw = getFloatStyle
@@ -1,25 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers..js';
2
- import { css } from '../css/index..js';
3
-
4
- const gridItemConfig = {
5
- transform(props, { map }) {
6
- const { colSpan, rowSpan, colStart, rowStart, colEnd, rowEnd, ...rest } = props;
7
- const spanFn = (v) => v === "auto" ? v : `span ${v}`;
8
- return {
9
- gridColumn: colSpan != null ? map(colSpan, spanFn) : void 0,
10
- gridRow: rowSpan != null ? map(rowSpan, spanFn) : void 0,
11
- gridColumnStart: colStart,
12
- gridColumnEnd: colEnd,
13
- gridRowStart: rowStart,
14
- gridRowEnd: rowEnd,
15
- ...rest
16
- };
17
- }}
18
-
19
- export const getGridItemStyle = (styles = {}) => {
20
- const _styles = getPatternStyles(gridItemConfig, styles)
21
- return gridItemConfig.transform(_styles, patternFns)
22
- }
23
-
24
- export const gridItem = (styles) => css(getGridItemStyle(styles))
25
- gridItem.raw = getGridItemStyle
@@ -1,25 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers.mjs';
2
- import { css } from '../css/index.mjs';
3
-
4
- const gridItemConfig = {
5
- transform(props, { map }) {
6
- const { colSpan, rowSpan, colStart, rowStart, colEnd, rowEnd, ...rest } = props;
7
- const spanFn = (v) => v === "auto" ? v : `span ${v}`;
8
- return {
9
- gridColumn: colSpan != null ? map(colSpan, spanFn) : void 0,
10
- gridRow: rowSpan != null ? map(rowSpan, spanFn) : void 0,
11
- gridColumnStart: colStart,
12
- gridColumnEnd: colEnd,
13
- gridRowStart: rowStart,
14
- gridRowEnd: rowEnd,
15
- ...rest
16
- };
17
- }}
18
-
19
- export const getGridItemStyle = (styles = {}) => {
20
- const _styles = getPatternStyles(gridItemConfig, styles)
21
- return gridItemConfig.transform(_styles, patternFns)
22
- }
23
-
24
- export const gridItem = (styles) => css(getGridItemStyle(styles))
25
- gridItem.raw = getGridItemStyle
@@ -1,27 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers..js';
2
- import { css } from '../css/index..js';
3
-
4
- const gridConfig = {
5
- transform(props, { map, isCssUnit }) {
6
- const { columnGap, rowGap, gap, columns, minChildWidth, ...rest } = props;
7
- const getValue = (v) => isCssUnit(v) ? v : `token(sizes.${v}, ${v})`;
8
- return {
9
- display: "grid",
10
- gridTemplateColumns: columns != null ? map(columns, (v) => `repeat(${v}, minmax(0, 1fr))`) : minChildWidth != null ? map(minChildWidth, (v) => `repeat(auto-fit, minmax(${getValue(v)}, 1fr))`) : void 0,
11
- gap,
12
- columnGap,
13
- rowGap,
14
- ...rest
15
- };
16
- },
17
- defaultValues(props) {
18
- return { gap: props.columnGap || props.rowGap ? void 0 : "8px" };
19
- }}
20
-
21
- export const getGridStyle = (styles = {}) => {
22
- const _styles = getPatternStyles(gridConfig, styles)
23
- return gridConfig.transform(_styles, patternFns)
24
- }
25
-
26
- export const grid = (styles) => css(getGridStyle(styles))
27
- grid.raw = getGridStyle
@@ -1,27 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers.mjs';
2
- import { css } from '../css/index.mjs';
3
-
4
- const gridConfig = {
5
- transform(props, { map, isCssUnit }) {
6
- const { columnGap, rowGap, gap, columns, minChildWidth, ...rest } = props;
7
- const getValue = (v) => isCssUnit(v) ? v : `token(sizes.${v}, ${v})`;
8
- return {
9
- display: "grid",
10
- gridTemplateColumns: columns != null ? map(columns, (v) => `repeat(${v}, minmax(0, 1fr))`) : minChildWidth != null ? map(minChildWidth, (v) => `repeat(auto-fit, minmax(${getValue(v)}, 1fr))`) : void 0,
11
- gap,
12
- columnGap,
13
- rowGap,
14
- ...rest
15
- };
16
- },
17
- defaultValues(props) {
18
- return { gap: props.columnGap || props.rowGap ? void 0 : "8px" };
19
- }}
20
-
21
- export const getGridStyle = (styles = {}) => {
22
- const _styles = getPatternStyles(gridConfig, styles)
23
- return gridConfig.transform(_styles, patternFns)
24
- }
25
-
26
- export const grid = (styles) => css(getGridStyle(styles))
27
- grid.raw = getGridStyle
@@ -1,24 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers..js';
2
- import { css } from '../css/index..js';
3
-
4
- const hstackConfig = {
5
- transform(props) {
6
- const { justify, gap, ...rest } = props;
7
- return {
8
- display: "flex",
9
- alignItems: "center",
10
- justifyContent: justify,
11
- gap,
12
- flexDirection: "row",
13
- ...rest
14
- };
15
- },
16
- defaultValues:{gap:'8px'}}
17
-
18
- export const getHstackStyle = (styles = {}) => {
19
- const _styles = getPatternStyles(hstackConfig, styles)
20
- return hstackConfig.transform(_styles, patternFns)
21
- }
22
-
23
- export const hstack = (styles) => css(getHstackStyle(styles))
24
- hstack.raw = getHstackStyle
@@ -1,24 +0,0 @@
1
- import { getPatternStyles, patternFns } from '../helpers.mjs';
2
- import { css } from '../css/index.mjs';
3
-
4
- const hstackConfig = {
5
- transform(props) {
6
- const { justify, gap, ...rest } = props;
7
- return {
8
- display: "flex",
9
- alignItems: "center",
10
- justifyContent: justify,
11
- gap,
12
- flexDirection: "row",
13
- ...rest
14
- };
15
- },
16
- defaultValues:{gap:'8px'}}
17
-
18
- export const getHstackStyle = (styles = {}) => {
19
- const _styles = getPatternStyles(hstackConfig, styles)
20
- return hstackConfig.transform(_styles, patternFns)
21
- }
22
-
23
- export const hstack = (styles) => css(getHstackStyle(styles))
24
- hstack.raw = getHstackStyle
@@ -1,20 +0,0 @@
1
- export * from './container..js';
2
- export * from './box..js';
3
- export * from './flex..js';
4
- export * from './stack..js';
5
- export * from './vstack..js';
6
- export * from './hstack..js';
7
- export * from './spacer..js';
8
- export * from './square..js';
9
- export * from './circle..js';
10
- export * from './center..js';
11
- export * from './link-overlay..js';
12
- export * from './aspect-ratio..js';
13
- export * from './grid..js';
14
- export * from './grid-item..js';
15
- export * from './wrap..js';
16
- export * from './divider..js';
17
- export * from './float..js';
18
- export * from './bleed..js';
19
- export * from './visually-hidden..js';
20
- export * from './cq..js';