@dynatrace/strato-components 0.85.0 → 0.85.21

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 (282) hide show
  1. package/README.md +1 -1
  2. package/buttons/button/Button.css +93 -0
  3. package/buttons/button/Button.d.ts +94 -0
  4. package/buttons/button/Button.js +258 -0
  5. package/buttons/button/Button.sty.d.ts +51 -0
  6. package/buttons/button/Button.sty.js +33 -0
  7. package/buttons/button/Label.d.ts +16 -0
  8. package/buttons/button/Label.js +60 -0
  9. package/buttons/button/Prefix.d.ts +16 -0
  10. package/buttons/button/Prefix.js +54 -0
  11. package/buttons/button/Suffix.d.ts +16 -0
  12. package/buttons/button/Suffix.js +56 -0
  13. package/buttons/button/types/button-aria.d.ts +37 -0
  14. package/buttons/button/types/button-aria.js +15 -0
  15. package/buttons/button/utils/focus-without-scrolling.d.ts +5 -0
  16. package/buttons/button/utils/focus-without-scrolling.js +77 -0
  17. package/buttons/button/utils/is-virtual-event.d.ts +10 -0
  18. package/buttons/button/utils/is-virtual-event.js +32 -0
  19. package/buttons/index.d.ts +10 -0
  20. package/buttons/index.js +30 -0
  21. package/buttons/intent-button/IntentButton.d.ts +44 -0
  22. package/buttons/intent-button/IntentButton.js +102 -0
  23. package/buttons/intent-button/useIntentButton.d.ts +12 -0
  24. package/buttons/intent-button/useIntentButton.js +72 -0
  25. package/content/index.d.ts +4 -0
  26. package/content/index.js +5 -1
  27. package/content/progress/ProgressBar.js +1 -2
  28. package/content/progress/ProgressCircle.js +1 -2
  29. package/content/skeleton/Skeleton.css +33 -0
  30. package/content/skeleton/Skeleton.d.ts +30 -0
  31. package/content/skeleton/Skeleton.js +60 -0
  32. package/content/skeleton/Skeleton.sty.d.ts +10 -0
  33. package/content/skeleton/Skeleton.sty.js +25 -0
  34. package/content/skeleton/SkeletonText.d.ts +24 -0
  35. package/content/skeleton/SkeletonText.js +84 -0
  36. package/esm/buttons/button/Button.css +93 -0
  37. package/esm/buttons/button/Button.js +233 -0
  38. package/esm/buttons/button/Button.js.map +7 -0
  39. package/esm/buttons/button/Button.sty.js +15 -0
  40. package/esm/buttons/button/Button.sty.js.map +7 -0
  41. package/esm/buttons/button/Label.js +32 -0
  42. package/esm/buttons/button/Label.js.map +7 -0
  43. package/esm/buttons/button/Prefix.js +26 -0
  44. package/esm/buttons/button/Prefix.js.map +7 -0
  45. package/esm/buttons/button/Suffix.js +28 -0
  46. package/esm/buttons/button/Suffix.js.map +7 -0
  47. package/esm/buttons/button/types/button-aria.js +1 -0
  48. package/esm/buttons/button/types/button-aria.js.map +7 -0
  49. package/esm/buttons/button/utils/focus-without-scrolling.js +59 -0
  50. package/esm/buttons/button/utils/focus-without-scrolling.js.map +7 -0
  51. package/esm/buttons/button/utils/is-virtual-event.js +14 -0
  52. package/esm/buttons/button/utils/is-virtual-event.js.map +7 -0
  53. package/esm/buttons/index.js +15 -0
  54. package/esm/buttons/index.js.map +7 -0
  55. package/esm/buttons/intent-button/IntentButton.js +74 -0
  56. package/esm/buttons/intent-button/IntentButton.js.map +7 -0
  57. package/esm/buttons/intent-button/useIntentButton.js +57 -0
  58. package/esm/buttons/intent-button/useIntentButton.js.map +7 -0
  59. package/esm/content/index.js +5 -1
  60. package/esm/content/index.js.map +2 -2
  61. package/esm/content/progress/ProgressBar.js +2 -3
  62. package/esm/content/progress/ProgressBar.js.map +2 -2
  63. package/esm/content/progress/ProgressCircle.js +2 -3
  64. package/esm/content/progress/ProgressCircle.js.map +2 -2
  65. package/esm/content/skeleton/Skeleton.css +33 -0
  66. package/esm/content/skeleton/Skeleton.js +32 -0
  67. package/esm/content/skeleton/Skeleton.js.map +7 -0
  68. package/esm/content/skeleton/Skeleton.sty.js +7 -0
  69. package/esm/content/skeleton/Skeleton.sty.js.map +7 -0
  70. package/esm/content/skeleton/SkeletonText.js +56 -0
  71. package/esm/content/skeleton/SkeletonText.js.map +7 -0
  72. package/esm/index.js +1 -0
  73. package/esm/index.js.map +2 -2
  74. package/esm/layouts/{Divider → divider}/Divider.css +5 -5
  75. package/esm/layouts/{Divider → divider}/Divider.js.map +1 -1
  76. package/esm/layouts/{Divider → divider}/Divider.sty.js +1 -1
  77. package/esm/layouts/{Divider → divider}/Divider.sty.js.map +2 -2
  78. package/esm/layouts/helpers/spacingToCss.js +13 -0
  79. package/esm/layouts/helpers/spacingToCss.js.map +7 -0
  80. package/esm/layouts/hooks/useLayoutSizeProps.js +15 -0
  81. package/esm/layouts/hooks/useLayoutSizeProps.js.map +7 -0
  82. package/esm/layouts/hooks/useLayoutStyles.js +105 -0
  83. package/esm/layouts/hooks/useLayoutStyles.js.map +7 -0
  84. package/esm/layouts/hooks/useMarginProps.js +55 -0
  85. package/esm/layouts/hooks/useMarginProps.js.map +7 -0
  86. package/esm/layouts/hooks/usePaddingProps.js +59 -0
  87. package/esm/layouts/hooks/usePaddingProps.js.map +7 -0
  88. package/esm/layouts/index.js +6 -2
  89. package/esm/layouts/index.js.map +2 -2
  90. package/esm/layouts/surface/Surface.css +95 -0
  91. package/esm/layouts/surface/Surface.js +84 -0
  92. package/esm/layouts/surface/Surface.js.map +7 -0
  93. package/esm/layouts/surface/Surface.sty.js +10 -0
  94. package/esm/layouts/surface/Surface.sty.js.map +7 -0
  95. package/esm/layouts/surface/variables.sty.js +5 -0
  96. package/esm/layouts/surface/variables.sty.js.map +7 -0
  97. package/esm/layouts/types/layout.types.js +1 -0
  98. package/esm/layouts/types/layout.types.js.map +7 -0
  99. package/esm/styles/field.css +208 -0
  100. package/esm/styles/field.sty.js +9 -0
  101. package/esm/styles/field.sty.js.map +7 -0
  102. package/esm/typography/{BlockQuote → block-quote}/Blockquote.css +2 -2
  103. package/esm/typography/{BlockQuote → block-quote}/Blockquote.js.map +2 -2
  104. package/esm/typography/{BlockQuote → block-quote}/Blockquote.sty.js +1 -1
  105. package/esm/typography/{BlockQuote → block-quote}/Blockquote.sty.js.map +2 -2
  106. package/{typography/Code → esm/typography/code}/Code.css +1 -1
  107. package/esm/typography/code/Code.js.map +7 -0
  108. package/esm/typography/{Code → code}/Code.sty.js +1 -1
  109. package/esm/typography/{Code → code}/Code.sty.js.map +2 -2
  110. package/esm/typography/{Emphasis → emphasis}/Emphasis.css +1 -1
  111. package/esm/typography/{Emphasis → emphasis}/Emphasis.js.map +2 -2
  112. package/esm/typography/{Emphasis → emphasis}/Emphasis.sty.js +1 -1
  113. package/esm/typography/{Emphasis → emphasis}/Emphasis.sty.js.map +2 -2
  114. package/{typography/ExternalLink → esm/typography/external-link}/ExternalLink.css +6 -6
  115. package/esm/typography/external-link/ExternalLink.js.map +7 -0
  116. package/esm/typography/{ExternalLink → external-link}/ExternalLink.sty.js +1 -1
  117. package/esm/typography/{ExternalLink → external-link}/ExternalLink.sty.js.map +2 -2
  118. package/esm/typography/{Heading → heading}/Heading.css +7 -7
  119. package/esm/typography/heading/Heading.js.map +7 -0
  120. package/esm/typography/heading/Heading.sty.js +7 -0
  121. package/esm/typography/{Heading → heading}/Heading.sty.js.map +2 -2
  122. package/esm/typography/{Highlight → highlight}/Highlight.css +1 -1
  123. package/esm/typography/{Highlight → highlight}/Highlight.js.map +2 -2
  124. package/esm/typography/{Highlight → highlight}/Highlight.sty.js +1 -1
  125. package/esm/typography/{Highlight → highlight}/Highlight.sty.js.map +2 -2
  126. package/esm/typography/index.js +13 -13
  127. package/esm/typography/index.js.map +1 -1
  128. package/{typography/Link → esm/typography/link}/Link.css +4 -4
  129. package/esm/typography/{Link → link}/Link.js +1 -1
  130. package/esm/typography/link/Link.js.map +7 -0
  131. package/esm/typography/{Link → link}/Link.sty.js +1 -1
  132. package/esm/typography/{Link → link}/Link.sty.js.map +2 -2
  133. package/esm/typography/{List → list}/List.css +4 -4
  134. package/esm/typography/{List → list}/List.js +1 -1
  135. package/esm/typography/{List → list}/List.js.map +2 -2
  136. package/esm/typography/{List → list}/List.sty.js +2 -2
  137. package/esm/typography/{List → list}/List.sty.js.map +2 -2
  138. package/esm/typography/{Paragraph → paragraph}/Paragraph.css +3 -3
  139. package/esm/typography/{Paragraph → paragraph}/Paragraph.js.map +2 -2
  140. package/esm/typography/{Paragraph → paragraph}/Paragraph.sty.js +1 -1
  141. package/esm/typography/{Paragraph → paragraph}/Paragraph.sty.js.map +2 -2
  142. package/{typography/Strikethrough → esm/typography/strikethrough}/Strikethrough.css +1 -1
  143. package/esm/typography/strikethrough/Strikethrough.js.map +7 -0
  144. package/esm/typography/{Strikethrough → strikethrough}/Strikethrough.sty.js +1 -1
  145. package/esm/typography/{Strikethrough → strikethrough}/Strikethrough.sty.js.map +2 -2
  146. package/{typography/Strong → esm/typography/strong}/Strong.css +1 -1
  147. package/esm/typography/{Strong → strong}/Strong.js.map +2 -2
  148. package/esm/typography/{Strong → strong}/Strong.sty.js +1 -1
  149. package/esm/typography/{Strong → strong}/Strong.sty.js.map +2 -2
  150. package/{typography/Text → esm/typography/text}/Text.css +3 -3
  151. package/esm/typography/text/Text.js.map +7 -0
  152. package/esm/typography/{Text → text}/Text.sty.js +1 -1
  153. package/esm/typography/{Text → text}/Text.sty.js.map +2 -2
  154. package/{typography/TextEllipsis → esm/typography/text-ellipsis}/TextEllipsis.css +4 -4
  155. package/esm/typography/text-ellipsis/TextEllipsis.js.map +7 -0
  156. package/esm/typography/text-ellipsis/TextEllipsis.sty.js +7 -0
  157. package/esm/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.sty.js.map +2 -2
  158. package/index.d.ts +1 -0
  159. package/index.js +1 -0
  160. package/lang/en.json +12 -0
  161. package/lang/ja.json +24 -0
  162. package/lang/uncompiled/en.json +8 -0
  163. package/lang/uncompiled/ja.json +14 -1
  164. package/layouts/{Divider → divider}/Divider.css +5 -5
  165. package/layouts/{Divider → divider}/Divider.sty.js +1 -1
  166. package/layouts/helpers/spacingToCss.d.ts +6 -0
  167. package/layouts/helpers/spacingToCss.js +29 -0
  168. package/layouts/hooks/useLayoutSizeProps.d.ts +6 -0
  169. package/layouts/hooks/useLayoutSizeProps.js +33 -0
  170. package/layouts/hooks/useLayoutStyles.d.ts +7 -0
  171. package/layouts/hooks/useLayoutStyles.js +123 -0
  172. package/layouts/hooks/useMarginProps.d.ts +7 -0
  173. package/layouts/hooks/useMarginProps.js +73 -0
  174. package/layouts/hooks/usePaddingProps.d.ts +7 -0
  175. package/layouts/hooks/usePaddingProps.js +77 -0
  176. package/layouts/index.d.ts +6 -2
  177. package/layouts/index.js +6 -2
  178. package/layouts/surface/Surface.css +95 -0
  179. package/layouts/surface/Surface.d.ts +46 -0
  180. package/layouts/surface/Surface.js +110 -0
  181. package/layouts/surface/Surface.sty.d.ts +43 -0
  182. package/layouts/surface/Surface.sty.js +28 -0
  183. package/layouts/surface/variables.sty.d.ts +1 -0
  184. package/layouts/surface/variables.sty.js +23 -0
  185. package/layouts/types/layout.types.d.ts +64 -0
  186. package/layouts/types/layout.types.js +15 -0
  187. package/package.json +11 -4
  188. package/styles/field.css +208 -0
  189. package/styles/field.sty.d.ts +102 -0
  190. package/styles/field.sty.js +27 -0
  191. package/styles/sprinkles.sty.d.ts +107 -107
  192. package/typography/{BlockQuote → block-quote}/Blockquote.css +2 -2
  193. package/typography/{BlockQuote → block-quote}/Blockquote.sty.js +1 -1
  194. package/{esm/typography/Code → typography/code}/Code.css +1 -1
  195. package/typography/{Code → code}/Code.d.ts +2 -2
  196. package/typography/{Code → code}/Code.sty.js +1 -1
  197. package/typography/{Emphasis → emphasis}/Emphasis.css +1 -1
  198. package/typography/{Emphasis → emphasis}/Emphasis.sty.js +1 -1
  199. package/{esm/typography/ExternalLink → typography/external-link}/ExternalLink.css +6 -6
  200. package/typography/{ExternalLink → external-link}/ExternalLink.d.ts +2 -2
  201. package/typography/{ExternalLink → external-link}/ExternalLink.sty.js +1 -1
  202. package/typography/{Heading → heading}/Heading.css +7 -7
  203. package/typography/{Heading → heading}/Heading.d.ts +3 -2
  204. package/typography/{Heading → heading}/Heading.sty.js +1 -1
  205. package/typography/{Highlight → highlight}/Highlight.css +1 -1
  206. package/typography/{Highlight → highlight}/Highlight.sty.js +1 -1
  207. package/typography/index.d.ts +26 -26
  208. package/typography/index.js +13 -13
  209. package/{esm/typography/Link → typography/link}/Link.css +4 -4
  210. package/typography/{Link → link}/Link.d.ts +2 -2
  211. package/typography/{Link → link}/Link.js +1 -1
  212. package/typography/{Link → link}/Link.sty.js +1 -1
  213. package/typography/{List → list}/List.css +4 -4
  214. package/typography/{List → list}/List.js +1 -1
  215. package/typography/{List → list}/List.sty.js +2 -2
  216. package/typography/{Paragraph → paragraph}/Paragraph.css +3 -3
  217. package/typography/{Paragraph → paragraph}/Paragraph.sty.js +1 -1
  218. package/{esm/typography/Strikethrough → typography/strikethrough}/Strikethrough.css +1 -1
  219. package/typography/{Strikethrough → strikethrough}/Strikethrough.d.ts +2 -2
  220. package/typography/{Strikethrough → strikethrough}/Strikethrough.sty.js +1 -1
  221. package/{esm/typography/Strong → typography/strong}/Strong.css +1 -1
  222. package/typography/{Strong → strong}/Strong.sty.js +1 -1
  223. package/{esm/typography/Text → typography/text}/Text.css +3 -3
  224. package/typography/{Text → text}/Text.d.ts +3 -2
  225. package/typography/{Text → text}/Text.sty.js +1 -1
  226. package/{esm/typography/TextEllipsis → typography/text-ellipsis}/TextEllipsis.css +4 -4
  227. package/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.d.ts +3 -3
  228. package/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.sty.js +1 -1
  229. package/esm/typography/Code/Code.js.map +0 -7
  230. package/esm/typography/ExternalLink/ExternalLink.js.map +0 -7
  231. package/esm/typography/Heading/Heading.js.map +0 -7
  232. package/esm/typography/Heading/Heading.sty.js +0 -7
  233. package/esm/typography/Link/Link.js.map +0 -7
  234. package/esm/typography/Strikethrough/Strikethrough.js.map +0 -7
  235. package/esm/typography/Text/Text.js.map +0 -7
  236. package/esm/typography/TextEllipsis/TextEllipsis.js.map +0 -7
  237. package/esm/typography/TextEllipsis/TextEllipsis.sty.js +0 -7
  238. package/esm/layouts/{Divider → divider}/Divider.js +0 -0
  239. package/esm/typography/{BlockQuote → block-quote}/Blockquote.js +0 -0
  240. package/esm/typography/{Code → code}/Code.js +0 -0
  241. package/esm/typography/{Emphasis → emphasis}/Emphasis.js +0 -0
  242. package/esm/typography/{ExternalLink → external-link}/ExternalLink.js +0 -0
  243. package/esm/typography/{Heading → heading}/Heading.js +0 -0
  244. package/esm/typography/{Highlight → highlight}/Highlight.js +0 -0
  245. package/esm/typography/{Paragraph → paragraph}/Paragraph.js +0 -0
  246. package/esm/typography/{Strikethrough → strikethrough}/Strikethrough.js +0 -0
  247. package/esm/typography/{Strong → strong}/Strong.js +0 -0
  248. package/esm/typography/{Text → text}/Text.js +0 -0
  249. package/esm/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.js +0 -0
  250. package/layouts/{Divider → divider}/Divider.d.ts +0 -0
  251. package/layouts/{Divider → divider}/Divider.js +0 -0
  252. package/layouts/{Divider → divider}/Divider.sty.d.ts +0 -0
  253. package/typography/{BlockQuote → block-quote}/Blockquote.d.ts +1 -1
  254. package/typography/{BlockQuote → block-quote}/Blockquote.js +0 -0
  255. package/typography/{BlockQuote → block-quote}/Blockquote.sty.d.ts +0 -0
  256. package/typography/{Code → code}/Code.js +0 -0
  257. package/typography/{Code → code}/Code.sty.d.ts +0 -0
  258. package/typography/{Emphasis → emphasis}/Emphasis.d.ts +1 -1
  259. package/typography/{Emphasis → emphasis}/Emphasis.js +0 -0
  260. package/typography/{Emphasis → emphasis}/Emphasis.sty.d.ts +0 -0
  261. package/typography/{ExternalLink → external-link}/ExternalLink.js +0 -0
  262. package/typography/{ExternalLink → external-link}/ExternalLink.sty.d.ts +0 -0
  263. package/typography/{Heading → heading}/Heading.js +0 -0
  264. package/typography/{Heading → heading}/Heading.sty.d.ts +0 -0
  265. package/typography/{Highlight → highlight}/Highlight.d.ts +1 -1
  266. package/typography/{Highlight → highlight}/Highlight.js +0 -0
  267. package/typography/{Highlight → highlight}/Highlight.sty.d.ts +0 -0
  268. package/typography/{Link → link}/Link.sty.d.ts +0 -0
  269. package/typography/{List → list}/List.d.ts +1 -1
  270. package/typography/{List → list}/List.sty.d.ts +0 -0
  271. package/typography/{Paragraph → paragraph}/Paragraph.d.ts +1 -1
  272. package/typography/{Paragraph → paragraph}/Paragraph.js +0 -0
  273. package/typography/{Paragraph → paragraph}/Paragraph.sty.d.ts +0 -0
  274. package/typography/{Strikethrough → strikethrough}/Strikethrough.js +0 -0
  275. package/typography/{Strikethrough → strikethrough}/Strikethrough.sty.d.ts +0 -0
  276. package/typography/{Strong → strong}/Strong.d.ts +1 -1
  277. /package/typography/{Strong → strong}/Strong.js +0 -0
  278. /package/typography/{Strong → strong}/Strong.sty.d.ts +0 -0
  279. /package/typography/{Text → text}/Text.js +0 -0
  280. /package/typography/{Text → text}/Text.sty.d.ts +0 -0
  281. /package/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.js +0 -0
  282. /package/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.sty.d.ts +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/typography/text/Text.tsx"],
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport React, { type ElementType, type ReactElement, forwardRef } from 'react';\n\nimport { textCSS } from './Text.sty.js';\nimport type { AriaLabelingProps } from '../../core/types/a11y-props.js';\nimport type { DataTestId } from '../../core/types/data-props.js';\nimport type { DOMProps } from '../../core/types/dom.js';\nimport type { MaskingProps } from '../../core/types/masking-props.js';\nimport type { PolymorphicComponentProps } from '../../core/types/polymorph.js';\nimport type { StylingProps } from '../../core/types/styling-props.js';\nimport type { WithChildren } from '../../core/types/with-children.js';\nimport { textStyleCSS } from '../../styles/textStyle.sty.js';\n\n/**\n * The props for the text component without any props coming from polymorphing.\n * @public\n */\nexport interface TextOwnProps\n extends WithChildren,\n DOMProps,\n AriaLabelingProps,\n StylingProps,\n DataTestId,\n MaskingProps {\n /** Sets the text style. Variants include \"base\", \"base-emphasized\", etc. */\n textStyle?: 'base' | 'base-emphasized' | 'small' | 'small-emphasized';\n /** Sets the font style. Can either be \"text\" or \"code\" */\n fontStyle?: 'text' | 'code';\n}\n\n/**\n * @public\n * Combined props for the text component - polymorphing and own props. */\nexport type TextProps<E extends ElementType> = PolymorphicComponentProps<\n E,\n TextOwnProps\n>;\n\n/**\n * Use the `Text` component for text that is rendered without any semantic markup.\n * @public\n */\nexport const Text: <E extends ElementType = 'span'>(\n props: TextProps<E>,\n) => ReactElement | null = /* @__PURE__ */ forwardRef(\n <E extends ElementType>(\n {\n children,\n textStyle,\n fontStyle,\n as,\n className: consumerClassName,\n style: consumerStyle,\n 'data-testid': dataTestId,\n 'data-dtrum-mask': dataDtrumMask,\n 'data-dtrum-allow': dataDtrumAllow,\n ...remainingProps\n }: TextProps<E>,\n ref: typeof remainingProps.ref,\n ) => {\n const TextTag = as || 'span';\n\n let ellipsis: undefined | 'singleLine' | 'multiLine';\n\n return (\n <TextTag\n data-testid={dataTestId}\n data-dtrum-mask={dataDtrumMask}\n data-dtrum-allow={dataDtrumAllow}\n ref={ref}\n className={clsx([\n textCSS({ ellipsis }),\n (fontStyle || textStyle) && textStyleCSS({ fontStyle, textStyle }),\n consumerClassName,\n ])}\n style={consumerStyle}\n {...remainingProps}\n >\n {children}\n </TextTag>\n );\n },\n);\n\n(Text as typeof Text & { displayName: string }).displayName = 'Text';\n"],
5
+ "mappings": "AAAA,OAAO,UAAU;AACjB,OAAO,SAA8C,kBAAkB;AAEvE,SAAS,eAAe;AAQxB,SAAS,oBAAoB;AA+BtB,MAAM,OAE8B;AAAA,EACzC,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,OAAO;AAAA,IACP,eAAe;AAAA,IACf,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,IACpB,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,UAAU,MAAM;AAEtB,QAAI;AAEJ,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAa;AAAA,QACb,mBAAiB;AAAA,QACjB,oBAAkB;AAAA,QAClB;AAAA,QACA,WAAW,KAAK;AAAA,UACd,QAAQ,EAAE,SAAS,CAAC;AAAA,WACnB,aAAa,cAAc,aAAa,EAAE,WAAW,UAAU,CAAC;AAAA,UACjE;AAAA,QACF,CAAC;AAAA,QACD,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEC,KAA+C,cAAc;",
6
+ "names": []
7
+ }
@@ -1,6 +1,6 @@
1
1
  import "./Text.css";
