@ably/ui 14.8.0-dev.bf71c2e → 14.8.0-dev.cbf00c0

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.
@@ -185,6 +185,7 @@
185
185
  --fs-p1: 1rem;
186
186
  --fs-p2: 0.938rem;
187
187
  --fs-p3: 0.875rem;
188
+ --fs-p4: 0.813rem;
188
189
  --fs-standfirst-xl: 2.25rem;
189
190
  --fs-standfirst: 1.5rem;
190
191
  --fs-sub-header: 1.125rem;
@@ -165,4 +165,20 @@
165
165
  .ui-figcaption {
166
166
  @apply font-mono text-p3 text-neutral-800;
167
167
  }
168
+
169
+ .ui-menu-label-1 {
170
+ @apply font-sans text-neutral-1000 text-p1 font-medium leading-snug;
171
+ }
172
+
173
+ .ui-menu-label-2 {
174
+ @apply font-sans text-neutral-1000 text-p2 font-medium leading-snug;
175
+ }
176
+
177
+ .ui-menu-label-3 {
178
+ @apply font-sans text-neutral-1000 text-p3 font-medium leading-snug;
179
+ }
180
+
181
+ .ui-menu-label-4 {
182
+ @apply font-sans text-neutral-1000 text-p4 font-medium leading-snug;
183
+ }
168
184
  }
