@geoffcox/sterling-svelte 0.0.17 → 0.0.19

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/TextArea.svelte CHANGED
@@ -1,10 +1,6 @@
1
- <script>import { v4 as uuid } from "uuid";
2
- import Label from "./Label.svelte";
3
- export let value;
1
+ <script>export let autoHeight = false;
4
2
  export let resize = "none";
5
- export let disabled = false;
6
- export let autoHeight = false;
7
- const inputId = uuid();
3
+ export let value;
8
4
  let textAreaRef;
9
5
  const autoSetHeight = () => {
10
6
  if (autoHeight && textAreaRef) {
@@ -19,48 +15,41 @@ $:
19
15
  autoHeight, autoSetHeight();
20
16
  </script>
21
17
 
22
- <div class="sterling-text-area" style={`--TextArea__resize: ${resize};`}>
23
- {#if $$slots.label}
24
- <Label {disabled} for={inputId}>
25
- <slot name="label" />
26
- </Label>
27
- {/if}
28
- <textarea
29
- {...$$restProps}
30
- bind:this={textAreaRef}
31
- bind:value
32
- on:blur
33
- on:click
34
- on:change
35
- on:copy
36
- on:cut
37
- on:paste
38
- on:dblclick
39
- on:focus
40
- on:focusin
41
- on:focusout
42
- on:input
43
- on:invalid
44
- on:keydown
45
- on:keypress
46
- on:keyup
47
- on:mousedown
48
- on:mouseenter
49
- on:mouseleave
50
- on:mousemove
51
- on:mouseover
52
- on:mouseout
53
- on:mouseup
54
- on:select
55
- on:submit
56
- on:reset
57
- on:wheel
58
- on:input={onInput}
59
- {disabled}
60
- rows="1"
61
- {...$$restProps}
62
- />
63
- </div>
18
+ <textarea
19
+ bind:this={textAreaRef}
20
+ class="sterling-text-area"
21
+ rows="1"
22
+ style={`--TextArea__resize: ${resize};`}
23
+ bind:value
24
+ on:blur
25
+ on:click
26
+ on:change
27
+ on:copy
28
+ on:cut
29
+ on:paste
30
+ on:dblclick
31
+ on:focus
32
+ on:focusin
33
+ on:focusout
34
+ on:input
35
+ on:invalid
36
+ on:keydown
37
+ on:keypress
38
+ on:keyup
39
+ on:mousedown
40
+ on:mouseenter
41
+ on:mouseleave
42
+ on:mousemove
43
+ on:mouseover
44
+ on:mouseout
45
+ on:mouseup
46
+ on:select
47
+ on:submit
48
+ on:reset
49
+ on:wheel
50
+ on:input={onInput}
51
+ {...$$restProps}
52
+ />
64
53
 
65
54
  <style>
66
55
  .sterling-text-area {
@@ -71,15 +60,17 @@ $:
71
60
  border-width: var(--stsv-Input__border-width);
72
61
  box-sizing: border-box;
73
62
  color: var(--stsv-Input__color);
74
- overflow: hidden;
75
- width: 100%;
63
+ font: inherit;
64
+ line-height: inherit;
76
65
  height: 100%;
77
- display: grid;
78
- grid-template-columns: 1fr;
79
- grid-template-rows: 1fr;
80
- padding: 0;
66
+ outline: none;
67
+ padding: 0.5em;
81
68
  margin: 0;
69
+ min-height: 3em;
70
+ overflow: hidden;
71
+ resize: var(--TextArea__resize, none);
82
72
  transition: background-color 250ms, color 250ms, border-color 250ms;
73
+ width: 100%;
83
74
  }
84
75
 
85
76
  .sterling-text-area:hover {
@@ -88,7 +79,7 @@ $:
88
79
  color: var(--stsv-Input__color--hover);
89
80
  }
90
81
 
91
- .sterling-text-area:focus-wthin {
82
+ .sterling-text-area:focus {
92
83
  background-color: var(--stsv-Input__background-color--focus);
93
84
  border-color: var(--stsv-Input__border-color--focus);
94
85
  color: var(--stsv-Input__color--focus);
@@ -105,49 +96,17 @@ $:
105
96
  cursor: not-allowed;
106
97
  }
107
98
 
108
- textarea {
109
- background: none;
110
- box-sizing: border-box;
111
- color: inherit;
112
- font: inherit;
113
- line-height: inherit;
114
- padding: 0 0.5em 0.5em 0.5em;
115
- min-height: 3em;
116
- margin: 0.5em 0 0 0;
117
- resize: var(--TextArea__resize, none);
118
- width: 100%;
119
- }
120
-
121
- textarea,
122
- textarea:hover,
123
- textarea:focus-within,
124
- textarea:disabled {
125
- background-color: transparent;
126
- border: none;
127
- outline: none;
128
- }
129
-
130
- textarea::placeholder {
99
+ .sterling-text-area::placeholder {
131
100
  color: var(--stsv-Display__color--faint);
132
101
  transition: background-color 250ms, color 250ms, border-color 250ms;
133
102
  }
134
103
 
135
- textarea:disabled::placeholder {
104
+ .sterling-text-area:disabled::placeholder {
136
105
  color: var(--stsv-Display__color--disabled);
137
106
  }
138
107
 
139
- .sterling-text-area > :global(label) {
140
- font-size: 0.7em;
141
- margin: 0.5em 0 0 0.7em;
142
- }
143
-
144
- .sterling-text-area > :global(label):empty {
145
- margin: 0;
146
- }
147
-
148
108
  @media (prefers-reduced-motion) {
149
- .sterling-text-area,
150
- .sterling-text-area textarea::placeholder {
109
+ .sterling-text-area {
151
110
  transition: none;
152
111
  }
153
112
  }
@@ -3,10 +3,9 @@ import type { TextAreaResize } from './TextArea.types';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- value: string;
7
- resize?: TextAreaResize | undefined;
8
- disabled?: boolean | undefined;
9
6
  autoHeight?: boolean | undefined;
7
+ resize?: TextAreaResize | undefined;
8
+ value: string;
10
9
  };
11
10
  events: {
12
11
  blur: FocusEvent;
@@ -38,9 +37,7 @@ declare const __propDef: {
38
37
  } & {
39
38
  [evt: string]: CustomEvent<any>;
40
39
  };
41
- slots: {
42
- label: {};
43
- };
40
+ slots: {};
44
41
  };
45
42
  export type TextAreaProps = typeof __propDef.props;
46
43
  export type TextAreaEvents = typeof __propDef.events;
package/Tree.svelte CHANGED
@@ -1,10 +1,7 @@
1
1
  <script>import { createKeyborg } from "keyborg";
2
2
  import { createEventDispatcher, onMount, setContext } from "svelte";
3
3
  import { writable } from "svelte/store";
4
- import { v4 as uuid } from "uuid";
5
- import Label from "./Label.svelte";
6
4
  import { treeContextKey } from "./Tree.constants";
7
- const inputId = uuid();
8
5
  export let composed = false;
9
6
  export let disabled = false;
10
7
  export let selectedValue = void 0;
@@ -58,18 +55,12 @@ onMount(() => {
58
55
  <div
59
56
  aria-disabled={disabled}
60
57
  class="sterling-tree"
61
- class:disabled
62
58
  class:composed
59
+ class:disabled
63
60
  class:using-keyboard={usingKeyboard}
61
+ role="tree"
64
62
  >
65
- {#if $$slots.label}
66
- <Label {disabled} for={inputId}>
67
- <slot name="label" />
68
- </Label>
69
- {/if}
70
- <div class="tree" role="tree">
71
- <slot />
72
- </div>
63
+ <slot />
73
64
  </div>
74
65
 
75
66
  <style>
@@ -81,12 +72,14 @@ onMount(() => {
81
72
  border-width: var(--stsv-Common__border-width);
82
73
  box-sizing: border-box;
83
74
  color: var(--stsv-Common__color);
84
- display: grid;
85
- grid-template-columns: 1fr;
86
- grid-template-rows: auto 1fr;
75
+ display: flex;
76
+ flex-direction: column;
77
+ flex-wrap: nowrap;
87
78
  height: 100%;
79
+ overflow-x: hidden;
80
+ overflow-y: scroll;
88
81
  margin: 0;
89
- overflow: hidden;
82
+ position: relative;
90
83
  transition: background-color 250ms, color 250ms, border-color 250ms;
91
84
  }
92
85
 
@@ -112,31 +105,10 @@ onMount(() => {
112
105
  }
113
106
 
114
107
  .sterling-tree.composed,
115
- .sterling-tree:hover.composed,
116
- .sterling-tree:focus-visible.composed,
117
- .sterling-tree.disabled.composed {
118
- background: none;
108
+ .sterling-tree.composed:hover,
109
+ .sterling-tree.composed.using-keyboard:focus-visible,
110
+ .sterling-tree.composed.disabled {
119
111
  border: none;
120
112
  outline: none;
121
113
  }
122
-
123
- .sterling-tree > :global(label) {
124
- font-size: 0.7em;
125
- margin: 0.5em 0.7em;
126
- }
127
-
128
- .sterling-tree > :global(label):empty {
129
- margin: 0;
130
- }
131
-
132
- .tree {
133
- display: flex;
134
- flex-direction: column;
135
- flex-wrap: nowrap;
136
- grid-row: 2 / span 1;
137
- overflow-x: hidden;
138
- overflow-y: scroll;
139
- outline: none;
140
- position: relative;
141
- }
142
114
  </style>
package/Tree.svelte.d.ts CHANGED
@@ -13,7 +13,6 @@ declare const __propDef: {
13
13
  [evt: string]: CustomEvent<any>;
14
14
  };
15
15
  slots: {
16
- label: {};
17
16
  default: {};
18
17
  };
19
18
  };
package/index.d.ts CHANGED
@@ -7,10 +7,11 @@ export { applyLightTheme } from './theme/applyLightTheme';
7
7
  export { applyTheme } from './theme/applyTheme';
8
8
  export { darkTheme } from './theme/darkTheme';
9
9
  export { lightTheme } from './theme/lightTheme';
10
- export { neutrals } from './theme/colors';
10
+ export { neutralColors, lightStatusColors, darkStatusColors } from './theme/colors';
11
11
  export { toggleDarkTheme } from './theme/toggleDarkTheme';
12
12
  export { menuBarContextKey, menuItemContextKey } from './Menus.constants';
13
13
  export type { ButtonVariant, ButtonShape } from './Button.types';
14
+ export type { FieldStatus } from './Field.types';
14
15
  export type { ListContext } from './List.types';
15
16
  export type { MenuBarContext, MenuItemContext, MenuItemRegistration } from './Menus.types';
16
17
  export type { ProgressColorful } from './Progress.types';
@@ -24,6 +25,8 @@ export { treeContextKey, treeItemContextKey } from './Tree.constants';
24
25
  import Button from './Button.svelte';
25
26
  import Checkbox from './Checkbox.svelte';
26
27
  import Dialog from './Dialog.svelte';
28
+ import Dropdown from './Dropdown.svelte';
29
+ import Field from './Field.svelte';
27
30
  import Input from './Input.svelte';
28
31
  import Label from './Label.svelte';
29
32
  import List from './List.svelte';
@@ -47,4 +50,4 @@ import Tree from './Tree.svelte';
47
50
  import TreeChevron from './TreeChevron.svelte';
48
51
  import TreeItem from './TreeItem.svelte';
49
52
  import TreeItemDisplay from './TreeItemDisplay.svelte';
50
- export { Button, Checkbox, Dialog, Input, Label, List, ListItem, Menu, MenuBar, MenuButton, MenuItem, MenuItemDisplay, MenuSeparator, Progress, Radio, Select, Slider, Switch, Tab, TabList, TextArea, Tooltip, Tree, TreeChevron, TreeItem, TreeItemDisplay };
53
+ export { Button, Checkbox, Dialog, Dropdown, Field, Input, Label, List, ListItem, Menu, MenuBar, MenuButton, MenuItem, MenuItemDisplay, MenuSeparator, Progress, Radio, Select, Slider, Switch, Tab, TabList, TextArea, Tooltip, Tree, TreeChevron, TreeItem, TreeItemDisplay };
package/index.js CHANGED
@@ -9,7 +9,7 @@ export { applyLightTheme } from './theme/applyLightTheme';
9
9
  export { applyTheme } from './theme/applyTheme';
10
10
  export { darkTheme } from './theme/darkTheme';
11
11
  export { lightTheme } from './theme/lightTheme';
12
- export { neutrals } from './theme/colors';
12
+ export { neutralColors, lightStatusColors, darkStatusColors } from './theme/colors';
13
13
  export { toggleDarkTheme } from './theme/toggleDarkTheme';
14
14
  // ----- Button ----- //
15
15
  export { menuBarContextKey, menuItemContextKey } from './Menus.constants';
@@ -21,6 +21,8 @@ export { treeContextKey, treeItemContextKey } from './Tree.constants';
21
21
  import Button from './Button.svelte';
22
22
  import Checkbox from './Checkbox.svelte';
23
23
  import Dialog from './Dialog.svelte';
24
+ import Dropdown from './Dropdown.svelte';
25
+ import Field from './Field.svelte';
24
26
  import Input from './Input.svelte';
25
27
  import Label from './Label.svelte';
26
28
  import List from './List.svelte';
@@ -44,4 +46,4 @@ import Tree from './Tree.svelte';
44
46
  import TreeChevron from './TreeChevron.svelte';
45
47
  import TreeItem from './TreeItem.svelte';
46
48
  import TreeItemDisplay from './TreeItemDisplay.svelte';
47
- export { Button, Checkbox, Dialog, Input, Label, List, ListItem, Menu, MenuBar, MenuButton, MenuItem, MenuItemDisplay, MenuSeparator, Progress, Radio, Select, Slider, Switch, Tab, TabList, TextArea, Tooltip, Tree, TreeChevron, TreeItem, TreeItemDisplay };
49
+ export { Button, Checkbox, Dialog, Dropdown, Field, Input, Label, List, ListItem, Menu, MenuBar, MenuButton, MenuItem, MenuItemDisplay, MenuSeparator, Progress, Radio, Select, Slider, Switch, Tab, TabList, TextArea, Tooltip, Tree, TreeChevron, TreeItem, TreeItemDisplay };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geoffcox/sterling-svelte",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "author": "Geoff Cox",
5
5
  "description": "A modern, accessible, and lightweight component library for Svelte.",
6
6
  "license": "MIT",
@@ -55,6 +55,9 @@
55
55
  "./Button.types": "./Button.types.js",
56
56
  "./Checkbox.svelte": "./Checkbox.svelte",
57
57
  "./Dialog.svelte": "./Dialog.svelte",
58
+ "./Dropdown.svelte": "./Dropdown.svelte",
59
+ "./Field.svelte": "./Field.svelte",
60
+ "./Field.types": "./Field.types.js",
58
61
  "./Input.svelte": "./Input.svelte",
59
62
  "./Label.svelte": "./Label.svelte",
60
63
  "./List.constants": "./List.constants.js",
@@ -70,7 +73,6 @@
70
73
  "./Menus.constants": "./Menus.constants.js",
71
74
  "./Menus.types": "./Menus.types.js",
72
75
  "./Menus.utils": "./Menus.utils.js",
73
- "./Portal.svelte": "./Portal.svelte",
74
76
  "./Progress.svelte": "./Progress.svelte",
75
77
  "./Progress.types": "./Progress.types.js",
76
78
  "./Radio.svelte": "./Radio.svelte",
package/theme/colors.d.ts CHANGED
@@ -1 +1,53 @@
1
- export declare const neutrals: Record<string, string>;
1
+ export declare const neutralColors: Record<string, string>;
2
+ /**
3
+ * Status colors for a light theme.
4
+ * These are carefully chosen colors to meet the minimum 4.5:1 accessibility contrast ratio.
5
+ */
6
+ export declare const lightStatusColors: {
7
+ info: {
8
+ backgroundColor: string;
9
+ borderColor: string;
10
+ color: string;
11
+ };
12
+ success: {
13
+ backgroundColor: string;
14
+ borderColor: string;
15
+ color: string;
16
+ };
17
+ warning: {
18
+ backgroundColor: string;
19
+ borderColor: string;
20
+ color: string;
21
+ };
22
+ error: {
23
+ backgroundColor: string;
24
+ borderColor: string;
25
+ color: string;
26
+ };
27
+ };
28
+ /**
29
+ * Status colors for a dark theme.
30
+ * These are carefully chosen colors to meet the minimum 4.5:1 accessibility contrast ratio.
31
+ */
32
+ export declare const darkStatusColors: {
33
+ info: {
34
+ backgroundColor: string;
35
+ borderColor: string;
36
+ color: string;
37
+ };
38
+ success: {
39
+ backgroundColor: string;
40
+ borderColor: string;
41
+ color: string;
42
+ };
43
+ warning: {
44
+ backgroundColor: string;
45
+ borderColor: string;
46
+ color: string;
47
+ };
48
+ error: {
49
+ backgroundColor: string;
50
+ borderColor: string;
51
+ color: string;
52
+ };
53
+ };
package/theme/colors.js CHANGED
@@ -1,4 +1,4 @@
1
- export const neutrals = {
1
+ export const neutralColors = {
2
2
  neutral0: 'hsl(0, 0%, 0%)',
3
3
  neutral10: 'hsl(0, 0%, 12%)',
4
4
  neutral15: 'hsl(0, 0%, 15%)',
@@ -13,3 +13,55 @@ export const neutrals = {
13
13
  neutral98: 'hsl(0, 0%, 98%)',
14
14
  neutral100: 'hsl(0, 0%, 100%)'
15
15
  };
16
+ /**
17
+ * Status colors for a light theme.
18
+ * These are carefully chosen colors to meet the minimum 4.5:1 accessibility contrast ratio.
19
+ */
20
+ export const lightStatusColors = {
21
+ info: {
22
+ backgroundColor: 'hsl(198, 100%, 90%)',
23
+ borderColor: 'hsl(198, 100%, 40%)',
24
+ color: 'hsl(198, 100%, 40%)'
25
+ },
26
+ success: {
27
+ backgroundColor: 'hsl(146, 100%, 90%)',
28
+ borderColor: 'hsl(146, 100%, 30%)',
29
+ color: 'hsl(146, 80%, 25%)'
30
+ },
31
+ warning: {
32
+ backgroundColor: 'hsl(39, 100%, 80%)',
33
+ borderColor: 'hsl(39, 100%, 45%)',
34
+ color: 'hsl(39, 100%, 25%)'
35
+ },
36
+ error: {
37
+ backgroundColor: 'hsl(5, 100%, 90%)',
38
+ borderColor: 'hsl(5, 100%, 40%)',
39
+ color: 'hsl(5, 80%, 40%)'
40
+ }
41
+ };
42
+ /**
43
+ * Status colors for a dark theme.
44
+ * These are carefully chosen colors to meet the minimum 4.5:1 accessibility contrast ratio.
45
+ */
46
+ export const darkStatusColors = {
47
+ info: {
48
+ backgroundColor: 'hsl(198, 100%, 10%)',
49
+ borderColor: 'hsl(198, 100%, 40%)',
50
+ color: 'hsl(198, 80%, 50%)'
51
+ },
52
+ success: {
53
+ backgroundColor: 'hsl(146, 100%, 10%)',
54
+ borderColor: 'hsl(146, 100%, 30%)',
55
+ color: 'hsl(146, 100%, 40%)'
56
+ },
57
+ warning: {
58
+ backgroundColor: 'hsl(39, 100%, 10%)',
59
+ borderColor: 'hsl(39, 100%, 45%)',
60
+ color: 'hsl(39, 100%, 50%)'
61
+ },
62
+ error: {
63
+ backgroundColor: 'hsl(5, 100%, 10%)',
64
+ borderColor: 'hsl(5, 100%, 40%)',
65
+ color: 'hsl(5, 100%, 50%)'
66
+ }
67
+ };
@@ -1,84 +1,91 @@
1
- import { neutrals } from './colors';
1
+ import { darkStatusColors, neutralColors } from './colors';
2
2
  export const darkTheme = {
3
3
  // ----- Common ---- //
4
- '--stsv-Common__background-color': neutrals.neutral15,
5
- '--stsv-Common__border-color': neutrals.neutral92,
4
+ '--stsv-Common__background-color': neutralColors.neutral15,
5
+ '--stsv-Common__border-color': neutralColors.neutral92,
6
6
  '--stsv-Common__border-radius': '0',
7
7
  '--stsv-Common__border-style': 'solid',
8
8
  '--stsv-Common__border-width': '2px',
9
- '--stsv-Common__color': neutrals.neutral100,
9
+ '--stsv-Common__color': neutralColors.neutral100,
10
10
  // hover
11
- '--stsv-Common__background-color--hover': neutrals.neutral15,
12
- '--stsv-Common__border-color--hover': neutrals.neutral96,
13
- '--stsv-Common__color--hover': neutrals.neutral100,
11
+ '--stsv-Common__background-color--hover': neutralColors.neutral15,
12
+ '--stsv-Common__border-color--hover': neutralColors.neutral96,
13
+ '--stsv-Common__color--hover': neutralColors.neutral100,
14
14
  // focus
15
- '--stsv-Common__background-color--focus': neutrals.neutral45,
16
- '--stsv-Common__border-color--focus': neutrals.neutral100,
17
- '--stsv-Common__color--focus': neutrals.neutral100,
15
+ '--stsv-Common__background-color--focus': neutralColors.neutral45,
16
+ '--stsv-Common__border-color--focus': neutralColors.neutral100,
17
+ '--stsv-Common__color--focus': neutralColors.neutral100,
18
18
  // outline
19
- '--stsv-Common__outline-color': neutrals.neutral100,
19
+ '--stsv-Common__outline-color': neutralColors.neutral100,
20
20
  '--stsv-Common__outline-offset': '0',
21
21
  '--stsv-Common__outline-style': 'solid',
22
22
  '--stsv-Common__outline-width': '2px',
23
23
  // disabled
24
- '--stsv-Common__background-color--disabled': neutrals.neutral45,
25
- '--stsv-Common__border-color--disabled': neutrals.neutral92,
26
- '--stsv-Common__color--disabled': neutrals.neutral60,
24
+ '--stsv-Common__background-color--disabled': neutralColors.neutral45,
25
+ '--stsv-Common__border-color--disabled': neutralColors.neutral92,
26
+ '--stsv-Common__color--disabled': neutralColors.neutral60,
27
27
  // ----- Layer ---- //
28
- '--stsv-Layer__background-color--1': neutrals.neutral20,
29
- '--stsv-Layer__color--1': neutrals.neutral100,
30
- '--stsv-Layer__background-color--2': neutrals.neutral10,
31
- '--stsv-Layer__color--2': neutrals.neutral100,
32
- '--stsv-Layer__background-color--3': neutrals.neutral45,
33
- '--stsv-Layer__color--3': neutrals.neutral100,
28
+ '--stsv-Layer__background-color--1': neutralColors.neutral20,
29
+ '--stsv-Layer__color--1': neutralColors.neutral100,
30
+ '--stsv-Layer__background-color--2': neutralColors.neutral10,
31
+ '--stsv-Layer__color--2': neutralColors.neutral100,
32
+ '--stsv-Layer__background-color--3': neutralColors.neutral45,
33
+ '--stsv-Layer__color--3': neutralColors.neutral100,
34
34
  // ----- Button ----- //
35
- '--stsv-Button__background-color': neutrals.neutral30,
36
- '--stsv-Button__border-color': neutrals.neutral92,
35
+ '--stsv-Button__background-color': neutralColors.neutral30,
36
+ '--stsv-Button__border-color': neutralColors.neutral92,
37
37
  '--stsv-Button__border-radius': '8px',
38
38
  '--stsv-Button__border-style': 'solid',
39
39
  '--stsv-Button__border-width': '2px',
40
- '--stsv-Button__color': neutrals.neutral100,
40
+ '--stsv-Button__color': neutralColors.neutral100,
41
41
  // hover
42
- '--stsv-Button__background-color--hover': neutrals.neutral45,
43
- '--stsv-Button__border-color--hover': neutrals.neutral96,
44
- '--stsv-Button__color--hover': neutrals.neutral100,
42
+ '--stsv-Button__background-color--hover': neutralColors.neutral45,
43
+ '--stsv-Button__border-color--hover': neutralColors.neutral96,
44
+ '--stsv-Button__color--hover': neutralColors.neutral100,
45
45
  // active
46
- '--stsv-Button__background-color--active': neutrals.neutral60,
47
- '--stsv-Button__border-color--active': neutrals.neutral98,
48
- '--stsv-Button__color--active': neutrals.neutral98,
46
+ '--stsv-Button__background-color--active': neutralColors.neutral60,
47
+ '--stsv-Button__border-color--active': neutralColors.neutral98,
48
+ '--stsv-Button__color--active': neutralColors.neutral98,
49
49
  // focus
50
- '--stsv-Button__background-color--focus': neutrals.neutral45,
51
- '--stsv-Button__border-color--focus': neutrals.neutral100,
52
- '--stsv-Button__color--focus': neutrals.neutral100,
50
+ '--stsv-Button__background-color--focus': neutralColors.neutral45,
51
+ '--stsv-Button__border-color--focus': neutralColors.neutral100,
52
+ '--stsv-Button__color--focus': neutralColors.neutral100,
53
53
  // ----- Input ----- //
54
- '--stsv-Input__background-color': neutrals.neutral30,
55
- '--stsv-Input__border-color': neutrals.neutral92,
54
+ '--stsv-Input__background-color': neutralColors.neutral30,
55
+ '--stsv-Input__border-color': neutralColors.neutral92,
56
56
  '--stsv-Input__border-radius': '3px',
57
57
  '--stsv-Input__border-style': 'solid',
58
58
  '--stsv-Input__border-width': '2px',
59
- '--stsv-Input__color': neutrals.neutral100,
59
+ '--stsv-Input__color': neutralColors.neutral100,
60
60
  // hover
61
- '--stsv-Input__background-color--hover': neutrals.neutral15,
62
- '--stsv-Input__border-color--hover': neutrals.neutral96,
63
- '--stsv-Input__color--hover': neutrals.neutral100,
61
+ '--stsv-Input__background-color--hover': neutralColors.neutral15,
62
+ '--stsv-Input__border-color--hover': neutralColors.neutral96,
63
+ '--stsv-Input__color--hover': neutralColors.neutral100,
64
64
  // focus
65
- '--stsv-Input__background-color--focus': neutrals.neutral15,
66
- '--stsv-Input__border-color--focus': neutrals.neutral100,
67
- '--stsv-Input__color--focus': neutrals.neutral100,
65
+ '--stsv-Input__background-color--focus': neutralColors.neutral15,
66
+ '--stsv-Input__border-color--focus': neutralColors.neutral100,
67
+ '--stsv-Input__color--focus': neutralColors.neutral100,
68
68
  // selected
69
- '--stsv-Input__background-color--selected': neutrals.neutral60,
70
- '--stsv-Input__border-color--selected': neutrals.neutral98,
71
- '--stsv-Input__color--selected': neutrals.neutral100,
69
+ '--stsv-Input__background-color--selected': neutralColors.neutral60,
70
+ '--stsv-Input__border-color--selected': neutralColors.neutral98,
71
+ '--stsv-Input__color--selected': neutralColors.neutral100,
72
72
  // ----- Display ----- //
73
- '--stsv-Display__background-color': neutrals.neutral30,
74
- '--stsv-Display__border-color': neutrals.neutral92,
75
- '--stsv-Display__color': neutrals.neutral100,
76
- '--stsv-Display__color--subtle': neutrals.neutral96,
77
- '--stsv-Display__color--faint': neutrals.neutral45,
78
- '--stsv-Display__color--disabled': neutrals.neutral45,
79
- '--stsv-Display__color--info': '#025E73',
80
- '--stsv-Display__color--progress': '#0099DD',
81
- '--stsv-Display__color--success': '#03A64A',
82
- '--stsv-Display__color--warning': '#F2A71B',
83
- '--stsv-Display__color--error': '#A62B1F'
73
+ '--stsv-Display__background-color': neutralColors.neutral20,
74
+ '--stsv-Display__border-color': neutralColors.neutral92,
75
+ '--stsv-Display__color': neutralColors.neutral80,
76
+ '--stsv-Display__color--subtle': neutralColors.neutral96,
77
+ '--stsv-Display__color--faint': neutralColors.neutral45,
78
+ '--stsv-Display__color--disabled': neutralColors.neutral45,
79
+ '--stsv-Info__background-color': darkStatusColors.info.backgroundColor,
80
+ '--stsv-Info__border-color': darkStatusColors.info.borderColor,
81
+ '--stsv-Info__color': darkStatusColors.info.color,
82
+ '--stsv-Success__background-color': darkStatusColors.success.backgroundColor,
83
+ '--stsv-Success__border-color': darkStatusColors.success.borderColor,
84
+ '--stsv-Success__color': darkStatusColors.success.color,
85
+ '--stsv-Warning__background-color': darkStatusColors.warning.backgroundColor,
86
+ '--stsv-Warning__border-color': darkStatusColors.warning.borderColor,
87
+ '--stsv-Warning__color': darkStatusColors.warning.color,
88
+ '--stsv-Error__background-color': darkStatusColors.error.backgroundColor,
89
+ '--stsv-Error__border-color': darkStatusColors.error.borderColor,
90
+ '--stsv-Error__color': darkStatusColors.error.color
84
91
  };