@seeqdev/qomponents 0.0.0 → 0.0.2

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 (67) hide show
  1. package/README.md +33 -13
  2. package/dist/Button/Button.d.ts +5 -0
  3. package/dist/Button/Button.js +71 -0
  4. package/dist/Button/Button.js.map +1 -0
  5. package/dist/Button/Button.stories.d.ts +3 -5
  6. package/dist/Button/Button.stories.js +58 -0
  7. package/dist/Button/Button.stories.js.map +1 -0
  8. package/dist/Button/Button.test.js +49 -0
  9. package/dist/Button/Button.test.js.map +1 -0
  10. package/dist/Button/Button.types.d.ts +19 -4
  11. package/dist/Button/Button.types.js +4 -0
  12. package/dist/Button/Button.types.js.map +1 -0
  13. package/dist/Button/index.js +2 -0
  14. package/dist/Button/index.js.map +1 -0
  15. package/dist/FontCustom.woff +0 -0
  16. package/dist/FontCustom.woff2 +0 -0
  17. package/dist/Icon/Icon.d.ts +10 -0
  18. package/dist/Icon/Icon.js +54 -0
  19. package/dist/Icon/Icon.js.map +1 -0
  20. package/dist/Icon/Icon.stories.d.ts +5 -0
  21. package/dist/Icon/Icon.stories.js +40 -0
  22. package/dist/Icon/Icon.stories.js.map +1 -0
  23. package/dist/Icon/Icon.test.d.ts +1 -0
  24. package/dist/Icon/Icon.test.js +55 -0
  25. package/dist/Icon/Icon.test.js.map +1 -0
  26. package/dist/Icon/Icon.types.d.ts +38 -0
  27. package/dist/Icon/Icon.types.js +16 -0
  28. package/dist/Icon/Icon.types.js.map +1 -0
  29. package/dist/Icon/index.d.ts +1 -0
  30. package/dist/Icon/index.js +2 -0
  31. package/dist/Icon/index.js.map +1 -0
  32. package/dist/TextField/TextField.d.ts +7 -0
  33. package/dist/TextField/TextField.js +47 -0
  34. package/dist/TextField/TextField.js.map +1 -0
  35. package/dist/TextField/TextField.stories.d.ts +5 -0
  36. package/dist/TextField/TextField.stories.js +33 -0
  37. package/dist/TextField/TextField.stories.js.map +1 -0
  38. package/dist/TextField/TextField.test.d.ts +1 -0
  39. package/dist/TextField/TextField.test.js +35 -0
  40. package/dist/TextField/TextField.test.js.map +1 -0
  41. package/dist/TextField/TextField.types.d.ts +16 -0
  42. package/dist/TextField/TextField.types.js +2 -0
  43. package/dist/TextField/TextField.types.js.map +1 -0
  44. package/dist/TextField/index.d.ts +1 -0
  45. package/dist/TextField/index.js +2 -0
  46. package/dist/TextField/index.js.map +1 -0
  47. package/dist/Tooltip/Tooltip.d.ts +7 -0
  48. package/dist/Tooltip/Tooltip.js +30 -0
  49. package/dist/Tooltip/Tooltip.js.map +1 -0
  50. package/dist/Tooltip/Tooltip.stories.d.ts +5 -0
  51. package/dist/Tooltip/Tooltip.stories.js +32 -0
  52. package/dist/Tooltip/Tooltip.stories.js.map +1 -0
  53. package/dist/Tooltip/Tooltip.types.d.ts +9 -0
  54. package/dist/Tooltip/Tooltip.types.js +3 -0
  55. package/dist/Tooltip/Tooltip.types.js.map +1 -0
  56. package/dist/Tooltip/index.d.ts +1 -0
  57. package/dist/Tooltip/index.js +2 -0
  58. package/dist/Tooltip/index.js.map +1 -0
  59. package/dist/index.d.ts +6 -0
  60. package/dist/index.esm.js +182 -15
  61. package/dist/index.esm.js.map +1 -1
  62. package/dist/index.js +183 -13
  63. package/dist/index.js.map +1 -1
  64. package/dist/styles.css +1732 -181
  65. package/dist/utils/browserId.js +29 -0
  66. package/dist/utils/browserId.js.map +1 -0
  67. package/package.json +3 -1
