@viasat/beam-styles 2.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 +150 -0
- package/all.scss +3 -0
- package/components/accordion.module.scss +166 -0
- package/components/accordion.vars.scss +3 -0
- package/components/actionList.module.scss +211 -0
- package/components/actionList.vars.scss +6 -0
- package/components/alert.module.scss +158 -0
- package/components/aspectRatio.module.scss +21 -0
- package/components/avatar.module.scss +204 -0
- package/components/badge.module.scss +166 -0
- package/components/badgeDot.module.scss +90 -0
- package/components/box.module.scss +127 -0
- package/components/breadcrumbs.module.scss +149 -0
- package/components/button.module.scss +179 -0
- package/components/button.vars.scss +129 -0
- package/components/card.module.scss +232 -0
- package/components/checkbox.module.scss +123 -0
- package/components/chip.module.scss +173 -0
- package/components/chipsGroup.module.scss +13 -0
- package/components/closeButton.module.scss +52 -0
- package/components/combobox.module.scss +243 -0
- package/components/dialog.module.scss +199 -0
- package/components/divider.module.scss +255 -0
- package/components/emptyState.module.scss +61 -0
- package/components/fileUpload.module.scss +282 -0
- package/components/flag.module.scss +11 -0
- package/components/floatingui.module.scss +40 -0
- package/components/header.module.scss +123 -0
- package/components/helperText.module.scss +86 -0
- package/components/icon.module.scss +46 -0
- package/components/icon.vars.scss +31 -0
- package/components/index.scss +40 -0
- package/components/inputChoiceGroup.module.scss +46 -0
- package/components/label.module.scss +67 -0
- package/components/link.module.scss +118 -0
- package/components/list.module.scss +204 -0
- package/components/logo.module.scss +11 -0
- package/components/menu.module.scss +13 -0
- package/components/nativeSelect.module.scss +139 -0
- package/components/navigation.module.scss +156 -0
- package/components/pageHeader.module.scss +93 -0
- package/components/pageLayout.module.scss +38 -0
- package/components/pagination.module.scss +71 -0
- package/components/popover.module.scss +71 -0
- package/components/progressBar.module.scss +107 -0
- package/components/radioButton.module.scss +115 -0
- package/components/segmentedControl.module.scss +212 -0
- package/components/sideNav.module.scss +355 -0
- package/components/slider.module.scss +240 -0
- package/components/spinner.module.scss +261 -0
- package/components/spinner.vars.scss +85 -0
- package/components/stepper.module.scss +255 -0
- package/components/switch.module.scss +194 -0
- package/components/tabs.module.scss +412 -0
- package/components/text.module.scss +112 -0
- package/components/textArea.module.scss +183 -0
- package/components/textField.module.scss +162 -0
- package/components/toast.module.scss +235 -0
- package/components/toastContainer.module.scss +68 -0
- package/components/tooltip.module.scss +112 -0
- package/package.json +47 -0
- package/styles.css +11719 -0
- package/styles.css.map +1 -0
- package/styles.min.css +20 -0
- package/styles.min.css.map +1 -0
- package/utils/animation.scss +13 -0
- package/utils/constants.scss +1 -0
- package/utils/cursors.scss +35 -0
- package/utils/globals.scss +17 -0
- package/utils/helpers.scss +14 -0
- package/utils/index.scss +10 -0
- package/utils/mixins.scss +93 -0
- package/utils/spacing.scss +82 -0
- package/utils/stateLayer.module.scss +55 -0
- package/utils/stateLayerVars.scss +75 -0
- package/utils/tokens.scss +14 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../utils/constants.scss';
|
|
3
|
+
@use '../utils/mixins.scss' as mixins;
|
|
4
|
+
@use '../utils/tokens.scss' as tokens;
|
|
5
|
+
|
|
6
|
+
@import '../../../../tokens/src/lib/components/Tooltip';
|
|
7
|
+
|
|
8
|
+
$tooltipBaseClass: '#{constants.$prefix}tooltip';
|
|
9
|
+
$arrow-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="4" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.75 3.515c.69.647 1.81.647 2.5 0L10 0H0l3.75 3.515Z" fill="%23202E39"/></svg>');
|
|
10
|
+
|
|
11
|
+
$sizes: (
|
|
12
|
+
xs: tokens.$bm-comp-tooltip-size-icon-trigger-xs,
|
|
13
|
+
sm: tokens.$bm-comp-tooltip-size-icon-trigger-sm,
|
|
14
|
+
md: tokens.$bm-comp-tooltip-size-icon-trigger-md,
|
|
15
|
+
lg: tokens.$bm-comp-tooltip-size-icon-trigger-lg,
|
|
16
|
+
xl: tokens.$bm-comp-tooltip-size-icon-trigger-xl,
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
%icon-trigger-base {
|
|
20
|
+
border: none;
|
|
21
|
+
background: none;
|
|
22
|
+
padding: 0;
|
|
23
|
+
margin: 0;
|
|
24
|
+
display: flex;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
color: tokens.$bm-comp-tooltip-color-icon-trigger;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.#{$tooltipBaseClass} {
|
|
30
|
+
z-index: 999;
|
|
31
|
+
|
|
32
|
+
background-color: tokens.$bm-comp-tooltip-color-bg;
|
|
33
|
+
border-radius: tokens.$bm-comp-tooltip-radius;
|
|
34
|
+
|
|
35
|
+
max-width: tokens.$bm-comp-tooltip-size-width;
|
|
36
|
+
padding: tokens.$bm-comp-tooltip-space-y tokens.$bm-comp-tooltip-space-x;
|
|
37
|
+
|
|
38
|
+
color: tokens.$bm-comp-tooltip-color-text;
|
|
39
|
+
font: tokens.$bm-comp-tooltip-typo-body;
|
|
40
|
+
|
|
41
|
+
// doesn't actually directly do anything in CSS;
|
|
42
|
+
// just a sanity check so we don't ever lose this var in prod
|
|
43
|
+
// due to a plugin like purgeCSS
|
|
44
|
+
offset: tokens.$bm-comp-tooltip-space-offset;
|
|
45
|
+
|
|
46
|
+
// animation styling
|
|
47
|
+
// see https://floating-ui.com/docs/useTransition#usetransitionstatus
|
|
48
|
+
transition-property: opacity;
|
|
49
|
+
|
|
50
|
+
&[data-status='open'] {
|
|
51
|
+
transition-duration: 0s;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&[data-status='close'] {
|
|
55
|
+
transition-duration: 0.2s;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&[data-status='initial'],
|
|
59
|
+
&[data-status='close'] {
|
|
60
|
+
opacity: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&__arrow {
|
|
64
|
+
// doesn't actually directly do anything in CSS;
|
|
65
|
+
// just a sanity check so we don't ever lose this var in prod
|
|
66
|
+
// due to a plugin like purgeCSS
|
|
67
|
+
offset: tokens.$bm-comp-tooltip-space-arrow;
|
|
68
|
+
|
|
69
|
+
@include mixins.svg-icon($arrow-mask);
|
|
70
|
+
|
|
71
|
+
// slight scale to prevent gaps
|
|
72
|
+
scale: 1.05;
|
|
73
|
+
|
|
74
|
+
width: tokens.$bm-comp-tooltip-size-arrow-width;
|
|
75
|
+
height: tokens.$bm-comp-tooltip-size-arrow-height;
|
|
76
|
+
background-color: tokens.$bm-comp-tooltip-color-bg;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&__icon-trigger {
|
|
80
|
+
@extend %icon-trigger-base;
|
|
81
|
+
|
|
82
|
+
svg {
|
|
83
|
+
background: none;
|
|
84
|
+
border: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&:focus-visible {
|
|
88
|
+
border-radius: tokens.$bm-sem-radius-round;
|
|
89
|
+
@include mixins.simulated-inset-outline($offset: 0px);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&--disabled {
|
|
93
|
+
opacity: tokens.$bm-sem-opacity-disabled;
|
|
94
|
+
cursor: inherit;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@each $size, $sizeValue in $sizes {
|
|
98
|
+
&--#{$size} {
|
|
99
|
+
border-radius: 100%;
|
|
100
|
+
|
|
101
|
+
// This ensures it works with the slot
|
|
102
|
+
height: $sizeValue;
|
|
103
|
+
width: $sizeValue;
|
|
104
|
+
|
|
105
|
+
svg {
|
|
106
|
+
height: $sizeValue;
|
|
107
|
+
width: $sizeValue;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@viasat/beam-styles",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "SCSS modules and component styles for the Beam Design System",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Viasat",
|
|
7
|
+
"homepage": "https://react.beam.viasat.com/",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://git.viasat.com/vega/beam",
|
|
11
|
+
"directory": "libs/styles"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://git.viasat.com/vega/beam/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"design-system",
|
|
18
|
+
"beam",
|
|
19
|
+
"styles",
|
|
20
|
+
"scss",
|
|
21
|
+
"sass",
|
|
22
|
+
"css",
|
|
23
|
+
"css-modules"
|
|
24
|
+
],
|
|
25
|
+
"main": "./styles.css",
|
|
26
|
+
"module": "./styles.css",
|
|
27
|
+
"exports": {
|
|
28
|
+
".": "./styles.css",
|
|
29
|
+
"./*": "./*"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"**/*.scss",
|
|
33
|
+
"**/*.css",
|
|
34
|
+
"**/*.css.map",
|
|
35
|
+
"README.md"
|
|
36
|
+
],
|
|
37
|
+
"sideEffects": [
|
|
38
|
+
"**/*.css",
|
|
39
|
+
"**/*.scss"
|
|
40
|
+
],
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=18.0.0"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
}
|
|
47
|
+
}
|