package/index.d.ts CHANGED
@@ -3,11 +3,27 @@
3
3
  declare module '@ably/ui/core/Accordion/types' {
4
4
  import { ReactNode } from "react";
5
5
  import { IconName, IconSize } from ".@ably/ui/core/Icon/types";
6
- import { ColorClass, DataStateOpenColorClass } from ".@ably/ui/core/styles/colors/types";
6
+ import { ColorClass } from ".@ably/ui/core/styles/colors/types";
7
+ /**
8
+ * Represents the data structure for an Accordion component.
9
+ */
7
10
  export type AccordionData = {
11
+ /**
12
+ * The name of the accordion item.
13
+ */
8
14
  name: string;
15
+ /**
16
+ * The optional icon name to be displayed alongside the accordion item.
17
+ */
9
18
  icon?: IconName;
19
+ /**
20
+ * The content to be displayed when the accordion item is expanded.
21
+ */
10
22
  content: ReactNode;
23
+ /**
24
+ * Optional click handler function that is called when the accordion item is clicked.
25
+ * @param index - The index of the clicked accordion item.
26
+ */
11
27
  onClick?: (index: number) => void;
12
28
  };
13
29
  export type AccordionIcons = {
@@ -22,25 +38,98 @@ export type AccordionIcons = {
22
38
  };
23
39
  export const accordionThemes: readonly ["dark", "light", "transparent", "darkTransparent", "static", "darkStatic"];
24
40
  export type AccordionTheme = (typeof accordionThemes)[number];
41
+ /**
42
+ * Represents the theme colors for an accordion component.
43
+ */
25
44
  export type AccordionThemeColors = {
45
+ /**
46
+ * Background color class for the accordion.
47
+ */
26
48
  bg: ColorClass;
49
+ /**
50
+ * Background color when the accordion item is hovered.
51
+ */
27
52
  hoverBg: string;
53
+ /**
54
+ * Text color class for the accordion.
55
+ */
28
56
  text: ColorClass;
57
+ /**
58
+ * Color class for the toggle icon of the accordion.
59
+ */
29
60
  toggleIconColor: ColorClass;
30
- selectableBg?: DataStateOpenColorClass;
31
- selectableText?: DataStateOpenColorClass;
61
+ /**
62
+ * Optional background color class for selectable accordion items.
63
+ */
64
+ selectableBg?: ColorClass;
65
+ /**
66
+ * Optional text color class for selectable accordion items.
67
+ */
68
+ selectableText?: ColorClass;
69
+ /**
70
+ * Optional border color for the accordion.
71
+ */
32
72
  border?: string;
33
73
  };
74
+ /**
75
+ * Options for configuring the Accordion component.
76
+ */
34
77
  export type AccordionOptions = {
78
+ /**
79
+ * If true, only one accordion item can be open at a time.
80
+ * @default false
81
+ */
35
82
  autoClose?: boolean;
83
+ /**
84
+ * If true, accordion items can be selected.
85
+ * @default false
86
+ */
36
87
  selectable?: boolean;
88
+ /**
89
+ * If true, the accordion header will stick to the top when scrolling.
90
+ * @default false
91
+ */
37
92
  sticky?: boolean;
93
+ /**
94
+ * An array of indexes indicating which accordion items should be open by default.
95
+ * @default []
96
+ */
38
97
  defaultOpenIndexes?: number[];
98
+ /**
99
+ * If true, all accordion items will be fully open.
100
+ * @default false
101
+ */
39
102
  fullyOpen?: boolean;
103
+ /**
104
+ * Custom CSS class to apply to the accordion header.
105
+ * @default ""
106
+ */
40
107
  headerCSS?: string;
108
+ /**
109
+ * If true, borders between accordion items will be hidden.
110
+ * @default false
111
+ */
41
112
  hideBorders?: boolean;
113
+ /**
114
+ * Size of the row icon.
115
+ * @default "32px"
116
+ */
42
117
  rowIconSize?: IconSize;
118
+ /**
119
+ * Size of the accordion icon.
120
+ * @default "16px"
121
+ */
43
122
  iconSize?: IconSize;
123
+ /**
124
+ * Custom CSS classes to apply to the selected accordion header.
125
+ * @default ""
126
+ */
127
+ selectedHeaderCSS?: string;
128
+ /**
129
+ * Custom CSS classes to apply to the accordion content.
130
+ * @default ""
131
+ */
132
+ contentCSS?: string;
44
133
  };
45
134
  //# sourceMappingURL=types.d.ts.map
46
135
  }
@@ -57,10 +146,21 @@ declare module '@ably/ui/core/Accordion' {
57
146
  import React from "react";
58
147
  import type { AccordionData, AccordionIcons, AccordionOptions, AccordionTheme } from "@ably/ui/core/Accordion/types";
59
148
  export type AccordionProps = {
149
+ /**
150
+ * The data for the accordion items.
151
+ */
60
152
  data: AccordionData[];
153
+ /**
154
+ * Icons for the accordion toggle.
155
+ */
61
156
  icons?: AccordionIcons;
157
+ /**
158
+ * Theme for the accordion.
159
+ */
62
160
  theme?: AccordionTheme;
63
- headerCSS?: string;
161
+ /**
162
+ * Options for the accordion behavior.
163
+ */
64
164
  options?: AccordionOptions;
65
165
  } & React.HTMLAttributes<HTMLDivElement>;
66
166
  const Accordion: ({ data, theme, icons, options, ...props }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
@@ -261,7 +361,7 @@ export const computedIcons: {
261
361
  display: readonly ["icon-display-48hrs", "icon-display-ably-channels", "icon-display-about-ably-col", "icon-display-api-keys", "icon-display-api", "icon-display-architectural-guidance", "icon-display-asset-tracking-col", "icon-display-authentication", "icon-display-avatar-stack", "icon-display-browser", "icon-display-calendar", "icon-display-call-mobile", "icon-display-careers-col", "icon-display-case-studies-col", "icon-display-chat-col", "icon-display-chat-mono", "icon-display-chat-stack-col", "icon-display-chat-stack", "icon-display-cloud-servers", "icon-display-compare-tech-col", "icon-display-connection-state-&-recovery", "icon-display-consumer-groups", "icon-display-custom-cname", "icon-display-custom", "icon-display-customers-col", "icon-display-data-broadcast-col", "icon-display-data-broadcast-mono", "icon-display-data-synchronization-col", "icon-display-dedicated-cluster", "icon-display-deltas", "icon-display-docs-col", "icon-display-documentation", "icon-display-dynamic-channel-groups", "icon-display-edge-network", "icon-display-elasticity", "icon-display-equalisers-mono", "icon-display-events-col", "icon-display-exactly-once-delivery", "icon-display-examples-col", "icon-display-fan-out", "icon-display-firehose", "icon-display-gdpr", "icon-display-general-comms", "icon-display-granular-permissions", "icon-display-hipaa-mono", "icon-display-hipaa", "icon-display-history", "icon-display-integrations-col", "icon-display-integrations", "icon-display-it-support-access", "icon-display-it-support-helpdesk", "icon-display-kafka-at-the-edge-col", "icon-display-laptop", "icon-display-lightbulb-col", "icon-display-live-chat", "icon-display-live-updates-results-metrics-col", "icon-display-map-pin", "icon-display-message-batching", "icon-display-message-persistence", "icon-display-message-queues", "icon-display-message", "icon-display-multi-user-spaces-col", "icon-display-observe-analytics", "icon-display-padlock-closed", "icon-display-platform", "icon-display-play", "icon-display-premium-support", "icon-display-privacy-shield-framework", "icon-display-private-link", "icon-display-push-notifications-col", "icon-display-push-notifications-mono", "icon-display-push-notifications", "icon-display-quickstart-guides-col", "icon-display-resources-col", "icon-display-rewind", "icon-display-sdks-col", "icon-display-send-received-messages", "icon-display-servers", "icon-display-shopping-cart", "icon-display-sla", "icon-display-soc2-type2-mono", "icon-display-soc2-type2", "icon-display-subscription-filters", "icon-display-support-chat-mono", "icon-display-system-metadata", "icon-display-tech-account-comms", "icon-display-tutorials-demos-col", "icon-display-virtual-events-col", "icon-display-virtual-events"];
262
362
  gui: readonly ["icon-gui-ably-badge", "icon-gui-arrow-bidirectional-horizontal", "icon-gui-arrow-bidirectional-vertical", "icon-gui-arrow-down", "icon-gui-arrow-left", "icon-gui-arrow-right", "icon-gui-arrow-up", "icon-gui-burger-menu", "icon-gui-check-circled-fill-black", "icon-gui-check-circled-fill", "icon-gui-check-circled", "icon-gui-checklist-checked", "icon-gui-chevron-down", "icon-gui-chevron-up", "icon-gui-clock", "icon-gui-close", "icon-gui-copy", "icon-gui-cross-circled-fill", "icon-gui-cross-circled", "icon-gui-dash-circled", "icon-gui-disclosure-arrow", "icon-gui-document-generic", "icon-gui-enlarge", "icon-gui-external-link", "icon-gui-filter-flow-step-1", "icon-gui-filter-flow-step-2", "icon-gui-filter-flow-step-3", "icon-gui-hand", "icon-gui-history", "icon-gui-info", "icon-gui-link-arrow", "icon-gui-link", "icon-gui-live-chat", "icon-gui-minus", "icon-gui-partial", "icon-gui-plus", "icon-gui-quote-marks-solid", "icon-gui-refresh", "icon-gui-resources", "icon-gui-search", "icon-gui-tick", "icon-gui-warning"];
263
363
  other: readonly ["icon-other-quote"];
264
- product: readonly ["icon-product-asset-tracking-mono", "icon-product-asset-tracking", "icon-product-chat-mono", "icon-product-chat", "icon-product-liveobjects", "icon-product-livesync-mono", "icon-product-livesync", "icon-product-platform-mono", "icon-product-pub-sub-mono", "icon-product-pubsub", "icon-product-spaces-mono", "icon-product-spaces"];
364
+ product: readonly ["icon-product-asset-tracking-mono", "icon-product-asset-tracking", "icon-product-chat-mono", "icon-product-chat", "icon-product-liveobjects", "icon-product-livesync-mono", "icon-product-livesync", "icon-product-platform-mono", "icon-product-pubsub-mono", "icon-product-pubsub", "icon-product-spaces-mono", "icon-product-spaces"];
265
365
  social: readonly ["icon-social-discord", "icon-social-facebook", "icon-social-github", "icon-social-glassdoor", "icon-social-google", "icon-social-linkedin", "icon-social-stackoverflow", "icon-social-twitter", "icon-social-x", "icon-social-youtube"];
266
366
  tech: readonly ["icon-tech-amqp10", "icon-tech-apache-kafka", "icon-tech-apachepulsar", "icon-tech-awskinesis", "icon-tech-awslambda", "icon-tech-awssqs", "icon-tech-azureservicebus", "icon-tech-cloudflareworkers", "icon-tech-csharp", "icon-tech-flutter", "icon-tech-gcloudfunctions", "icon-tech-go", "icon-tech-ifttt", "icon-tech-java", "icon-tech-javascript", "icon-tech-net", "icon-tech-objectivec", "icon-tech-php", "icon-tech-python", "icon-tech-react", "icon-tech-ruby", "icon-tech-swift", "icon-tech-terraform", "icon-tech-zapier"];
267
367
  };
@@ -281,7 +381,7 @@ export const iconNames: {
281
381
  social: readonly ["icon-social-discord", "icon-social-facebook", "icon-social-github", "icon-social-glassdoor", "icon-social-google", "icon-social-linkedin", "icon-social-stackoverflow", "icon-social-twitter", "icon-social-x", "icon-social-youtube"];
282
382
  other: readonly ["icon-other-quote"];
283
383
  tech: readonly ["icon-tech-amqp10", "icon-tech-apache-kafka", "icon-tech-apachepulsar", "icon-tech-awskinesis", "icon-tech-awslambda", "icon-tech-awssqs", "icon-tech-azureservicebus", "icon-tech-cloudflareworkers", "icon-tech-csharp", "icon-tech-flutter", "icon-tech-gcloudfunctions", "icon-tech-go", "icon-tech-ifttt", "icon-tech-java", "icon-tech-javascript", "icon-tech-net", "icon-tech-objectivec", "icon-tech-php", "icon-tech-python", "icon-tech-react", "icon-tech-ruby", "icon-tech-swift", "icon-tech-terraform", "icon-tech-zapier"];
284
- product: readonly ["icon-product-asset-tracking-mono", "icon-product-asset-tracking", "icon-product-chat-mono", "icon-product-chat", "icon-product-liveobjects", "icon-product-livesync-mono", "icon-product-livesync", "icon-product-platform-mono", "icon-product-pub-sub-mono", "icon-product-pubsub", "icon-product-spaces-mono", "icon-product-spaces"];
384
+ product: readonly ["icon-product-asset-tracking-mono", "icon-product-asset-tracking", "icon-product-chat-mono", "icon-product-chat", "icon-product-liveobjects", "icon-product-livesync-mono", "icon-product-livesync", "icon-product-platform-mono", "icon-product-pubsub-mono", "icon-product-pubsub", "icon-product-spaces-mono", "icon-product-spaces"];
285
385
  };
286
386
  export type IconName = (typeof iconNames.gui)[number] | (typeof iconNames.display)[number] | (typeof iconNames.social)[number] | (typeof iconNames.other)[number] | (typeof iconNames.tech)[number] | (typeof iconNames.product)[number];
287
387
  export type IconSize = `${number}px` | `${number}em` | `${number}rem` | `calc(${string})`;
@@ -1003,7 +1103,6 @@ export const colors: readonly ["neutral", "orange", "blue", "yellow", "green", "
1003
1103
  export type ColorClassColorGroups = (typeof colors)[number];
1004
1104
  export type Theme = "light" | "dark";
1005
1105
  export type ColorClass = `${ColorClassVariants}${ColorClassPrefixes}-${ColorName}`;
1006
- export type DataStateOpenColorClass = `data-[state=open]:${ColorClass}`;
1007
1106
  export const neutralColors: readonly ["neutral-000", "neutral-100", "neutral-200", "neutral-300", "neutral-400", "neutral-500", "neutral-600", "neutral-700", "neutral-800", "neutral-900", "neutral-1000", "neutral-1100", "neutral-1200", "neutral-1300"];
1008
1107
  export const orangeColors: readonly ["orange-100", "orange-200", "orange-300", "orange-400", "orange-500", "orange-600", "orange-700", "orange-800", "orange-900", "orange-1000", "orange-1100"];
1009
1108
  export const yellowColors: readonly ["yellow-100", "yellow-200", "yellow-300", "yellow-400", "yellow-500", "yellow-600", "yellow-700", "yellow-800", "yellow-900"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ably/ui",
3
- "version": "14.8.0-dev.bf71c2e",
3
+ "version": "14.8.0-dev.cbf00c0",
4
4
  "description": "Home of the Ably design system library ([design.ably.com](https://design.ably.com)). It provides a showcase, development/test environment and a publishing pipeline for different distributables.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,6 +26,7 @@ module.exports = {
26
26
  p1: ["var(--fs-p1)", "var(--lh-extra-relaxed)"],
27
27
  p2: ["var(--fs-p2)", "var(--lh-extra-relaxed)"],
28
28
  p3: ["var(--fs-p3)", "var(--lh-extra-relaxed)"],
29
+ p4: ["var(--fs-p4)", "var(--lh-extra-relaxed)"],
29
30
  standfirst: ["var(--fs-standfirst)"],
30
31
  "standfirst-xl": ["var(--fs-standfirst-xl)"],
31
32
  "sub-header": ["var(--fs-sub-header)"],