package/dist/index.js CHANGED
@@ -30,27 +30,197 @@ const browserName = browserId && browserId.split(' ', 2)[0];
30
30
  browserId && parseInt(browserId.split(' ', 2)[1], 10);
31
31
  const browserIsFirefox = browserId && browserName === 'Firefox';
32
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',
33
+ const DEFAULT_TOOL_TIP_DELAY = 1000;
34
+
35
+ /**
36
+ * This component displays a Tooltip for the provided children.
37
+ */
38
+ const Tooltip = ({ position = 'bottom', children, text, delay = DEFAULT_TOOL_TIP_DELAY, }) => {
39
+ const arrowBaseClasses = "before:tw-content-[''] before:tw-absolute before:tw-border-8";
40
+ const centerArrowVertically = 'before:tw-top-1/2 before:-tw-translate-y-1/2';
41
+ const centerArrowHorizontally = 'before:tw-left-1/2 before:-tw-translate-x-1/2';
42
+ const arrowRight = `${arrowBaseClasses} ${centerArrowVertically} before:tw-right-[100%] before:tw-border-y-transparent
43
+ before:tw-border-l-transparent before:tw-border-r-black`;
44
+ const arrowLeft = `${arrowBaseClasses} ${centerArrowVertically} before:tw-left-[100%] before:tw-border-y-transparent
45
+ before:tw-border-l-black before:tw-border-r-transparent`;
46
+ const arrowBottom = `${arrowBaseClasses} ${centerArrowHorizontally} before:-tw-top-4 before:tw-border-b-black
47
+ before:tw-border-r-transparent before:tw-border-l-transparent before:tw-border-t-transparent`;
48
+ const arrowTop = `${arrowBaseClasses} ${centerArrowHorizontally} before:-tw-bottom-4 before:tw-border-b-transparent
49
+ before:tw-border-t-black before:tw-border-l-transparent before:tw-border-r-transparent`;
50
+ const placements = {
51
+ top: `-tw-top-2 -tw-translate-y-full tw-left-1/2 -tw-translate-x-1/2 ${arrowTop}`,
52
+ left: `-tw-translate-x-full -tw-left-3 -tw-translate-y-1/2 tw-top-1/2 ${arrowLeft}`,
53
+ right: `tw-translate-x-full -tw-right-3 -tw-translate-y-1/2 tw-top-1/2 ${arrowRight}`,
54
+ bottom: `-tw-bottom-2 tw-translate-y-full tw-left-1/2 -tw-translate-x-1/2 ${arrowBottom}`,
55
+ };
56
+ return (React.createElement("div", { className: "tw-group tw-relative tw-inline-block" },
57
+ children,
58
+ React.createElement("div", { className: `tw-z-50 tw-whitespace-nowrap tw-hidden group-hover:tw-inline-block group-hover:tw-delay-[${delay}ms]
59
+ tw-absolute tw-opacity-0 group-hover:tw-opacity-100 tw-rounded tw-bg-black tw-p-2 tw-text-xs tw-text-white ${placements[position]}` }, text)));
60
+ };
61
+
62
+ /**
63
+ * Icon:
64
+ * - access to Seeq custom icons by providing the desired icon
65
+ * - leverage "type" to style your icon
66
+ */
67
+ const Icon = ({ onClick, icon, type = 'theme', extraClassNames, id, large, small, color, testId, customId, tooltip, tooltipDelay, tooltipPlacement, number, hasExternalTooltipHandler = false, }) => {
68
+ if ((type === 'color' && (color === undefined || color === '')) || (color && type !== 'color')) {
69
+ const errorMessage = color === undefined || color === ''
70
+ ? 'Icon with type="color" must have prop color specified.'
71
+ : 'Icon with prop color must have type="color".';
72
+ return React.createElement("div", { className: "tw-text-sq-danger-color" }, errorMessage);
73
+ }
74
+ const colorClassesThemeLight = {
75
+ 'theme': 'tw-text-sq-color-dark',
76
+ 'white': 'tw-text-white',
77
+ 'dark-gray': 'tw-text-sq-fairly-dark-gray',
78
+ 'warning': 'tw-text-sq-warning-color',
79
+ 'darkish-gray': 'tw-text-sq-darkish-gray',
80
+ 'gray': 'tw-text-sq-disabled-gray',
81
+ 'color': '',
82
+ 'info': 'tw-text-sq-link',
83
+ 'text': 'tw-text-sq-text-color',
84
+ 'inherit': '',
85
+ 'danger': 'tw-text-sq-danger-color',
86
+ 'theme-light': 'tw-text-sq-color-light',
87
+ 'success': 'tw-text-sq-success-color',
88
+ };
89
+ const colorClassesThemeDark = {
90
+ 'theme': 'dark:tw-text-sq-color-dark-dark',
91
+ 'white': '',
92
+ 'dark-gray': 'tw-text-sq-fairly-dark-gray',
93
+ 'warning': '',
94
+ 'darkish-gray': 'tw-text-sq-darkish-gray',
95
+ 'gray': 'dark:tw-text-sq-dark-disabled-gray',
96
+ 'color': '',
97
+ 'info': 'dark:tw-text-sq-link-dark',
98
+ 'text': 'dark:tw-text-sq-dark-text',
99
+ 'inherit': '',
100
+ 'danger': 'tw-text-sq-danger-color',
101
+ 'theme-light': 'tw-text-sq-color-light',
102
+ 'success': 'tw-text-sq-success-color',
103
+ };
104
+ const iconPrefix = icon.startsWith('fc') ? 'fc' : 'fa';
105
+ const style = type === 'color' && color ? { color } : {};
106
+ const appliedClassNames = `${iconPrefix} ${icon} ${small ? 'fa-sm' : ''} ${large ? 'fa-lg' : ''}
107
+ ${colorClassesThemeLight[type]} ${colorClassesThemeDark[type]} ${onClick ? 'cursor-pointer' : ''} ${extraClassNames}`;
108
+ const iconTag = (React.createElement("i", { className: appliedClassNames, style: style, onClick: onClick, "data-testid": testId, "data-customid": customId, id: id, "data-number": number }));
109
+ return !hasExternalTooltipHandler && tooltip && tooltip !== '' ? (React.createElement(Tooltip, { text: tooltip, delay: tooltipDelay, position: tooltipPlacement }, iconTag)) : (iconTag);
110
+ };
111
+
112
+ /**
113
+ * All-in-one Button:
114
+ * - use "variant" to achieve the desired style
115
+ * - include tooltips and/or icons
116
+ */
117
+ const Button = ({ onClick, label, variant = 'outline', type = 'button', size = 'sm', disabled, extraClassNames, id, testId, stopPropagation = true, tooltip, tooltipOptions, iconStyle = 'text', icon, iconColor, }) => {
118
+ const baseClasses = 'tw-py-1 tw-px-2.5 tw-rounded-sm focus:tw-ring-0 disabled:tw-pointer-events-none';
119
+ const baseClassesByVariant = {
120
+ 'outline': 'tw-border-solid tw-border',
121
+ 'theme': 'disabled:tw-bg-opacity-50',
122
+ 'danger': 'tw-bg-sq-danger-color hover:tw-bg-sq-danger-color-hover disabled:tw-bg-opacity-50',
123
+ 'theme-light': 'disabled:tw-bg-opacity-50',
124
+ 'no-border': '',
125
+ 'warning': 'tw-bg-sq-warning-color',
126
+ };
127
+ const textClassesByVariantLightTheme = {
128
+ 'outline': 'tw-text-sq-text-color',
129
+ 'theme': 'tw-text-white',
130
+ 'theme-light': 'tw-text-white',
131
+ 'danger': 'tw-text-white',
132
+ 'no-border': 'tw-text-sq-text-color',
133
+ 'warning': 'tw-text-white',
134
+ };
135
+ const textClassesByVariantDarkTheme = {
136
+ 'outline': 'dark:tw-text-sq-dark-text',
137
+ 'theme': 'dark:tw-text-white',
138
+ 'theme-light': 'dark:tw-text-white',
139
+ 'danger': 'dark:tw-text-white',
140
+ 'no-border': 'dark:tw-text-sq-dark-text',
141
+ 'warning': 'dark:tw-text-white',
142
+ };
143
+ const classesByVariantLightTheme = {
144
+ 'outline': 'tw-border-sq-disabled-gray hover:tw-bg-sq-light-gray' +
145
+ ' focus:tw-bg-sq-dark-gray active:tw-bg-sq-dark-gray focus:tw-border-sq-color-dark active:tw-border-sq-color-dark',
146
+ 'theme': 'tw-bg-sq-color-dark hover:tw-bg-sq-color-highlight',
147
+ 'danger': '',
148
+ 'theme-light': 'tw-bg-sq-icon hover:tw-bg-sq-link',
149
+ 'no-border': '',
150
+ 'warning': 'tw-bg-sq-warning-color',
151
+ };
152
+ const classesByVariantDarkTheme = {
153
+ 'outline': 'dark:tw-border-sq-dark-disabled-gray dark:hover:tw-bg-sq-highlight-color-dark' +
154
+ ' dark:focus:tw-bg-sq-dark-gray dark:active:tw-bg-sq-dark-gray dark:focus:tw-border-sq-color-dark' +
155
+ ' dark:active:tw-border-sq-color-dark',
156
+ 'theme': 'dark:tw-bg-sq-color-dark dark:hover:tw-bg-sq-color-highlight',
157
+ 'danger': '',
158
+ 'theme-light': 'dark:tw-bg-sq-icon-dark dark:hover:tw-bg-sq-link-dark',
41
159
  'no-border': '',
42
160
  'warning': '',
43
161
  };
44
162
  const sizeClasses = {
45
- sm: 'text-xs',
46
- lg: 'text-xl',
163
+ sm: 'tw-text-sm',
164
+ lg: 'tw-text-xl',
47
165
  };
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) => {
166
+ const appliedClasses = `${baseClasses} ${baseClassesByVariant[variant]} ${sizeClasses[size]} ${classesByVariantLightTheme[variant]} ${classesByVariantDarkTheme[variant]} ${textClassesByVariantLightTheme[variant]} ${textClassesByVariantDarkTheme[variant]} ${extraClassNames}`;
167
+ const button = (React.createElement("button", { id: id, disabled: disabled, "data-testid": testId, type: type === 'link' || (type === 'submit' && browserIsFirefox) ? 'button' : type, onClick: (e) => {
50
168
  stopPropagation && e.stopPropagation();
51
169
  onClick && onClick();
52
- }, className: appliedClasses }, label));
170
+ }, className: appliedClasses },
171
+ icon && (React.createElement(Icon, { icon: icon, type: iconStyle, color: iconColor, extraClassNames: label ?
172
+ `tw-mr-1 ${textClassesByVariantLightTheme[variant]} ${textClassesByVariantDarkTheme[variant]}` : '', testId: `${id}_spinner` })),
173
+ label));
174
+ return tooltip ? (React.createElement(Tooltip, { text: tooltip, ...tooltipOptions }, button)) : (button);
53
175
  };
