@seeqdev/qomponents 0.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/README.md +28 -0
- package/dist/Button/Button.d.ts +5 -0
- package/dist/Button/Button.stories.d.ts +9 -0
- package/dist/Button/Button.test.d.ts +1 -0
- package/dist/Button/Button.types.d.ts +24 -0
- package/dist/Button/index.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +54 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +56 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +593 -0
- package/dist/utils/browserId.d.ts +9 -0
- package/package.json +68 -0
package/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Seeq Qomponents - UNDER CONSTRUCTION
|
|
2
|
+
|
|
3
|
+
## Development
|
|
4
|
+
|
|
5
|
+
Don't forget to add the component to your `index.ts` exports if you want the library to export the component!
|
|
6
|
+
|
|
7
|
+
To develop a qomponent and use the benefits of hot-reload for quick preview you can run:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
npm run dev
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This will start Ladle and watch for changes in the qomponents directory.
|
|
14
|
+
|
|
15
|
+
### Testing
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
npm run test
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
... or IntelliJ
|
|
22
|
+
|
|
23
|
+
### Building
|
|
24
|
+
|
|
25
|
+
Builds happen via gradle.
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
};
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const AllButtons: () => JSX.Element;
|
|
6
|
+
export declare const WithShortText: () => JSX.Element;
|
|
7
|
+
export declare const WithLongText: () => JSX.Element;
|
|
8
|
+
export declare const InTopic: () => JSX.Element;
|
|
9
|
+
export declare const InAnalysis: () => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type ButtonType = 'button' | 'reset' | 'submit' | 'link';
|
|
2
|
+
export type ButtonSize = 'sm' | 'lg';
|
|
3
|
+
export type ButtonVariant = 'outline' | 'theme' | 'warning' | 'danger' | 'no-border' | 'theme-light';
|
|
4
|
+
export interface ButtonProps {
|
|
5
|
+
/** function to call when clicking the button (takes no parameters) */
|
|
6
|
+
onClick?: () => any;
|
|
7
|
+
/** label translation key on the button (i.e. SUBMIT) */
|
|
8
|
+
label?: string;
|
|
9
|
+
variant?: ButtonVariant;
|
|
10
|
+
/** type of button (i.e button/submit/reset, default is button) */
|
|
11
|
+
type?: ButtonType;
|
|
12
|
+
/** size of the button (i.e. sm/lg, default is normal) */
|
|
13
|
+
size?: ButtonSize;
|
|
14
|
+
/** true if button should be disabled */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** extra class names to be placed on the Icon component */
|
|
17
|
+
extraClassNames?: string;
|
|
18
|
+
/** id to place on the button element */
|
|
19
|
+
id?: string;
|
|
20
|
+
/** id that will be used in the data-testid attribute on the button element */
|
|
21
|
+
testId?: string;
|
|
22
|
+
/** if false, will not stopPropagation onClick **/
|
|
23
|
+
stopPropagation?: boolean;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Button";
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @exports the browser id (i.e., 'IE 11' 'Chrome 90')
|
|
5
|
+
* @see http://stackoverflow.com/questions/2400935/browser-detection-in-javascript
|
|
6
|
+
*/
|
|
7
|
+
const browserId = (function () {
|
|
8
|
+
let tem;
|
|
9
|
+
const ua = navigator.userAgent;
|
|
10
|
+
let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
|
|
11
|
+
if (/trident/i.test(M[1])) {
|
|
12
|
+
tem = /\brv[ :]+(\d+)/g.exec(ua) || [];
|
|
13
|
+
return `IE ${tem[1] || ''}`;
|
|
14
|
+
}
|
|
15
|
+
if (M[1] === 'Chrome') {
|
|
16
|
+
tem = ua.match(/\b(OPR|Edge?)\/(\d+)/);
|
|
17
|
+
if (tem !== null) {
|
|
18
|
+
return tem.slice(1).join(' ').replace('OPR', 'Opera').replace('Edg ', 'Edge ');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];
|
|
22
|
+
if ((tem = ua.match(/version\/(\d+)/i)) !== null) {
|
|
23
|
+
M.splice(1, 1, tem[1]);
|
|
24
|
+
}
|
|
25
|
+
return M.join(' ');
|
|
26
|
+
})();
|
|
27
|
+
const browserName = browserId && browserId.split(' ', 2)[0];
|
|
28
|
+
browserId && parseInt(browserId.split(' ', 2)[1], 10);
|
|
29
|
+
const browserIsFirefox = browserId && browserName === 'Firefox';
|
|
30
|
+
|
|
31
|
+
const Button = ({ onClick, label, variant = 'outline', type = 'button', size = 'sm', disabled, extraClassNames, id, testId, stopPropagation = true, }) => {
|
|
32
|
+
const baseClasses = 'py-1 px-3 rounded-sm focus:ring-0 disabled:pointer-events-none';
|
|
33
|
+
const classesByVariant = {
|
|
34
|
+
outline: 'text-sq-text-color border-sq-disabled-gray border-solid border hover:bg-sq-light-gray' +
|
|
35
|
+
' focus:bg-sq-dark-gray active:bg-sq-dark-gray focus:border-sq-color-dark active:border-sq-color-dark',
|
|
36
|
+
theme: 'bg-sq-color-dark hover:bg-sq-color-highlight text-white disabled:bg-opacity-50',
|
|
37
|
+
danger: 'bg-sq-danger-color text-white hover:bg-sq-danger-color-hover disabled:bg-opacity-50',
|
|
38
|
+
'theme-light': 'bg-sq-icon text-white hover:bg-sq-link disabled:bg-opacity-50',
|
|
39
|
+
'no-border': '',
|
|
40
|
+
'warning': '',
|
|
41
|
+
};
|
|
42
|
+
const sizeClasses = {
|
|
43
|
+
sm: 'text-xs',
|
|
44
|
+
lg: 'text-xl',
|
|
45
|
+
};
|
|
46
|
+
const appliedClasses = baseClasses + ' ' + sizeClasses[size] + ' ' + classesByVariant[variant] + ' ' + extraClassNames;
|
|
47
|
+
return (React.createElement("button", { id: id, disabled: disabled, "data-testid": testId, type: type === 'link' || (type === 'submit' && browserIsFirefox) ? 'button' : type, onClick: (e) => {
|
|
48
|
+
stopPropagation && e.stopPropagation();
|
|
49
|
+
onClick && onClick();
|
|
50
|
+
}, className: appliedClasses }, label));
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export { Button };
|
|
54
|
+
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/utils/browserId.ts","../src/Button/Button.tsx"],"sourcesContent":["/**\n * @exports the browser id (i.e., 'IE 11' 'Chrome 90')\n * @see http://stackoverflow.com/questions/2400935/browser-detection-in-javascript\n */\nexport const browserId: string = (function () {\n let tem;\n const ua = navigator.userAgent;\n let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n if (/trident/i.test(M[1])) {\n tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\n return `IE ${tem[1] || ''}`;\n }\n\n if (M[1] === 'Chrome') {\n tem = ua.match(/\\b(OPR|Edge?)\\/(\\d+)/);\n if (tem !== null) {\n return tem.slice(1).join(' ').replace('OPR', 'Opera').replace('Edg ', 'Edge ');\n }\n }\n\n M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];\n if ((tem = ua.match(/version\\/(\\d+)/i)) !== null) {\n M.splice(1, 1, tem[1]);\n }\n\n return M.join(' ');\n})();\nexport const browserName = browserId && browserId.split(' ', 2)[0];\nexport const browserVersion = browserId && parseInt(browserId.split(' ', 2)[1], 10);\nexport const browserIsFirefox = browserId && browserName === 'Firefox';\nexport const browserIsEdgeBeforeChromium =\n browserName && browserVersion && browserName === 'Edge' && browserVersion < 70;\n","import React from 'react';\nimport { ButtonProps } from './Button.types';\nimport '../styles.css';\nimport { browserIsFirefox } from '../utils/browserId';\n\nconst Button: React.FunctionComponent<ButtonProps> =\n ({\n onClick,\n label,\n variant = 'outline',\n type = 'button',\n size = 'sm',\n disabled,\n extraClassNames,\n id,\n testId,\n stopPropagation = true,\n }) => {\n const baseClasses = 'py-1 px-3 rounded-sm focus:ring-0 disabled:pointer-events-none';\n const classesByVariant = {\n outline: 'text-sq-text-color border-sq-disabled-gray border-solid border hover:bg-sq-light-gray' +\n ' focus:bg-sq-dark-gray active:bg-sq-dark-gray focus:border-sq-color-dark active:border-sq-color-dark',\n theme: 'bg-sq-color-dark hover:bg-sq-color-highlight text-white disabled:bg-opacity-50',\n danger: 'bg-sq-danger-color text-white hover:bg-sq-danger-color-hover disabled:bg-opacity-50',\n 'theme-light': 'bg-sq-icon text-white hover:bg-sq-link disabled:bg-opacity-50',\n 'no-border': '',\n 'warning': '',\n };\n const sizeClasses = {\n sm: 'text-xs',\n lg: 'text-xl',\n };\n const appliedClasses = baseClasses + ' ' + sizeClasses[size] + ' ' + classesByVariant[variant] + ' ' + extraClassNames;\n\n return (\n <button\n id={id}\n disabled={disabled}\n data-testid={testId}\n type={type === 'link' || (type === 'submit' && browserIsFirefox) ? 'button' : type}\n onClick={(e) => {\n stopPropagation && e.stopPropagation();\n onClick && onClick();\n }}\n className={appliedClasses}>\n {label}\n </button>\n );\n };\nexport default Button;\n\n"],"names":[],"mappings":";;AAAA;;;AAGG;AACI,MAAM,SAAS,GAAW,CAAC,YAAA;AAChC,IAAA,IAAI,GAAG,CAAC;AACR,IAAA,MAAM,EAAE,GAAG,SAAS,CAAC,SAAS,CAAC;IAC/B,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,8DAA8D,CAAC,IAAI,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ACtB,EACD,SAAS,EAAE,cAAc,IACxB,KAAK,CACC,EACT;AACJ;;;;"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @exports the browser id (i.e., 'IE 11' 'Chrome 90')
|
|
7
|
+
* @see http://stackoverflow.com/questions/2400935/browser-detection-in-javascript
|
|
8
|
+
*/
|
|
9
|
+
const browserId = (function () {
|
|
10
|
+
let tem;
|
|
11
|
+
const ua = navigator.userAgent;
|
|
12
|
+
let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
|
|
13
|
+
if (/trident/i.test(M[1])) {
|
|
14
|
+
tem = /\brv[ :]+(\d+)/g.exec(ua) || [];
|
|
15
|
+
return `IE ${tem[1] || ''}`;
|
|
16
|
+
}
|
|
17
|
+
if (M[1] === 'Chrome') {
|
|
18
|
+
tem = ua.match(/\b(OPR|Edge?)\/(\d+)/);
|
|
19
|
+
if (tem !== null) {
|
|
20
|
+
return tem.slice(1).join(' ').replace('OPR', 'Opera').replace('Edg ', 'Edge ');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];
|
|
24
|
+
if ((tem = ua.match(/version\/(\d+)/i)) !== null) {
|
|
25
|
+
M.splice(1, 1, tem[1]);
|
|
26
|
+
}
|
|
27
|
+
return M.join(' ');
|
|
28
|
+
})();
|
|
29
|
+
const browserName = browserId && browserId.split(' ', 2)[0];
|
|
30
|
+
browserId && parseInt(browserId.split(' ', 2)[1], 10);
|
|
31
|
+
const browserIsFirefox = browserId && browserName === 'Firefox';
|
|
32
|
+
|
|
33
|
+
const Button = ({ onClick, label, variant = 'outline', type = 'button', size = 'sm', disabled, extraClassNames, id, testId, stopPropagation = true, }) => {
|
|
34
|
+
const baseClasses = 'py-1 px-3 rounded-sm focus:ring-0 disabled:pointer-events-none';
|
|
35
|
+
const classesByVariant = {
|
|
36
|
+
outline: 'text-sq-text-color border-sq-disabled-gray border-solid border hover:bg-sq-light-gray' +
|
|
37
|
+
' focus:bg-sq-dark-gray active:bg-sq-dark-gray focus:border-sq-color-dark active:border-sq-color-dark',
|
|
38
|
+
theme: 'bg-sq-color-dark hover:bg-sq-color-highlight text-white disabled:bg-opacity-50',
|
|
39
|
+
danger: 'bg-sq-danger-color text-white hover:bg-sq-danger-color-hover disabled:bg-opacity-50',
|
|
40
|
+
'theme-light': 'bg-sq-icon text-white hover:bg-sq-link disabled:bg-opacity-50',
|
|
41
|
+
'no-border': '',
|
|
42
|
+
'warning': '',
|
|
43
|
+
};
|
|
44
|
+
const sizeClasses = {
|
|
45
|
+
sm: 'text-xs',
|
|
46
|
+
lg: 'text-xl',
|
|
47
|
+
};
|
|
48
|
+
const appliedClasses = baseClasses + ' ' + sizeClasses[size] + ' ' + classesByVariant[variant] + ' ' + extraClassNames;
|
|
49
|
+
return (React.createElement("button", { id: id, disabled: disabled, "data-testid": testId, type: type === 'link' || (type === 'submit' && browserIsFirefox) ? 'button' : type, onClick: (e) => {
|
|
50
|
+
stopPropagation && e.stopPropagation();
|
|
51
|
+
onClick && onClick();
|
|
52
|
+
}, className: appliedClasses }, label));
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
exports.Button = Button;
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/utils/browserId.ts","../src/Button/Button.tsx"],"sourcesContent":["/**\n * @exports the browser id (i.e., 'IE 11' 'Chrome 90')\n * @see http://stackoverflow.com/questions/2400935/browser-detection-in-javascript\n */\nexport const browserId: string = (function () {\n let tem;\n const ua = navigator.userAgent;\n let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n if (/trident/i.test(M[1])) {\n tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\n return `IE ${tem[1] || ''}`;\n }\n\n if (M[1] === 'Chrome') {\n tem = ua.match(/\\b(OPR|Edge?)\\/(\\d+)/);\n if (tem !== null) {\n return tem.slice(1).join(' ').replace('OPR', 'Opera').replace('Edg ', 'Edge ');\n }\n }\n\n M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];\n if ((tem = ua.match(/version\\/(\\d+)/i)) !== null) {\n M.splice(1, 1, tem[1]);\n }\n\n return M.join(' ');\n})();\nexport const browserName = browserId && browserId.split(' ', 2)[0];\nexport const browserVersion = browserId && parseInt(browserId.split(' ', 2)[1], 10);\nexport const browserIsFirefox = browserId && browserName === 'Firefox';\nexport const browserIsEdgeBeforeChromium =\n browserName && browserVersion && browserName === 'Edge' && browserVersion < 70;\n","import React from 'react';\nimport { ButtonProps } from './Button.types';\nimport '../styles.css';\nimport { browserIsFirefox } from '../utils/browserId';\n\nconst Button: React.FunctionComponent<ButtonProps> =\n ({\n onClick,\n label,\n variant = 'outline',\n type = 'button',\n size = 'sm',\n disabled,\n extraClassNames,\n id,\n testId,\n stopPropagation = true,\n }) => {\n const baseClasses = 'py-1 px-3 rounded-sm focus:ring-0 disabled:pointer-events-none';\n const classesByVariant = {\n outline: 'text-sq-text-color border-sq-disabled-gray border-solid border hover:bg-sq-light-gray' +\n ' focus:bg-sq-dark-gray active:bg-sq-dark-gray focus:border-sq-color-dark active:border-sq-color-dark',\n theme: 'bg-sq-color-dark hover:bg-sq-color-highlight text-white disabled:bg-opacity-50',\n danger: 'bg-sq-danger-color text-white hover:bg-sq-danger-color-hover disabled:bg-opacity-50',\n 'theme-light': 'bg-sq-icon text-white hover:bg-sq-link disabled:bg-opacity-50',\n 'no-border': '',\n 'warning': '',\n };\n const sizeClasses = {\n sm: 'text-xs',\n lg: 'text-xl',\n };\n const appliedClasses = baseClasses + ' ' + sizeClasses[size] + ' ' + classesByVariant[variant] + ' ' + extraClassNames;\n\n return (\n <button\n id={id}\n disabled={disabled}\n data-testid={testId}\n type={type === 'link' || (type === 'submit' && browserIsFirefox) ? 'button' : type}\n onClick={(e) => {\n stopPropagation && e.stopPropagation();\n onClick && onClick();\n }}\n className={appliedClasses}>\n {label}\n </button>\n );\n };\nexport default Button;\n\n"],"names":[],"mappings":";;;;AAAA;;;AAGG;AACI,MAAM,SAAS,GAAW,CAAC,YAAA;AAChC,IAAA,IAAI,GAAG,CAAC;AACR,IAAA,MAAM,EAAE,GAAG,SAAS,CAAC,SAAS,CAAC;IAC/B,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,8DAA8D,CAAC,IAAI,EAAE,CAAC;IACvF,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;QACzB,GAAG,GAAG,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;QACvC,OAAO,CAAA,GAAA,EAAM,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;AAC7B,KAAA;AAED,IAAA,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;AACrB,QAAA,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;QACvC,IAAI,GAAG,KAAK,IAAI,EAAE;YAChB,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAChF,SAAA;AACF,KAAA;AAED,IAAA,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AAC1E,IAAA,IAAI,CAAC,G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,OAAO,CAAC,GAAG,GAAG,GAAG,eAAe,CAAC;AAEvH,IAAA,QACE,KACE,CAAA,aAAA,CAAA,QAAA,EAAA,EAAA,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,QAAQ,EAAA,aAAA,EACL,MAAM,EACnB,IAAI,EAAE,IAAI,KAAK,MAAM,KAAK,IAAI,KAAK,QAAQ,IAAI,gBAAgB,CAAC,GAAG,QAAQ,GAAG,IAAI,EAClF,OAAO,EAAE,CAAC,CAAC,KAAI;AACb,YAAA,eAAe,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;YACvC,OAAO,IAAI,OAAO,EAAE,CAAC;SACtB,EACD,SAAS,EAAE,cAAc,IACxB,KAAK,CACC,EACT;AACJ;;;;"}
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1,593 @@
|
|
|
1
|
+
/*
|
|
2
|
+
! tailwindcss v3.2.7 | MIT License | https://tailwindcss.com
|
|
3
|
+
*//*
|
|
4
|
+
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
|
5
|
+
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
*,
|
|
9
|
+
::before,
|
|
10
|
+
::after {
|
|
11
|
+
box-sizing: border-box; /* 1 */
|
|
12
|
+
border-width: 0; /* 2 */
|
|
13
|
+
border-style: solid; /* 2 */
|
|
14
|
+
border-color: #e5e7eb; /* 2 */
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
::before,
|
|
18
|
+
::after {
|
|
19
|
+
--tw-content: '';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
1. Use a consistent sensible line-height in all browsers.
|
|
24
|
+
2. Prevent adjustments of font size after orientation changes in iOS.
|
|
25
|
+
3. Use a more readable tab size.
|
|
26
|
+
4. Use the user's configured `sans` font-family by default.
|
|
27
|
+
5. Use the user's configured `sans` font-feature-settings by default.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
html {
|
|
31
|
+
line-height: 1.5; /* 1 */
|
|
32
|
+
-webkit-text-size-adjust: 100%; /* 2 */
|
|
33
|
+
-moz-tab-size: 4; /* 3 */
|
|
34
|
+
-o-tab-size: 4;
|
|
35
|
+
tab-size: 4; /* 3 */
|
|
36
|
+
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
|
|
37
|
+
font-feature-settings: normal; /* 5 */
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/*
|
|
41
|
+
1. Remove the margin in all browsers.
|
|
42
|
+
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
body {
|
|
46
|
+
margin: 0; /* 1 */
|
|
47
|
+
line-height: inherit; /* 2 */
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/*
|
|
51
|
+
1. Add the correct height in Firefox.
|
|
52
|
+
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
|
|
53
|
+
3. Ensure horizontal rules are visible by default.
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
hr {
|
|
57
|
+
height: 0; /* 1 */
|
|
58
|
+
color: inherit; /* 2 */
|
|
59
|
+
border-top-width: 1px; /* 3 */
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/*
|
|
63
|
+
Add the correct text decoration in Chrome, Edge, and Safari.
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
abbr:where([title]) {
|
|
67
|
+
-webkit-text-decoration: underline dotted;
|
|
68
|
+
text-decoration: underline dotted;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/*
|
|
72
|
+
Remove the default font size and weight for headings.
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
h1,
|
|
76
|
+
h2,
|
|
77
|
+
h3,
|
|
78
|
+
h4,
|
|
79
|
+
h5,
|
|
80
|
+
h6 {
|
|
81
|
+
font-size: inherit;
|
|
82
|
+
font-weight: inherit;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/*
|
|
86
|
+
Reset links to optimize for opt-in styling instead of opt-out.
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
a {
|
|
90
|
+
color: inherit;
|
|
91
|
+
text-decoration: inherit;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/*
|
|
95
|
+
Add the correct font weight in Edge and Safari.
|
|
96
|
+
*/
|
|
97
|
+
|
|
98
|
+
b,
|
|
99
|
+
strong {
|
|
100
|
+
font-weight: bolder;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/*
|
|
104
|
+
1. Use the user's configured `mono` font family by default.
|
|
105
|
+
2. Correct the odd `em` font sizing in all browsers.
|
|
106
|
+
*/
|
|
107
|
+
|
|
108
|
+
code,
|
|
109
|
+
kbd,
|
|
110
|
+
samp,
|
|
111
|
+
pre {
|
|
112
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
|
|
113
|
+
font-size: 1em; /* 2 */
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/*
|
|
117
|
+
Add the correct font size in all browsers.
|
|
118
|
+
*/
|
|
119
|
+
|
|
120
|
+
small {
|
|
121
|
+
font-size: 80%;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/*
|
|
125
|
+
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
|
|
126
|
+
*/
|
|
127
|
+
|
|
128
|
+
sub,
|
|
129
|
+
sup {
|
|
130
|
+
font-size: 75%;
|
|
131
|
+
line-height: 0;
|
|
132
|
+
position: relative;
|
|
133
|
+
vertical-align: baseline;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
sub {
|
|
137
|
+
bottom: -0.25em;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
sup {
|
|
141
|
+
top: -0.5em;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/*
|
|
145
|
+
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
|
|
146
|
+
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
|
|
147
|
+
3. Remove gaps between table borders by default.
|
|
148
|
+
*/
|
|
149
|
+
|
|
150
|
+
table {
|
|
151
|
+
text-indent: 0; /* 1 */
|
|
152
|
+
border-color: inherit; /* 2 */
|
|
153
|
+
border-collapse: collapse; /* 3 */
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/*
|
|
157
|
+
1. Change the font styles in all browsers.
|
|
158
|
+
2. Remove the margin in Firefox and Safari.
|
|
159
|
+
3. Remove default padding in all browsers.
|
|
160
|
+
*/
|
|
161
|
+
|
|
162
|
+
button,
|
|
163
|
+
input,
|
|
164
|
+
optgroup,
|
|
165
|
+
select,
|
|
166
|
+
textarea {
|
|
167
|
+
font-family: inherit; /* 1 */
|
|
168
|
+
font-size: 100%; /* 1 */
|
|
169
|
+
font-weight: inherit; /* 1 */
|
|
170
|
+
line-height: inherit; /* 1 */
|
|
171
|
+
color: inherit; /* 1 */
|
|
172
|
+
margin: 0; /* 2 */
|
|
173
|
+
padding: 0; /* 3 */
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/*
|
|
177
|
+
Remove the inheritance of text transform in Edge and Firefox.
|
|
178
|
+
*/
|
|
179
|
+
|
|
180
|
+
button,
|
|
181
|
+
select {
|
|
182
|
+
text-transform: none;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/*
|
|
186
|
+
1. Correct the inability to style clickable types in iOS and Safari.
|
|
187
|
+
2. Remove default button styles.
|
|
188
|
+
*/
|
|
189
|
+
|
|
190
|
+
button,
|
|
191
|
+
[type='button'],
|
|
192
|
+
[type='reset'],
|
|
193
|
+
[type='submit'] {
|
|
194
|
+
-webkit-appearance: button; /* 1 */
|
|
195
|
+
background-color: transparent; /* 2 */
|
|
196
|
+
background-image: none; /* 2 */
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/*
|
|
200
|
+
Use the modern Firefox focus style for all focusable elements.
|
|
201
|
+
*/
|
|
202
|
+
|
|
203
|
+
:-moz-focusring {
|
|
204
|
+
outline: auto;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/*
|
|
208
|
+
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
|
|
209
|
+
*/
|
|
210
|
+
|
|
211
|
+
:-moz-ui-invalid {
|
|
212
|
+
box-shadow: none;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/*
|
|
216
|
+
Add the correct vertical alignment in Chrome and Firefox.
|
|
217
|
+
*/
|
|
218
|
+
|
|
219
|
+
progress {
|
|
220
|
+
vertical-align: baseline;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/*
|
|
224
|
+
Correct the cursor style of increment and decrement buttons in Safari.
|
|
225
|
+
*/
|
|
226
|
+
|
|
227
|
+
::-webkit-inner-spin-button,
|
|
228
|
+
::-webkit-outer-spin-button {
|
|
229
|
+
height: auto;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/*
|
|
233
|
+
1. Correct the odd appearance in Chrome and Safari.
|
|
234
|
+
2. Correct the outline style in Safari.
|
|
235
|
+
*/
|
|
236
|
+
|
|
237
|
+
[type='search'] {
|
|
238
|
+
-webkit-appearance: textfield; /* 1 */
|
|
239
|
+
outline-offset: -2px; /* 2 */
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/*
|
|
243
|
+
Remove the inner padding in Chrome and Safari on macOS.
|
|
244
|
+
*/
|
|
245
|
+
|
|
246
|
+
::-webkit-search-decoration {
|
|
247
|
+
-webkit-appearance: none;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/*
|
|
251
|
+
1. Correct the inability to style clickable types in iOS and Safari.
|
|
252
|
+
2. Change font properties to `inherit` in Safari.
|
|
253
|
+
*/
|
|
254
|
+
|
|
255
|
+
::-webkit-file-upload-button {
|
|
256
|
+
-webkit-appearance: button; /* 1 */
|
|
257
|
+
font: inherit; /* 2 */
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/*
|
|
261
|
+
Add the correct display in Chrome and Safari.
|
|
262
|
+
*/
|
|
263
|
+
|
|
264
|
+
summary {
|
|
265
|
+
display: list-item;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/*
|
|
269
|
+
Removes the default spacing and border for appropriate elements.
|
|
270
|
+
*/
|
|
271
|
+
|
|
272
|
+
blockquote,
|
|
273
|
+
dl,
|
|
274
|
+
dd,
|
|
275
|
+
h1,
|
|
276
|
+
h2,
|
|
277
|
+
h3,
|
|
278
|
+
h4,
|
|
279
|
+
h5,
|
|
280
|
+
h6,
|
|
281
|
+
hr,
|
|
282
|
+
figure,
|
|
283
|
+
p,
|
|
284
|
+
pre {
|
|
285
|
+
margin: 0;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
fieldset {
|
|
289
|
+
margin: 0;
|
|
290
|
+
padding: 0;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
legend {
|
|
294
|
+
padding: 0;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
ol,
|
|
298
|
+
ul,
|
|
299
|
+
menu {
|
|
300
|
+
list-style: none;
|
|
301
|
+
margin: 0;
|
|
302
|
+
padding: 0;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/*
|
|
306
|
+
Prevent resizing textareas horizontally by default.
|
|
307
|
+
*/
|
|
308
|
+
|
|
309
|
+
textarea {
|
|
310
|
+
resize: vertical;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/*
|
|
314
|
+
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
|
|
315
|
+
2. Set the default placeholder color to the user's configured gray 400 color.
|
|
316
|
+
*/
|
|
317
|
+
|
|
318
|
+
input::-moz-placeholder, textarea::-moz-placeholder {
|
|
319
|
+
opacity: 1; /* 1 */
|
|
320
|
+
color: #9ca3af; /* 2 */
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
input::placeholder,
|
|
324
|
+
textarea::placeholder {
|
|
325
|
+
opacity: 1; /* 1 */
|
|
326
|
+
color: #9ca3af; /* 2 */
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/*
|
|
330
|
+
Set the default cursor for buttons.
|
|
331
|
+
*/
|
|
332
|
+
|
|
333
|
+
button,
|
|
334
|
+
[role="button"] {
|
|
335
|
+
cursor: pointer;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/*
|
|
339
|
+
Make sure disabled buttons don't get the pointer cursor.
|
|
340
|
+
*/
|
|
341
|
+
:disabled {
|
|
342
|
+
cursor: default;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/*
|
|
346
|
+
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
|
|
347
|
+
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
|
|
348
|
+
This can trigger a poorly considered lint error in some tools but is included by design.
|
|
349
|
+
*/
|
|
350
|
+
|
|
351
|
+
img,
|
|
352
|
+
svg,
|
|
353
|
+
video,
|
|
354
|
+
canvas,
|
|
355
|
+
audio,
|
|
356
|
+
iframe,
|
|
357
|
+
embed,
|
|
358
|
+
object {
|
|
359
|
+
display: block; /* 1 */
|
|
360
|
+
vertical-align: middle; /* 2 */
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/*
|
|
364
|
+
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
|
|
365
|
+
*/
|
|
366
|
+
|
|
367
|
+
img,
|
|
368
|
+
video {
|
|
369
|
+
max-width: 100%;
|
|
370
|
+
height: auto;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/* Make elements with the HTML hidden attribute stay hidden by default */
|
|
374
|
+
[hidden] {
|
|
375
|
+
display: none;
|
|
376
|
+
}
|
|
377
|
+
:root {
|
|
378
|
+
--sq-color-dark: 42, 92, 132;
|
|
379
|
+
--sq-white: 255, 255, 255;
|
|
380
|
+
--sq-color-highlight: 4, 145, 194;
|
|
381
|
+
--sq-text-color: 58, 58, 58;
|
|
382
|
+
--sq-disabled-gray: 221, 225, 227;
|
|
383
|
+
--sq-light-gray: 241, 245, 247;
|
|
384
|
+
--sq-dark-gray: 226, 226, 226;
|
|
385
|
+
--sq-danger-color: 217, 83, 79;
|
|
386
|
+
--sq-icon: 4, 145, 194;
|
|
387
|
+
--sq-link: 42, 92, 132;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.color_topic {
|
|
391
|
+
--sq-color-dark: 42, 92, 132;
|
|
392
|
+
--sq-color-highlight: 4, 145, 194;
|
|
393
|
+
--sq-icon: 4, 145, 194;
|
|
394
|
+
--sq-link: 42, 92, 132;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.color_analysis {
|
|
398
|
+
--sq-color-dark: 66, 124, 99;
|
|
399
|
+
--sq-color-highlight: 66, 124, 99;
|
|
400
|
+
--sq-icon: 4, 145, 194;
|
|
401
|
+
--sq-link: 0, 121, 96;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
*, ::before, ::after {
|
|
405
|
+
--tw-border-spacing-x: 0;
|
|
406
|
+
--tw-border-spacing-y: 0;
|
|
407
|
+
--tw-translate-x: 0;
|
|
408
|
+
--tw-translate-y: 0;
|
|
409
|
+
--tw-rotate: 0;
|
|
410
|
+
--tw-skew-x: 0;
|
|
411
|
+
--tw-skew-y: 0;
|
|
412
|
+
--tw-scale-x: 1;
|
|
413
|
+
--tw-scale-y: 1;
|
|
414
|
+
--tw-pan-x: ;
|
|
415
|
+
--tw-pan-y: ;
|
|
416
|
+
--tw-pinch-zoom: ;
|
|
417
|
+
--tw-scroll-snap-strictness: proximity;
|
|
418
|
+
--tw-ordinal: ;
|
|
419
|
+
--tw-slashed-zero: ;
|
|
420
|
+
--tw-numeric-figure: ;
|
|
421
|
+
--tw-numeric-spacing: ;
|
|
422
|
+
--tw-numeric-fraction: ;
|
|
423
|
+
--tw-ring-inset: ;
|
|
424
|
+
--tw-ring-offset-width: 0px;
|
|
425
|
+
--tw-ring-offset-color: #fff;
|
|
426
|
+
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
427
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
428
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
429
|
+
--tw-shadow: 0 0 #0000;
|
|
430
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
431
|
+
--tw-blur: ;
|
|
432
|
+
--tw-brightness: ;
|
|
433
|
+
--tw-contrast: ;
|
|
434
|
+
--tw-grayscale: ;
|
|
435
|
+
--tw-hue-rotate: ;
|
|
436
|
+
--tw-invert: ;
|
|
437
|
+
--tw-saturate: ;
|
|
438
|
+
--tw-sepia: ;
|
|
439
|
+
--tw-drop-shadow: ;
|
|
440
|
+
--tw-backdrop-blur: ;
|
|
441
|
+
--tw-backdrop-brightness: ;
|
|
442
|
+
--tw-backdrop-contrast: ;
|
|
443
|
+
--tw-backdrop-grayscale: ;
|
|
444
|
+
--tw-backdrop-hue-rotate: ;
|
|
445
|
+
--tw-backdrop-invert: ;
|
|
446
|
+
--tw-backdrop-opacity: ;
|
|
447
|
+
--tw-backdrop-saturate: ;
|
|
448
|
+
--tw-backdrop-sepia: ;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
::backdrop {
|
|
452
|
+
--tw-border-spacing-x: 0;
|
|
453
|
+
--tw-border-spacing-y: 0;
|
|
454
|
+
--tw-translate-x: 0;
|
|
455
|
+
--tw-translate-y: 0;
|
|
456
|
+
--tw-rotate: 0;
|
|
457
|
+
--tw-skew-x: 0;
|
|
458
|
+
--tw-skew-y: 0;
|
|
459
|
+
--tw-scale-x: 1;
|
|
460
|
+
--tw-scale-y: 1;
|
|
461
|
+
--tw-pan-x: ;
|
|
462
|
+
--tw-pan-y: ;
|
|
463
|
+
--tw-pinch-zoom: ;
|
|
464
|
+
--tw-scroll-snap-strictness: proximity;
|
|
465
|
+
--tw-ordinal: ;
|
|
466
|
+
--tw-slashed-zero: ;
|
|
467
|
+
--tw-numeric-figure: ;
|
|
468
|
+
--tw-numeric-spacing: ;
|
|
469
|
+
--tw-numeric-fraction: ;
|
|
470
|
+
--tw-ring-inset: ;
|
|
471
|
+
--tw-ring-offset-width: 0px;
|
|
472
|
+
--tw-ring-offset-color: #fff;
|
|
473
|
+
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
474
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
475
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
476
|
+
--tw-shadow: 0 0 #0000;
|
|
477
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
478
|
+
--tw-blur: ;
|
|
479
|
+
--tw-brightness: ;
|
|
480
|
+
--tw-contrast: ;
|
|
481
|
+
--tw-grayscale: ;
|
|
482
|
+
--tw-hue-rotate: ;
|
|
483
|
+
--tw-invert: ;
|
|
484
|
+
--tw-saturate: ;
|
|
485
|
+
--tw-sepia: ;
|
|
486
|
+
--tw-drop-shadow: ;
|
|
487
|
+
--tw-backdrop-blur: ;
|
|
488
|
+
--tw-backdrop-brightness: ;
|
|
489
|
+
--tw-backdrop-contrast: ;
|
|
490
|
+
--tw-backdrop-grayscale: ;
|
|
491
|
+
--tw-backdrop-hue-rotate: ;
|
|
492
|
+
--tw-backdrop-invert: ;
|
|
493
|
+
--tw-backdrop-opacity: ;
|
|
494
|
+
--tw-backdrop-saturate: ;
|
|
495
|
+
--tw-backdrop-sepia: ;
|
|
496
|
+
}
|
|
497
|
+
.rounded-sm {
|
|
498
|
+
border-radius: 0.125rem;
|
|
499
|
+
}
|
|
500
|
+
.border {
|
|
501
|
+
border-width: 1px;
|
|
502
|
+
}
|
|
503
|
+
.border-solid {
|
|
504
|
+
border-style: solid;
|
|
505
|
+
}
|
|
506
|
+
.border-sq-disabled-gray {
|
|
507
|
+
--tw-border-opacity: 1;
|
|
508
|
+
border-color: rgba(var(--sq-disabled-gray), var(--tw-border-opacity));
|
|
509
|
+
}
|
|
510
|
+
.bg-sq-color-dark {
|
|
511
|
+
--tw-bg-opacity: 1;
|
|
512
|
+
background-color: rgba(var(--sq-color-dark), var(--tw-bg-opacity));
|
|
513
|
+
}
|
|
514
|
+
.bg-sq-danger-color {
|
|
515
|
+
--tw-bg-opacity: 1;
|
|
516
|
+
background-color: rgba(var(--sq-danger-color), var(--tw-bg-opacity));
|
|
517
|
+
}
|
|
518
|
+
.bg-sq-icon {
|
|
519
|
+
--tw-bg-opacity: 1;
|
|
520
|
+
background-color: rgba(var(--sq-icon), var(--tw-bg-opacity));
|
|
521
|
+
}
|
|
522
|
+
.px-3 {
|
|
523
|
+
padding-left: 0.75rem;
|
|
524
|
+
padding-right: 0.75rem;
|
|
525
|
+
}
|
|
526
|
+
.py-1 {
|
|
527
|
+
padding-top: 0.25rem;
|
|
528
|
+
padding-bottom: 0.25rem;
|
|
529
|
+
}
|
|
530
|
+
.text-xl {
|
|
531
|
+
font-size: 1.25rem;
|
|
532
|
+
line-height: 1.75rem;
|
|
533
|
+
}
|
|
534
|
+
.text-xs {
|
|
535
|
+
font-size: 0.75rem;
|
|
536
|
+
line-height: 1rem;
|
|
537
|
+
}
|
|
538
|
+
.text-sq-text-color {
|
|
539
|
+
--tw-text-opacity: 1;
|
|
540
|
+
color: rgba(var(--sq-text-color), var(--tw-text-opacity));
|
|
541
|
+
}
|
|
542
|
+
.text-white {
|
|
543
|
+
--tw-text-opacity: 1;
|
|
544
|
+
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
545
|
+
}
|
|
546
|
+
.outline {
|
|
547
|
+
outline-style: solid;
|
|
548
|
+
}
|
|
549
|
+
/* Heads up! Before these colors can be used you must also add them to the tailwind.config.cjs! */
|
|
550
|
+
/* Make sure to keep these colors in sync with the webserver/_custom_variables.scss values to ensure cohesive UIs */
|
|
551
|
+
.hover\:bg-sq-color-highlight:hover {
|
|
552
|
+
--tw-bg-opacity: 1;
|
|
553
|
+
background-color: rgba(var(--sq-color-highlight), var(--tw-bg-opacity));
|
|
554
|
+
}
|
|
555
|
+
.hover\:bg-sq-danger-color-hover:hover {
|
|
556
|
+
--tw-bg-opacity: 1;
|
|
557
|
+
background-color: rgb(212 59 55 / var(--tw-bg-opacity));
|
|
558
|
+
}
|
|
559
|
+
.hover\:bg-sq-light-gray:hover {
|
|
560
|
+
--tw-bg-opacity: 1;
|
|
561
|
+
background-color: rgba(var(--sq-light-gray), var(--tw-bg-opacity));
|
|
562
|
+
}
|
|
563
|
+
.hover\:bg-sq-link:hover {
|
|
564
|
+
--tw-bg-opacity: 1;
|
|
565
|
+
background-color: rgba(var(--sq-link), var(--tw-bg-opacity));
|
|
566
|
+
}
|
|
567
|
+
.focus\:border-sq-color-dark:focus {
|
|
568
|
+
--tw-border-opacity: 1;
|
|
569
|
+
border-color: rgba(var(--sq-color-dark), var(--tw-border-opacity));
|
|
570
|
+
}
|
|
571
|
+
.focus\:bg-sq-dark-gray:focus {
|
|
572
|
+
--tw-bg-opacity: 1;
|
|
573
|
+
background-color: rgba(var(--sq-dark-gray), var(--tw-bg-opacity));
|
|
574
|
+
}
|
|
575
|
+
.focus\:ring-0:focus {
|
|
576
|
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
577
|
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
578
|
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
579
|
+
}
|
|
580
|
+
.active\:border-sq-color-dark:active {
|
|
581
|
+
--tw-border-opacity: 1;
|
|
582
|
+
border-color: rgba(var(--sq-color-dark), var(--tw-border-opacity));
|
|
583
|
+
}
|
|
584
|
+
.active\:bg-sq-dark-gray:active {
|
|
585
|
+
--tw-bg-opacity: 1;
|
|
586
|
+
background-color: rgba(var(--sq-dark-gray), var(--tw-bg-opacity));
|
|
587
|
+
}
|
|
588
|
+
.disabled\:pointer-events-none:disabled {
|
|
589
|
+
pointer-events: none;
|
|
590
|
+
}
|
|
591
|
+
.disabled\:bg-opacity-50:disabled {
|
|
592
|
+
--tw-bg-opacity: 0.5;
|
|
593
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exports the browser id (i.e., 'IE 11' 'Chrome 90')
|
|
3
|
+
* @see http://stackoverflow.com/questions/2400935/browser-detection-in-javascript
|
|
4
|
+
*/
|
|
5
|
+
export declare const browserId: string;
|
|
6
|
+
export declare const browserName: string;
|
|
7
|
+
export declare const browserVersion: number;
|
|
8
|
+
export declare const browserIsFirefox: boolean;
|
|
9
|
+
export declare const browserIsEdgeBeforeChromium: boolean;
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@seeqdev/qomponents",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"module": "dist/index.esm.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "TOOD"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"description": "A library that allows you to build native UIs ... TODO",
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "rollup -c --bundleConfigAsCjs",
|
|
20
|
+
"watchRollup": "rollup -c --bundleConfigAsCjs --watch",
|
|
21
|
+
"test": "jest",
|
|
22
|
+
"test:watch": "jest --watch",
|
|
23
|
+
"dev": "ladle serve"
|
|
24
|
+
},
|
|
25
|
+
"author": "Seeq",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "TODO"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "TODO",
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"react": ">=17.0.0",
|
|
33
|
+
"react-dom": ">=17.0.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@ladle/react": "2.9.0",
|
|
37
|
+
"@rollup/plugin-commonjs": "24.0.1",
|
|
38
|
+
"@rollup/plugin-node-resolve": "15.0.1",
|
|
39
|
+
"@testing-library/jest-dom": "5.16.5",
|
|
40
|
+
"@testing-library/react": "14.0.0",
|
|
41
|
+
"@types/jest": "29.4.0",
|
|
42
|
+
"@types/react": "18.0.28",
|
|
43
|
+
"@types/react-dom": "18.0.11",
|
|
44
|
+
"autoprefixer": "10.4.13",
|
|
45
|
+
"color": "4.2.3",
|
|
46
|
+
"identity-obj-proxy": "3.0.0",
|
|
47
|
+
"jest": "29.4.3",
|
|
48
|
+
"jest-environment-jsdom": "29.4.3",
|
|
49
|
+
"jest-junit": "15.0.0",
|
|
50
|
+
"jest-silent-reporter": "0.5.0",
|
|
51
|
+
"postcss-import": "^15.1.0",
|
|
52
|
+
"react": "18.2.0",
|
|
53
|
+
"react-dom": "18.2.0",
|
|
54
|
+
"rollup": "3.17.2",
|
|
55
|
+
"rollup-plugin-copy": "3.4.0",
|
|
56
|
+
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
57
|
+
"rollup-plugin-postcss": "4.0.2",
|
|
58
|
+
"rollup-plugin-typescript2": "0.34.1",
|
|
59
|
+
"tailwindcss": "3.2.7",
|
|
60
|
+
"ts-jest": "29.0.5",
|
|
61
|
+
"ts-node": "10.9.1",
|
|
62
|
+
"typescript": "4.9.5",
|
|
63
|
+
"typescript-strict-plugin": "2.1.0"
|
|
64
|
+
},
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"postcss": "8.4.21"
|
|
67
|
+
}
|
|
68
|
+
}
|