@pingux/astro 2.149.2-alpha.0 → 2.150.0-alpha.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/lib/cjs/components/Icon/Icon.js +2 -2
- package/lib/cjs/components/IconButton/IconButton.stories.js +18 -28
- package/lib/cjs/components/Tabs/Tabs.style.js +2 -2
- package/lib/cjs/hooks/useGetTheme/useGetTheme.d.ts +2 -0
- package/lib/cjs/hooks/useTShirtSize/useTShirtSize.test.js +51 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/index.d.ts +1 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.d.ts +7 -45
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +10 -23
- package/lib/cjs/styles/themes/astro/customProperties/index.d.ts +1 -0
- package/lib/cjs/styles/themes/astro/customProperties/index.js +2 -0
- package/lib/cjs/styles/themes/next-gen/colors/colors.js +1 -1
- package/lib/cjs/styles/themes/next-gen/customProperties/index.d.ts +4 -2
- package/lib/cjs/styles/themes/next-gen/customProperties/index.js +2 -0
- package/lib/cjs/styles/themes/next-gen/customProperties/tShirtSizes.js +13 -13
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +145 -245
- package/lib/cjs/styles/themes/next-gen/variants/badges.d.ts +18 -20
- package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +136 -235
- package/lib/cjs/styles/themes/next-gen/variants/button.js +48 -105
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +9 -10
- package/lib/components/Icon/Icon.js +2 -2
- package/lib/components/IconButton/IconButton.stories.js +18 -28
- package/lib/components/Tabs/Tabs.style.js +2 -2
- package/lib/hooks/useTShirtSize/useTShirtSize.test.js +51 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +10 -23
- package/lib/styles/themes/astro/customProperties/index.js +2 -0
- package/lib/styles/themes/next-gen/colors/colors.js +1 -1
- package/lib/styles/themes/next-gen/customProperties/index.js +2 -0
- package/lib/styles/themes/next-gen/customProperties/tShirtSizes.js +13 -13
- package/lib/styles/themes/next-gen/variants/button.js +48 -105
- package/package.json +1 -1
|
@@ -327,44 +327,60 @@ var aiChat = _objectSpread(_objectSpread({}, withIcon), {}, {
|
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
});
|
|
330
|
-
|
|
331
|
-
|
|
330
|
+
|
|
331
|
+
// Base styles for icon buttons
|
|
332
|
+
var baseIconButtonStyle = {
|
|
333
|
+
p: '4px',
|
|
332
334
|
transition: 'color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out',
|
|
333
335
|
outline: 'none',
|
|
334
336
|
borderRadius: '28px',
|
|
335
|
-
border: '
|
|
336
|
-
|
|
337
|
+
border: 'none',
|
|
338
|
+
cursor: 'pointer',
|
|
339
|
+
boxShadow: 'none !important'
|
|
340
|
+
};
|
|
341
|
+
var baseIconButton = _objectSpread(_objectSpread({}, baseIconButtonStyle), {}, {
|
|
337
342
|
path: {
|
|
338
343
|
fill: 'dark'
|
|
339
344
|
},
|
|
340
|
-
'&.is-focused': {
|
|
341
|
-
outline: '2px solid',
|
|
342
|
-
outlineColor: 'primary',
|
|
343
|
-
outlineOffset: '3px'
|
|
344
|
-
},
|
|
345
345
|
'&.is-hovered': {
|
|
346
|
-
backgroundColor: '
|
|
346
|
+
backgroundColor: 'background.hover',
|
|
347
347
|
path: {
|
|
348
348
|
fill: 'dark'
|
|
349
349
|
}
|
|
350
350
|
},
|
|
351
351
|
'&.is-pressed': {
|
|
352
|
-
backgroundColor: '
|
|
353
|
-
borderColor: 'gray-200',
|
|
352
|
+
backgroundColor: 'background.hover',
|
|
354
353
|
path: {
|
|
355
354
|
fill: 'dark'
|
|
356
355
|
}
|
|
357
|
-
}
|
|
358
|
-
}
|
|
356
|
+
},
|
|
357
|
+
'&.is-focused': _objectSpread({}, defaultFocus)
|
|
358
|
+
});
|
|
359
|
+
var invertedIconButton = _objectSpread(_objectSpread({}, baseIconButtonStyle), {}, {
|
|
360
|
+
'&.is-hovered': {
|
|
361
|
+
boxShadow: 'none !important',
|
|
362
|
+
backgroundColor: 'blue-600'
|
|
363
|
+
},
|
|
364
|
+
'&.is-pressed': {
|
|
365
|
+
backgroundColor: 'blue-600'
|
|
366
|
+
},
|
|
367
|
+
'&.is-disabled': {
|
|
368
|
+
backgroundColor: 'gray-300'
|
|
369
|
+
},
|
|
370
|
+
'&.is-focused': _objectSpread({}, defaultFocus)
|
|
371
|
+
});
|
|
359
372
|
var modalCloseButton = _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
|
360
373
|
position: 'absolute',
|
|
361
374
|
top: 32,
|
|
362
375
|
right: 18
|
|
363
376
|
});
|
|
364
|
-
var onyxIconButton = _objectSpread(_objectSpread(
|
|
377
|
+
var onyxIconButton = _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
|
365
378
|
path: {
|
|
366
379
|
fill: 'blue'
|
|
367
380
|
},
|
|
381
|
+
display: 'inline-flex',
|
|
382
|
+
alignItems: 'center',
|
|
383
|
+
justifyContent: 'center',
|
|
368
384
|
'&.is-hovered': {
|
|
369
385
|
backgroundColor: _chromaJs["default"].mix(primaryBlue, 'black', 0.075, 'rgb').hex(),
|
|
370
386
|
path: {
|
|
@@ -373,47 +389,32 @@ var onyxIconButton = _objectSpread(_objectSpread(_objectSpread({}, baseIconButto
|
|
|
373
389
|
},
|
|
374
390
|
'&.is-pressed': {
|
|
375
391
|
backgroundColor: _chromaJs["default"].mix(primaryBlue, 'black', 0.125, 'rgb').hex(),
|
|
376
|
-
borderColor: _chromaJs["default"].mix(primaryBlue, 'black', 0.125, 'rgb').hex(),
|
|
377
392
|
path: {
|
|
378
393
|
fill: 'white'
|
|
379
394
|
}
|
|
380
395
|
},
|
|
381
|
-
|
|
382
|
-
maxWidth: '48.5px',
|
|
383
|
-
width: '48.5px',
|
|
384
|
-
p: 'sm',
|
|
385
|
-
display: 'inline-flex',
|
|
386
|
-
alignItems: 'center',
|
|
387
|
-
justifyContent: 'center'
|
|
396
|
+
'&.is-focused': _objectSpread({}, defaultFocus)
|
|
388
397
|
});
|
|
389
398
|
var hintButton = {
|
|
390
399
|
backgroundColor: 'transparent',
|
|
391
400
|
path: {
|
|
392
401
|
fill: 'dark'
|
|
393
402
|
},
|
|
394
|
-
'&.is-focused': {
|
|
395
|
-
outline: '2px solid',
|
|
396
|
-
outlineColor: 'primary',
|
|
397
|
-
outlineOffset: '3px'
|
|
398
|
-
},
|
|
399
403
|
'&.is-hovered': {
|
|
400
404
|
backgroundColor: 'gray-100',
|
|
401
405
|
path: {
|
|
402
406
|
fill: 'dark'
|
|
403
407
|
}
|
|
404
|
-
}
|
|
408
|
+
},
|
|
409
|
+
'&.is-focused': _objectSpread({}, defaultFocus)
|
|
405
410
|
};
|
|
406
411
|
var badgeDeleteButton = _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
|
407
|
-
height: 14,
|
|
408
412
|
p: 0,
|
|
413
|
+
height: 14,
|
|
409
414
|
width: 14,
|
|
410
|
-
|
|
411
|
-
'&.is-focused': _objectSpread(_objectSpread({}, defaultFocus), {}, {
|
|
412
|
-
backgroundColor: 'gray-100'
|
|
413
|
-
}),
|
|
415
|
+
'&.is-focused': _objectSpread({}, defaultFocus),
|
|
414
416
|
'&.is-pressed': {
|
|
415
417
|
backgroundColor: 'gray-100',
|
|
416
|
-
borderColor: 'gray-200',
|
|
417
418
|
path: {
|
|
418
419
|
fill: 'dark'
|
|
419
420
|
}
|
|
@@ -422,19 +423,17 @@ var badgeDeleteButton = _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
|
|
422
423
|
bg: 'transparent'
|
|
423
424
|
}
|
|
424
425
|
}, transitions);
|
|
425
|
-
var searchClearButton = _objectSpread(_objectSpread({},
|
|
426
|
+
var searchClearButton = _objectSpread(_objectSpread({}, baseIconButtonStyle), {}, {
|
|
427
|
+
path: {
|
|
428
|
+
fill: 'dark'
|
|
429
|
+
},
|
|
426
430
|
width: '20px',
|
|
427
431
|
height: '20px',
|
|
428
|
-
border: 'none',
|
|
429
432
|
position: 'absolute',
|
|
430
433
|
right: '20px',
|
|
431
|
-
'& > svg': {
|
|
432
|
-
minWidth: _tShirtSizes["default"].xs,
|
|
433
|
-
width: _tShirtSizes["default"].xs,
|
|
434
|
-
height: _tShirtSizes["default"].xs
|
|
435
|
-
},
|
|
436
434
|
'&.is-hovered': {
|
|
437
|
-
bg: 'background.hover'
|
|
435
|
+
bg: 'background.hover',
|
|
436
|
+
boxShadow: 'none !important'
|
|
438
437
|
},
|
|
439
438
|
'&.is-pressed': {
|
|
440
439
|
bg: 'background.hover'
|
|
@@ -442,7 +441,6 @@ var searchClearButton = _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
|
|
442
441
|
});
|
|
443
442
|
var iconButtons = {
|
|
444
443
|
base: _objectSpread({}, baseIconButton),
|
|
445
|
-
nextGen: _objectSpread({}, onyxIconButton),
|
|
446
444
|
onyx: _objectSpread({}, onyxIconButton),
|
|
447
445
|
responseToolbar: _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
|
448
446
|
'&.is-not-loaded': {
|
|
@@ -463,7 +461,6 @@ var iconButtons = {
|
|
|
463
461
|
}),
|
|
464
462
|
'&.is-pressed': {
|
|
465
463
|
backgroundColor: 'gray-100',
|
|
466
|
-
borderColor: 'gray-200',
|
|
467
464
|
path: {
|
|
468
465
|
fill: 'dark'
|
|
469
466
|
}
|
|
@@ -475,83 +472,30 @@ var iconButtons = {
|
|
|
475
472
|
width: '28px',
|
|
476
473
|
height: '28px',
|
|
477
474
|
'& > svg': {
|
|
478
|
-
minWidth:
|
|
479
|
-
width:
|
|
480
|
-
height:
|
|
475
|
+
minWidth: _tShirtSizes["default"].sm,
|
|
476
|
+
width: _tShirtSizes["default"].sm,
|
|
477
|
+
height: _tShirtSizes["default"].sm,
|
|
481
478
|
path: {
|
|
482
479
|
fill: '#455469 !important'
|
|
483
480
|
}
|
|
484
481
|
}
|
|
485
482
|
}),
|
|
486
|
-
headerNav: _objectSpread(
|
|
487
|
-
borderRadius: '4px',
|
|
488
|
-
path: {
|
|
489
|
-
fill: 'text.primary'
|
|
490
|
-
},
|
|
491
|
-
px: 'md',
|
|
492
|
-
py: 'sm',
|
|
493
|
-
width: '56px',
|
|
494
|
-
height: '40px',
|
|
495
|
-
'&.is-hovered': {
|
|
496
|
-
path: {
|
|
497
|
-
fill: 'text.secondary'
|
|
498
|
-
}
|
|
499
|
-
},
|
|
500
|
-
'&.is-pressed': {
|
|
501
|
-
path: {
|
|
502
|
-
fill: 'text.secondary'
|
|
503
|
-
}
|
|
504
|
-
},
|
|
505
|
-
'&.is-focused': _objectSpread(_objectSpread({}, defaultFocus), {}, {
|
|
506
|
-
outlineOffset: '1px'
|
|
507
|
-
})
|
|
508
|
-
}),
|
|
483
|
+
headerNav: _objectSpread({}, baseIconButton),
|
|
509
484
|
copyButton: _codeView.copyButton,
|
|
510
485
|
deleteAttachment: _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
|
511
486
|
backgroundColor: 'light',
|
|
512
|
-
border: '1px solid',
|
|
513
|
-
borderColor: 'gray-300',
|
|
514
487
|
size: '24px',
|
|
515
|
-
p: '4px',
|
|
516
488
|
'&.is-hovered': {
|
|
517
489
|
backgroundColor: '#dde5ec'
|
|
518
490
|
}
|
|
519
491
|
}),
|
|
520
|
-
inverted: {
|
|
521
|
-
cursor: 'pointer',
|
|
522
|
-
transition: 'color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out',
|
|
523
|
-
outline: 'none',
|
|
524
|
-
path: {
|
|
525
|
-
fill: 'white'
|
|
526
|
-
},
|
|
527
|
-
'&.is-focused': {
|
|
528
|
-
outline: '2px solid',
|
|
529
|
-
outlineColor: 'primary',
|
|
530
|
-
outlineOffset: '3px'
|
|
531
|
-
},
|
|
532
|
-
'&.is-pressed': {
|
|
533
|
-
backgroundColor: _chromaJs["default"].mix(primaryBlue, 'black', 0.125, 'rgb').hex(),
|
|
534
|
-
borderColor: _chromaJs["default"].mix(primaryBlue, 'black', 0.125, 'rgb').hex()
|
|
535
|
-
},
|
|
536
|
-
'&.is-hovered': _objectSpread(_objectSpread({}, boxShadowNone), {}, {
|
|
537
|
-
border: 'none !important',
|
|
538
|
-
borderColor: 'none !important',
|
|
539
|
-
backgroundColor: _chromaJs["default"].mix(primaryBlue, 'black', 0.075, 'rgb').hex()
|
|
540
|
-
}),
|
|
541
|
-
'&.is-disabled': {
|
|
542
|
-
backgroundColor: 'gray-300'
|
|
543
|
-
}
|
|
544
|
-
},
|
|
492
|
+
inverted: _objectSpread({}, invertedIconButton),
|
|
545
493
|
searchClearButton: searchClearButton,
|
|
546
494
|
filter: _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
|
547
|
-
bg: 'transparent',
|
|
548
|
-
border: '2px solid',
|
|
549
|
-
borderColor: 'transparent',
|
|
550
495
|
width: '32px',
|
|
551
496
|
height: '32px',
|
|
552
497
|
'&.is-hovered': {
|
|
553
|
-
|
|
554
|
-
borderColor: 'transparent',
|
|
498
|
+
boxShadow: 'none !important',
|
|
555
499
|
backgroundColor: 'gray-100',
|
|
556
500
|
path: {
|
|
557
501
|
fill: 'dark'
|
|
@@ -559,7 +503,6 @@ var iconButtons = {
|
|
|
559
503
|
},
|
|
560
504
|
'&.is-pressed': {
|
|
561
505
|
backgroundColor: 'gray-100',
|
|
562
|
-
borderColor: 'gray-200',
|
|
563
506
|
path: {
|
|
564
507
|
fill: 'dark'
|
|
565
508
|
}
|
|
@@ -4,18 +4,9 @@ export declare const badgeDeleteButton: {
|
|
|
4
4
|
height: number;
|
|
5
5
|
p: number;
|
|
6
6
|
width: number;
|
|
7
|
-
transition: string;
|
|
8
|
-
outline: string;
|
|
9
|
-
border: string;
|
|
10
|
-
borderColor: string;
|
|
11
7
|
path: {
|
|
12
8
|
fill: string;
|
|
13
9
|
};
|
|
14
|
-
'&.is-focused': {
|
|
15
|
-
outline: string;
|
|
16
|
-
outlineColor: string;
|
|
17
|
-
outlineOffset: string;
|
|
18
|
-
};
|
|
19
10
|
'&.is-hovered': {
|
|
20
11
|
backgroundColor: string;
|
|
21
12
|
path: {
|
|
@@ -24,11 +15,19 @@ export declare const badgeDeleteButton: {
|
|
|
24
15
|
};
|
|
25
16
|
'&.is-pressed': {
|
|
26
17
|
backgroundColor: string;
|
|
27
|
-
borderColor: string;
|
|
28
18
|
path: {
|
|
29
19
|
fill: string;
|
|
30
20
|
};
|
|
31
21
|
};
|
|
22
|
+
'&.is-focused': {
|
|
23
|
+
outline: string;
|
|
24
|
+
outlineColor: string;
|
|
25
|
+
outlineOffset: string;
|
|
26
|
+
};
|
|
27
|
+
transition: string;
|
|
28
|
+
outline: string;
|
|
29
|
+
border: string;
|
|
30
|
+
boxShadow: string;
|
|
32
31
|
};
|
|
33
32
|
declare const _default: {
|
|
34
33
|
accordion: {
|
|
@@ -18,15 +18,15 @@ import { useGetTheme, useTShirtSize } from '../../hooks';
|
|
|
18
18
|
import Box from '../Box';
|
|
19
19
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
20
|
var Icon = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
21
|
+
var theme = useGetTheme();
|
|
21
22
|
var color = props.color,
|
|
22
23
|
IconComponent = props.icon,
|
|
23
24
|
sx = props.sx,
|
|
24
25
|
_props$size = props.size,
|
|
25
|
-
size = _props$size === void 0 ?
|
|
26
|
+
size = _props$size === void 0 ? theme.defaultIconSize : _props$size,
|
|
26
27
|
variant = props.variant,
|
|
27
28
|
title = props.title,
|
|
28
29
|
others = _objectWithoutProperties(props, _excluded);
|
|
29
|
-
var theme = useGetTheme();
|
|
30
30
|
var _useTShirtSize = useTShirtSize({
|
|
31
31
|
size: size,
|
|
32
32
|
sizes: theme.tShirtSizes
|
|
@@ -7,6 +7,7 @@ import PencilIcon from '@pingux/mdi-react/PencilIcon';
|
|
|
7
7
|
import PlusIcon from '@pingux/mdi-react/PlusIcon';
|
|
8
8
|
import { withDesign } from 'storybook-addon-designs';
|
|
9
9
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
|
10
|
+
import { useGetTheme } from '../../hooks';
|
|
10
11
|
import { Box, Icon, IconButton, Table, TableBody, TableCell, TableHead, TableRow, Text } from '../../index';
|
|
11
12
|
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
|
|
12
13
|
import IconButtonReadme from './IconButton.mdx';
|
|
@@ -66,7 +67,6 @@ export var WithTooltip = function WithTooltip(args) {
|
|
|
66
67
|
title: "Edit"
|
|
67
68
|
}, args), ___EmotionJSX(Icon, {
|
|
68
69
|
icon: CreateIcon,
|
|
69
|
-
size: "sm",
|
|
70
70
|
title: {
|
|
71
71
|
name: 'Create Icon'
|
|
72
72
|
}
|
|
@@ -96,6 +96,8 @@ Disabled.parameters = {
|
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
export var Sizes = function Sizes() {
|
|
99
|
+
var _useGetTheme = useGetTheme(),
|
|
100
|
+
isOnyx = _useGetTheme.themeState.isOnyx;
|
|
99
101
|
return ___EmotionJSX(Table, null, ___EmotionJSX(TableHead, null, ___EmotionJSX(TableRow, {
|
|
100
102
|
key: "head"
|
|
101
103
|
}, ___EmotionJSX(TableCell, {
|
|
@@ -113,47 +115,41 @@ export var Sizes = function Sizes() {
|
|
|
113
115
|
bg: "transparent !important"
|
|
114
116
|
}, ___EmotionJSX(TableCell, {
|
|
115
117
|
width: "40%"
|
|
116
|
-
}, ___EmotionJSX(Text, null, "XXS | 15px
|
|
118
|
+
}, ___EmotionJSX(Text, null, "XXS |", ' ', isOnyx ? '18px' : '15px')), ___EmotionJSX(TableCell, null, ___EmotionJSX(Text, {
|
|
117
119
|
fontFamily: "monospace"
|
|
118
120
|
}, ' ', "<IconButton aria-label='create button' variant='inverted'/>"), ___EmotionJSX(Text, {
|
|
119
121
|
fontFamily: "monospace"
|
|
120
122
|
}, "<Icon icon={CreateIcon} size='xxs'/>"), ___EmotionJSX(Text, {
|
|
121
123
|
fontFamily: "monospace"
|
|
122
|
-
}, '</IconButton>')), ___EmotionJSX(TableCell, null, ___EmotionJSX(IconButton, {
|
|
124
|
+
}, '</IconButton>')), ___EmotionJSX(TableCell, null, ___EmotionJSX(Box, null, ___EmotionJSX(IconButton, {
|
|
123
125
|
"aria-label": "create button",
|
|
124
|
-
variant: "inverted"
|
|
125
|
-
sx: {
|
|
126
|
-
width: 'unset'
|
|
127
|
-
}
|
|
126
|
+
variant: "inverted"
|
|
128
127
|
}, ___EmotionJSX(Icon, {
|
|
129
128
|
icon: CreateIcon,
|
|
130
129
|
size: "xxs",
|
|
131
130
|
title: {
|
|
132
131
|
name: 'Create Icon'
|
|
133
132
|
}
|
|
134
|
-
})))), ___EmotionJSX(TableRow, {
|
|
133
|
+
}))))), ___EmotionJSX(TableRow, {
|
|
135
134
|
bg: "transparent !important"
|
|
136
135
|
}, ___EmotionJSX(TableCell, {
|
|
137
136
|
width: "40%"
|
|
138
|
-
}, ___EmotionJSX(Text, null, "XS | 21px
|
|
137
|
+
}, ___EmotionJSX(Text, null, "XS |", ' ', isOnyx ? '22px' : '21px')), ___EmotionJSX(TableCell, null, ___EmotionJSX(Text, {
|
|
139
138
|
fontFamily: "monospace"
|
|
140
139
|
}, ' ', "<IconButton aria-label='create button' variant='inverted'/>"), ___EmotionJSX(Text, {
|
|
141
140
|
fontFamily: "monospace"
|
|
142
141
|
}, "<Icon icon={CreateIcon} size='xs'/>"), ___EmotionJSX(Text, {
|
|
143
142
|
fontFamily: "monospace"
|
|
144
|
-
}, '</IconButton>')), ___EmotionJSX(TableCell, null, ___EmotionJSX(IconButton, {
|
|
143
|
+
}, '</IconButton>')), ___EmotionJSX(TableCell, null, ___EmotionJSX(Box, null, ___EmotionJSX(IconButton, {
|
|
145
144
|
"aria-label": "create button",
|
|
146
|
-
variant: "inverted"
|
|
147
|
-
sx: {
|
|
148
|
-
width: 'unset'
|
|
149
|
-
}
|
|
145
|
+
variant: "inverted"
|
|
150
146
|
}, ___EmotionJSX(Icon, {
|
|
151
147
|
icon: CreateIcon,
|
|
152
148
|
size: "xs",
|
|
153
149
|
title: {
|
|
154
150
|
name: 'Create Icon'
|
|
155
151
|
}
|
|
156
|
-
})))), ___EmotionJSX(TableRow, {
|
|
152
|
+
}))))), ___EmotionJSX(TableRow, {
|
|
157
153
|
bg: "transparent !important"
|
|
158
154
|
}, ___EmotionJSX(TableCell, {
|
|
159
155
|
width: "40%"
|
|
@@ -163,41 +159,35 @@ export var Sizes = function Sizes() {
|
|
|
163
159
|
fontFamily: "monospace"
|
|
164
160
|
}, "<Icon icon={CreateIcon} size='sm'/>"), ___EmotionJSX(Text, {
|
|
165
161
|
fontFamily: "monospace"
|
|
166
|
-
}, '</IconButton>')), ___EmotionJSX(TableCell, null, ___EmotionJSX(IconButton, {
|
|
162
|
+
}, '</IconButton>')), ___EmotionJSX(TableCell, null, ___EmotionJSX(Box, null, ___EmotionJSX(IconButton, {
|
|
167
163
|
"aria-label": "create button",
|
|
168
|
-
variant: "inverted"
|
|
169
|
-
sx: {
|
|
170
|
-
width: 'unset'
|
|
171
|
-
}
|
|
164
|
+
variant: "inverted"
|
|
172
165
|
}, ___EmotionJSX(Icon, {
|
|
173
166
|
icon: CreateIcon,
|
|
174
167
|
size: "sm",
|
|
175
168
|
title: {
|
|
176
169
|
name: 'Create Icon'
|
|
177
170
|
}
|
|
178
|
-
})))), ___EmotionJSX(TableRow, {
|
|
171
|
+
}))))), ___EmotionJSX(TableRow, {
|
|
179
172
|
bg: "transparent !important"
|
|
180
173
|
}, ___EmotionJSX(TableCell, {
|
|
181
174
|
width: "40%"
|
|
182
|
-
}, ___EmotionJSX(Text, null, "MD | 31px
|
|
175
|
+
}, ___EmotionJSX(Text, null, "MD |", ' ', isOnyx ? '32px' : '31px')), ___EmotionJSX(TableCell, null, ___EmotionJSX(Text, {
|
|
183
176
|
fontFamily: "monospace"
|
|
184
177
|
}, ' ', "<IconButton aria-label='create button' variant='inverted'/>"), ___EmotionJSX(Text, {
|
|
185
178
|
fontFamily: "monospace"
|
|
186
179
|
}, "<Icon icon={CreateIcon} size='md'/>"), ___EmotionJSX(Text, {
|
|
187
180
|
fontFamily: "monospace"
|
|
188
|
-
}, '</IconButton>')), ___EmotionJSX(TableCell, null, ___EmotionJSX(IconButton, {
|
|
181
|
+
}, '</IconButton>')), ___EmotionJSX(TableCell, null, ___EmotionJSX(Box, null, ___EmotionJSX(IconButton, {
|
|
189
182
|
"aria-label": "create button",
|
|
190
|
-
variant: "inverted"
|
|
191
|
-
sx: {
|
|
192
|
-
width: 'unset'
|
|
193
|
-
}
|
|
183
|
+
variant: "inverted"
|
|
194
184
|
}, ___EmotionJSX(Icon, {
|
|
195
185
|
icon: CreateIcon,
|
|
196
186
|
size: "md",
|
|
197
187
|
title: {
|
|
198
188
|
name: 'Create Icon'
|
|
199
189
|
}
|
|
200
|
-
}))))));
|
|
190
|
+
})))))));
|
|
201
191
|
};
|
|
202
192
|
Sizes.parameters = {
|
|
203
193
|
design: {
|
|
@@ -26,7 +26,7 @@ export var tab = {
|
|
|
26
26
|
cursor: 'default'
|
|
27
27
|
},
|
|
28
28
|
'&.is-selected.is-vertical': {
|
|
29
|
-
bg: 'accent.
|
|
29
|
+
bg: 'accent.99'
|
|
30
30
|
},
|
|
31
31
|
'& > svg': {
|
|
32
32
|
flexShrink: 0
|
|
@@ -44,7 +44,7 @@ export var tab = {
|
|
|
44
44
|
'&.is-selected': {
|
|
45
45
|
borderLeft: '3px solid',
|
|
46
46
|
borderLeftColor: 'active',
|
|
47
|
-
bg: 'accent.
|
|
47
|
+
bg: 'accent.99',
|
|
48
48
|
'& > span': {
|
|
49
49
|
p: '0',
|
|
50
50
|
color: 'active'
|
|
@@ -59,7 +59,7 @@ test('returns size value if size is a t-shirt value', function () {
|
|
|
59
59
|
result = _renderHook2.result;
|
|
60
60
|
var obj = {
|
|
61
61
|
sizeProps: {
|
|
62
|
-
size: '
|
|
62
|
+
size: '48px'
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
expect(result.current).toEqual(obj);
|
|
@@ -109,4 +109,54 @@ test('using custom sizes, returns size value if size is a string value', functio
|
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
111
|
expect(result.current).toEqual(obj);
|
|
112
|
+
});
|
|
113
|
+
test('returns size directly if size key is not found in sizes', function () {
|
|
114
|
+
var props = {
|
|
115
|
+
size: 'unknown-size'
|
|
116
|
+
};
|
|
117
|
+
var _renderHook6 = renderHook(function () {
|
|
118
|
+
return useTShirtSize(props);
|
|
119
|
+
}),
|
|
120
|
+
result = _renderHook6.result;
|
|
121
|
+
expect(result.current).toEqual({
|
|
122
|
+
sizeProps: {
|
|
123
|
+
size: 'unknown-size'
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
test('returns value if size value includes rem', function () {
|
|
128
|
+
var customSizes = {
|
|
129
|
+
sm: '1.5rem'
|
|
130
|
+
};
|
|
131
|
+
var props = {
|
|
132
|
+
size: 'sm',
|
|
133
|
+
sizes: customSizes
|
|
134
|
+
};
|
|
135
|
+
var _renderHook7 = renderHook(function () {
|
|
136
|
+
return useTShirtSize(props);
|
|
137
|
+
}),
|
|
138
|
+
result = _renderHook7.result;
|
|
139
|
+
expect(result.current).toEqual({
|
|
140
|
+
sizeProps: {
|
|
141
|
+
size: '1.5rem'
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
test('returns size with px when numeric value found in sizes', function () {
|
|
146
|
+
var customSizes = {
|
|
147
|
+
sm: 8
|
|
148
|
+
};
|
|
149
|
+
var props = {
|
|
150
|
+
size: 'sm',
|
|
151
|
+
sizes: customSizes
|
|
152
|
+
};
|
|
153
|
+
var _renderHook8 = renderHook(function () {
|
|
154
|
+
return useTShirtSize(props);
|
|
155
|
+
}),
|
|
156
|
+
result = _renderHook8.result;
|
|
157
|
+
expect(result.current).toEqual({
|
|
158
|
+
sizeProps: {
|
|
159
|
+
size: '8px'
|
|
160
|
+
}
|
|
161
|
+
});
|
|
112
162
|
});
|
|
@@ -15,56 +15,43 @@ var baseIconButton = {
|
|
|
15
15
|
path: {
|
|
16
16
|
fill: 'dark'
|
|
17
17
|
},
|
|
18
|
-
'&.is-focused': {
|
|
19
|
-
outline: '2px solid',
|
|
20
|
-
outlineColor: 'primary',
|
|
21
|
-
outlineOffset: '3px'
|
|
22
|
-
},
|
|
23
18
|
'&.is-hovered': {
|
|
24
19
|
path: {
|
|
25
|
-
fill:
|
|
20
|
+
fill: 'gray-400'
|
|
26
21
|
},
|
|
27
|
-
backgroundColor: '
|
|
22
|
+
backgroundColor: 'background.secondary'
|
|
28
23
|
},
|
|
29
24
|
'&.is-pressed': {
|
|
30
25
|
backgroundColor: 'gray-800',
|
|
31
26
|
borderColor: 'gray-900',
|
|
32
27
|
path: {
|
|
33
|
-
fill:
|
|
28
|
+
fill: 'gray-400'
|
|
34
29
|
}
|
|
35
30
|
}
|
|
36
31
|
};
|
|
37
32
|
var hintButton = _objectSpread({}, baseIconButton);
|
|
38
33
|
var iconButtons = {
|
|
39
34
|
base: _objectSpread({}, baseIconButton),
|
|
40
|
-
inverted:
|
|
41
|
-
borderColor: 'transparent !important',
|
|
35
|
+
inverted: {
|
|
42
36
|
path: {
|
|
43
37
|
fill: 'black'
|
|
44
38
|
},
|
|
45
39
|
'&.is-pressed': {
|
|
46
|
-
backgroundColor: chroma.mix('white', 'black', 0.125, 'rgb').hex()
|
|
47
|
-
borderColor: chroma.mix('white', 'black', 0.125, 'rgb').hex()
|
|
40
|
+
backgroundColor: chroma.mix('white', 'black', 0.125, 'rgb').hex()
|
|
48
41
|
},
|
|
49
42
|
'&.is-hovered': {
|
|
50
|
-
border: 'none !important',
|
|
51
|
-
borderColor: 'none !important',
|
|
52
43
|
backgroundColor: 'white'
|
|
53
44
|
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
nextGen: {
|
|
45
|
+
},
|
|
46
|
+
searchClearButton: {
|
|
57
47
|
'&.is-hovered': {
|
|
58
|
-
|
|
59
|
-
fill: 'black'
|
|
60
|
-
}
|
|
48
|
+
backgroundColor: 'background.secondary'
|
|
61
49
|
},
|
|
62
50
|
'&.is-pressed': {
|
|
63
|
-
|
|
64
|
-
fill: 'black'
|
|
65
|
-
}
|
|
51
|
+
backgroundColor: 'background.secondary'
|
|
66
52
|
}
|
|
67
53
|
},
|
|
54
|
+
hintButton: hintButton,
|
|
68
55
|
deleteAttachment: {
|
|
69
56
|
backgroundColor: 'background.secondary',
|
|
70
57
|
borderColor: 'border.attachment',
|
|
@@ -15,6 +15,7 @@ var defaultLoaderSize = 16;
|
|
|
15
15
|
var buttonLoaderSize = '0.5em';
|
|
16
16
|
var iFrameContentDivBackgroundColor = '#F7F8FD';
|
|
17
17
|
var defaultIconColor = 'currentColor';
|
|
18
|
+
var defaultIconSize = 'sm';
|
|
18
19
|
export var astroThemeValues = {
|
|
19
20
|
accordionItemDefaultLabelTag: accordionItemDefaultLabelTag,
|
|
20
21
|
activeColor: activeColor,
|
|
@@ -33,5 +34,6 @@ export var astroThemeValues = {
|
|
|
33
34
|
accordionItemMarginLeft: accordionItemMarginLeft,
|
|
34
35
|
defaultLoaderSize: defaultLoaderSize,
|
|
35
36
|
defaultIconColor: defaultIconColor,
|
|
37
|
+
defaultIconSize: defaultIconSize,
|
|
36
38
|
buttonLoaderSize: buttonLoaderSize
|
|
37
39
|
};
|
|
@@ -117,7 +117,7 @@ var badge = {
|
|
|
117
117
|
textColor: nextGenColors.font.base,
|
|
118
118
|
background: nextGenColors['gray-100']
|
|
119
119
|
};
|
|
120
|
-
var tooltip =
|
|
120
|
+
var tooltip = 'black';
|
|
121
121
|
var colors = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, subColors), nextGenColors), overrides), {}, {
|
|
122
122
|
badge: badge,
|
|
123
123
|
card: card,
|
|
@@ -19,6 +19,7 @@ var activeColor = '#1a73e8';
|
|
|
19
19
|
var backgroundBaseColor = 'white';
|
|
20
20
|
var iFrameContentDivBackgroundColor = backgroundBaseColor;
|
|
21
21
|
var defaultIconColor = 'gray-800';
|
|
22
|
+
var defaultIconSize = 'md';
|
|
22
23
|
var buttonLoaderSize = 'sm';
|
|
23
24
|
export var nextGenThemeValues = _objectSpread({
|
|
24
25
|
activeColor: activeColor,
|
|
@@ -32,5 +33,6 @@ export var nextGenThemeValues = _objectSpread({
|
|
|
32
33
|
accordionItemDefaultLabelTag: accordionItemDefaultLabelTag,
|
|
33
34
|
iFrameContentDivBackgroundColor: iFrameContentDivBackgroundColor,
|
|
34
35
|
rockerButtonGap: '0px',
|
|
36
|
+
defaultIconSize: defaultIconSize,
|
|
35
37
|
buttonLoaderSize: buttonLoaderSize
|
|
36
38
|
}, customSizes);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
xxs: '
|
|
3
|
-
'icon-100': '
|
|
4
|
-
xs: '
|
|
5
|
-
'icon-200': '
|
|
6
|
-
sm: '
|
|
7
|
-
'icon-300': '
|
|
8
|
-
md: '
|
|
9
|
-
'icon-400': '
|
|
10
|
-
'icon-500': '
|
|
11
|
-
'icon-600': '
|
|
12
|
-
'icon-700': '
|
|
13
|
-
'icon-800': '
|
|
14
|
-
'icon-900': '
|
|
2
|
+
xxs: '10px',
|
|
3
|
+
'icon-100': '14px',
|
|
4
|
+
xs: '14px',
|
|
5
|
+
'icon-200': '18px',
|
|
6
|
+
sm: '18px',
|
|
7
|
+
'icon-300': '24px',
|
|
8
|
+
md: '24px',
|
|
9
|
+
'icon-400': '36px',
|
|
10
|
+
'icon-500': '48px',
|
|
11
|
+
'icon-600': '60px',
|
|
12
|
+
'icon-700': '72px',
|
|
13
|
+
'icon-800': '84px',
|
|
14
|
+
'icon-900': '96px'
|
|
15
15
|
};
|
|
16
16
|
export var iconWrapperSizes = {
|
|
17
17
|
sm: 18,
|