54
176
 
177
+ /**
178
+ * Textfield.
179
+ */
180
+ const TextField = React.forwardRef((props, ref) => {
181
+ const { readonly = false, onChange, onKeyUp, id, name, size = 'sm', value, placeholder, extraClassNames, testId, type = 'text', } = props;
182
+ const internalRef = React.useRef(null);
183
+ const [cursor, setCursor] = React.useState(null);
184
+ const setAllRefs = (receivedRef) => {
185
+ if (ref)
186
+ ref.current = receivedRef;
187
+ internalRef.current = receivedRef;
188
+ };
189
+ React.useEffect(() => {
190
+ const input = internalRef.current;
191
+ if (input)
192
+ input.setSelectionRange(cursor, cursor);
193
+ }, [ref, cursor, value]);
194
+ const handleChange = (e) => {
195
+ setCursor(e.target.selectionStart);
196
+ onChange && onChange(e);
197
+ };
198
+ React.useEffect(() => {
199
+ /**
200
+ * we need to change the value only if it's different since the internal state of "input" will change it anyway
201
+ * this will only be the case when the value has been changed externally via store (undo / redo)
202
+ */
203
+ if (value !== null && value !== undefined && value !== internalRef.current?.value && internalRef.current) {
204
+ // we need to use this method because using the value props directly will switch the input to a "controlled"
205
+ // component
206
+ internalRef.current.value = `${value}`;
207
+ }
208
+ }, [value]);
209
+ const baseClasses = 'tw-height-34 tw-leading-normal tw-outline-none tw-py-1 tw-px-3 tw-rounded-sm disabled:tw-pointer-events-none' +
210
+ ' disabled:tw-cursor-not-allowed tw-p-1 tw-border-solid tw-border';
211
+ const darkTheme = 'dark:tw-border-sq-dark-disabled-gray dark:tw-bg-sq-dark-background dark:tw-text-sq-dark-text' +
212
+ ' dark:focus:tw-border-sq-color-dark-dark dark:active:tw-border-sq-color-dark-dark';
213
+ const lightTheme = 'tw-border-sq-disabled-gray tw-text-sq-text-color focus:tw-border-sq-color-dark active:tw-border-sq-color-dark';
214
+ const sizeClasses = {
215
+ sm: 'tw-text-sm',
216
+ lg: 'tw-text-xl',
217
+ };
218
+ const appliedClasses = `${baseClasses} ${sizeClasses[size]} ${extraClassNames} ${lightTheme} ${darkTheme}`;
219
+ return (React.createElement("input", { ref: setAllRefs, "data-testid": testId, name: name, id: id, type: type, value: value, className: appliedClasses, placeholder: placeholder, disabled: readonly, autoComplete: "none", onChange: handleChange, onKeyUp: onKeyUp }));
220
+ });
221
+
55
222
  exports.Button = Button;
