@guardian/stand 0.0.31 → 0.0.33

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 (46) hide show
  1. package/dist/components/date-picker/DatePicker.cjs +166 -0
  2. package/dist/components/date-picker/DatePicker.js +126 -0
  3. package/dist/components/date-picker/styles.cjs +199 -0
  4. package/dist/components/date-picker/styles.js +187 -0
  5. package/dist/components/form/types.cjs +2 -1
  6. package/dist/components/form/types.js +3 -2
  7. package/dist/components/link/Link.cjs +37 -0
  8. package/dist/components/link/Link.js +17 -0
  9. package/dist/components/link/styles.cjs +31 -0
  10. package/dist/components/link/styles.js +28 -0
  11. package/dist/components/select/Select.cjs +1 -1
  12. package/dist/components/select/Select.js +7 -1
  13. package/dist/date-picker.cjs +9 -0
  14. package/dist/date-picker.js +2 -0
  15. package/dist/index.cjs +6 -2
  16. package/dist/index.js +3 -1
  17. package/dist/link.cjs +9 -0
  18. package/dist/link.js +2 -0
  19. package/dist/styleD/build/css/component/datePicker.css +120 -0
  20. package/dist/styleD/build/css/component/link.css +12 -0
  21. package/dist/styleD/build/css/component/templateComponent.css +8 -0
  22. package/dist/styleD/build/typescript/component/datePicker.cjs +185 -0
  23. package/dist/styleD/build/typescript/component/datePicker.js +183 -0
  24. package/dist/styleD/build/typescript/component/link.cjs +24 -0
  25. package/dist/styleD/build/typescript/component/link.js +22 -0
  26. package/dist/types/components/date-picker/DatePicker.d.ts +2 -0
  27. package/dist/types/components/date-picker/sandbox.d.ts +2 -0
  28. package/dist/types/components/date-picker/styles.d.ts +11 -0
  29. package/dist/types/components/date-picker/types.d.ts +21 -0
  30. package/dist/types/components/form/types.d.ts +1 -1
  31. package/dist/types/components/link/Link.d.ts +2 -0
  32. package/dist/types/components/link/sandbox.d.ts +5 -0
  33. package/dist/types/components/link/styles.d.ts +7 -0
  34. package/dist/types/components/link/types.d.ts +11 -0
  35. package/dist/types/components/typography/types.d.ts +3 -2
  36. package/dist/types/date-picker.d.ts +21 -0
  37. package/dist/types/index.d.ts +6 -2
  38. package/dist/types/link.d.ts +19 -0
  39. package/dist/types/styleD/build/typescript/component/datePicker.d.ts +185 -0
  40. package/dist/types/styleD/build/typescript/component/link.d.ts +24 -0
  41. package/dist/types/styleD/build/typescript/component/templateComponent.d.ts +10 -0
  42. package/dist/types/templates/component/TemplateComponent.d.ts +2 -0
  43. package/dist/types/templates/component/sandbox.d.ts +5 -0
  44. package/dist/types/templates/component/styles.d.ts +7 -0
  45. package/dist/types/templates/component/types.d.ts +5 -0
  46. package/package.json +45 -18
