@utilitywarehouse/hearth-react 0.28.6 → 0.29.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 (104) hide show
  1. package/README.md +34 -20
  2. package/SKILL.md +355 -0
  3. package/dist/{chunk-O7RBVBMN.cjs → chunk-LWHIBSW2.cjs} +2 -2
  4. package/dist/{chunk-O7RBVBMN.cjs.map → chunk-LWHIBSW2.cjs.map} +1 -1
  5. package/dist/{chunk-JRVYOIXR.js → chunk-MIVYZGEV.js} +2 -2
  6. package/dist/components/CardAccordion/CardAccordion.context.d.ts.map +1 -1
  7. package/dist/components/Combobox/Combobox.cjs +1 -1
  8. package/dist/components/Combobox/Combobox.js +1 -1
  9. package/dist/components/ExpandableCard/ExpandableCard.cjs +1 -1
  10. package/dist/components/ExpandableCard/ExpandableCard.js +1 -1
  11. package/dist/helpers/get-classname-styles.d.ts.map +1 -1
  12. package/dist/helpers/logger.d.ts.map +1 -1
  13. package/dist/helpers/merge-ids.d.ts.map +1 -1
  14. package/dist/hooks/use-ids.d.ts.map +1 -1
  15. package/dist/index.cjs +1 -1
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.js +1 -1
  18. package/package.json +18 -12
  19. package/public/llms/components/accordion.md +321 -0
  20. package/public/llms/components/alert.md +217 -0
  21. package/public/llms/components/avatar.md +112 -0
  22. package/public/llms/components/badge.md +158 -0
  23. package/public/llms/components/body-text.md +200 -0
  24. package/public/llms/components/box.md +148 -0
  25. package/public/llms/components/breadcrumbs.md +97 -0
  26. package/public/llms/components/button.md +595 -0
  27. package/public/llms/components/card-accordion.md +277 -0
  28. package/public/llms/components/card.md +985 -0
  29. package/public/llms/components/checkbox-group.md +193 -0
  30. package/public/llms/components/checkbox-tile.md +116 -0
  31. package/public/llms/components/checkbox.md +108 -0
  32. package/public/llms/components/combobox.md +360 -0
  33. package/public/llms/components/container.md +162 -0
  34. package/public/llms/components/currency-input.md +85 -0
  35. package/public/llms/components/date-input.md +90 -0
  36. package/public/llms/components/date-picker.md +159 -0
  37. package/public/llms/components/description-list.md +149 -0
  38. package/public/llms/components/detail-text.md +89 -0
  39. package/public/llms/components/divider.md +88 -0
  40. package/public/llms/components/em.md +43 -0
  41. package/public/llms/components/expandable-card.md +231 -0
  42. package/public/llms/components/flex.md +197 -0
  43. package/public/llms/components/grid.md +244 -0
  44. package/public/llms/components/heading.md +65 -0
  45. package/public/llms/components/helper-text.md +27 -0
  46. package/public/llms/components/highlight-banner.md +94 -0
  47. package/public/llms/components/icon-button.md +516 -0
  48. package/public/llms/components/icon-container.md +247 -0
  49. package/public/llms/components/inline-link.md +190 -0
  50. package/public/llms/components/label.md +28 -0
  51. package/public/llms/components/link.md +236 -0
  52. package/public/llms/components/list.md +715 -0
  53. package/public/llms/components/menu.md +270 -0
  54. package/public/llms/components/modal.md +328 -0
  55. package/public/llms/components/pagination.md +138 -0
  56. package/public/llms/components/password-input.md +93 -0
  57. package/public/llms/components/progress-bar.md +139 -0
  58. package/public/llms/components/progress-stepper.md +147 -0
  59. package/public/llms/components/radio-group.md +487 -0
  60. package/public/llms/components/search-input.md +132 -0
  61. package/public/llms/components/section-header.md +82 -0
  62. package/public/llms/components/select.md +148 -0
  63. package/public/llms/components/skeleton.md +282 -0
  64. package/public/llms/components/spinner.md +59 -0
  65. package/public/llms/components/strong.md +49 -0
  66. package/public/llms/components/switch.md +106 -0
  67. package/public/llms/components/table.md +230 -0
  68. package/public/llms/components/tabs.md +320 -0
  69. package/public/llms/components/text-area.md +141 -0
  70. package/public/llms/components/text-input.md +228 -0
  71. package/public/llms/components/toast.md +323 -0
  72. package/public/llms/components/toggle-button-card.md +513 -0
  73. package/public/llms/components/tooltip.md +188 -0
  74. package/public/llms/components/unstyled-icon-button.md +175 -0
  75. package/public/llms/components/validation-text.md +29 -0
  76. package/public/llms/components/verification-input.md +96 -0
  77. package/public/llms/docs/changelog.md +1430 -0
  78. package/public/llms/docs/common-props/align-self.md +90 -0
  79. package/public/llms/docs/common-props/border.md +308 -0
  80. package/public/llms/docs/common-props/colour.md +221 -0
  81. package/public/llms/docs/common-props/flex-items.md +91 -0
  82. package/public/llms/docs/common-props/gap.md +111 -0
  83. package/public/llms/docs/common-props/grid-items.md +96 -0
  84. package/public/llms/docs/common-props/margin.md +105 -0
  85. package/public/llms/docs/common-props/opacity.md +100 -0
  86. package/public/llms/docs/common-props/order.md +90 -0
  87. package/public/llms/docs/common-props/overflow.md +89 -0
  88. package/public/llms/docs/common-props/padding.md +102 -0
  89. package/public/llms/docs/common-props/position.md +92 -0
  90. package/public/llms/docs/common-props/size.md +93 -0
  91. package/public/llms/docs/common-props/spacing.md +97 -0
  92. package/public/llms/docs/common-props/text.md +35 -0
  93. package/public/llms/docs/common-props/z-index.md +88 -0
  94. package/public/llms/docs/design-tokens.md +72 -0
  95. package/public/llms/docs/getting-started.md +117 -0
  96. package/public/llms/docs/layout.md +135 -0
  97. package/public/llms/docs/migrating.md +302 -0
  98. package/public/llms/docs/responsive-design/breakpoints.md +119 -0
  99. package/public/llms/docs/responsive-design/media-queries.md +89 -0
  100. package/public/llms/docs/responsive-design/responsive-props.md +37 -0
  101. package/public/llms.txt +97 -0
  102. package/scripts/init-ai.js +142 -0
  103. package/styles.css +2 -2
  104. /package/dist/{chunk-JRVYOIXR.js.map → chunk-MIVYZGEV.js.map} +0 -0