223
+ exports.Icon = Icon;
224
+ exports.TextField = TextField;
225
+ exports.Tooltip = Tooltip;
56
226
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +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,I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IAAI,CAAC,GAAG,GAAG,GAAG,gBAAgB,CAAC,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;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/utils/browserId.ts","../src/Tooltip/Tooltip.types.ts","../src/Tooltip/Tooltip.tsx","../src/Icon/Icon.tsx","../src/Button/Button.tsx","../src/TextField/TextField.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","export const DEFAULT_TOOL_TIP_DELAY = 1000;\nexport const tooltipPositions = ['top', 'left', 'right', 'bottom'] as const;\n\nexport type TooltipPosition = typeof tooltipPositions[number];\n\nexport interface TooltipProps {\n position?: TooltipPosition;\n children?: JSX.Element | string;\n text: JSX.Element | string;\n delay?: number;\n}\n","import React from 'react';\nimport '../styles.css';\nimport { DEFAULT_TOOL_TIP_DELAY, TooltipProps } from './Tooltip.types';\n\n/**\n * This component displays a Tooltip for the provided children.\n */\nexport const Tooltip: React.FunctionComponent<TooltipProps> = ({\n position = 'bottom',\n children,\n text,\n delay = DEFAULT_TOOL_TIP_DELAY,\n}) => {\n const arrowBaseClasses = \"before:tw-content-[''] before:tw-absolute before:tw-border-8\";\n const centerArrowVertically = 'before:tw-top-1/2 before:-tw-translate-y-1/2';\n const centerArrowHorizontally = 'before:tw-left-1/2 before:-tw-translate-x-1/2';\n const arrowRight = `${arrowBaseClasses} ${centerArrowVertically} before:tw-right-[100%] before:tw-border-y-transparent \n before:tw-border-l-transparent before:tw-border-r-black`;\n\n const arrowLeft = `${arrowBaseClasses} ${centerArrowVertically} before:tw-left-[100%] before:tw-border-y-transparent\n before:tw-border-l-black before:tw-border-r-transparent`;\n\n const arrowBottom = `${arrowBaseClasses} ${centerArrowHorizontally} before:-tw-top-4 before:tw-border-b-black \n before:tw-border-r-transparent before:tw-border-l-transparent before:tw-border-t-transparent`;\n const arrowTop = `${arrowBaseClasses} ${centerArrowHorizontally} before:-tw-bottom-4 before:tw-border-b-transparent \n before:tw-border-t-black before:tw-border-l-transparent before:tw-border-r-transparent`;\n\n const placements = {\n top: `-tw-top-2 -tw-translate-y-full tw-left-1/2 -tw-translate-x-1/2 ${arrowTop}`,\n left: `-tw-translate-x-full -tw-left-3 -tw-translate-y-1/2 tw-top-1/2 ${arrowLeft}`,\n right: `tw-translate-x-full -tw-right-3 -tw-translate-y-1/2 tw-top-1/2 ${arrowRight}`,\n bottom: `-tw-bottom-2 tw-translate-y-full tw-left-1/2 -tw-translate-x-1/2 ${arrowBottom}`,\n };\n\n return (\n <div className=\"tw-group tw-relative tw-inline-block\">\n {children}\n <div\n className={`tw-z-50 tw-whitespace-nowrap tw-hidden group-hover:tw-inline-block group-hover:tw-delay-[${delay}ms] \n tw-absolute tw-opacity-0 group-hover:tw-opacity-100 tw-rounded tw-bg-black tw-p-2 tw-text-xs tw-text-white ${placements[position]}`}>\n {text}\n </div>\n </div>\n );\n};\n","import React from 'react';\nimport '../styles.css';\nimport { IconProps } from './Icon.types';\nimport Tooltip from '../Tooltip';\n\n/**\n * Icon:\n * - access to Seeq custom icons by providing the desired icon\n * - leverage \"type\" to style your icon\n */\nconst Icon: React.FunctionComponent<IconProps> = ({\n onClick,\n icon,\n type = 'theme',\n extraClassNames,\n id,\n large,\n small,\n color,\n testId,\n customId,\n tooltip,\n tooltipDelay,\n tooltipPlacement,\n number,\n hasExternalTooltipHandler = false,\n}) => {\n if ((type === 'color' && (color === undefined || color === '')) || (color && type !== 'color')) {\n const errorMessage =\n color === undefined || color === ''\n ? 'Icon with type=\"color\" must have prop color specified.'\n : 'Icon with prop color must have type=\"color\".';\n return <div className=\"tw-text-sq-danger-color\">{errorMessage}</div>;\n }\n\n const colorClassesThemeLight = {\n 'theme': 'tw-text-sq-color-dark',\n 'white': 'tw-text-white',\n 'dark-gray': 'tw-text-sq-fairly-dark-gray',\n 'warning': 'tw-text-sq-warning-color',\n 'darkish-gray': 'tw-text-sq-darkish-gray',\n 'gray': 'tw-text-sq-disabled-gray',\n 'color': '',\n 'info': 'tw-text-sq-link',\n 'text': 'tw-text-sq-text-color',\n 'inherit': '',\n 'danger': 'tw-text-sq-danger-color',\n 'theme-light': 'tw-text-sq-color-light',\n 'success': 'tw-text-sq-success-color',\n };\n\n const colorClassesThemeDark = {\n 'theme': 'dark:tw-text-sq-color-dark-dark',\n 'white': '',\n 'dark-gray': 'tw-text-sq-fairly-dark-gray',\n 'warning': '',\n 'darkish-gray': 'tw-text-sq-darkish-gray',\n 'gray': 'dark:tw-text-sq-dark-disabled-gray',\n 'color': '',\n 'info': 'dark:tw-text-sq-link-dark',\n 'text': 'dark:tw-text-sq-dark-text',\n 'inherit': '',\n 'danger': 'tw-text-sq-danger-color',\n 'theme-light': 'tw-text-sq-color-light',\n 'success': 'tw-text-sq-success-color',\n };\n\n const iconPrefix = icon.startsWith('fc') ? 'fc' : 'fa';\n const style = type === 'color' && color ? { color } : {};\n const appliedClassNames = `${iconPrefix} ${icon} ${small ? 'fa-sm' : ''} ${large ? 'fa-lg' : ''} \n ${colorClassesThemeLight[type]} ${colorClassesThemeDark[type]} ${onClick ? 'cursor-pointer' : ''} ${extraClassNames}`;\n\n const iconTag = (\n <i\n className={appliedClassNames}\n style={style}\n onClick={onClick}\n data-testid={testId}\n data-customid={customId}\n id={id}\n data-number={number}\n />\n );\n\n return !hasExternalTooltipHandler && tooltip && tooltip !== '' ? (\n <Tooltip text={tooltip} delay={tooltipDelay} position={tooltipPlacement}>\n {iconTag}\n </Tooltip>\n ) : (\n iconTag\n );\n};\nexport default Icon;\n","import React from 'react';\nimport { ButtonProps } from './Button.types';\nimport '../styles.css';\nimport { browserIsFirefox } from '../utils/browserId';\nimport Tooltip from '../Tooltip';\nimport Icon from '../Icon';\n\n/**\n * All-in-one Button:\n * - use \"variant\" to achieve the desired style\n * - include tooltips and/or icons\n */\nconst Button: React.FunctionComponent<ButtonProps> = ({\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 tooltip,\n tooltipOptions,\n iconStyle = 'text',\n icon,\n iconColor,\n}) => {\n const baseClasses = 'tw-py-1 tw-px-2.5 tw-rounded-sm focus:tw-ring-0 disabled:tw-pointer-events-none';\n const baseClassesByVariant = {\n 'outline':\n 'tw-border-solid tw-border',\n 'theme': 'disabled:tw-bg-opacity-50',\n 'danger': 'tw-bg-sq-danger-color hover:tw-bg-sq-danger-color-hover disabled:tw-bg-opacity-50',\n 'theme-light': 'disabled:tw-bg-opacity-50',\n 'no-border': '',\n 'warning': 'tw-bg-sq-warning-color',\n };\n const textClassesByVariantLightTheme = {\n 'outline': 'tw-text-sq-text-color',\n 'theme': 'tw-text-white',\n 'theme-light': 'tw-text-white',\n 'danger': 'tw-text-white',\n 'no-border': 'tw-text-sq-text-color',\n 'warning': 'tw-text-white',\n };\n const textClassesByVariantDarkTheme = {\n 'outline': 'dark:tw-text-sq-dark-text',\n 'theme': 'dark:tw-text-white',\n 'theme-light': 'dark:tw-text-white',\n 'danger': 'dark:tw-text-white',\n 'no-border': 'dark:tw-text-sq-dark-text',\n 'warning': 'dark:tw-text-white',\n };\n\n const classesByVariantLightTheme = {\n 'outline':\n 'tw-border-sq-disabled-gray hover:tw-bg-sq-light-gray' +\n ' focus:tw-bg-sq-dark-gray active:tw-bg-sq-dark-gray focus:tw-border-sq-color-dark active:tw-border-sq-color-dark',\n 'theme': 'tw-bg-sq-color-dark hover:tw-bg-sq-color-highlight',\n 'danger': '',\n 'theme-light': 'tw-bg-sq-icon hover:tw-bg-sq-link',\n 'no-border': '',\n 'warning': 'tw-bg-sq-warning-color',\n };\n\n const classesByVariantDarkTheme = {\n 'outline':\n 'dark:tw-border-sq-dark-disabled-gray dark:hover:tw-bg-sq-highlight-color-dark' +\n ' dark:focus:tw-bg-sq-dark-gray dark:active:tw-bg-sq-dark-gray dark:focus:tw-border-sq-color-dark' +\n ' dark:active:tw-border-sq-color-dark',\n 'theme': 'dark:tw-bg-sq-color-dark dark:hover:tw-bg-sq-color-highlight',\n 'danger': '',\n 'theme-light': 'dark:tw-bg-sq-icon-dark dark:hover:tw-bg-sq-link-dark',\n 'no-border': '',\n 'warning': '',\n };\n const sizeClasses = {\n sm: 'tw-text-sm',\n lg: 'tw-text-xl',\n };\n const appliedClasses = `${baseClasses} ${baseClassesByVariant[variant]} ${sizeClasses[size]} ${classesByVariantLightTheme[variant]} ${classesByVariantDarkTheme[variant]} ${textClassesByVariantLightTheme[variant]} ${textClassesByVariantDarkTheme[variant]} ${extraClassNames}`;\n\n const button = (\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 {icon && (\n <Icon\n icon={icon}\n type={iconStyle}\n color={iconColor}\n extraClassNames={label ?\n `tw-mr-1 ${textClassesByVariantLightTheme[variant]} ${textClassesByVariantDarkTheme[variant]}` : ''}\n testId={`${id}_spinner`}\n />\n )}\n {label}\n </button>\n );\n\n return tooltip ? (\n <Tooltip text={tooltip} {...tooltipOptions}>\n {button}\n </Tooltip>\n ) : (\n button\n );\n};\nexport default Button;\n","import React, { useEffect, useRef, useState } from 'react';\nimport { TextFieldProps } from './TextField.types';\nimport '../styles.css';\n\n/**\n * Textfield.\n */\nexport const TextField: React.FunctionComponent<TextFieldProps> = React.forwardRef<HTMLInputElement, TextFieldProps>(\n (props, ref: any) => {\n const {\n readonly = false,\n onChange,\n onKeyUp,\n id,\n name,\n size = 'sm',\n value,\n placeholder,\n extraClassNames,\n testId,\n type = 'text',\n } = props;\n\n const internalRef = useRef<HTMLInputElement | null>(null);\n const [cursor, setCursor] = useState(null);\n\n const setAllRefs = (receivedRef: any) => {\n if (ref) ref.current = receivedRef;\n internalRef.current = receivedRef;\n };\n\n useEffect(() => {\n const input = internalRef.current! as unknown as HTMLInputElement;\n if (input) input.setSelectionRange(cursor, cursor);\n }, [ref, cursor, value]);\n\n const handleChange = (e: any) => {\n setCursor(e.target.selectionStart);\n onChange && onChange(e);\n };\n\n useEffect(() => {\n /**\n * we need to change the value only if it's different since the internal state of \"input\" will change it anyway\n * this will only be the case when the value has been changed externally via store (undo / redo)\n */\n if (value !== null && value !== undefined && value !== internalRef.current?.value && internalRef.current) {\n // we need to use this method because using the value props directly will switch the input to a \"controlled\"\n // component\n internalRef.current.value = `${value}`;\n }\n }, [value]);\n\n const baseClasses =\n 'tw-height-34 tw-leading-normal tw-outline-none tw-py-1 tw-px-3 tw-rounded-sm disabled:tw-pointer-events-none' +\n ' disabled:tw-cursor-not-allowed tw-p-1 tw-border-solid tw-border';\n\n const darkTheme = 'dark:tw-border-sq-dark-disabled-gray dark:tw-bg-sq-dark-background dark:tw-text-sq-dark-text' +\n ' dark:focus:tw-border-sq-color-dark-dark dark:active:tw-border-sq-color-dark-dark';\n const lightTheme = 'tw-border-sq-disabled-gray tw-text-sq-text-color focus:tw-border-sq-color-dark active:tw-border-sq-color-dark';\n\n const sizeClasses = {\n sm: 'tw-text-sm',\n lg: 'tw-text-xl',\n };\n\n const appliedClasses = `${baseClasses} ${sizeClasses[size]} ${extraClassNames} ${lightTheme} ${darkTheme}`;\n\n return (\n <input\n ref={setAllRefs}\n data-testid={testId}\n name={name}\n id={id}\n type={type}\n value={value}\n className={appliedClasses}\n placeholder={placeholder}\n disabled={readonly}\n autoComplete=\"none\"\n onChange={handleChange}\n onKeyUp={onKeyUp}\n />\n );\n },\n);\n"],"names":["useRef","useState","useEffect"],"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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