@ably/ui 14.9.0-dev.4cf104c → 15.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/core/Accordion.js +1 -1
- package/core/Button.js +1 -0
- package/core/styles/buttons.css +82 -68
- package/core/styles/gui.css +33 -0
- package/core/styles/legacy-buttons.css +95 -0
- package/core/styles/properties.css +1 -0
- package/core/styles/text.css +0 -16
- package/core/styles.components.css +2 -0
- package/index.d.ts +36 -0
- package/package.json +1 -1
- package/tailwind.config.js +1 -0
- package/core/.DS_Store +0 -0
- package/core/Accordion/.DS_Store +0 -0
- package/core/Code/.DS_Store +0 -0
- package/core/ContactFooter/.DS_Store +0 -0
- package/core/CookieMessage/.DS_Store +0 -0
- package/core/CustomerLogos/.DS_Store +0 -0
- package/core/DropdownMenu/.DS_Store +0 -0
- package/core/FeaturedLink/.DS_Store +0 -0
- package/core/Flash/.DS_Store +0 -0
- package/core/Footer/.DS_Store +0 -0
- package/core/Icon/.DS_Store +0 -0
- package/core/Loader/.DS_Store +0 -0
- package/core/Logo/.DS_Store +0 -0
- package/core/Meganav/.DS_Store +0 -0
- package/core/MeganavBlogPostsList/.DS_Store +0 -0
- package/core/MeganavControl/.DS_Store +0 -0
- package/core/MeganavControlMobileDropdown/.DS_Store +0 -0
- package/core/MeganavControlMobilePanelClose/.DS_Store +0 -0
- package/core/MeganavControlMobilePanelOpen/.DS_Store +0 -0
- package/core/MeganavSearchAutocomplete/.DS_Store +0 -0
- package/core/MeganavSearchSuggestions/.DS_Store +0 -0
- package/core/Notice/.DS_Store +0 -0
- package/core/Slider/.DS_Store +0 -0
- package/core/Table/.DS_Store +0 -0
- package/core/Tooltip/.DS_Store +0 -0
- package/core/icons/.DS_Store +0 -0
- package/core/styles/colors/computed-colors.json +0 -1
package/core/Accordion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import React,{useMemo,useState}from"react";import{AccordionContent,AccordionItem,AccordionTrigger,Accordion as RadixAccordion}from"@radix-ui/react-accordion";import clsx from"clsx";import Icon from"./Icon";import{themeClasses,isNonTransparentTheme,isStaticTheme}from"./Accordion/utils";const AccordionRow=({name,children,rowIcon,options,toggleIcons,theme,index,onClick,openRowValues})=>{const{selectable,sticky}=options||{};const rowKey=`accordion-item-${index}`;const isOpen=openRowValues.includes(rowKey);const{text,bg,hoverBg,selectableBg,selectableText,border,toggleIconColor}=themeClasses[theme];const textClass=selectable&&isOpen&&selectableText||text;return /*#__PURE__*/React.createElement(AccordionItem,{value:rowKey,className:clsx({[`${border}`]:border&&!options?.hideBorders})},/*#__PURE__*/React.createElement(AccordionTrigger,{onClick:onClick,className:clsx({"flex w-full group/accordion-trigger py-16 ui-text-p1 font-bold text-left items-center gap-12 transition-colors":true,"px-16 mb-16 rounded-lg":isNonTransparentTheme(theme),"rounded-none":!isNonTransparentTheme(theme),"pointer-events-none focus:outline-none":isStaticTheme(theme),"focus:outline-gui-blue-focus":!isStaticTheme(theme),"sticky top-0":sticky,[`${bg} ${hoverBg} ${text}`]:!(selectable&&isOpen),[`${selectableBg} ${selectableText}`]:selectable&&isOpen,[options?.headerCSS??""]:options?.headerCSS,[options?.selectedHeaderCSS??""]:options?.selectedHeaderCSS&&isOpen})},rowIcon?/*#__PURE__*/React.createElement(Icon,{name:rowIcon,color:textClass,size:options?.rowIconSize??"32px"}):null,/*#__PURE__*/React.createElement("span",null,name),!selectable&&!isStaticTheme(theme)?/*#__PURE__*/React.createElement("span",{className:"flex-1 justify-end flex items-center"},/*#__PURE__*/React.createElement(Icon,{name:isOpen?toggleIcons.open.name:toggleIcons.closed.name,color:toggleIconColor,size:options?.iconSize??"16px"})):null),/*#__PURE__*/React.createElement(AccordionContent,{className:clsx({"ui-text-p2 overflow-hidden transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down":true,[options?.contentCSS??""]:options?.contentCSS})},/*#__PURE__*/React.createElement("div",{className:"pb-16"},children)))};const Accordion=({data,theme="transparent",icons={closed:{name:"icon-gui-plus"},open:{name:"icon-gui-minus"}},options,...props})=>{const[openRowValues,setOpenRowValues]=useState(
|
|
1
|
+
import React,{useMemo,useState}from"react";import{AccordionContent,AccordionItem,AccordionTrigger,Accordion as RadixAccordion}from"@radix-ui/react-accordion";import clsx from"clsx";import Icon from"./Icon";import{themeClasses,isNonTransparentTheme,isStaticTheme}from"./Accordion/utils";const AccordionRow=({name,children,rowIcon,options,toggleIcons,theme,index,onClick,openRowValues})=>{const{selectable,sticky}=options||{};const rowKey=`accordion-item-${index}`;const isOpen=openRowValues.includes(rowKey);const{text,bg,hoverBg,selectableBg,selectableText,border,toggleIconColor}=themeClasses[theme];const textClass=selectable&&isOpen&&selectableText||text;return /*#__PURE__*/React.createElement(AccordionItem,{value:rowKey,className:clsx({[`${border}`]:border&&!options?.hideBorders})},/*#__PURE__*/React.createElement(AccordionTrigger,{onClick:onClick,className:clsx({"flex w-full group/accordion-trigger py-16 ui-text-p1 font-bold text-left items-center gap-12 transition-colors":true,"px-16 mb-16 rounded-lg":isNonTransparentTheme(theme),"rounded-none":!isNonTransparentTheme(theme),"pointer-events-none focus:outline-none":isStaticTheme(theme),"focus:outline-gui-blue-focus":!isStaticTheme(theme),"sticky top-0":sticky,[`${bg} ${hoverBg} ${text}`]:!(selectable&&isOpen),[`${selectableBg} ${selectableText}`]:selectable&&isOpen,[options?.headerCSS??""]:options?.headerCSS,[options?.selectedHeaderCSS??""]:options?.selectedHeaderCSS&&isOpen})},rowIcon?/*#__PURE__*/React.createElement(Icon,{name:rowIcon,color:textClass,size:options?.rowIconSize??"32px"}):null,/*#__PURE__*/React.createElement("span",null,name),!selectable&&!isStaticTheme(theme)?/*#__PURE__*/React.createElement("span",{className:"flex-1 justify-end flex items-center"},/*#__PURE__*/React.createElement(Icon,{name:isOpen?toggleIcons.open.name:toggleIcons.closed.name,color:toggleIconColor,size:options?.iconSize??"16px"})):null),/*#__PURE__*/React.createElement(AccordionContent,{className:clsx({"ui-text-p2 overflow-hidden transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down":true,[options?.contentCSS??""]:options?.contentCSS})},/*#__PURE__*/React.createElement("div",{className:"pb-16"},children)))};const Accordion=({data,theme="transparent",icons={closed:{name:"icon-gui-plus"},open:{name:"icon-gui-minus"}},options,...props})=>{const openIndexes=useMemo(()=>{const indexValues=data.map((_,i)=>`accordion-item-${i}`);return options?.fullyOpen?indexValues:indexValues.filter((_,index)=>options?.defaultOpenIndexes?.includes(index))},[options?.defaultOpenIndexes,options?.fullyOpen,data.length]);const[openRowValues,setOpenRowValues]=useState(openIndexes);const innerAccordion=data.map((item,index)=>/*#__PURE__*/React.createElement(AccordionRow,{key:item.name,name:item.name,rowIcon:item.icon,toggleIcons:icons,theme:theme,options:options,index:index,onClick:()=>{item.onClick?.(index)},openRowValues:openRowValues},item.content));return /*#__PURE__*/React.createElement("div",props,options?.autoClose?/*#__PURE__*/React.createElement(RadixAccordion,{type:"single",collapsible:true,defaultValue:openIndexes[0],onValueChange:values=>setOpenRowValues(values)},innerAccordion):/*#__PURE__*/React.createElement(RadixAccordion,{type:"multiple",defaultValue:openIndexes,onValueChange:values=>setOpenRowValues(values)},innerAccordion))};export default Accordion;
|
package/core/Button.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import React from"react";import Icon from"./Icon";import clsx from"clsx";const buttonClasses={priority:{lg:"ui-button-priority-lg",md:"ui-button-priority",sm:"ui-button-priority-sm",xs:"ui-button-priority-xs"},primary:{lg:"ui-button-primary-lg",md:"ui-button-primary",sm:"ui-button-primary-sm",xs:"ui-button-primary-xs"},secondary:{lg:"ui-button-secondary-lg",md:"ui-button-secondary",sm:"ui-button-secondary-sm",xs:"ui-button-secondary-xs"}};export const iconModifierClasses={lg:{left:"ui-button-lg-left-icon",right:"ui-button-lg-right-icon"},md:{left:"ui-button-left-icon",right:"ui-button-right-icon"},sm:{left:"ui-button-sm-left-icon",right:"ui-button-sm-right-icon"},xs:{left:"",right:""}};const Button=({variant="primary",size,leftIcon,rightIcon,children,className,...rest})=>{return /*#__PURE__*/React.createElement("button",{className:clsx(buttonClasses[variant][size??"md"],{[iconModifierClasses[size??"md"].left]:leftIcon},{[iconModifierClasses[size??"md"].right]:rightIcon},className),...rest},leftIcon?/*#__PURE__*/React.createElement(Icon,{name:leftIcon}):null,children,rightIcon?/*#__PURE__*/React.createElement(Icon,{name:rightIcon}):null)};export default Button;
|
package/core/styles/buttons.css
CHANGED
|
@@ -1,95 +1,109 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
-
.ui-
|
|
3
|
-
@apply
|
|
4
|
-
@apply hover:text-white hover:bg-active-orange;
|
|
5
|
-
@apply active:text-white active:bg-red-orange;
|
|
6
|
-
@apply focus:text-white focus:bg-cool-black focus:outline-gui-focus;
|
|
7
|
-
@apply disabled:text-mid-grey disabled:bg-gui-unavailable disabled:cursor-not-allowed;
|
|
8
|
-
@apply transition-colors;
|
|
9
|
-
@apply inline-flex items-center justify-center;
|
|
2
|
+
.ui-button-base {
|
|
3
|
+
@apply inline-flex rounded justify-center items-center gap-12 text-neutral-000 transition-colors focus:outline-4 focus:outline-gui-blue-focus disabled:cursor-not-allowed;
|
|
10
4
|
}
|
|
11
5
|
|
|
12
|
-
.ui-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
6
|
+
.ui-button-lg-base {
|
|
7
|
+
@apply ui-button-base ui-gui-button1 h-[56px] px-[28px] py-[17px] gap-12 [&>svg]:!w-24 [&>svg]:!h-24;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ui-button-md-base {
|
|
11
|
+
@apply ui-button-base ui-gui-button2 h-[48px] px-24 py-[13.5px] gap-[10px] [&>svg]:!w-24 [&>svg]:!h-24;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ui-button-sm-base {
|
|
15
|
+
@apply ui-button-base ui-gui-button3 h-[40px] px-20 py-[10px] gap-8 [&>svg]:!w-20 [&>svg]:!h-20;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ui-button-xs-base {
|
|
19
|
+
@apply ui-button-base ui-gui-button4 h-[36px] px-12 py-[9px] gap-6 [&>svg]:!w-16 [&>svg]:!h-16;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ui-button-disabled-base {
|
|
23
|
+
@apply disabled:bg-gui-unavailable dark:disabled:bg-gui-unavailable-dark disabled:text-gui-unavailable-dark dark:disabled:text-gui-unavailable disabled:hover:bg-gui-unavailable dark:disabled:hover:bg-gui-unavailable-dark;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ui-button-priority-base {
|
|
27
|
+
@apply bg-gradient-active-orange hover:bg-gradient-to-r hover:from-orange-800 hover:to-orange-800 active:bg-gradient-to-r active:from-orange-800 active:to-orange-800 disabled:bg-none ui-button-disabled-base;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ui-button-primary-base {
|
|
31
|
+
@apply bg-neutral-1300 dark:bg-neutral-000 text-neutral-000 dark:text-neutral-1300 hover:bg-neutral-1200 dark:hover:bg-neutral-100 active:bg-neutral-1100 dark:active:bg-neutral-200 ui-button-disabled-base;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.ui-button-secondary-base {
|
|
35
|
+
@apply text-neutral-1300 dark:text-neutral-000 border border-neutral-600 dark:border-neutral-700 hover:border-neutral-700 dark:hover:border-neutral-600 active:border-neutral-400 dark:active:border-neutral-800 active:text-neutral-1000 dark:active:text-neutral-300 disabled:border-gui-unavailable dark:disabled:border-gui-unavailable-dark disabled:text-gui-unavailable dark:disabled:text-gui-unavailable-dark;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ui-button-priority-lg {
|
|
39
|
+
@apply ui-button-lg-base ui-button-priority-base;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ui-button-priority {
|
|
43
|
+
@apply ui-button-md-base ui-button-priority-base;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ui-button-priority-sm {
|
|
47
|
+
@apply ui-button-sm-base ui-button-priority-base;
|
|
48
|
+
}
|
|
26
49
|
|
|
27
|
-
|
|
28
|
-
@apply
|
|
29
|
-
@apply inline-flex items-center justify-center;
|
|
50
|
+
.ui-button-priority-xs {
|
|
51
|
+
@apply ui-button-xs-base ui-button-priority-base;
|
|
30
52
|
}
|
|
31
53
|
|
|
32
|
-
.ui-
|
|
33
|
-
|
|
34
|
-
background-position: 100% 0%;
|
|
54
|
+
.ui-button-primary-lg {
|
|
55
|
+
@apply ui-button-lg-base ui-button-primary-base;
|
|
35
56
|
}
|
|
36
57
|
|
|
37
|
-
.ui-
|
|
38
|
-
|
|
39
|
-
@apply bg-gui-unavailable text-mid-grey cursor-not-allowed;
|
|
58
|
+
.ui-button-primary {
|
|
59
|
+
@apply ui-button-md-base ui-button-primary-base;
|
|
40
60
|
}
|
|
41
61
|
|
|
42
|
-
.ui-
|
|
43
|
-
@apply
|
|
44
|
-
@apply hover:text-white hover:bg-active-orange;
|
|
45
|
-
@apply active:text-white active:bg-red-orange;
|
|
46
|
-
@apply focus:text-white focus:bg-cool-black focus:outline-gui-focus;
|
|
47
|
-
@apply disabled:text-mid-grey disabled:bg-gui-unavailable disabled:cursor-not-allowed;
|
|
48
|
-
@apply transition-colors;
|
|
49
|
-
@apply inline-flex items-center justify-center;
|
|
62
|
+
.ui-button-primary-sm {
|
|
63
|
+
@apply ui-button-sm-base ui-button-primary-base;
|
|
50
64
|
}
|
|
51
65
|
|
|
52
|
-
.ui-
|
|
53
|
-
@apply
|
|
54
|
-
@apply hover:text-cool-black hover:border-active-orange hover:bg-white;
|
|
55
|
-
@apply active:border-red-orange active:bg-white;
|
|
56
|
-
@apply focus:border-cool-black focus:bg-white focus:outline-gui-focus;
|
|
57
|
-
@apply disabled:text-gui-unavailable disabled:border-gui-unavailable disabled:bg-white disabled:cursor-not-allowed;
|
|
58
|
-
@apply transition-colors;
|
|
59
|
-
@apply inline-flex items-center justify-center;
|
|
66
|
+
.ui-button-primary-xs {
|
|
67
|
+
@apply ui-button-xs-base ui-button-primary-base;
|
|
60
68
|
}
|
|
61
69
|
|
|
62
|
-
.ui-
|
|
63
|
-
@apply
|
|
64
|
-
@apply hover:text-white hover:border-active-orange;
|
|
65
|
-
@apply active:border-red-orange;
|
|
66
|
-
@apply focus:outline-gui-focus;
|
|
67
|
-
@apply disabled:text-gui-unavailable disabled:border-gui-unavailable disabled:cursor-not-allowed;
|
|
68
|
-
@apply transition-colors;
|
|
69
|
-
@apply inline-flex items-center justify-center;
|
|
70
|
+
.ui-button-secondary-lg {
|
|
71
|
+
@apply ui-button-lg-base ui-button-secondary-base;
|
|
70
72
|
}
|
|
71
73
|
|
|
72
|
-
.ui-
|
|
73
|
-
@apply
|
|
74
|
+
.ui-button-secondary {
|
|
75
|
+
@apply ui-button-md-base ui-button-secondary-base;
|
|
74
76
|
}
|
|
75
77
|
|
|
76
|
-
.ui-
|
|
77
|
-
@apply
|
|
78
|
+
.ui-button-secondary-sm {
|
|
79
|
+
@apply ui-button-sm-base ui-button-secondary-base;
|
|
78
80
|
}
|
|
79
81
|
|
|
80
|
-
.ui-
|
|
81
|
-
@apply
|
|
82
|
+
.ui-button-secondary-xs {
|
|
83
|
+
@apply ui-button-xs-base ui-button-secondary-base;
|
|
82
84
|
}
|
|
83
|
-
|
|
84
|
-
.ui-
|
|
85
|
-
@apply
|
|
85
|
+
|
|
86
|
+
.ui-button-lg-left-icon {
|
|
87
|
+
@apply pl-24;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ui-button-left-icon {
|
|
91
|
+
@apply pl-20;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.ui-button-sm-left-icon {
|
|
95
|
+
@apply pl-[18px];
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.ui-button-lg-right-icon {
|
|
99
|
+
@apply pr-24;
|
|
86
100
|
}
|
|
87
101
|
|
|
88
|
-
.ui-
|
|
89
|
-
@apply
|
|
102
|
+
.ui-button-right-icon {
|
|
103
|
+
@apply pr-20;
|
|
90
104
|
}
|
|
91
105
|
|
|
92
|
-
.ui-
|
|
93
|
-
@apply
|
|
106
|
+
.ui-button-sm-right-icon {
|
|
107
|
+
@apply pr-[18px];
|
|
94
108
|
}
|
|
95
109
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.ui-gui-menu1 {
|
|
3
|
+
@apply font-sans text-neutral-1000 text-p1 font-medium leading-snug;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.ui-gui-menu2 {
|
|
7
|
+
@apply font-sans text-neutral-1000 text-p2 font-medium leading-snug;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ui-gui-menu3 {
|
|
11
|
+
@apply font-sans text-neutral-1000 text-p3 font-medium leading-snug;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ui-gui-menu4 {
|
|
15
|
+
@apply font-sans text-neutral-1000 text-p4 font-medium leading-snug;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ui-gui-button1 {
|
|
19
|
+
@apply font-sans text-p1 font-bold leading-snug;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ui-gui-button2 {
|
|
23
|
+
@apply font-sans text-p2 font-bold leading-snug;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ui-gui-button3 {
|
|
27
|
+
@apply font-sans text-p3 font-bold leading-snug;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ui-gui-button4 {
|
|
31
|
+
@apply font-sans text-p4 font-bold leading-snug;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.ui-btn {
|
|
3
|
+
@apply text-white bg-cool-black text-btn2 font-sans font-bold inline-block rounded p-btn;
|
|
4
|
+
@apply hover:text-white hover:bg-active-orange;
|
|
5
|
+
@apply active:text-white active:bg-red-orange;
|
|
6
|
+
@apply focus:text-white focus:bg-cool-black focus:outline-gui-focus;
|
|
7
|
+
@apply disabled:text-mid-grey disabled:bg-gui-unavailable disabled:cursor-not-allowed;
|
|
8
|
+
@apply transition-colors;
|
|
9
|
+
@apply inline-flex items-center justify-center;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ui-btn-alt {
|
|
13
|
+
transition: background-position 0.2s;
|
|
14
|
+
background: linear-gradient(
|
|
15
|
+
61.2deg,
|
|
16
|
+
var(--color-active-orange) 5%,
|
|
17
|
+
#fe5215 19%,
|
|
18
|
+
#fc4a13 27%,
|
|
19
|
+
#f73c10 33%,
|
|
20
|
+
#f1280a 39%,
|
|
21
|
+
#e90f04 44%,
|
|
22
|
+
var(--color-red-orange) 50%
|
|
23
|
+
);
|
|
24
|
+
background-size: 200% 100%;
|
|
25
|
+
background-position: 0% 0%;
|
|
26
|
+
|
|
27
|
+
@apply text-white text-btn2 font-sans font-bold inline-block rounded p-btn;
|
|
28
|
+
@apply focus:outline-gui-focus;
|
|
29
|
+
@apply inline-flex items-center justify-center;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ui-btn-alt:hover,
|
|
33
|
+
.ui-btn-alt:focus {
|
|
34
|
+
background-position: 100% 0%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ui-btn-alt:disabled {
|
|
38
|
+
background: linear-gradient(var(--gradient-transparent));
|
|
39
|
+
@apply bg-gui-unavailable text-mid-grey cursor-not-allowed;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ui-btn-invert {
|
|
43
|
+
@apply text-cool-black bg-white text-btn2 font-sans font-bold inline-block rounded p-btn;
|
|
44
|
+
@apply hover:text-white hover:bg-active-orange;
|
|
45
|
+
@apply active:text-white active:bg-red-orange;
|
|
46
|
+
@apply focus:text-white focus:bg-cool-black focus:outline-gui-focus;
|
|
47
|
+
@apply disabled:text-mid-grey disabled:bg-gui-unavailable disabled:cursor-not-allowed;
|
|
48
|
+
@apply transition-colors;
|
|
49
|
+
@apply inline-flex items-center justify-center;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ui-btn-secondary {
|
|
53
|
+
@apply text-cool-black bg-white text-btn2 font-sans font-bold inline-block border-btn border-cool-black rounded p-btn;
|
|
54
|
+
@apply hover:text-cool-black hover:border-active-orange hover:bg-white;
|
|
55
|
+
@apply active:border-red-orange active:bg-white;
|
|
56
|
+
@apply focus:border-cool-black focus:bg-white focus:outline-gui-focus;
|
|
57
|
+
@apply disabled:text-gui-unavailable disabled:border-gui-unavailable disabled:bg-white disabled:cursor-not-allowed;
|
|
58
|
+
@apply transition-colors;
|
|
59
|
+
@apply inline-flex items-center justify-center;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ui-btn-secondary-invert {
|
|
63
|
+
@apply text-white bg-cool-black text-btn2 font-sans font-bold inline-block border-btn border-mid-grey rounded p-btn;
|
|
64
|
+
@apply hover:text-white hover:border-active-orange;
|
|
65
|
+
@apply active:border-red-orange;
|
|
66
|
+
@apply focus:outline-gui-focus;
|
|
67
|
+
@apply disabled:text-gui-unavailable disabled:border-gui-unavailable disabled:cursor-not-allowed;
|
|
68
|
+
@apply transition-colors;
|
|
69
|
+
@apply inline-flex items-center justify-center;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ui-btn-icon {
|
|
73
|
+
@apply w-24 h-24 mr-16;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.ui-btn-icon-small {
|
|
77
|
+
@apply w-20 h-20 mr-12;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.ui-btn-icon-xsmall {
|
|
81
|
+
@apply w-16 h-16 mr-8;
|
|
82
|
+
}
|
|
83
|
+
.ui-btn.ui-btn-disabled,
|
|
84
|
+
.ui-btn-invert.ui-btn-disabled {
|
|
85
|
+
@apply text-mid-grey bg-gui-unavailable cursor-not-allowed pointer-events-none select-none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.ui-btn-secondary.ui-btn-disabled {
|
|
89
|
+
@apply text-gui-unavailable border-gui-unavailable bg-white cursor-not-allowed pointer-events-none select-none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ui-btn-secondary-invert.ui-btn-disabled {
|
|
93
|
+
@apply text-gui-unavailable border-gui-unavailable cursor-not-allowed pointer-events-none select-none;
|
|
94
|
+
}
|
|
95
|
+
}
|
package/core/styles/text.css
CHANGED
|
@@ -165,20 +165,4 @@
|
|
|
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
|
-
}
|
|
184
168
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
@import "./styles/buttons.css";
|
|
2
|
+
@import "./styles/legacy-buttons.css";
|
|
2
3
|
@import "./styles/dropdowns.css";
|
|
3
4
|
@import "./styles/forms.css";
|
|
4
5
|
@import "./styles/layout.css";
|
|
5
6
|
@import "./styles/shadows.css";
|
|
6
7
|
@import "./styles/text.css";
|
|
8
|
+
@import "./styles/gui.css";
|
|
7
9
|
|
|
8
10
|
@layer components {
|
|
9
11
|
/* Basis for icon component */
|
package/index.d.ts
CHANGED
|
@@ -168,6 +168,42 @@ export default Accordion;
|
|
|
168
168
|
//# sourceMappingURL=Accordion.d.ts.map
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
+
declare module '@ably/ui/core/Button' {
|
|
172
|
+
import React, { PropsWithChildren } from "react";
|
|
173
|
+
import { IconName } from "@ably/ui/core/Icon/types";
|
|
174
|
+
export type ButtonType = "priority" | "primary" | "secondary";
|
|
175
|
+
type ButtonSize = "lg" | "md" | "sm" | "xs";
|
|
176
|
+
type ButtonProps = {
|
|
177
|
+
/**
|
|
178
|
+
* The type of button: priority, primary, or secondary.
|
|
179
|
+
*/
|
|
180
|
+
variant?: ButtonType;
|
|
181
|
+
/**
|
|
182
|
+
* The button size: lg, sm, or xs. Leave empty for md.
|
|
183
|
+
*/
|
|
184
|
+
size?: ButtonSize;
|
|
185
|
+
/**
|
|
186
|
+
* An icon to render on the left side of the button label.
|
|
187
|
+
*/
|
|
188
|
+
leftIcon?: IconName;
|
|
189
|
+
/**
|
|
190
|
+
* An icon to render on the right side of the button label.
|
|
191
|
+
*/
|
|
192
|
+
rightIcon?: IconName;
|
|
193
|
+
/**
|
|
194
|
+
* Optional classes to add to the button element.
|
|
195
|
+
*/
|
|
196
|
+
className?: string;
|
|
197
|
+
} & React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
198
|
+
export const iconModifierClasses: Record<ButtonSize, {
|
|
199
|
+
left: string;
|
|
200
|
+
right: string;
|
|
201
|
+
}>;
|
|
202
|
+
const Button: React.FC<PropsWithChildren<ButtonProps>>;
|
|
203
|
+
export default Button;
|
|
204
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
205
|
+
}
|
|
206
|
+
|
|
171
207
|
declare module '@ably/ui/core/Code' {
|
|
172
208
|
type CodeProps = {
|
|
173
209
|
language: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ably/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
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",
|
package/tailwind.config.js
CHANGED
|
@@ -128,6 +128,7 @@ module.exports = {
|
|
|
128
128
|
"gui-blue-focus": "var(--color-gui-blue-focus)",
|
|
129
129
|
"gui-blue-visited": "var(--color-gui-blue-focus)",
|
|
130
130
|
"gui-unavailable": "var(--color-gui-unavailable)",
|
|
131
|
+
"gui-unavailable-dark": "var(--color-gui-unavailable-dark)",
|
|
131
132
|
"gui-success-green": "var(--color-gui-success-green)",
|
|
132
133
|
"gui-error-red": "var(--color-gui-error-red)",
|
|
133
134
|
"gui-focus": "var(--color-gui-focus)",
|
package/core/.DS_Store
DELETED
|
Binary file
|
package/core/Accordion/.DS_Store
DELETED
|
Binary file
|
package/core/Code/.DS_Store
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/core/Flash/.DS_Store
DELETED
|
Binary file
|
package/core/Footer/.DS_Store
DELETED
|
Binary file
|
package/core/Icon/.DS_Store
DELETED
|
Binary file
|
package/core/Loader/.DS_Store
DELETED
|
Binary file
|
package/core/Logo/.DS_Store
DELETED
|
Binary file
|
package/core/Meganav/.DS_Store
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/core/Notice/.DS_Store
DELETED
|
Binary file
|
package/core/Slider/.DS_Store
DELETED
|
Binary file
|
package/core/Table/.DS_Store
DELETED
|
Binary file
|
package/core/Tooltip/.DS_Store
DELETED
|
Binary file
|
package/core/icons/.DS_Store
DELETED
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
["bg-blue-400","bg-blue-100","bg-neutral-1300","bg-neutral-300","bg-neutral-200","bg-neutral-100","bg-neutral-000","bg-neutral-600","bg-orange-900","bg-orange-600","border-blue-400","border-neutral-200","border-neutral-600","border-neutral-500","border-orange-600","from-neutral-400","group-hover:bg-neutral-100","text-blue-600","text-blue-200","text-neutral-1300","text-neutral-300","text-neutral-000","text-neutral-1100","text-neutral-1000","text-neutral-800","text-neutral-700","text-neutral-600","text-neutral-500","text-orange-200","text-orange-600"]
|