@@ -0,0 +1,183 @@
1
+ const componentDatePicker = {
2
+ picker: {
3
+ shared: {
4
+ display: "flex",
5
+ width: "100%",
6
+ justifyContent: "space-between",
7
+ alignItems: "center",
8
+ height: "2.5rem",
9
+ borderRadius: "0.25rem",
10
+ border: "0.0625rem solid #545454",
11
+ backgroundColor: "#ffffff",
12
+ gap: "0.5rem",
13
+ padding: {
14
+ top: "0",
15
+ right: "0.25rem",
16
+ bottom: "0",
17
+ left: "0.75rem"
18
+ },
19
+ disabled: {
20
+ cursor: "not-allowed",
21
+ backgroundColor: "#ededed",
22
+ color: "#999999"
23
+ },
24
+ focusVisible: {
25
+ outline: "0.125rem solid #0072a9"
26
+ },
27
+ invalid: {
28
+ border: "0.0625rem solid #b42a19"
29
+ },
30
+ button: {
31
+ flex: "1",
32
+ backgroundColor: "#00000000",
33
+ border: "0 solid transparent",
34
+ padding: {
35
+ top: "0",
36
+ right: "0",
37
+ bottom: "0",
38
+ left: "0"
39
+ },
40
+ margin: {
41
+ top: "0",
42
+ right: "0",
43
+ bottom: "0",
44
+ left: "0"
45
+ },
46
+ display: "flex",
47
+ alignItems: "center",
48
+ justifyContent: "flex-end",
49
+ color: "#545454",
50
+ cursor: "pointer",
51
+ disabled: {
52
+ color: "#999999",
53
+ cursor: "not-allowed"
54
+ }
55
+ }
56
+ }
57
+ },
58
+ segment: {
59
+ shared: {
60
+ placeholder: {
61
+ color: "#545454",
62
+ focusVisible: {
63
+ outline: "0.125rem solid #0072a9"
64
+ }
65
+ }
66
+ }
67
+ },
68
+ popover: {
69
+ shared: {
70
+ offset: 8,
71
+ containerPadding: 0,
72
+ backgroundColor: "#ffffff",
73
+ padding: {
74
+ top: "0.25rem",
75
+ right: "0.25rem",
76
+ bottom: "0.25rem",
77
+ left: "0.25rem"
78
+ },
79
+ boxShadow: "0 2px 6px 0 rgba(0, 0, 0, 0.3)"
80
+ }
81
+ },
82
+ calendar: {
83
+ header: {
84
+ shared: {
85
+ display: "flex",
86
+ alignItems: "center",
87
+ justifyContent: "space-between",
88
+ typography: {
89
+ font: "normal 700 0.875rem/1.15 Open Sans",
90
+ letterSpacing: "-0.0125rem",
91
+ fontWidth: 95
92
+ },
93
+ button: {
94
+ backgroundColor: "#00000000",
95
+ border: "none",
96
+ padding: {
97
+ top: "0",
98
+ right: "0",
99
+ bottom: "0",
100
+ left: "0"
101
+ },
102
+ margin: {
103
+ top: "0",
104
+ right: "0",
105
+ bottom: "0",
106
+ left: "0"
107
+ },
108
+ display: "flex",
109
+ alignItems: "center",
110
+ justifyContent: "center",
111
+ color: "#545454",
112
+ cursor: "pointer",
113
+ width: "2.5rem",
114
+ height: "2.5rem",
115
+ aspectRatio: "1",
116
+ hovered: {
117
+ backgroundColor: "#f6f6f6"
118
+ },
119
+ pressed: {
120
+ backgroundColor: "#ededed"
121
+ },
122
+ selected: {
123
+ backgroundColor: "#b8d8e7"
124
+ },
125
+ focusVisible: {
126
+ outline: "0.125rem solid #0072a9"
127
+ },
128
+ disabled: {
129
+ cursor: "not-allowed",
130
+ color: "#999999"
131
+ }
132
+ }
133
+ }
134
+ },
135
+ grid: {
136
+ shared: {
137
+ typography: {
138
+ font: "normal 460 0.875rem/1.3 Open Sans",
139
+ letterSpacing: "0rem",
140
+ fontWidth: 95
141
+ },
142
+ borderCollapse: "collapse",
143
+ borderSpacing: "0",
144
+ th: {
145
+ width: "2.5rem",
146
+ height: "2.5rem",
147
+ verticalAlign: "middle"
148
+ }
149
+ }
150
+ },
151
+ cell: {
152
+ shared: {
153
+ width: "2.5rem",
154
+ aspectRatio: "1",
155
+ display: "flex",
156
+ alignItems: "center",
157
+ justifyContent: "center",
158
+ cursor: "pointer",
159
+ outsideMonth: {
160
+ display: "none"
161
+ },
162
+ hovered: {
163
+ backgroundColor: "#f6f6f6"
164
+ },
165
+ pressed: {
166
+ backgroundColor: "#ededed"
167
+ },
168
+ selected: {
169
+ backgroundColor: "#b8d8e7"
170
+ },
171
+ focusVisible: {
172
+ outline: "0.125rem solid #0072a9"
173
+ },
174
+ disabled: {
175
+ cursor: "not-allowed",
176
+ color: "#999999"
177
+ }
178
+ }
179
+ }
180
+ }
181
+ };
182
+
183
+ export { componentDatePicker };
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ const componentLink = {
4
+ shared: {
5
+ focus: {
6
+ outline: "1px solid #0072a9"
7
+ },
8
+ hover: {
9
+ color: "#00344e",
10
+ cursor: "pointer"
11
+ },
12
+ enabled: {
13
+ color: "#00496c"
14
+ },
15
+ disabled: {
16
+ color: "#999999"
17
+ },
18
+ pressed: {
19
+ color: "#00202f"
20
+ }
21
+ }
22
+ };
23
+
24
+ exports.componentLink = componentLink;
@@ -0,0 +1,22 @@
1
+ const componentLink = {
2
+ shared: {
3
+ focus: {
4
+ outline: "1px solid #0072a9"
5
+ },
6
+ hover: {
7
+ color: "#00344e",
8
+ cursor: "pointer"
9
+ },
10
+ enabled: {
11
+ color: "#00496c"
12
+ },
13
+ disabled: {
14
+ color: "#999999"
15
+ },
16
+ pressed: {
17
+ color: "#00202f"
18
+ }
19
+ }
20
+ };
21
+
22
+ export { componentLink };
@@ -0,0 +1,2 @@
1
+ import type { DatePickerProps } from './types';
2
+ export declare function DatePicker({ isInvalid, locale, useMonthTextInput, theme, ...props }: DatePickerProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const componentName = "DatePicker";
2
+ export declare const componentTsx = "import { CalendarDate } from '@internationalized/date';\nimport { DatePicker } from '@guardian/stand/date-picker';\n\nexport const Component = () => (\n\t<>\n\t\t{/* Basic usage */}\n\t\t<DatePicker\n\t\t\tlabel=\"Date of birth\"\n\t\t\tdescription=\"Enter your date of birth (e.g. 15 April 1990)\"\n\t\t/>\n\n\t\t{/* With min/max constraints and a pre-selected date */}\n\t\t<DatePicker\n\t\t\tlabel=\"Select a date\"\n\t\t\tdescription=\"Choose a date within 2026\"\n\t\t\tvalue={new CalendarDate(2026, 4, 15)}\n\t\t\tminValue={new CalendarDate(2026, 1, 1)}\n\t\t\tmaxValue={new CalendarDate(2026, 12, 31)}\n\t\t/>\n\t</>\n);\n";
@@ -0,0 +1,11 @@
1
+ import type { SerializedStyles } from '@emotion/react';
2
+ import type { ComponentDatePicker } from '../../styleD/build/typescript/component/datePicker';
3
+ import type { Prettify } from '../../util/types';
4
+ export type DatePickerTheme = Prettify<ComponentDatePicker>;
5
+ export declare const defaultDatePickerTheme: DatePickerTheme;
6
+ export declare const datePickerStyles: (theme: DatePickerTheme) => SerializedStyles;
7
+ export declare const dateSegmentStyles: (theme: DatePickerTheme) => SerializedStyles;
8
+ export declare const datePickerPopoverStyles: (theme: DatePickerTheme) => SerializedStyles;
9
+ export declare const calendarHeaderStyles: (theme: DatePickerTheme) => SerializedStyles;
10
+ export declare const calendarGridStyles: (theme: DatePickerTheme) => SerializedStyles;
11
+ export declare const calendarCellStyles: (theme: DatePickerTheme) => SerializedStyles;
@@ -0,0 +1,21 @@
1
+ import type { DateValue, CalendarProps as RACCalendarProps, DatePickerProps as RACDatePickerProps } from 'react-aria-components';
2
+ import type { DefaultProps } from '../../util/types';
3
+ import type { FormInputContainerDefaultProps } from '../form/types';
4
+ import type { DatePickerTheme } from './styles';
5
+ export interface DatePickerProps extends FormInputContainerDefaultProps<Omit<RACDatePickerProps<DateValue>, 'granularity' | 'hideTimeZone'>, DatePickerTheme> {
6
+ /**
7
+ * When true (default), the month segment displays full month names (e.g. "April") and
8
+ * supports typing the first letters of a month name to select it.
9
+ * Set to false to revert to React Aria's default numeric month behaviour.
10
+ */
11
+ useMonthTextInput?: boolean;
12
+ /**
13
+ * Locale to use for formatting the date. By default, it uses en-GB,
14
+ * you shouldn't need to set this prop in most scenarios,
15
+ * if you need low level control use this along with useMonthTextInput prop
16
+ *
17
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale for more details on supported locales and formatting options.
18
+ */
19
+ locale?: string;
20
+ }
21
+ export type CalendarProps = DefaultProps<DatePickerTheme, RACCalendarProps<DateValue>['className']> & Omit<RACCalendarProps<DateValue>, 'className'>;
@@ -36,5 +36,5 @@ export type FormInputContainerDefaultProps<ReactAriaInput extends {
36
36
  * The React Aria form container components FormInputContainer supports.
37
37
  * Add new components here
38
38
  */
39
- export declare const ALLOWED_FORM_CONTAINERS: readonly [(props: import("react-aria-components").TextFieldProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null, <T extends object = {}, M extends "single" | "multiple" = "single">(props: import("react-aria-components").SelectProps<T, M> & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null, (props: import("react-aria-components").RadioGroupProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null, (props: import("react-aria-components").CheckboxGroupProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null];
39
+ export declare const ALLOWED_FORM_CONTAINERS: readonly [(props: import("react-aria-components").TextFieldProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null, <T extends object = {}, M extends "single" | "multiple" = "single">(props: import("react-aria-components").SelectProps<T, M> & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null, (props: import("react-aria-components").RadioGroupProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null, (props: import("react-aria-components").CheckboxGroupProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null, <T_1 extends import("react-aria-components").DateValue>(props: import("react-aria-components").DatePickerProps<T_1> & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null];
40
40
  export type AllowedContainer = (typeof ALLOWED_FORM_CONTAINERS)[number];
@@ -0,0 +1,2 @@
1
+ import type { LinkProps } from './types';
2
+ export declare function Link({ children, typography, theme, cssOverrides, className, ...props }: LinkProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare const componentName = "Link";
2
+ export declare const componentTsx = "import { Link } from '@guardian/stand/link';\n\nexport const Component = () => (\n\t<Link href=\"#\">Hello</Link>\n);\n";
3
+ export declare const componentCss = "\n/* import the link styles */\n@import '@guardian/stand/component/link.css';\n\n.stand-typography-body-sm {\n\tfont: var(--semantic-typography-body-sm-font);\n\tletter-spacing: var(--semantic-typography-body-sm-letter-spacing);\n\tfont-variation-settings: \"wdth\" var(--semantic-typography-body-sm-font-width);\n}\n.stand-link {\n\ttext-decoration: underline;\n\ttext-decoration-style: solid;\n\ttext-underline-offset: 8%;\n\ttext-decoration-thickness: 5%;\n\tcolor: var(--component-link-shared-enabled-color);\n}\n\n.stand-link[data-hovered] {\n\tcolor: var(--component-link-shared-hover-color);\n\tcursor: var(--component-link-shared-hover-cursor);\n}\n\n.stand-link[data-pressed] {\n\tcolor: var(--component-link-shared-pressed-color);\n}\n\n.stand-link[data-disabled] {\n\tcolor: var(--component-link-shared-disabled-color);\n}\n\n.stand-link[data-focus-visible] {\n\toutline: var(--component-link-shared-focus-outline);\n}\n";
4
+ export declare const componentHtml = "<div class=\"container\">\n\t<a class=\"stand-link stand-typography-body-sm\" href=\"#\">Default link</a></br>\n\t<a class=\"stand-link stand-typography-body-sm\" href=\"#\" data-hovered>Hovered link</a></br>\n\t<a class=\"stand-link stand-typography-body-sm\" href=\"#\" data-pressed>Pressed link</a></br>\n\t<a class=\"stand-link stand-typography-body-sm\" href=\"#\" data-disabled>Disabled link</a></br>\n\t<a class=\"stand-link stand-typography-body-sm\" href=\"#\" data-focus-visible>Focused link</a>\n</div>\n";
5
+ export declare const componentJs = "\nimport { componentLink, semanticTypography } from \"@guardian/stand\";\n\nconst semanticTypographyBodySm = `\n\t\tfont: ${semanticTypography['body-sm'].font};\n\t\tletter-spacing: ${semanticTypography['body-sm'].letterSpacing};\n\t\tfont-variation-settings: \"wdth\" ${semanticTypography['body-sm'].fontWidth};\n`;\n\nconst baseStyle = `\n\ttext-decoration: underline;\n\ttext-decoration-style: solid;\n\ttext-underline-offset: 8%;\n\ttext-decoration-thickness: 5%;\n\tcolor: ${componentLink.shared.enabled.color};\n`;\n\nconst hoverStyle = `\n\tcolor: ${componentLink.shared.hover.color};\n\tcursor: ${componentLink.shared.hover.cursor};\n`;\n\nconst pressedStyle = `\n\tcolor: ${componentLink.shared.pressed.color};\n`;\n\nconst disabledStyle = `\n\tcolor: ${componentLink.shared.disabled.color};\n`;\n\nconst focusVisibleStyle = `\n\toutline: ${componentLink.shared.focus.outline};\n`;\n\ndocument.getElementById(\"app\").innerHTML = `\n\t<style>\n\t\t.stand-typography-body-sm { ${semanticTypographyBodySm} }\n\t\t.stand-link { ${baseStyle} }\n\t\t.stand-link[data-hovered] { ${hoverStyle} }\n\t\t.stand-link[data-pressed] { ${pressedStyle} }\n\t\t.stand-link[data-disabled] { ${disabledStyle} }\n\t\t.stand-link[data-focus-visible] { ${focusVisibleStyle} }\n\t</style>\n\t<div class=\"container\">\n\t\t<a class=\"stand-link stand-typography-body-sm\" href=\"#\">Default link</a></br>\n\t\t<a class=\"stand-link stand-typography-body-sm\" href=\"#\" data-hovered>Hovered link</a></br>\n\t\t<a class=\"stand-link stand-typography-body-sm\" href=\"#\" data-pressed>Pressed link</a></br>\n\t\t<a class=\"stand-link stand-typography-body-sm\" href=\"#\" data-disabled>Disabled link</a></br>\n\t\t<a class=\"stand-link stand-typography-body-sm\" href=\"#\" data-focus-visible>Focused link</a>\n\t</div>\n`;\n";
@@ -0,0 +1,7 @@
1
+ import type { SerializedStyles } from '@emotion/react';
2
+ import type { ComponentLink } from '../../styleD/build/typescript/component/link';
3
+ import type { DeepPartial, Prettify } from '../../util/types';
4
+ export type LinkTheme = Prettify<ComponentLink>;
5
+ export type PartialLinkTheme = DeepPartial<LinkTheme>;
6
+ export declare const defaultLinkTheme: LinkTheme;
7
+ export declare const linkStyles: (theme: LinkTheme) => SerializedStyles;
@@ -0,0 +1,11 @@
1
+ import type { LinkProps as RACLinkProps } from 'react-aria-components';
2
+ import type { DefaultPropsWithChildren } from '../../util/types';
3
+ import type { TypographyVariant } from '../typography/types';
4
+ import type { LinkTheme } from './styles';
5
+ export interface LinkProps extends Omit<RACLinkProps, 'children'>, DefaultPropsWithChildren<LinkTheme, RACLinkProps['className']> {
6
+ /**
7
+ * to change the typography of the link, you can pass a variant from semanticTypography.
8
+ * By default, it is set to "body-sm".
9
+ */
10
+ typography?: TypographyVariant;
11
+ }
@@ -1,6 +1,7 @@
1
- import type { SemanticTypography } from '../..';
1
+ import type { SemanticTypography } from '../../styleD/build/typescript/semantic/typography';
2
2
  import type { DefaultPropsWithChildren } from '../../util/types';
3
3
  import type { TypographyTheme } from './styles';
4
+ export type TypographyVariant = keyof SemanticTypography;
4
5
  export interface TypographyProps extends DefaultPropsWithChildren<TypographyTheme> {
5
6
  /**
6
7
  * HTML element to render with font applied to
@@ -9,5 +10,5 @@ export interface TypographyProps extends DefaultPropsWithChildren<TypographyThem
9
10
  /**
10
11
  * Font variant to apply as a CSS style to the element
11
12
  */
12
- variant?: keyof SemanticTypography;
13
+ variant?: TypographyVariant;
13
14
  }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * DatePicker component entry point
3
+ *
4
+ * Peer dependencies required to use these components:
5
+ * - `@emotion/react`
6
+ * - `react`
7
+ * - `react-dom`
8
+ * - `typescript`
9
+ * - `@internationalized/date`
10
+ * - `react-aria-components`
11
+ *
12
+ * See the `peerDependencies` section of package.json for compatible versions.
13
+ *
14
+ * If you only need the built CSS (./component/datePicker.css),
15
+ * you don't need to install these.
16
+ */
17
+ export { DatePicker } from './components/date-picker/DatePicker';
18
+ export type { DatePickerProps } from './components/date-picker/types';
19
+ export type { DatePickerTheme } from './components/date-picker/styles';
20
+ export { componentDatePicker } from './styleD/build/typescript/component/datePicker';
21
+ export type { ComponentDatePicker } from './styleD/build/typescript/component/datePicker';
@@ -16,8 +16,6 @@ export type { ComponentUserMenu } from './styleD/build/typescript/component/user
16
16
  /**
17
17
  * design system components tokens exports
18
18
  */
19
- export { componentAlertBanner } from './styleD/build/typescript/component/alertBanner';
20
- export type { ComponentAlertBanner } from './styleD/build/typescript/component/alertBanner';
21
19
  export { componentAvatar } from './styleD/build/typescript/component/avatar';
22
20
  export type { ComponentAvatar } from './styleD/build/typescript/component/avatar';
23
21
  export { componentButton } from './styleD/build/typescript/component/button';
@@ -26,6 +24,8 @@ export { componentCheckbox } from './styleD/build/typescript/component/checkbox'
26
24
  export type { ComponentCheckbox } from './styleD/build/typescript/component/checkbox';
27
25
  export { componentFavicon } from './styleD/build/typescript/component/favicon';
28
26
  export type { ComponentFavicon } from './styleD/build/typescript/component/favicon';
27
+ export { componentDatePicker } from './styleD/build/typescript/component/datePicker';
28
+ export type { ComponentDatePicker } from './styleD/build/typescript/component/datePicker';
29
29
  export { componentForm } from './styleD/build/typescript/component/form';
30
30
  export type { ComponentForm } from './styleD/build/typescript/component/form';
31
31
  export { componentIcon } from './styleD/build/typescript/component/icon';
@@ -34,6 +34,10 @@ export { componentInlineMessage } from './styleD/build/typescript/component/inli
34
34
  export type { ComponentInlineMessage } from './styleD/build/typescript/component/inlineMessage';
35
35
  export { componentMenu } from './styleD/build/typescript/component/menu';
36
36
  export type { ComponentMenu } from './styleD/build/typescript/component/menu';
37
+ export { componentLink } from './styleD/build/typescript/component/link';
38
+ export type { ComponentLink } from './styleD/build/typescript/component/link';
39
+ export { componentAlertBanner } from './styleD/build/typescript/component/alertBanner';
40
+ export type { ComponentAlertBanner } from './styleD/build/typescript/component/alertBanner';
37
41
  export { componentRadioGroup } from './styleD/build/typescript/component/radioGroup';
38
42
  export type { ComponentRadioGroup } from './styleD/build/typescript/component/radioGroup';
39
43
  export { componentSelect } from './styleD/build/typescript/component/select';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Link component entry point
3
+ *
4
+ * Peer dependencies required to use these components:
5
+ * - `@emotion/react`
6
+ * - `react`
7
+ * - `react-dom`
8
+ * - `typescript`
9
+ *
10
+ * See the `peerDependencies` section of package.json for compatible versions.
11
+ *
12
+ * If you only need the built CSS (./component/link.css),
13
+ * you don't need to install these.
14
+ */
15
+ export { Link } from './components/link/Link';
16
+ export type { LinkProps } from './components/link/types';
17
+ export type { PartialLinkTheme as LinkTheme } from './components/link/styles';
18
+ export { componentLink } from './styleD/build/typescript/component/link';
19
+ export type { ComponentLink } from './styleD/build/typescript/component/link';
@@ -0,0 +1,185 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+ export declare const componentDatePicker: {
5
+ picker: {
6
+ shared: {
7
+ display: string;
8
+ width: string;
9
+ justifyContent: string;
10
+ alignItems: string;
11
+ height: string;
12
+ borderRadius: string;
13
+ border: string;
14
+ backgroundColor: string;
15
+ gap: string;
16
+ padding: {
17
+ top: string;
18
+ right: string;
19
+ bottom: string;
20
+ left: string;
21
+ };
22
+ disabled: {
23
+ cursor: string;
24
+ backgroundColor: string;
25
+ color: string;
26
+ };
27
+ focusVisible: {
28
+ outline: string;
29
+ };
30
+ invalid: {
31
+ border: string;
32
+ };
33
+ button: {
34
+ flex: string;
35
+ backgroundColor: string;
36
+ border: string;
37
+ padding: {
38
+ top: string;
39
+ right: string;
40
+ bottom: string;
41
+ left: string;
42
+ };
43
+ margin: {
44
+ top: string;
45
+ right: string;
46
+ bottom: string;
47
+ left: string;
48
+ };
49
+ display: string;
50
+ alignItems: string;
51
+ justifyContent: string;
52
+ color: string;
53
+ cursor: string;
54
+ disabled: {
55
+ color: string;
56
+ cursor: string;
57
+ };
58
+ };
59
+ };
60
+ };
61
+ segment: {
62
+ shared: {
63
+ placeholder: {
64
+ color: string;
65
+ focusVisible: {
66
+ outline: string;
67
+ };
68
+ };
69
+ };
70
+ };
71
+ popover: {
72
+ shared: {
73
+ offset: number;
74
+ containerPadding: number;
75
+ backgroundColor: string;
76
+ padding: {
77
+ top: string;
78
+ right: string;
79
+ bottom: string;
80
+ left: string;
81
+ };
82
+ boxShadow: string;
83
+ };
84
+ };
85
+ calendar: {
86
+ header: {
87
+ shared: {
88
+ display: string;
89
+ alignItems: string;
90
+ justifyContent: string;
91
+ typography: {
92
+ font: string;
93
+ letterSpacing: string;
94
+ fontWidth: number;
95
+ };
96
+ button: {
97
+ backgroundColor: string;
98
+ border: string;
99
+ padding: {
100
+ top: string;
101
+ right: string;
102
+ bottom: string;
103
+ left: string;
104
+ };
105
+ margin: {
106
+ top: string;
107
+ right: string;
108
+ bottom: string;
109
+ left: string;
110
+ };
111
+ display: string;
112
+ alignItems: string;
113
+ justifyContent: string;
114
+ color: string;
115
+ cursor: string;
116
+ width: string;
117
+ height: string;
118
+ aspectRatio: string;
119
+ hovered: {
120
+ backgroundColor: string;
121
+ };
122
+ pressed: {
123
+ backgroundColor: string;
124
+ };
125
+ selected: {
126
+ backgroundColor: string;
127
+ };
128
+ focusVisible: {
129
+ outline: string;
130
+ };
131
+ disabled: {
132
+ cursor: string;
133
+ color: string;
134
+ };
135
+ };
136
+ };
137
+ };
138
+ grid: {
139
+ shared: {
140
+ typography: {
141
+ font: string;
142
+ letterSpacing: string;
143
+ fontWidth: number;
144
+ };
145
+ borderCollapse: string;
146
+ borderSpacing: string;
147
+ th: {
148
+ width: string;
149
+ height: string;
150
+ verticalAlign: string;
151
+ };
152
+ };
153
+ };
154
+ cell: {
155
+ shared: {
156
+ width: string;
157
+ aspectRatio: string;
158
+ display: string;
159
+ alignItems: string;
160
+ justifyContent: string;
161
+ cursor: string;
162
+ outsideMonth: {
163
+ display: string;
164
+ };
165
+ hovered: {
166
+ backgroundColor: string;
167
+ };
168
+ pressed: {
169
+ backgroundColor: string;
170
+ };
171
+ selected: {
172
+ backgroundColor: string;
173
+ };
174
+ focusVisible: {
175
+ outline: string;
176
+ };
177
+ disabled: {
178
+ cursor: string;
179
+ color: string;
180
+ };
181
+ };
182
+ };
183
+ };
184
+ };
185
+ export type ComponentDatePicker = typeof componentDatePicker;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+ export declare const componentLink: {
5
+ shared: {
6
+ focus: {
7
+ outline: string;
8
+ };
9
+ hover: {
10
+ color: string;
11
+ cursor: string;
12
+ };
13
+ enabled: {
14
+ color: string;
15
+ };
16
+ disabled: {
17
+ color: string;
18
+ };
19
+ pressed: {
20
+ color: string;
21
+ };
22
+ };
23
+ };
24
+ export type ComponentLink = typeof componentLink;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+ export declare const componentTemplateComponent: {
5
+ color: {
6
+ background: string;
7
+ text: string;
8
+ };
9
+ };
10
+ export type ComponentTemplateComponent = typeof componentTemplateComponent;
@@ -0,0 +1,2 @@
1
+ import type { TemplateComponentProps } from './types';
2
+ export declare const TemplateComponent: (props: TemplateComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare const componentName = "TemplateComponent";
2
+ export declare const componentTsx = "import { TemplateComponent } from '@guardian/stand/template-component';\n\nexport const Component = () => (\n\t<>\n\t\t{/* default example */}\n\t\t<TemplateComponent />\n\n\t\t{/* custom message example */}\n\t\t<TemplateComponent message=\"hi there\" />\n\n);\n\n";
3
+ export declare const componentCss = "\n/* import the templateComponent styles */\n@import '@guardian/stand/component/templateComponent.css';\n/* import the icon styles if using the icon variant of the templateComponent component */\n@import \"@guardian/stand/component/icon.css\";\n\n/* example setup of templateComponent style */\n.stand-template-component {\n\tbackground-color: var(--component-template-component-color-background);\n\tdisplay: var(--component-template-component-display);\n\talign-items: var(--component-template-component-align-items);\n\tjustify-content: var(--component-template-component-justify-content);\n\twidth: var(--component-template-component-size);\n\theight: var(--component-template-component-size);\n\tuser-select: var(--component-template-component-user-select);\n\tcolor: var(--component-template-component-color-text);\n\tfont: var(--component-template-component-typography-font);\n\tletter-spacing: var(--component-template-component-typography-letter-spacing);\n\tfont-variation-settings: \"wdth\" var(--component-template-component-typography-font-width);\n}\n\n.stand-template-component-icon {\n\tdisplay: var(--component-icon-shared-display);\n\tuser-select: var(--component-icon-shared-user-select);\n\tfont-size: var(--component-icon-md-size);\n}\n\n.stand-template-component-icon-color-svg > svg {\n\twidth: var(--component-icon-md-size);\n\theight: var(--component-icon-md-size);\n\tfill: var(--component-template-component-color-text);\n}\n\n/* example setup for templateComponent image */\n.stand-template-component > img {\n\twidth: 100%;\n\theight: 100%;\n\tobject-fit: cover;\n}\n";
4
+ export declare const componentHtml = "<div class=\"container\">\n\t<div class=\"stand-template-component\">C</div>\n <div class=\"stand-template-component\">\n\t\t<span class=\"material-symbols stand-template-component-icon\">raven</span>\n </div>\n <div class=\"stand-template-component\">\n <span class=\"stand-template-component-icon stand-template-component-icon-color-svg\"><svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#1f1f1f\"><path d=\"M240-200h120v-240h240v240h120v-360L480-740 240-560v360Zm-80 80v-480l320-240 320 240v480H520v-240h-80v240H160Zm320-350Z\"/></svg></span>\n </div>\n <div class=\"stand-template-component\">\n \t<img src=\"https://uploads.guimcode.co.uk/2026/01/27/f85e2e477ce54f4c3b671faa5cd21673aa9f8072fddb5d70a73e6038dc812eec.jpg\" alt=\"Mahesh Makani\" />\n </div>\n</div>\n";
5
+ export declare const componentJs = "\t// for ts/js\n\t\timport { componentTemplateComponent, componentIcon } from \"@guardian/stand\";\n\nconst templateComponentStyles = `\n background-color: ${componentTemplateComponent.color.background};\n display: ${componentTemplateComponent.display};\n align-items: ${componentTemplateComponent[\"align-items\"]};\n justify-content: ${componentTemplateComponent[\"justify-content\"]};\n width: ${componentTemplateComponent.size};\n height: ${componentTemplateComponent.size};\n user-select: ${componentTemplateComponent[\"user-select\"]};\n`;\n\nconst typographyStyle = `\n color: ${componentTemplateComponent.color.text};\n font: ${componentTemplateComponent.typography.font};\n letter-spacing: ${componentTemplateComponent.typography.letterSpacing};\n font-variation-settings: 'wdth' ${componentTemplateComponent.typography.fontWidth};\n`;\n\nconst imgStyle = `\n width: 100%;\n height: 100%;\n object-fit: cover;\n`;\n\nconst iconStyles = `\n display: ${componentIcon.shared.display};\n user-select: ${componentIcon.shared[\"user-select\"]};\n font-size: ${componentIcon.md.size};\n color: ${componentTemplateComponent.color.text};\n`;\n\nconst iconSvgStyles = `\n width: ${componentIcon.md.size};\n height: ${componentIcon.md.size};\n fill: ${componentTemplateComponent.color.text};\n`;\n\n// e.g. adding to DOM using vanilla JS styles\ndocument.getElementById(\"app\").innerHTML = `\n<div class=\"container\">\n <div style=\"${templateComponentStyles}${typographyStyle}\">C</div>\n <div style=\"${templateComponentStyles}\">\n\t<span class=\"material-symbols\" style=\"${iconStyles}\">raven</span>\n </div>\n <div style=\"${templateComponentStyles}\">\n <span class=\"material-symbols\" style=\"${iconStyles}\"><svg style=\"${iconSvgStyles}\" xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#1f1f1f\"><path d=\"M240-200h120v-240h240v240h120v-360L480-740 240-560v360Zm-80 80v-480l320-240 320 240v480H520v-240h-80v240H160Zm320-350Z\"/></svg></span>\n </div>\n <div style=\"${templateComponentStyles}\">\n <img style=\"${imgStyle}\" src=\"https://uploads.guimcode.co.uk/2026/01/27/f85e2e477ce54f4c3b671faa5cd21673aa9f8072fddb5d70a73e6038dc812eec.jpg\" alt=\"Mahesh Makani\" />\n </div>\n`;\n";