@@ -0,0 +1,111 @@
1
+ # Gap
2
+
3
+ The `gap` prop is responsive, and accepts [space design tokens](https://hearth.prod.uw.systems/?path=/docs/tokens_space--docs#available-space-tokens),
4
+ as well as Hearth prefixed CSS custom properties from the Hearth Tokens library. You cannot pass raw strings.
5
+
6
+ ```tsx
7
+ import { Flex } from '@utilitywarehouse/hearth-react' import { components } from '@utilitywarehouse/hearth-tokens/browser';
8
+
9
+ // token value
10
+ <Flex gap="100" />
11
+
12
+ // responsive token values
13
+ <Flex gap={{ mobile: "100", desktop: "300" }}/>
14
+
15
+ // Hearth prefixed CSS custom property
16
+ <Flex gap="var(--h-space-200)" />
17
+
18
+ // Hearth browser tokens
19
+ <Flex gap={components.button.gap}/>
20
+
21
+ // This will show an error as the string pixel value, passed to the desktop breakpoint, is not valid
22
+ // <Box gap={{ mobile: '100', tablet: 'var(--h-space-200)', desktop: '32px' }}/>
23
+ ```
24
+
25
+ | Prop | Type | Default | Description |
26
+ | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
27
+ | `spacing` | `"none" \| "2xs" \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | — | Set responsive spacing between child elements. |
28
+ | `asChild` | `boolean` | — | |
29
+ | `display` | `Responsive<"flex" \| "none" \| "inline-flex">` | — | |
30
+ | `direction` | `Responsive<"row" \| "column" \| "row-reverse" \| "column-reverse">` | — | |
31
+ | `wrap` | `Responsive<"wrap" \| "nowrap" \| "wrap-reverse">` | — | |
32
+ | `alignContent` | `Responsive<"center" \| "start" \| "end" \| "stretch" \| "between" \| "around" \| "evenly">` | — | |
33
+ | `alignItems` | `Responsive<"center" \| "start" \| "end" \| "stretch" \| "baseline">` | — | |
34
+ | `alignSelf` | `Responsive<"center" \| "start" \| "end" \| "stretch">` | — | |
35
+ | `backgroundColor` | `"primary" \| "secondary" \| "brand" \| `var(--h-${string})`` | — | |
36
+ | `borderColor` | `"strong" \| `var(--h-${string})` \| "subtle"` | — | |
37
+ | `borderTopColor` | `"strong" \| `var(--h-${string})` \| "subtle"` | — | |
38
+ | `borderRightColor` | `"strong" \| `var(--h-${string})` \| "subtle"` | — | |
39
+ | `borderBottomColor` | `"strong" \| `var(--h-${string})` \| "subtle"` | — | |
40
+ | `borderLeftColor` | `"strong" \| `var(--h-${string})` \| "subtle"` | — | |
41
+ | `borderRadius` | `Responsive<"none" \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "full" \| "inherit">` | — | |
42
+ | `borderRadiusTopLeftNone` | `boolean` | — | |
43
+ | `borderRadiusTopRightNone` | `boolean` | — | |
44
+ | `borderRadiusBottomLeftNone` | `boolean` | — | |
45
+ | `borderRadiusBottomRightNone` | `boolean` | — | |
46
+ | `borderRadiusTopNone` | `boolean` | — | |
47
+ | `borderRadiusRightNone` | `boolean` | — | |
48
+ | `borderRadiusBottomNone` | `boolean` | — | |
49
+ | `borderRadiusLeftNone` | `boolean` | — | |
50
+ | `borderStyle` | `Responsive<"none" \| "solid">` | — | |
51
+ | `borderTopStyle` | `Responsive<"none" \| "solid">` | — | |
52
+ | `borderRightStyle` | `Responsive<"none" \| "solid">` | — | |
53
+ | `borderBottomStyle` | `Responsive<"none" \| "solid">` | — | |
54
+ | `borderLeftStyle` | `Responsive<"none" \| "solid">` | — | |
55
+ | `borderWidth` | `Responsive<"0" \| "1" \| "2">` | — | |
56
+ | `borderTopWidth` | `Responsive<"0" \| "1" \| "2">` | — | |
57
+ | `borderRightWidth` | `Responsive<"0" \| "1" \| "2">` | — | |
58
+ | `borderBottomWidth` | `Responsive<"0" \| "1" \| "2">` | — | |
59
+ | `borderLeftWidth` | `Responsive<"0" \| "1" \| "2">` | — | |
60
+ | `color` | `"primary" \| "secondary" \| "brand" \| "affirmative" \| "inverted" \| `var(--h-${string})`` | — | |
61
+ | `flex` | `Responsive<string>` | — | |
62
+ | `flexBasis` | `Responsive<string>` | — | |
63
+ | `flexShrink` | `Responsive<string>` | — | |
64
+ | `flexGrow` | `Responsive<string>` | — | |
65
+ | `gap` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
66
+ | `rowGap` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
67
+ | `columnGap` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
68
+ | `gridColumnSpan` | `Responsive<Union<string, "1" \| "2" \| "3" \| "4" \| "5" \| "6" \| "7" \| "8" \| "9" \| "10" \| "11" \| "12">>` | — | |
69
+ | `gridArea` | `Responsive<string>` | — | |
70
+ | `gridColumn` | `Responsive<string>` | — | |
71
+ | `gridColumnStart` | `Responsive<string>` | — | |
72
+ | `gridColumnEnd` | `Responsive<string>` | — | |
73
+ | `gridRow` | `Responsive<string>` | — | |
74
+ | `gridRowStart` | `Responsive<string>` | — | |
75
+ | `gridRowEnd` | `Responsive<string>` | — | |
76
+ | `justifyContent` | `Responsive<"center" \| "start" \| "end" \| "stretch" \| "between" \| "around" \| "evenly">` | — | For flexboxes, the stretch value behaves as flex-start or start. This is because, in flexboxes, stretching is controlled using the flex-grow property. |
77
+ | `margin` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000" \| "auto">` | — | |
78
+ | `marginTop` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000" \| "auto">` | — | |
79
+ | `marginRight` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000" \| "auto">` | — | |
80
+ | `marginBottom` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000" \| "auto">` | — | |
81
+ | `marginLeft` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000" \| "auto">` | — | |
82
+ | `marginX` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000" \| "auto">` | — | |
83
+ | `marginY` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000" \| "auto">` | — | |
84
+ | `opacity` | `Responsive<string>` | — | |
85
+ | `order` | `Responsive<string>` | — | |
86
+ | `overflow` | `Responsive<"hidden" \| "auto" \| "visible" \| "clip" \| "scroll">` | — | |
87
+ | `overflowX` | `Responsive<"hidden" \| "auto" \| "visible" \| "clip" \| "scroll">` | — | |
88
+ | `overflowY` | `Responsive<"hidden" \| "auto" \| "visible" \| "clip" \| "scroll">` | — | |
89
+ | `padding` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
90
+ | `paddingTop` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
91
+ | `paddingRight` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
92
+ | `paddingBottom` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
93
+ | `paddingLeft` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
94
+ | `paddingX` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
95
+ | `paddingY` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
96
+ | `position` | `Responsive<"fixed" \| "static" \| "relative" \| "absolute" \| "sticky">` | — | |
97
+ | `inset` | `Responsive<Union<string, "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">>` | — | |
98
+ | `top` | `Responsive<Union<string, "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">>` | — | |
99
+ | `right` | `Responsive<Union<string, "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">>` | — | |
100
+ | `bottom` | `Responsive<Union<string, "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">>` | — | |
101
+ | `left` | `Responsive<Union<string, "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">>` | — | |
102
+ | `width` | `Responsive<string>` | — | |
103
+ | `maxWidth` | `Responsive<string>` | — | |
104
+ | `minWidth` | `Responsive<string>` | — | |
105
+ | `height` | `Responsive<string>` | — | |
106
+ | `maxHeight` | `Responsive<string>` | — | |
107
+ | `minHeight` | `Responsive<string>` | — | |
108
+ | `textAlign` | `Responsive<"center" \| "right" \| "left">` | — | |
109
+ | `textTransform` | `"none" \| "uppercase" \| "lowercase" \| "capitalize"` | — | Set the text-transform on the component. |
110
+ | `zIndex` | `Responsive<string>` | — | |
111
+ | `as` | `"span" \| "div"` | — | |
@@ -0,0 +1,96 @@
1
+ # Grid items
2
+
3
+ Grid item props enable styling on components when they are children of a grid
4
+ container.
5
+
6
+ The `gridColumnSpan` prop accepts one of a predefined set of grid
7
+ column span steps, the other grid item props accept any valid CSS grid value
8
+ for the relevant prop.
9
+
10
+ ```tsx
11
+ <Grid>
12
+ <Box gridColumnSpan="4" />
13
+ <Box gridColumn="1 / 3" />
14
+ <Box gridRowStart="2" />
15
+ <Box gridColumnEnd={{ mobile: '-1', tablet: '3', desktop: 'auto' }} />
16
+ </Grid>
17
+ ```
18
+
19
+ | Prop | Type | Default | Description |
20
+ | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ---------------------------------------- |
21
+ | `asChild` | `boolean` | — | |
22
+ | `display` | `Responsive<"none" \| "inline" \| "inline-block" \| "block">` | — | |
23
+ | `alignSelf` | `Responsive<"center" \| "start" \| "end" \| "stretch">` | — | |
24
+ | `backgroundColor` | `"primary" \| "secondary" \| "brand" \| `var(--h-${string})`` | — | |
25
+ | `borderColor` | `"strong" \| `var(--h-${string})` \| "subtle"` | — | |
26
+ | `borderTopColor` | `"strong" \| `var(--h-${string})` \| "subtle"` | — | |
27
+ | `borderRightColor` | `"strong" \| `var(--h-${string})` \| "subtle"` | — | |
28
+ | `borderBottomColor` | `"strong" \| `var(--h-${string})` \| "subtle"` | — | |
29
+ | `borderLeftColor` | `"strong" \| `var(--h-${string})` \| "subtle"` | — | |
30
+ | `borderRadius` | `Responsive<"none" \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "full" \| "inherit">` | — | |
31
+ | `borderRadiusTopLeftNone` | `boolean` | — | |
32
+ | `borderRadiusTopRightNone` | `boolean` | — | |
33
+ | `borderRadiusBottomLeftNone` | `boolean` | — | |
34
+ | `borderRadiusBottomRightNone` | `boolean` | — | |
35
+ | `borderRadiusTopNone` | `boolean` | — | |
36
+ | `borderRadiusRightNone` | `boolean` | — | |
37
+ | `borderRadiusBottomNone` | `boolean` | — | |
38
+ | `borderRadiusLeftNone` | `boolean` | — | |
39
+ | `borderStyle` | `Responsive<"none" \| "solid">` | — | |
40
+ | `borderTopStyle` | `Responsive<"none" \| "solid">` | — | |
41
+ | `borderRightStyle` | `Responsive<"none" \| "solid">` | — | |
42
+ | `borderBottomStyle` | `Responsive<"none" \| "solid">` | — | |
43
+ | `borderLeftStyle` | `Responsive<"none" \| "solid">` | — | |
44
+ | `borderWidth` | `Responsive<"0" \| "1" \| "2">` | — | |
45
+ | `borderTopWidth` | `Responsive<"0" \| "1" \| "2">` | — | |
46
+ | `borderRightWidth` | `Responsive<"0" \| "1" \| "2">` | — | |
47
+ | `borderBottomWidth` | `Responsive<"0" \| "1" \| "2">` | — | |
48
+ | `borderLeftWidth` | `Responsive<"0" \| "1" \| "2">` | — | |
49
+ | `color` | `"primary" \| "secondary" \| "brand" \| "affirmative" \| "inverted" \| `var(--h-${string})`` | — | |
50
+ | `flex` | `Responsive<string>` | — | |
51
+ | `flexBasis` | `Responsive<string>` | — | |
52
+ | `flexShrink` | `Responsive<string>` | — | |
53
+ | `flexGrow` | `Responsive<string>` | — | |
54
+ | `gridColumnSpan` | `Responsive<Union<string, "1" \| "2" \| "3" \| "4" \| "5" \| "6" \| "7" \| "8" \| "9" \| "10" \| "11" \| "12">>` | — | |
55
+ | `gridArea` | `Responsive<string>` | — | |
56
+ | `gridColumn` | `Responsive<string>` | — | |
57
+ | `gridColumnStart` | `Responsive<string>` | — | |
58
+ | `gridColumnEnd` | `Responsive<string>` | — | |
59
+ | `gridRow` | `Responsive<string>` | — | |
60
+ | `gridRowStart` | `Responsive<string>` | — | |
61
+ | `gridRowEnd` | `Responsive<string>` | — | |
62
+ | `margin` | `Responsive<`var(--h-${string})` \| "0" \| "auto" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
63
+ | `marginTop` | `Responsive<`var(--h-${string})` \| "0" \| "auto" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
64
+ | `marginRight` | `Responsive<`var(--h-${string})` \| "0" \| "auto" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
65
+ | `marginBottom` | `Responsive<`var(--h-${string})` \| "0" \| "auto" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
66
+ | `marginLeft` | `Responsive<`var(--h-${string})` \| "0" \| "auto" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
67
+ | `marginX` | `Responsive<`var(--h-${string})` \| "0" \| "auto" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
68
+ | `marginY` | `Responsive<`var(--h-${string})` \| "0" \| "auto" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
69
+ | `opacity` | `Responsive<string>` | — | |
70
+ | `order` | `Responsive<string>` | — | |
71
+ | `overflow` | `Responsive<"hidden" \| "auto" \| "visible" \| "clip" \| "scroll">` | — | |
72
+ | `overflowX` | `Responsive<"hidden" \| "auto" \| "visible" \| "clip" \| "scroll">` | — | |
73
+ | `overflowY` | `Responsive<"hidden" \| "auto" \| "visible" \| "clip" \| "scroll">` | — | |
74
+ | `padding` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
75
+ | `paddingTop` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
76
+ | `paddingRight` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
77
+ | `paddingBottom` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
78
+ | `paddingLeft` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
79
+ | `paddingX` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
80
+ | `paddingY` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
81
+ | `position` | `Responsive<"fixed" \| "static" \| "relative" \| "absolute" \| "sticky">` | — | |
82
+ | `inset` | `Responsive<Union<string, "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">>` | — | |
83
+ | `top` | `Responsive<Union<string, "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">>` | — | |
84
+ | `right` | `Responsive<Union<string, "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">>` | — | |
85
+ | `bottom` | `Responsive<Union<string, "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">>` | — | |
86
+ | `left` | `Responsive<Union<string, "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">>` | — | |
87
+ | `width` | `Responsive<string>` | — | |
88
+ | `maxWidth` | `Responsive<string>` | — | |
89
+ | `minWidth` | `Responsive<string>` | — | |
90
+ | `height` | `Responsive<string>` | — | |
91
+ | `maxHeight` | `Responsive<string>` | — | |
92
+ | `minHeight` | `Responsive<string>` | — | |
93
+ | `textAlign` | `Responsive<"center" \| "right" \| "left">` | — | |
94
+ | `textTransform` | `"none" \| "uppercase" \| "lowercase" \| "capitalize"` | — | Set the text-transform on the component. |
95
+ | `zIndex` | `Responsive<string>` | — | |
96
+ | `as` | `"div" \| "span"` | — | |
@@ -0,0 +1,105 @@
1
+ # Margin props
2
+
3
+ Margin props are responsive, and accept [space design tokens](https://hearth.prod.uw.systems/?path=/docs/tokens_space--docs#available-space-tokens),
4
+ as well as Hearth prefixed CSS custom properties from the Hearth Tokens library.
5
+
6
+ ```tsx
7
+ import { Box } from '@utilitywarehouse/hearth-react' import { components } from '@utilitywarehouse/hearth-tokens/browser';
8
+
9
+ // token value
10
+ <Box margin="100" />
11
+
12
+ // responsive token values
13
+ <Box margin={{ mobile: "100", desktop: "300" }}/>
14
+
15
+ // Hearth prefixed CSS custom property
16
+ <Box margin="var(--h-space-200)" />
17
+
18
+ // Hearth browser tokens
19
+ <Box margin={components.container.margin}/>
20
+
21
+ // The only raw string value accepted is "auto"
22
+ <Box marginX="auto"/>
23
+
24
+ // This will show an error as the string pixel value, passed to the desktop breakpoint, is not valid
25
+ // <Box margin={{ mobile: '100', tablet: 'var(--h-space-200)', desktop: '32px' }}/>
26
+ ```
27
+
28
+ | Prop | Type | Default | Description |
29
+ | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ---------------------------------------- |
30
+ | `asChild` | `boolean` | — | |
31
+ | `display` | `Responsive<"none" \| "inline" \| "inline-block" \| "block">` | — | |
32
+ | `alignSelf` | `Responsive<"center" \| "start" \| "end" \| "stretch">` | — | |
33
+ | `backgroundColor` | `"primary" \| "secondary" \| "brand" \| `var(--h-${string})`` | — | |
34
+ | `borderColor` | `"strong" \| `var(--h-${string})` \| "subtle"` | — | |
35
+ | `borderTopColor` | `"strong" \| `var(--h-${string})` \| "subtle"` | — | |
36
+ | `borderRightColor` | `"strong" \| `var(--h-${string})` \| "subtle"` | — | |
37
+ | `borderBottomColor` | `"strong" \| `var(--h-${string})` \| "subtle"` | — | |
38
+ | `borderLeftColor` | `"strong" \| `var(--h-${string})` \| "subtle"` | — | |
39
+ | `borderRadius` | `Responsive<"none" \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "full" \| "inherit">` | — | |
40
+ | `borderRadiusTopLeftNone` | `boolean` | — | |
41
+ | `borderRadiusTopRightNone` | `boolean` | — | |
42
+ | `borderRadiusBottomLeftNone` | `boolean` | — | |
43
+ | `borderRadiusBottomRightNone` | `boolean` | — | |
44
+ | `borderRadiusTopNone` | `boolean` | — | |
45
+ | `borderRadiusRightNone` | `boolean` | — | |
46
+ | `borderRadiusBottomNone` | `boolean` | — | |
47
+ | `borderRadiusLeftNone` | `boolean` | — | |
48
+ | `borderStyle` | `Responsive<"none" \| "solid">` | — | |
49
+ | `borderTopStyle` | `Responsive<"none" \| "solid">` | — | |
50
+ | `borderRightStyle` | `Responsive<"none" \| "solid">` | — | |
51
+ | `borderBottomStyle` | `Responsive<"none" \| "solid">` | — | |
52
+ | `borderLeftStyle` | `Responsive<"none" \| "solid">` | — | |
53
+ | `borderWidth` | `Responsive<"0" \| "1" \| "2">` | — | |
54
+ | `borderTopWidth` | `Responsive<"0" \| "1" \| "2">` | — | |
55
+ | `borderRightWidth` | `Responsive<"0" \| "1" \| "2">` | — | |
56
+ | `borderBottomWidth` | `Responsive<"0" \| "1" \| "2">` | — | |
57
+ | `borderLeftWidth` | `Responsive<"0" \| "1" \| "2">` | — | |
58
+ | `color` | `"primary" \| "secondary" \| "brand" \| "affirmative" \| "inverted" \| `var(--h-${string})`` | — | |
59
+ | `flex` | `Responsive<string>` | — | |
60
+ | `flexBasis` | `Responsive<string>` | — | |
61
+ | `flexShrink` | `Responsive<string>` | — | |
62
+ | `flexGrow` | `Responsive<string>` | — | |
63
+ | `gridColumnSpan` | `Responsive<Union<string, "1" \| "2" \| "3" \| "4" \| "5" \| "6" \| "7" \| "8" \| "9" \| "10" \| "11" \| "12">>` | — | |
64
+ | `gridArea` | `Responsive<string>` | — | |
65
+ | `gridColumn` | `Responsive<string>` | — | |
66
+ | `gridColumnStart` | `Responsive<string>` | — | |
67
+ | `gridColumnEnd` | `Responsive<string>` | — | |
68
+ | `gridRow` | `Responsive<string>` | — | |
69
+ | `gridRowStart` | `Responsive<string>` | — | |
70
+ | `gridRowEnd` | `Responsive<string>` | — | |
71
+ | `margin` | `Responsive<`var(--h-${string})` \| "0" \| "auto" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
72
+ | `marginTop` | `Responsive<`var(--h-${string})` \| "0" \| "auto" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
73
+ | `marginRight` | `Responsive<`var(--h-${string})` \| "0" \| "auto" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
74
+ | `marginBottom` | `Responsive<`var(--h-${string})` \| "0" \| "auto" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
75
+ | `marginLeft` | `Responsive<`var(--h-${string})` \| "0" \| "auto" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
76
+ | `marginX` | `Responsive<`var(--h-${string})` \| "0" \| "auto" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
77
+ | `marginY` | `Responsive<`var(--h-${string})` \| "0" \| "auto" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
78
+ | `opacity` | `Responsive<string>` | — | |
79
+ | `order` | `Responsive<string>` | — | |
80
+ | `overflow` | `Responsive<"hidden" \| "auto" \| "visible" \| "clip" \| "scroll">` | — | |
81
+ | `overflowX` | `Responsive<"hidden" \| "auto" \| "visible" \| "clip" \| "scroll">` | — | |
82
+ | `overflowY` | `Responsive<"hidden" \| "auto" \| "visible" \| "clip" \| "scroll">` | — | |
83
+ | `padding` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
84
+ | `paddingTop` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
85
+ | `paddingRight` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
86
+ | `paddingBottom` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
87
+ | `paddingLeft` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
88
+ | `paddingX` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
89
+ | `paddingY` | `Responsive<`var(--h-${string})` \| "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">` | — | |
90
+ | `position` | `Responsive<"fixed" \| "static" \| "relative" \| "absolute" \| "sticky">` | — | |
91
+ | `inset` | `Responsive<Union<string, "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">>` | — | |
92
+ | `top` | `Responsive<Union<string, "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">>` | — | |
93
+ | `right` | `Responsive<Union<string, "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">>` | — | |
94
+ | `bottom` | `Responsive<Union<string, "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">>` | — | |
95
+ | `left` | `Responsive<Union<string, "0" \| "25" \| "50" \| "75" \| "100" \| "150" \| "175" \| "200" \| "250" \| "300" \| "350" \| "400" \| "500" \| "600" \| "700" \| "800" \| "900" \| "1000">>` | — | |
96
+ | `width` | `Responsive<string>` | — | |
97
+ | `maxWidth` | `Responsive<string>` | — | |
98
+ | `minWidth` | `Responsive<string>` | — | |
99
+ | `height` | `Responsive<string>` | — | |
100
+ | `maxHeight` | `Responsive<string>` | — | |
101
+ | `minHeight` | `Responsive<string>` | — | |
102
+ | `textAlign` | `Responsive<"center" \| "right" \| "left">` | — | |
103
+ | `textTransform` | `"none" \| "uppercase" \| "lowercase" \| "capitalize"` | — | Set the text-transform on the component. |
104
+ | `zIndex` | `Responsive<string>` | — | |
105
+ | `as` | `"div" \| "span"` | — | |