@stenajs-webui/core 25.15.0 → 26.0.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.
- package/dist/accessibility/lively/Lively.d.ts +1 -1
- package/dist/components/deprecated-text/HeaderText.d.ts +3 -1
- package/dist/components/heading/Heading.d.ts +20 -4
- package/dist/index.css +1 -1
- package/dist/index.es.js +227 -210
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -29,7 +29,7 @@ export interface LivelyProps extends Omit<DivProps, "aria-live"> {
|
|
|
29
29
|
*
|
|
30
30
|
* @example
|
|
31
31
|
* <Column gap={2}>
|
|
32
|
-
* <Heading
|
|
32
|
+
* <Heading as="h2">Search</Heading>
|
|
33
33
|
* <Lively>{numResults != null && <Text>{numResults} hits</Text>}</Lively>
|
|
34
34
|
* </Column>
|
|
35
35
|
*/
|
|
@@ -3,4 +3,6 @@ import { HeadingProps } from "../heading/Heading";
|
|
|
3
3
|
/**
|
|
4
4
|
* @deprecated Please use `Heading` instead.
|
|
5
5
|
*/
|
|
6
|
-
export declare const HeaderText: React.FC<Omit<HeadingProps, "variant"
|
|
6
|
+
export declare const HeaderText: React.FC<Omit<HeadingProps, "size" | "as" | "variant"> & {
|
|
7
|
+
as?: HeadingProps["as"];
|
|
8
|
+
}>;
|
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
import { Property } from "csstype";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { H1Props } from "../../types/ElementProps";
|
|
4
|
-
export
|
|
5
|
-
|
|
4
|
+
export type HeadingTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
5
|
+
export type HeadingSize = "xs" | "s" | "m" | "l" | "xl" | "2xl" | "3xl" | "4xl";
|
|
6
|
+
export type HeadingVariant = "default" | "display";
|
|
7
|
+
/** The sizes of the display variant, as in the design: 4xl (40px) and 2xl (28px). */
|
|
8
|
+
export type HeadingDisplaySize = "4xl" | "2xl";
|
|
9
|
+
interface HeadingBaseProps extends H1Props {
|
|
10
|
+
as: HeadingTag | "span";
|
|
6
11
|
whiteSpace?: Property.WhiteSpace;
|
|
7
12
|
wordBreak?: Property.WordBreak;
|
|
8
|
-
as?: HeadingVariant | "span";
|
|
9
13
|
}
|
|
10
|
-
|
|
14
|
+
interface HeadingDefaultProps {
|
|
15
|
+
variant?: "default";
|
|
16
|
+
/** Default: the size of `as` (h1 is 2xl, h6 is xs, span is l). */
|
|
17
|
+
size?: HeadingSize;
|
|
18
|
+
}
|
|
19
|
+
interface HeadingDisplayProps {
|
|
20
|
+
/** Stena Sans Display: condensed capitals, weight 900. The application loads the font with StenaSans.css. */
|
|
21
|
+
variant: "display";
|
|
22
|
+
/** The display variant has two sizes: 4xl (40px) and 2xl (28px). */
|
|
23
|
+
size: HeadingDisplaySize;
|
|
24
|
+
}
|
|
25
|
+
export type HeadingProps = HeadingBaseProps & (HeadingDefaultProps | HeadingDisplayProps);
|
|
11
26
|
export declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
27
|
+
export {};
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._separatorLine_nzfcz_1{display:flex;border:0;margin:0;flex:none}._text_1iisw_1{--swui-text-color: var(--swui-text-primary-color);--swui-text-color-caption: var(--lhds-color-ui-600);--swui-text-color-overline: var(--lhds-color-ui-600);--swui-text-font-family: var(--swui-font-primary);--swui-text-font-weight: var(--swui-font-weight-text);--current-color: var(--swui-text-color);--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium);--current-font-weight: var(--swui-text-font-weight);--current-letter-spacing: var(--swui-text-letter-spacing);font-size:var(--current-font-size);line-height:var(--current-line-height);color:var(--current-color);letter-spacing:var(--current-letter-spacing);font-family:var(--swui-text-font-family);font-weight:var(--current-font-weight)}._text_1iisw_1._bold_1iisw_27{--current-font-weight: var(--swui-font-weight-text-bold)}._text_1iisw_1._caption_1iisw_31{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small);--current-color: var(--swui-text-color-caption);--current-letter-spacing: 0;font-style:italic}._text_1iisw_1._overline_1iisw_39{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller);--current-color: var(--swui-text-color-overline);--current-font-weight: var(--swui-font-weight-text-bold);--current-letter-spacing: .1rem;text-transform:uppercase}._text_1iisw_1._large_1iisw_48{--current-font-size: var(--swui-font-size-large);--current-line-height: var(--swui-line-height-large)}._text_1iisw_1._medium_1iisw_53{--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium)}._text_1iisw_1._small_1iisw_58{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small)}._text_1iisw_1._smaller_1iisw_63{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller)}._lively_1k3wm_6{display:contents}._visuallyHidden_1gevf_1{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.
|
|
1
|
+
._separatorLine_nzfcz_1{display:flex;border:0;margin:0;flex:none}._text_1iisw_1{--swui-text-color: var(--swui-text-primary-color);--swui-text-color-caption: var(--lhds-color-ui-600);--swui-text-color-overline: var(--lhds-color-ui-600);--swui-text-font-family: var(--swui-font-primary);--swui-text-font-weight: var(--swui-font-weight-text);--current-color: var(--swui-text-color);--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium);--current-font-weight: var(--swui-text-font-weight);--current-letter-spacing: var(--swui-text-letter-spacing);font-size:var(--current-font-size);line-height:var(--current-line-height);color:var(--current-color);letter-spacing:var(--current-letter-spacing);font-family:var(--swui-text-font-family);font-weight:var(--current-font-weight)}._text_1iisw_1._bold_1iisw_27{--current-font-weight: var(--swui-font-weight-text-bold)}._text_1iisw_1._caption_1iisw_31{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small);--current-color: var(--swui-text-color-caption);--current-letter-spacing: 0;font-style:italic}._text_1iisw_1._overline_1iisw_39{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller);--current-color: var(--swui-text-color-overline);--current-font-weight: var(--swui-font-weight-text-bold);--current-letter-spacing: .1rem;text-transform:uppercase}._text_1iisw_1._large_1iisw_48{--current-font-size: var(--swui-font-size-large);--current-line-height: var(--swui-line-height-large)}._text_1iisw_1._medium_1iisw_53{--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium)}._text_1iisw_1._small_1iisw_58{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small)}._text_1iisw_1._smaller_1iisw_63{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller)}._lively_1k3wm_6{display:contents}._visuallyHidden_1gevf_1{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}._heading_18j6t_1{line-height:var(--swui-heading-line-height, var(--swui-line-height));font-weight:var( --swui-heading-font-weight, var(--swui-font-weight-text-bold) );color:var(--swui-heading-text-color);font-family:var(--swui-heading-font-family);letter-spacing:0;margin:0}._heading_18j6t_1._heading_18j6t_1{font-size:var(--swui-heading-font-size, 2rem)}:where(._heading_18j6t_1){--swui-heading-text-color: var(--swui-text-primary-color);--swui-heading-font-family: var(--swui-font-primary)}:where(._heading_18j6t_1._size-xs_18j6t_25){--swui-heading-font-size: var(--swui-font-size-heading-xs, 1.4rem);--swui-heading-line-height: var( --swui-line-height-heading-xs, var(--swui-line-height) );--swui-heading-font-weight: var( --swui-font-weight-heading-xs, var(--swui-font-weight-text-bold) )}:where(._heading_18j6t_1._size-s_18j6t_37){--swui-heading-font-size: var(--swui-font-size-heading-s, 1.6rem);--swui-heading-line-height: var( --swui-line-height-heading-s, var(--swui-line-height) );--swui-heading-font-weight: var( --swui-font-weight-heading-s, var(--swui-font-weight-text-bold) )}:where(._heading_18j6t_1._size-m_18j6t_49){--swui-heading-font-size: var(--swui-font-size-heading-m, 1.8rem);--swui-heading-line-height: var( --swui-line-height-heading-m, var(--swui-line-height) );--swui-heading-font-weight: var( --swui-font-weight-heading-m, var(--swui-font-weight-text-bold) )}:where(._heading_18j6t_1._size-l_18j6t_61){--swui-heading-font-size: var(--swui-font-size-heading-l, 2rem);--swui-heading-line-height: var( --swui-line-height-heading-l, var(--swui-line-height) );--swui-heading-font-weight: var( --swui-font-weight-heading-l, var(--swui-font-weight-text-bold) )}:where(._heading_18j6t_1._size-xl_18j6t_73){--swui-heading-font-size: var(--swui-font-size-heading-xl, 2.4rem);--swui-heading-line-height: var( --swui-line-height-heading-xl, var(--swui-line-height) );--swui-heading-font-weight: var( --swui-font-weight-heading-xl, var(--swui-font-weight-text-bold) )}:where(._heading_18j6t_1._size-2xl_18j6t_85){--swui-heading-font-size: var(--swui-font-size-heading-2xl, 2.8rem);--swui-heading-line-height: var( --swui-line-height-heading-2xl, var(--swui-line-height) );--swui-heading-font-weight: var( --swui-font-weight-heading-2xl, var(--swui-font-weight-text-bold) )}:where(._heading_18j6t_1._size-3xl_18j6t_97){--swui-heading-font-size: var(--swui-font-size-heading-3xl, 3.2rem);--swui-heading-line-height: var(--swui-line-height-heading-3xl, 1.25);--swui-heading-font-weight: var(--swui-font-weight-heading-3xl, 700)}:where(._heading_18j6t_1._size-4xl_18j6t_103){--swui-heading-font-size: var(--swui-font-size-heading-4xl, 4rem);--swui-heading-line-height: var(--swui-line-height-heading-4xl, 1.2);--swui-heading-font-weight: var(--swui-font-weight-heading-4xl, 700)}:where(._heading_18j6t_1._display_18j6t_110){--swui-heading-font-family: var( --swui-font-family-heading-display, "Stena Sans Display", var(--swui-font-primary) );--swui-heading-font-weight: var(--swui-font-weight-heading-display, 900)}:where(._heading_18j6t_1._display_18j6t_110._size-4xl_18j6t_103){--swui-heading-line-height: var( --swui-line-height-heading-display-4xl, calc(46 / 40) )}:where(._heading_18j6t_1._display_18j6t_110._size-2xl_18j6t_85){--swui-heading-line-height: var( --swui-line-height-heading-display-2xl, calc(36 / 28) )}._ol_25p86_1,._ul_25p86_2{margin-top:0;margin-bottom:0;padding-left:24px;list-style-position:outside;font-family:var(--swui-font-primary);font-size:var(--swui-font-size-medium)}._ol_25p86_1 li,._ul_25p86_2 li{padding-top:var(--swui-metrics-spacing)}
|