2
2
  import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
3
- var textCSS = _7a468({ defaultClassName: "Text_textCSS__ty6wu50", variantClassNames: { ellipsis: { singleLine: "Text_textCSS_ellipsis_singleLine__ty6wu51", multiLine: "Text_textCSS_ellipsis_multiLine__ty6wu52" } }, defaultVariants: {}, compoundVariants: [] });
3
+ var textCSS = _7a468({ defaultClassName: "Text_textCSS__rup8ap0", variantClassNames: { ellipsis: { singleLine: "Text_textCSS_ellipsis_singleLine__rup8ap1", multiLine: "Text_textCSS_ellipsis_multiLine__rup8ap2" } }, defaultVariants: {}, compoundVariants: [] });
4
4
  export {
5
5
  textCSS
6
6
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/typography/Text/Text.css.ts"],
4
- "sourcesContent": ["import './Text.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var textCSS = _7a468({defaultClassName:'Text_textCSS__ty6wu50',variantClassNames:{ellipsis:{singleLine:'Text_textCSS_ellipsis_singleLine__ty6wu51',multiLine:'Text_textCSS_ellipsis_multiLine__ty6wu52'}},defaultVariants:{},compoundVariants:[]});"],
3
+ "sources": ["../../../../src/typography/text/Text.css.ts"],
4
+ "sourcesContent": ["import './Text.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var textCSS = _7a468({defaultClassName:'Text_textCSS__rup8ap0',variantClassNames:{ellipsis:{singleLine:'Text_textCSS_ellipsis_singleLine__rup8ap1',multiLine:'Text_textCSS_ellipsis_multiLine__rup8ap2'}},defaultVariants:{},compoundVariants:[]});"],
5
5
  "mappings": "AAAA,OAAO;AACP,SAAS,mBAAmB,cAAc;AACnC,IAAI,UAAU,OAAO,EAAC,kBAAiB,yBAAwB,mBAAkB,EAAC,UAAS,EAAC,YAAW,6CAA4C,WAAU,2CAA0C,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,EAAC,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- .TextEllipsis_textEllipsisCSS__1n6xzhd0 {
1
+ .TextEllipsis_textEllipsisCSS__1mnpbqs0 {
2
2
  display: inline-block;
3
3
  box-sizing: border-box;
4
4
  vertical-align: middle;
@@ -9,14 +9,14 @@
9
9
  text-decoration: inherit;
10
10
  width: 100%;
11
11
  }
12
- .TextEllipsis_textEllipsisCSS_truncationMode_start__1n6xzhd1 {
12
+ .TextEllipsis_textEllipsisCSS_truncationMode_start__1mnpbqs1 {
13
13
  text-overflow: ellipsis;
14
14
  direction: rtl;
15
15
  text-align: left;
16
16
  }
17
- .TextEllipsis_textEllipsisCSS_truncationMode_middle__1n6xzhd2 {
17
+ .TextEllipsis_textEllipsisCSS_truncationMode_middle__1mnpbqs2 {
18
18
  text-overflow: clip;
19
19
  }
20
- .TextEllipsis_textEllipsisCSS_truncationMode_end__1n6xzhd3 {
20
+ .TextEllipsis_textEllipsisCSS_truncationMode_end__1mnpbqs3 {
21
21
  text-overflow: ellipsis;
22
22
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/typography/text-ellipsis/TextEllipsis.tsx"],
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport React, {\n forwardRef,\n HTMLAttributes,\n RefObject,\n useLayoutEffect,\n useRef,\n} from 'react';\nimport useResizeObserver from 'use-resize-observer';\n\nimport { textEllipsisCSS } from './TextEllipsis.sty.js';\nimport { _useFontsUpdated } from '../../core/hooks/useFontsUpdated.js';\nimport { useMergeRefs } from '../../core/hooks/useMergeRefs.js';\nimport { type DataTestId } from '../../core/types/data-props.js';\nimport { type MaskingProps } from '../../core/types/masking-props.js';\nimport { type StylingProps } from '../../core/types/styling-props.js';\nimport { type _Font } from '../utils.js';\nimport { _centerEllipsizeText } from '../utils.js';\n\n/**\n * Available modes for how overly long text is truncated and where the ellipsis is placed.\n * @internal\n */\nexport type _TruncationMode = 'start' | 'middle' | 'end';\n\n/**\n * The props for the TextEllipsis component.\n * @public\n */\nexport interface TextEllipsisProps\n extends HTMLAttributes<HTMLSpanElement>,\n StylingProps,\n DataTestId,\n MaskingProps {\n /** The children (as text) passed to the component. */\n children: string;\n /**\n * The mode used for for truncating the text, either at the start, in the middle or at the end.\n * @defaultValue 'end'\n */\n truncationMode?: 'start' | 'middle' | 'end';\n /** Gets called when text needs to get truncated due to lack of horizontal space. */\n onTextOverflow?: (ellipsized: boolean) => void;\n}\n\n/**\n * Returns an object containing all font-related CSS properties from\n * a given DOM element that are relevant for rendering formatted text\n * in a 2D canvas context.\n *\n * @param textWrapper - The HTML element to extract the CSS properties from\n */\nfunction getFontProps(textWrapper: HTMLSpanElement): _Font {\n const computedStyle = window.getComputedStyle(textWrapper, null);\n\n return {\n fontStyle: computedStyle.getPropertyValue('font-style'),\n fontWeight: computedStyle.getPropertyValue('font-weight'),\n fontSize: computedStyle.getPropertyValue('font-size'),\n fontFamily: computedStyle.getPropertyValue('font-family'),\n };\n}\n\n/**\n * Determines whether a CSS text-ellipsis is currently rendered in a container.\n * Note: `containerWidth` is only passed to avoid unnecessary reflows by calling `getBoundingClientRect()`\n */\nfunction isNativeEllipsisActive(\n textWrapper: HTMLSpanElement,\n containerWidth: number,\n): boolean {\n const textWidth =\n Math.floor(textWrapper.getBoundingClientRect().width * 100) / 100;\n\n return textWidth > containerWidth;\n}\n\n/**\n * Detects whether a given formatted text has enough space within its\n * parent container and applies or removes an ellipsis accordingly.\n *\n * @param originalText - The text to be truncated if its width exceeds <code>maxWidthInPx</code>\n * @param truncationMode - The mode used for for truncating the text, either at the start, in the middle or at the end\n * @param containerRef - Object ref pointing towards the root element of the TextEllipsis component\n * @param wasEllipsized - Whether an ellipsis was applied during the last render cycle\n * @param onTextOverflow - Callback that gets called whenever the state of the ellipsis changes since the last render cycle\n */\nfunction renderEllipsizedText(\n originalText: string,\n truncationMode: TextEllipsisProps['truncationMode'],\n containerRef: RefObject<HTMLSpanElement>,\n wasEllipsized: boolean,\n onTextOverflow?: (ellipsized: boolean) => void,\n): boolean {\n const containerElement = containerRef.current;\n const textWrapper: HTMLSpanElement | null =\n (containerElement?.firstElementChild as HTMLSpanElement) || null;\n\n if (containerElement !== null && textWrapper !== null) {\n if (textWrapper.textContent !== originalText) {\n textWrapper.textContent = originalText; // always reset to full text before measuring container width\n }\n\n const containerWidth =\n Math.ceil(containerElement.getBoundingClientRect().width * 100) / 100;\n\n if (truncationMode === 'middle') {\n if (isNativeEllipsisActive(textWrapper, containerWidth)) {\n const ellipsizedText = _centerEllipsizeText(\n originalText,\n getFontProps(textWrapper),\n containerWidth,\n );\n textWrapper.textContent = ellipsizedText;\n\n if (ellipsizedText !== originalText) {\n if (onTextOverflow && !wasEllipsized) {\n onTextOverflow(true);\n }\n\n return true;\n }\n }\n\n if (onTextOverflow && wasEllipsized) {\n onTextOverflow(false);\n }\n } else if (isNativeEllipsisActive(textWrapper, containerWidth)) {\n if (onTextOverflow && !wasEllipsized) {\n onTextOverflow(true);\n }\n\n return true;\n } else if (onTextOverflow && wasEllipsized) {\n onTextOverflow(false);\n }\n }\n\n return false;\n}\n\nconst ComputedTextEllipsis = /* @__PURE__ */ forwardRef<\n HTMLSpanElement,\n TextEllipsisProps\n>((props, forwardedRef) => {\n const {\n children,\n truncationMode = 'end',\n onTextOverflow,\n className: consumerClassName,\n style: consumerStyle,\n 'data-testid': dataTestId,\n 'data-dtrum-mask': dataDtrumMask,\n 'data-dtrum-allow': dataDtrumAllow,\n ...remainingProps\n } = props;\n\n // resize observer is needed to re-render the component in case of resizing\n const { ref: observerContainerRef } = useResizeObserver<HTMLSpanElement>();\n const containerRef = useRef<HTMLSpanElement | null>(null);\n const ellipsisStateRef = useRef<boolean>(false);\n const mergedRef = useMergeRefs<HTMLSpanElement | null>([\n observerContainerRef,\n (instance: HTMLSpanElement) => {\n containerRef.current = instance;\n },\n forwardedRef,\n ]);\n const containerWidth = containerRef.current?.getBoundingClientRect().width;\n const fontsUpdated = _useFontsUpdated();\n\n useLayoutEffect(() => {\n ellipsisStateRef.current = renderEllipsizedText(\n children,\n truncationMode,\n containerRef,\n ellipsisStateRef.current,\n onTextOverflow,\n );\n }, [containerWidth, children, truncationMode, fontsUpdated, onTextOverflow]);\n\n return (\n <span\n ref={mergedRef}\n aria-label={children}\n data-ellipsis\n data-testid={dataTestId}\n data-dtrum-mask={dataDtrumMask}\n data-dtrum-allow={dataDtrumAllow}\n className={clsx(textEllipsisCSS({ truncationMode }), consumerClassName)}\n style={consumerStyle}\n {...remainingProps}\n >\n <span>{children}</span>\n </span>\n );\n});\n\nconst CssTextEllipsis = /* @__PURE__ */ forwardRef<\n HTMLSpanElement,\n TextEllipsisProps\n>((props, forwardedRef) => {\n const {\n children,\n truncationMode = 'end',\n onTextOverflow,\n className: consumerClassName,\n style: consumerStyle,\n 'data-testid': dataTestId,\n ...remainingProps\n } = props;\n\n return (\n <span\n ref={forwardedRef}\n aria-label={children}\n data-ellipsis\n data-testid={dataTestId}\n className={clsx(textEllipsisCSS({ truncationMode }), consumerClassName)}\n style={consumerStyle}\n {...remainingProps}\n >\n <span>{children}</span>\n </span>\n );\n});\n\n/**\n * Use the `TextEllipsis` component to truncate text and show an ellipsis whenever\n * there is insufficient space to render the entire text. While some of our Strato\n * components provide ellipsis out of the box, you need to take care of this yourself\n * when writing your own components.\n * @public\n */\nexport const TextEllipsis = /* @__PURE__ */ forwardRef<\n HTMLSpanElement,\n TextEllipsisProps\n>((props, forwardedRef) => {\n // in case onTextOverflow is not defined and the ellipsis is start or end\n // we can use css only which is significantly more performant\n const cssOnlyEllipsis =\n !props.onTextOverflow && props.truncationMode !== 'middle';\n\n return cssOnlyEllipsis ? (\n <CssTextEllipsis ref={forwardedRef} {...props} />\n ) : (\n <ComputedTextEllipsis ref={forwardedRef} {...props} />\n );\n});\n\n(TextEllipsis as typeof TextEllipsis & { displayName: string }).displayName =\n 'TextEllipsis';\n"],
5
+ "mappings": "AAAA,OAAO,UAAU;AACjB,OAAO;AAAA,EACL;AAAA,EAGA;AAAA,EACA;AAAA,OACK;AACP,OAAO,uBAAuB;AAE9B,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AACjC,SAAS,oBAAoB;AAK7B,SAAS,4BAA4B;AAmCrC,SAAS,aAAa,aAAqC;AACzD,QAAM,gBAAgB,OAAO,iBAAiB,aAAa,IAAI;AAE/D,SAAO;AAAA,IACL,WAAW,cAAc,iBAAiB,YAAY;AAAA,IACtD,YAAY,cAAc,iBAAiB,aAAa;AAAA,IACxD,UAAU,cAAc,iBAAiB,WAAW;AAAA,IACpD,YAAY,cAAc,iBAAiB,aAAa;AAAA,EAC1D;AACF;AAMA,SAAS,uBACP,aACA,gBACS;AACT,QAAM,YACJ,KAAK,MAAM,YAAY,sBAAsB,EAAE,QAAQ,GAAG,IAAI;AAEhE,SAAO,YAAY;AACrB;AAYA,SAAS,qBACP,cACA,gBACA,cACA,eACA,gBACS;AACT,QAAM,mBAAmB,aAAa;AACtC,QAAM,cACH,kBAAkB,qBAAyC;AAE9D,MAAI,qBAAqB,QAAQ,gBAAgB,MAAM;AACrD,QAAI,YAAY,gBAAgB,cAAc;AAC5C,kBAAY,cAAc;AAAA,IAC5B;AAEA,UAAM,iBACJ,KAAK,KAAK,iBAAiB,sBAAsB,EAAE,QAAQ,GAAG,IAAI;AAEpE,QAAI,mBAAmB,UAAU;AAC/B,UAAI,uBAAuB,aAAa,cAAc,GAAG;AACvD,cAAM,iBAAiB;AAAA,UACrB;AAAA,UACA,aAAa,WAAW;AAAA,UACxB;AAAA,QACF;AACA,oBAAY,cAAc;AAE1B,YAAI,mBAAmB,cAAc;AACnC,cAAI,kBAAkB,CAAC,eAAe;AACpC,2BAAe,IAAI;AAAA,UACrB;AAEA,iBAAO;AAAA,QACT;AAAA,MACF;AAEA,UAAI,kBAAkB,eAAe;AACnC,uBAAe,KAAK;AAAA,MACtB;AAAA,IACF,WAAW,uBAAuB,aAAa,cAAc,GAAG;AAC9D,UAAI,kBAAkB,CAAC,eAAe;AACpC,uBAAe,IAAI;AAAA,MACrB;AAEA,aAAO;AAAA,IACT,WAAW,kBAAkB,eAAe;AAC1C,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF;AAEA,SAAO;AACT;AAEA,MAAM,uBAAuC,2BAG3C,CAAC,OAAO,iBAAiB;AACzB,QAAM;AAAA,IACJ;AAAA,IACA,iBAAiB;AAAA,IACjB;AAAA,IACA,WAAW;AAAA,IACX,OAAO;AAAA,IACP,eAAe;AAAA,IACf,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,IACpB,GAAG;AAAA,EACL,IAAI;AAGJ,QAAM,EAAE,KAAK,qBAAqB,IAAI,kBAAmC;AACzE,QAAM,eAAe,OAA+B,IAAI;AACxD,QAAM,mBAAmB,OAAgB,KAAK;AAC9C,QAAM,YAAY,aAAqC;AAAA,IACrD;AAAA,IACA,CAAC,aAA8B;AAC7B,mBAAa,UAAU;AAAA,IACzB;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,iBAAiB,aAAa,SAAS,sBAAsB,EAAE;AACrE,QAAM,eAAe,iBAAiB;AAEtC,kBAAgB,MAAM;AACpB,qBAAiB,UAAU;AAAA,MACzB;AAAA,MACA;AAAA,MACA;AAAA,MACA,iBAAiB;AAAA,MACjB;AAAA,IACF;AAAA,EACF,GAAG,CAAC,gBAAgB,UAAU,gBAAgB,cAAc,cAAc,CAAC;AAE3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,cAAY;AAAA,MACZ,iBAAa;AAAA,MACb,eAAa;AAAA,MACb,mBAAiB;AAAA,MACjB,oBAAkB;AAAA,MAClB,WAAW,KAAK,gBAAgB,EAAE,eAAe,CAAC,GAAG,iBAAiB;AAAA,MACtE,OAAO;AAAA,MACN,GAAG;AAAA;AAAA,IAEJ,oCAAC,cAAM,QAAS;AAAA,EAClB;AAEJ,CAAC;AAED,MAAM,kBAAkC,2BAGtC,CAAC,OAAO,iBAAiB;AACzB,QAAM;AAAA,IACJ;AAAA,IACA,iBAAiB;AAAA,IACjB;AAAA,IACA,WAAW;AAAA,IACX,OAAO;AAAA,IACP,eAAe;AAAA,IACf,GAAG;AAAA,EACL,IAAI;AAEJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,cAAY;AAAA,MACZ,iBAAa;AAAA,MACb,eAAa;AAAA,MACb,WAAW,KAAK,gBAAgB,EAAE,eAAe,CAAC,GAAG,iBAAiB;AAAA,MACtE,OAAO;AAAA,MACN,GAAG;AAAA;AAAA,IAEJ,oCAAC,cAAM,QAAS;AAAA,EAClB;AAEJ,CAAC;AASM,MAAM,eAA+B,2BAG1C,CAAC,OAAO,iBAAiB;AAGzB,QAAM,kBACJ,CAAC,MAAM,kBAAkB,MAAM,mBAAmB;AAEpD,SAAO,kBACL,oCAAC,mBAAgB,KAAK,cAAe,GAAG,OAAO,IAE/C,oCAAC,wBAAqB,KAAK,cAAe,GAAG,OAAO;AAExD,CAAC;AAEA,aAA+D,cAC9D;",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ import "./TextEllipsis.css";
2
+ import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
3
+ var textEllipsisCSS = _7a468({ defaultClassName: "TextEllipsis_textEllipsisCSS__1mnpbqs0", variantClassNames: { truncationMode: { start: "TextEllipsis_textEllipsisCSS_truncationMode_start__1mnpbqs1", middle: "TextEllipsis_textEllipsisCSS_truncationMode_middle__1mnpbqs2", end: "TextEllipsis_textEllipsisCSS_truncationMode_end__1mnpbqs3" } }, defaultVariants: {}, compoundVariants: [] });
4
+ export {
5
+ textEllipsisCSS
6
+ };
7
+ //# sourceMappingURL=TextEllipsis.sty.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/typography/TextEllipsis/TextEllipsis.css.ts"],
4
- "sourcesContent": ["import './TextEllipsis.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var textEllipsisCSS = _7a468({defaultClassName:'TextEllipsis_textEllipsisCSS__1n6xzhd0',variantClassNames:{truncationMode:{start:'TextEllipsis_textEllipsisCSS_truncationMode_start__1n6xzhd1',middle:'TextEllipsis_textEllipsisCSS_truncationMode_middle__1n6xzhd2',end:'TextEllipsis_textEllipsisCSS_truncationMode_end__1n6xzhd3'}},defaultVariants:{},compoundVariants:[]});"],
3
+ "sources": ["../../../../src/typography/text-ellipsis/TextEllipsis.css.ts"],
4
+ "sourcesContent": ["import './TextEllipsis.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var textEllipsisCSS = _7a468({defaultClassName:'TextEllipsis_textEllipsisCSS__1mnpbqs0',variantClassNames:{truncationMode:{start:'TextEllipsis_textEllipsisCSS_truncationMode_start__1mnpbqs1',middle:'TextEllipsis_textEllipsisCSS_truncationMode_middle__1mnpbqs2',end:'TextEllipsis_textEllipsisCSS_truncationMode_end__1mnpbqs3'}},defaultVariants:{},compoundVariants:[]});"],
5
5
  "mappings": "AAAA,OAAO;AACP,SAAS,mBAAmB,cAAc;AACnC,IAAI,kBAAkB,OAAO,EAAC,kBAAiB,0CAAyC,mBAAkB,EAAC,gBAAe,EAAC,OAAM,+DAA8D,QAAO,gEAA+D,KAAI,4DAA2D,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,EAAC,CAAC;",
6
6
  "names": []
7
7
  }
package/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './buttons/index.js';
1
2
  export * from './core/index.js';
2
3
  export * from './content/index.js';
3
4
  export * from './layouts/index.js';
package/index.js CHANGED
@@ -14,6 +14,7 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
14
14
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
15
  var src_exports = {};
16
16
  module.exports = __toCommonJS(src_exports);
17
+ __reExport(src_exports, require("./buttons/index.js"), module.exports);
17
18
  __reExport(src_exports, require("./core/index.js"), module.exports);
18
19
  __reExport(src_exports, require("./content/index.js"), module.exports);
19
20
  __reExport(src_exports, require("./layouts/index.js"), module.exports);
package/lang/en.json CHANGED
@@ -5,10 +5,22 @@
5
5
  "value": "Loading"
6
6
  }
7
7
  ],
8
+ "JQOGuaGgqJObmSY1": [
9
+ {
10
+ "type": 0,
11
+ "value": "Open with"
12
+ }
13
+ ],
8
14
  "JzYy8MUVfPcyf4l5": [
9
15
  {
10
16
  "type": 0,
11
17
  "value": "Opening the link in a new window"
12
18
  }
19
+ ],
20
+ "cycz+bYG+VH7Of4e": [
21
+ {
22
+ "type": 0,
23
+ "value": "Loading"
24
+ }
13
25
  ]
14
26
  }
package/lang/ja.json CHANGED
@@ -1,2 +1,26 @@
1
1
  {
2
+ "3J6qHQEUwDxvZuIl": [
3
+ {
4
+ "type": 0,
5
+ "value": "ロードしています"
6
+ }
7
+ ],
8
+ "JQOGuaGgqJObmSY1": [
9
+ {
10
+ "type": 0,
11
+ "value": "プログラムから開く"
12
+ }
13
+ ],
14
+ "JzYy8MUVfPcyf4l5": [
15
+ {
16
+ "type": 0,
17
+ "value": "リンクを新しいウィンドウで開く"
18
+ }
19
+ ],
20
+ "cycz+bYG+VH7Of4e": [
21
+ {
22
+ "type": 0,
23
+ "value": "ロードしています"
24
+ }
25
+ ]
2
26
  }
@@ -3,8 +3,16 @@
3
3
  "notes": "Default label for the progress-bar.",
4
4
  "translation": "Loading"
5
5
  },
6
+ "JQOGuaGgqJObmSY1": {
7
+ "notes": "Intent button open label",
8
+ "translation": "Open with"
9
+ },
6
10
  "JzYy8MUVfPcyf4l5": {
7
11
  "notes": "External link icon that describes the external link icon",
8
12
  "translation": "Opening the link in a new window"
13
+ },
14
+ "cycz+bYG+VH7Of4e": {
15
+ "notes": "Label for the loading state.",
16
+ "translation": "Loading"
9
17
  }
10
18
  }
@@ -1 +1,14 @@
1
- {}
1
+ {
2
+ "3J6qHQEUwDxvZuIl": {
3
+ "translation": "ロードしています"
4
+ },
5
+ "JQOGuaGgqJObmSY1": {
6
+ "translation": "プログラムから開く"
7
+ },
8
+ "JzYy8MUVfPcyf4l5": {
9
+ "translation": "リンクを新しいウィンドウで開く"
10
+ },
11
+ "cycz+bYG+VH7Of4e": {
12
+ "translation": "ロードしています"
13
+ }
14
+ }
@@ -1,21 +1,21 @@
1
- .Divider_dividerCSS__1ljcfp90 {
1
+ .Divider_dividerCSS__1thxv8m0 {
2
2
  border: none;
3
3
  margin: 0;
4
4
  overflow-wrap: break-word;
5
5
  background-color: var(--vars_borderColor__k096v42);
6
6
  }
7
- .Divider_dividerCSS_orientation_horizontal__1ljcfp91 {
7
+ .Divider_dividerCSS_orientation_horizontal__1thxv8m1 {
8
8
  width: 100%;
9
9
  height: var(--dt-borders-width-default, 1px);
10
10
  }
11
- .Divider_dividerCSS_orientation_vertical__1ljcfp92 {
11
+ .Divider_dividerCSS_orientation_vertical__1thxv8m2 {
12
12
  width: var(--dt-borders-width-default, 1px);
13
13
  height: 100%;
14
14
  }
15
- .Divider_dividerCSS_compound_0__1ljcfp95 {
15
+ .Divider_dividerCSS_compound_0__1thxv8m5 {
16
16
  flex-shrink: 0;
17
17
  }
18
- .Divider_dividerCSS_compound_1__1ljcfp96 {
18
+ .Divider_dividerCSS_compound_1__1thxv8m6 {
19
19
  flex-shrink: 0;
20
20
  width: var(--dt-borders-width-default, 1px);
21
21
  height: auto;
@@ -23,4 +23,4 @@ module.exports = __toCommonJS(Divider_css_exports);
23
23
  var import_colorUtils_css_ts_vanilla = require("../../core/utils/colorUtils.css");
24
24
  var import_Divider_css_ts_vanilla = require("./Divider.css");
25
25
  var import_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
26
- var dividerCSS = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "Divider_dividerCSS__1ljcfp90", variantClassNames: { orientation: { horizontal: "Divider_dividerCSS_orientation_horizontal__1ljcfp91", vertical: "Divider_dividerCSS_orientation_vertical__1ljcfp92" }, flexItem: { true: "Divider_dividerCSS_flexItem_true__1ljcfp93", false: "Divider_dividerCSS_flexItem_false__1ljcfp94" } }, defaultVariants: {}, compoundVariants: [[{ orientation: "horizontal", flexItem: false }, "Divider_dividerCSS_compound_0__1ljcfp95"], [{ orientation: "vertical", flexItem: true }, "Divider_dividerCSS_compound_1__1ljcfp96"]] });
26
+ var dividerCSS = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "Divider_dividerCSS__1thxv8m0", variantClassNames: { orientation: { horizontal: "Divider_dividerCSS_orientation_horizontal__1thxv8m1", vertical: "Divider_dividerCSS_orientation_vertical__1thxv8m2" }, flexItem: { true: "Divider_dividerCSS_flexItem_true__1thxv8m3", false: "Divider_dividerCSS_flexItem_false__1thxv8m4" } }, defaultVariants: {}, compoundVariants: [[{ orientation: "horizontal", flexItem: false }, "Divider_dividerCSS_compound_0__1thxv8m5"], [{ orientation: "vertical", flexItem: true }, "Divider_dividerCSS_compound_1__1thxv8m6"]] });
@@ -0,0 +1,6 @@
1
+ import { type MarginProperties } from '../../styles/sprinkle-properties.js';
2
+ /**
3
+ * Converts a spacing token to its corresponding CSS value.
4
+ * @internal
5
+ */
6
+ export declare const spacingToCss: (spacingToken: MarginProperties | undefined) => number | string | undefined;
@@ -0,0 +1,29 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var spacingToCss_exports = {};
19
+ __export(spacingToCss_exports, {
20
+ spacingToCss: () => spacingToCss
21
+ });
22
+ module.exports = __toCommonJS(spacingToCss_exports);
23
+ var import_sprinkle_properties = require("../../styles/sprinkle-properties.js");
24
+ const spacingToCss = (spacingToken) => {
25
+ if (spacingToken === void 0) {
26
+ return void 0;
27
+ }
28
+ return import_sprinkle_properties.marginProperties[spacingToken];
29
+ };
@@ -0,0 +1,6 @@
1
+ import type { LayoutSizeProps, LayoutSizeCSS } from '../types/layout.types.js';
2
+ /**
3
+ * Returns the layout size properties.
4
+ * @internal
5
+ */
6
+ export declare const useLayoutSizeProps: (props: LayoutSizeProps) => LayoutSizeCSS;
@@ -0,0 +1,33 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var useLayoutSizeProps_exports = {};
19
+ __export(useLayoutSizeProps_exports, {
20
+ useLayoutSizeProps: () => useLayoutSizeProps
21
+ });
22
+ module.exports = __toCommonJS(useLayoutSizeProps_exports);
23
+ const useLayoutSizeProps = (props) => {
24
+ const { width, minWidth, maxWidth, height, minHeight, maxHeight } = props;
25
+ return {
26
+ width,
27
+ minWidth,
28
+ maxWidth,
29
+ height,
30
+ minHeight,
31
+ maxHeight
32
+ };
33
+ };
@@ -0,0 +1,7 @@
1
+ import type { SurfaceProps } from '../surface/Surface.js';
2
+ import type { LayoutStyles, DefaultStyles } from '../types/layout.types.js';
3
+ /**
4
+ * Generates layout styles including padding, margin, and size properties.
5
+ * @internal
6
+ */
7
+ export declare function useLayoutStyles(props: SurfaceProps<any>, defaultStyles: DefaultStyles): LayoutStyles;
@@ -0,0 +1,123 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var useLayoutStyles_exports = {};
19
+ __export(useLayoutStyles_exports, {
20
+ useLayoutStyles: () => useLayoutStyles
21
+ });
22
+ module.exports = __toCommonJS(useLayoutStyles_exports);
23
+ var import_useLayoutSizeProps = require("./useLayoutSizeProps.js");
24
+ var import_useMarginProps = require("./useMarginProps.js");
25
+ var import_usePaddingProps = require("./usePaddingProps.js");
26
+ function useLayoutStyles(props, defaultStyles) {
27
+ const {
28
+ /** Padding props */
29
+ padding,
30
+ p,
31
+ paddingX,
32
+ px,
33
+ paddingY,
34
+ py,
35
+ paddingTop,
36
+ pt,
37
+ paddingRight,
38
+ pr,
39
+ paddingBottom,
40
+ pb,
41
+ paddingLeft,
42
+ pl,
43
+ /** Margin props */
44
+ margin,
45
+ m,
46
+ marginX,
47
+ mx,
48
+ marginY,
49
+ my,
50
+ marginTop,
51
+ mt,
52
+ marginRight,
53
+ mr,
54
+ marginBottom,
55
+ mb,
56
+ marginLeft,
57
+ ml,
58
+ /** Layout props */
59
+ width,
60
+ minWidth,
61
+ maxWidth,
62
+ height,
63
+ minHeight,
64
+ maxHeight,
65
+ /** filtered remaining props for passing back to component */
66
+ ...remainingProps
67
+ } = props;
68
+ const paddingProps = {
69
+ padding,
70
+ p,
71
+ paddingX,
72
+ px,
73
+ paddingY,
74
+ py,
75
+ paddingTop,
76
+ pt,
77
+ paddingRight,
78
+ pr,
79
+ paddingBottom,
80
+ pb,
81
+ paddingLeft,
82
+ pl
83
+ };
84
+ const marginProps = {
85
+ margin,
86
+ m,
87
+ marginX,
88
+ mx,
89
+ marginY,
90
+ my,
91
+ marginTop,
92
+ mt,
93
+ marginRight,
94
+ mr,
95
+ marginBottom,
96
+ mb,
97
+ marginLeft,
98
+ ml
99
+ };
100
+ const layoutProps = {
101
+ width,
102
+ minWidth,
103
+ maxWidth,
104
+ height,
105
+ minHeight,
106
+ maxHeight
107
+ };
108
+ const paddingStyles = (0, import_usePaddingProps.usePaddingProps)(
109
+ paddingProps,
110
+ defaultStyles.paddingDefaults
111
+ );
112
+ const marginStyles = (0, import_useMarginProps.useMarginProps)(
113
+ marginProps,
114
+ defaultStyles.marginDefaults
115
+ );
116
+ const layoutSizeStyles = (0, import_useLayoutSizeProps.useLayoutSizeProps)(layoutProps);
117
+ return {
118
+ paddingStyles,
119
+ marginStyles,
120
+ layoutSizeStyles,
121
+ remainingProps
122
+ };
123
+ }
@@ -0,0 +1,7 @@
1
+ import { SpacingProps } from '../../styles/getSpacingSprinkles.js';
2
+ import type { MarginCSS, DefaultMargin } from '../types/layout.types.js';
3
+ /**
4
+ * Generates CSS margin properties based on the provided margin props and default margin values.
5
+ * @internal
6
+ */
7
+ export declare const useMarginProps: (props: SpacingProps, defaultMarginProps?: DefaultMargin) => MarginCSS;
@@ -0,0 +1,73 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var useMarginProps_exports = {};
19
+ __export(useMarginProps_exports, {
20
+ useMarginProps: () => useMarginProps
21
+ });
22
+ module.exports = __toCommonJS(useMarginProps_exports);
23
+ var import_lodash_es = require("lodash");
24
+ var import_spacingToCss = require("../helpers/spacingToCss.js");
25
+ const defaultMargin = {
26
+ margin: 0,
27
+ marginTop: 0,
28
+ marginRight: 0,
29
+ marginBottom: 0,
30
+ marginLeft: 0
31
+ };
32
+ const useMarginProps = (props, defaultMarginProps = defaultMargin) => {
33
+ const {
34
+ margin,
35
+ m,
36
+ marginX,
37
+ mx,
38
+ marginY,
39
+ my,
40
+ marginTop,
41
+ mt,
42
+ marginRight,
43
+ mr,
44
+ marginBottom,
45
+ mb,
46
+ marginLeft,
47
+ ml
48
+ } = props;
49
+ const convertedDefaultMarginProps = {
50
+ marginTop: (0, import_spacingToCss.spacingToCss)(
51
+ defaultMarginProps.marginTop ?? defaultMarginProps.margin
52
+ ),
53
+ marginLeft: (0, import_spacingToCss.spacingToCss)(
54
+ defaultMarginProps.marginLeft ?? defaultMarginProps.margin
55
+ ),
56
+ marginBottom: (0, import_spacingToCss.spacingToCss)(
57
+ defaultMarginProps.marginBottom ?? defaultMarginProps.margin
58
+ ),
59
+ marginRight: (0, import_spacingToCss.spacingToCss)(
60
+ defaultMarginProps.marginRight ?? defaultMarginProps.margin
61
+ )
62
+ };
63
+ return (0, import_lodash_es.merge)({}, convertedDefaultMarginProps, {
64
+ marginTop: (0, import_spacingToCss.spacingToCss)(mt ?? marginTop ?? my ?? marginY ?? m ?? margin),
65
+ marginRight: (0, import_spacingToCss.spacingToCss)(
66
+ mr ?? marginRight ?? mx ?? marginX ?? m ?? margin
67
+ ),
68
+ marginBottom: (0, import_spacingToCss.spacingToCss)(
69
+ mb ?? marginBottom ?? my ?? marginY ?? m ?? margin
70
+ ),
71
+ marginLeft: (0, import_spacingToCss.spacingToCss)(ml ?? marginLeft ?? mx ?? marginX ?? m ?? margin)
72
+ });
73
+ };
@@ -0,0 +1,7 @@
1
+ import { SpacingProps } from '../../styles/getSpacingSprinkles.js';
2
+ import type { PaddingCSS, DefaultPadding } from '../types/layout.types.js';
3
+ /**
4
+ * Generates CSS padding properties based on the provided padding props and default padding values.
5
+ * @internal
6
+ */
7
+ export declare const usePaddingProps: (props: SpacingProps, defaultPaddingProps?: DefaultPadding) => PaddingCSS;
@@ -0,0 +1,77 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var usePaddingProps_exports = {};
19
+ __export(usePaddingProps_exports, {
20
+ usePaddingProps: () => usePaddingProps
21
+ });
22
+ module.exports = __toCommonJS(usePaddingProps_exports);
23
+ var import_lodash_es = require("lodash");
24
+ var import_spacingToCss = require("../helpers/spacingToCss.js");
25
+ const defaultPadding = {
26
+ padding: 0,
27
+ paddingTop: 0,
28
+ paddingRight: 0,
29
+ paddingBottom: 0,
30
+ paddingLeft: 0
31
+ };
32
+ const usePaddingProps = (props, defaultPaddingProps = defaultPadding) => {
33
+ const {
34
+ padding,
35
+ p,
36
+ paddingX,
37
+ px,
38
+ paddingY,
39
+ py,
40
+ paddingTop,
41
+ pt,
42
+ paddingRight,
43
+ pr,
44
+ paddingBottom,
45
+ pb,
46
+ paddingLeft,
47
+ pl
48
+ } = props;
49
+ const convertedDefaultPaddingProps = {
50
+ paddingTop: (0, import_spacingToCss.spacingToCss)(
51
+ defaultPaddingProps.paddingTop ?? defaultPaddingProps.padding
52
+ ),
53
+ paddingLeft: (0, import_spacingToCss.spacingToCss)(
54
+ defaultPaddingProps.paddingLeft ?? defaultPaddingProps.padding
55
+ ),
56
+ paddingBottom: (0, import_spacingToCss.spacingToCss)(
57
+ defaultPaddingProps.paddingBottom ?? defaultPaddingProps.padding
58
+ ),
59
+ paddingRight: (0, import_spacingToCss.spacingToCss)(
60
+ defaultPaddingProps.paddingRight ?? defaultPaddingProps.padding
61
+ )
62
+ };
63
+ return (0, import_lodash_es.merge)({}, convertedDefaultPaddingProps, {
64
+ paddingTop: (0, import_spacingToCss.spacingToCss)(
65
+ pt ?? paddingTop ?? py ?? paddingY ?? p ?? padding
66
+ ),
67
+ paddingRight: (0, import_spacingToCss.spacingToCss)(
68
+ pr ?? paddingRight ?? px ?? paddingX ?? p ?? padding
69
+ ),
70
+ paddingBottom: (0, import_spacingToCss.spacingToCss)(
71
+ pb ?? paddingBottom ?? py ?? paddingY ?? p ?? padding
72
+ ),
73
+ paddingLeft: (0, import_spacingToCss.spacingToCss)(
74
+ pl ?? paddingLeft ?? px ?? paddingX ?? p ?? padding
75
+ )
76
+ });
77
+ };
@@ -1,6 +1,10 @@
1
1
  export { Flex, type FlexOwnProps, type FlexProps } from './flex/Flex.js';
2
2
  export { Grid, type GridOwnProps, type GridProps } from './grid/Grid.js';
3
- export { Divider } from './Divider/Divider.js';
4
- export type { DividerProps } from './Divider/Divider.js';
3
+ export { Divider } from './divider/Divider.js';
4
+ export type { DividerProps } from './divider/Divider.js';
5
5
  export { Container } from './container/Container.js';
6
6
  export type { ContainerOwnProps, ContainerProps, } from './container/Container.js';
7
+ export type { LayoutSizeCSS } from './types/layout.types.js';
8
+ export { Surface } from './surface/Surface.js';
9
+ export type { SurfaceOwnProps, SurfaceProps } from './surface/Surface.js';
10
+ export { surfaceBorderRadius as _surfaceBorderRadius } from './surface/variables.css.js';