@equinor/roma-ui 0.1.0 → 0.1.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 (3) hide show
  1. package/package.json +1 -1
  2. package/select.js +35 -34
  3. package/select.mjs +76 -81
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/roma-ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "exports": {
5
5
  ".": {
6
6
  "import": "./index.mjs",
package/select.js CHANGED
@@ -1,20 +1,21 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("react-aria-components"),u=require("@equinor/eds-core-react"),A=require("@equinor/eds-icons"),n=require("react"),r=require("styled-components"),t=require("@equinor/eds-tokens"),D=r(u.Typography)`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("react-aria-components"),u=require("@equinor/eds-core-react"),D=require("@equinor/eds-icons"),n=require("react"),e=require("@equinor/eds-tokens"),r=require("styled-components"),W=r(u.Typography)`
2
2
  variant={'helper'};
3
3
  group={$group};
4
4
  margin-left: 8px;
5
5
  margin-top: 8px;
6
- `,_=({helperText:e})=>e?o.jsx(D,{group:"input",children:e}):null,W=r(i.Select)`
6
+ color: ${e.tokens.colors.text.static_icons__tertiary.rgba}
7
+ `,_=({helperText:t})=>t?o.jsx(W,{group:"input",variant:"helper",children:t}):null,F=r(i.Select)`
7
8
  --focus-ring-color: red;
8
- --text-color-placeholder: ${t.tokens.colors.text.static_icons__tertiary.rgba};
9
- --highlight-background: ${t.tokens.colors.ui.background__light.rgba};
10
- --highlight-foreground: ${t.tokens.colors.ui.background__light.rgba};
9
+ --text-color-placeholder: ${e.tokens.colors.text.static_icons__tertiary.rgba};
10
+ --highlight-background: ${e.tokens.colors.ui.background__light.rgba};
11
+ --highlight-foreground: ${e.tokens.colors.ui.background__light.rgba};
11
12
  --trigger-width: 300px;
12
- --text-color: ${({$variant:e})=>e==="error"?t.tokens.colors.interactive.danger__text.rgba:e==="success"?t.tokens.colors.interactive.success__text.rgba:e==="warning"?t.tokens.colors.interactive.warning__text.rgba:"#000"};
13
- --label-color: ${({$variant:e})=>e==="error"?t.tokens.colors.interactive.danger__text.rgba:e==="success"?t.tokens.colors.interactive.success__text.rgba:e==="warning"?t.tokens.colors.interactive.warning__text.rgba:t.tokens.colors.text.static_icons__tertiary.rgba};
14
- --outline-color: ${({$variant:e})=>e==="error"?t.tokens.colors.interactive.danger__resting.rgba:e==="success"?t.tokens.colors.interactive.success__resting.rgba:e==="warning"?t.tokens.colors.interactive.warning__resting.rgba:t.tokens.colors.interactive.primary__resting.rgba};
13
+ --text-color: ${({$variant:t})=>t==="error"?e.tokens.colors.interactive.danger__text.rgba:t==="success"?e.tokens.colors.interactive.success__text.rgba:t==="warning"?e.tokens.colors.interactive.warning__text.rgba:"#000"};
14
+ --label-color: ${({$variant:t})=>t==="error"?e.tokens.colors.interactive.danger__text.rgba:t==="success"?e.tokens.colors.interactive.success__text.rgba:t==="warning"?e.tokens.colors.interactive.warning__text.rgba:e.tokens.colors.text.static_icons__tertiary.rgba};
15
+ --outline-color: ${({$variant:t})=>t==="error"?e.tokens.colors.interactive.danger__resting.rgba:t==="success"?e.tokens.colors.interactive.success__resting.rgba:t==="warning"?e.tokens.colors.interactive.warning__resting.rgba:e.tokens.colors.interactive.primary__resting.rgba};
15
16
  outline: none;
16
- `,F=r(i.Button)`
17
- --shadow: inset 0px -1px 0px 0px ${t.tokens.colors.text.static_icons__tertiary.rgba};
17
+ `,K=r(i.Button)`
18
+ --shadow: inset 0px -1px 0px 0px ${e.tokens.colors.text.static_icons__tertiary.rgba};
18
19
  cursor: pointer;
19
20
  max-width: 100%;
20
21
  width: 100%;
@@ -26,25 +27,25 @@
26
27
  overflow: hidden;
27
28
  text-overflow: ellipsis;
28
29
  white-space: nowrap;
29
- background-color: ${({$readonly:e})=>e?t.tokens.colors.ui.background__default.rgba:t.tokens.colors.ui.background__light.rgba};
30
+ background-color: ${({$readonly:t})=>t?e.tokens.colors.ui.background__default.rgba:e.tokens.colors.ui.background__light.rgba};
30
31
  > span {
31
32
  overflow: hidden;
32
33
  text-overflow: ellipsis;
33
34
  white-space: nowrap;
34
35
  }
35
- font-family: ${t.tokens.typography.input.text.fontFamily};
36
- ${({$variant:e,$readonly:a})=>e!=="error"&&!a&&"box-shadow: var(--shadow);"}
36
+ font-family: ${e.tokens.typography.input.text.fontFamily};
37
+ ${({$variant:t,$readonly:a})=>t!=="error"&&!a&&"box-shadow: var(--shadow);"}
37
38
  span[data-placeholder] {
38
- color: ${t.tokens.colors.text.static_icons__tertiary.rgba};
39
+ color: ${e.tokens.colors.text.static_icons__tertiary.rgba};
39
40
  }
40
- height: ${({$density:e})=>e==="compact"?"24px":"36px"};
41
+ height: ${({$density:t})=>t==="compact"?"24px":"36px"};
41
42
 
42
43
  &:not([data-focused], [data-pressed]) {
43
- ${({$variant:e})=>e==="error"&&"outline: 1px solid var(--outline-color) !important;"}
44
+ ${({$variant:t})=>t==="error"&&"outline: 1px solid var(--outline-color) !important;"}
44
45
  }
45
46
  &:focus-visible,
46
47
  &[data-pressed] {
47
- ${({$hasLabel:e})=>!e&&`background-color: ${t.tokens.colors.ui.background__medium.rgba};`}
48
+ ${({$hasLabel:t})=>!t&&`background-color: ${e.tokens.colors.ui.background__medium.rgba};`}
48
49
  }
49
50
  &:focus-within,
50
51
  &[data-pressed] {
@@ -56,7 +57,7 @@
56
57
  color: var(--text-color) !important;
57
58
  cursor: default;
58
59
  }
59
- `,K=r(i.ListBox)`
60
+ `,N=r(i.ListBox)`
60
61
  box-shadow: rgba(0, 0, 0, 0.2) 0px 7px 8px, rgba(0, 0, 0, 0.12) 0px 5px 22px,
61
62
  rgba(0, 0, 0, 0.14) 0px 12px 17px;
62
63
  background-color: var(--eds_ui_background__default, rgba(255, 255, 255, 1));
@@ -77,7 +78,7 @@
77
78
  cursor: pointer;
78
79
  outline: none;
79
80
  padding: 0 24px;
80
- height: ${({$density:e})=>e==="compact"?"32px":"48px"};
81
+ height: ${({$density:t})=>t==="compact"?"32px":"48px"};
81
82
  display: flex;
82
83
  min-width: calc(var(--trigger-width) - 63px);
83
84
  align-items: center;
@@ -90,7 +91,7 @@
90
91
  text-overflow: ellipsis;
91
92
  }
92
93
  &:hover:not([data-disabled]) {
93
- background-color: ${t.tokens.colors.ui.background__medium.rgba};
94
+ background-color: ${e.tokens.colors.ui.background__medium.rgba};
94
95
  }
95
96
 
96
97
  &[data-focus-visible] {
@@ -116,34 +117,34 @@
116
117
  background: var(--highlight-background);
117
118
  color: var(--highlight-foreground);
118
119
  }
119
- `,N=r(i.Label)`
120
- font-size: ${t.tokens.typography.input.label.fontSize};
121
- font-family: ${t.tokens.typography.input.label.fontFamily};
122
- font-weight: ${t.tokens.typography.input.label.fontWeight};
123
- line-height: ${t.tokens.typography.input.label.lineHeight};
124
- text-align: ${t.tokens.typography.input.label.textAlign};
125
- color: ${t.tokens.colors.text.static_icons__tertiary.rgba};
120
+ `,O=r(i.Label)`
121
+ font-size: ${e.tokens.typography.input.label.fontSize};
122
+ font-family: ${e.tokens.typography.input.label.fontFamily};
123
+ font-weight: ${e.tokens.typography.input.label.fontWeight};
124
+ line-height: ${e.tokens.typography.input.label.lineHeight};
125
+ text-align: ${e.tokens.typography.input.label.textAlign};
126
+ color: ${e.tokens.colors.text.static_icons__tertiary.rgba};
126
127
 
127
128
  display: flex;
128
129
  justify-content: space-between;
129
130
  position: relative;
130
131
  margin: 0 8px;
131
- `,O=r(i.Popover)`
132
- --text-color: ${t.tokens.colors.text.static_icons__default.rgba};
133
- --text-color-placeholder: ${t.tokens.colors.text.static_icons__tertiary.rgba};
134
- --highlight-background: ${t.tokens.colors.ui.background__medium.rgba};
132
+ `,U=r(i.Popover)`
133
+ --text-color: ${e.tokens.colors.text.static_icons__default.rgba};
134
+ --text-color-placeholder: ${e.tokens.colors.text.static_icons__tertiary.rgba};
135
+ --highlight-background: ${e.tokens.colors.ui.background__medium.rgba};
135
136
  --highlight-foreground: var(--text-color);
136
137
  font-family: Equinor;
137
138
  max-width: var(--trigger-width);
138
139
  width: 100%;
139
140
  border-radius: 10px;
140
141
  outline: none;
141
- `;f.displayName="StyledListBoxItem";const s={ListBox:K,ListBoxItem:f,Trigger:F,Wrapper:W,Label:N,Popover:O,HelperText:_},U=r.div`
142
+ `;f.displayName="StyledListBoxItem";const s={ListBox:N,ListBoxItem:f,Trigger:K,Wrapper:F,Label:O,Popover:U,HelperText:_},V=r.div`
142
143
  width: 24px;
143
144
  height: 24px;
144
145
  min-width: 18px;
145
146
  margin-right: 2px;
146
147
  cursor: pointer;
147
148
  border-radius: 50%;
148
- background-color: ${({$isHover:e})=>e?t.tokens.colors.interactive.primary__hover_alt.rgba:""};
149
- `,V=n.forwardRef(function({children:e,variant:a,selected:d,onSelectedChange:l,label:g,helperText:y,placeholder:k,items:v,ariaLabel:w,disabledKeys:J,disabled:m,readOnly:p,getValueText:$,onChange:h,showClearButton:Q,...S},L){const[x,j]=n.useState(),{density:B}=u.useEds(),I=n.useMemo(()=>d?`select-option-${d}`:x?`select-option-${x}`:"",[x,d]),q=n.useCallback(R=>{let c=(R??"").toString().replace("select-option-","");c===""&&(c=null),l?l(c):h?h({target:{value:c},currentTarget:{value:c}}):j(c)},[h,l]),T=n.useRef(),C=L??T,[E,H]=n.useState(!1),[M,b]=n.useState(!1),z=()=>{b(!0)},P=()=>{b(!1)};return o.jsxs(s.Wrapper,{onSelectionChange:q,selectedKey:I,$variant:a,autoComplete:"text",placeholder:k??" ",isOpen:p?!1:E,onOpenChange:H,isDisabled:m??p,"aria-label":w,...S,children:[g&&o.jsx(s.Label,{elementType:"label",children:g}),o.jsxs(s.Trigger,{ref:C,$density:B,$variant:a,$readonly:p??!1,"data-readonly":p,$hasLabel:!!g,children:[o.jsx(i.SelectValue,{children:$}),!p&&o.jsx(U,{onMouseEnter:z,onMouseLeave:P,$isHover:M,children:o.jsx(u.Icon,{size:24,data:A.arrow_drop_down,color:t.tokens.colors.interactive.primary__resting.rgba})})]}),o.jsx(s.Popover,{offset:4,UNSTABLE_portalContainer:document.querySelector("#roma-deal")??document.body,children:o.jsx(s.ListBox,{items:v,children:e})}),o.jsx(_,{helperText:y})]})}),G=({value:e,children:a,item:d,...l})=>{const{density:g}=u.useEds();return o.jsx(s.ListBoxItem,{$density:g,id:`select-option-${e}`,value:d,isDisabled:l.disabled,...l,children:a})};exports.Option=G;exports.Select=V;exports.Styled=s;
149
+ background-color: ${({$isHover:t})=>t?e.tokens.colors.interactive.primary__hover_alt.rgba:""};
150
+ `,G=n.forwardRef(function({children:t,variant:a,selected:d,onSelectedChange:l,label:g,helperText:y,placeholder:k,items:v,ariaLabel:w,disabledKeys:Q,disabled:m,readOnly:p,getValueText:$,onChange:h,showClearButton:X,...S},L){const[x,j]=n.useState(),{density:B,rootElement:I}=u.useEds(),T=n.useMemo(()=>d?`select-option-${d}`:x?`select-option-${x}`:"",[x,d]),q=n.useCallback(A=>{let c=(A??"").toString().replace("select-option-","");c===""&&(c=null),l?l(c):h?h({target:{value:c},currentTarget:{value:c}}):j(c)},[h,l]),E=n.useRef(),C=L??E,[H,M]=n.useState(!1),[z,b]=n.useState(!1),P=()=>{b(!0)},R=()=>{b(!1)};return o.jsxs(s.Wrapper,{onSelectionChange:q,selectedKey:T,$variant:a,autoComplete:"text",placeholder:k??" ",isOpen:p?!1:H,onOpenChange:M,isDisabled:m??p,"aria-label":w,...S,children:[g&&o.jsx(s.Label,{elementType:"label",children:g}),o.jsxs(s.Trigger,{ref:C,$density:B,$variant:a,$readonly:p??!1,"data-readonly":p,$hasLabel:!!g,children:[o.jsx(i.SelectValue,{children:$}),!p&&o.jsx(V,{onMouseEnter:P,onMouseLeave:R,$isHover:z,children:o.jsx(u.Icon,{size:24,data:D.arrow_drop_down,color:e.tokens.colors.interactive.primary__resting.rgba})})]}),o.jsx(s.Popover,{offset:4,UNSTABLE_portalContainer:I??document.body,children:o.jsx(s.ListBox,{items:v,children:t})}),o.jsx(_,{helperText:y})]})}),J=({value:t,children:a,item:d,...l})=>{const{density:g}=u.useEds();return o.jsx(s.ListBoxItem,{$density:g,id:`select-option-${t}`,value:d,isDisabled:l.disabled,...l,children:a})};exports.Option=J;exports.Select=G;exports.Styled=s;
package/select.mjs CHANGED
@@ -1,33 +1,28 @@
1
1
  import { jsx as t, jsxs as b } from "react/jsx-runtime";
2
- import { Select as W, Button as q, ListBox as A, ListBoxItem as F, Label as K, Popover as N, SelectValue as U } from "react-aria-components";
3
- import { Typography as V, useEds as x, Icon as G } from "@equinor/eds-core-react";
4
- import { arrow_drop_down as J } from "@equinor/eds-icons";
5
- import { forwardRef as Q, useState as u, useMemo as X, useCallback as Y, useRef as Z } from "react";
2
+ import { Select as A, Button as F, ListBox as K, ListBoxItem as N, Label as q, Popover as U, SelectValue as V } from "react-aria-components";
3
+ import { Typography as G, useEds as x, Icon as J } from "@equinor/eds-core-react";
4
+ import { arrow_drop_down as Q } from "@equinor/eds-icons";
5
+ import { forwardRef as X, useState as u, useMemo as Y, useCallback as Z, useRef as O } from "react";
6
+ import { tokens as e } from "@equinor/eds-tokens";
6
7
  import r from "styled-components";
7
- import { tokens as o } from "@equinor/eds-tokens";
8
- const O = r(V)`
8
+ const ee = r(G)`
9
9
  variant={'helper'};
10
10
  group={$group};
11
11
  margin-left: 8px;
12
12
  margin-top: 8px;
13
- `, _ = ({ helperText: e }) => e ? /* @__PURE__ */ t(
14
- O,
15
- {
16
- group: "input",
17
- children: e
18
- }
19
- ) : null, ee = r(W)`
13
+ color: ${e.colors.text.static_icons__tertiary.rgba}
14
+ `, _ = ({ helperText: o }) => o ? /* @__PURE__ */ t(ee, { group: "input", variant: "helper", children: o }) : null, oe = r(A)`
20
15
  --focus-ring-color: red;
21
- --text-color-placeholder: ${o.colors.text.static_icons__tertiary.rgba};
22
- --highlight-background: ${o.colors.ui.background__light.rgba};
23
- --highlight-foreground: ${o.colors.ui.background__light.rgba};
16
+ --text-color-placeholder: ${e.colors.text.static_icons__tertiary.rgba};
17
+ --highlight-background: ${e.colors.ui.background__light.rgba};
18
+ --highlight-foreground: ${e.colors.ui.background__light.rgba};
24
19
  --trigger-width: 300px;
25
- --text-color: ${({ $variant: e }) => e === "error" ? o.colors.interactive.danger__text.rgba : e === "success" ? o.colors.interactive.success__text.rgba : e === "warning" ? o.colors.interactive.warning__text.rgba : "#000"};
26
- --label-color: ${({ $variant: e }) => e === "error" ? o.colors.interactive.danger__text.rgba : e === "success" ? o.colors.interactive.success__text.rgba : e === "warning" ? o.colors.interactive.warning__text.rgba : o.colors.text.static_icons__tertiary.rgba};
27
- --outline-color: ${({ $variant: e }) => e === "error" ? o.colors.interactive.danger__resting.rgba : e === "success" ? o.colors.interactive.success__resting.rgba : e === "warning" ? o.colors.interactive.warning__resting.rgba : o.colors.interactive.primary__resting.rgba};
20
+ --text-color: ${({ $variant: o }) => o === "error" ? e.colors.interactive.danger__text.rgba : o === "success" ? e.colors.interactive.success__text.rgba : o === "warning" ? e.colors.interactive.warning__text.rgba : "#000"};
21
+ --label-color: ${({ $variant: o }) => o === "error" ? e.colors.interactive.danger__text.rgba : o === "success" ? e.colors.interactive.success__text.rgba : o === "warning" ? e.colors.interactive.warning__text.rgba : e.colors.text.static_icons__tertiary.rgba};
22
+ --outline-color: ${({ $variant: o }) => o === "error" ? e.colors.interactive.danger__resting.rgba : o === "success" ? e.colors.interactive.success__resting.rgba : o === "warning" ? e.colors.interactive.warning__resting.rgba : e.colors.interactive.primary__resting.rgba};
28
23
  outline: none;
29
- `, oe = r(q)`
30
- --shadow: inset 0px -1px 0px 0px ${o.colors.text.static_icons__tertiary.rgba};
24
+ `, te = r(F)`
25
+ --shadow: inset 0px -1px 0px 0px ${e.colors.text.static_icons__tertiary.rgba};
31
26
  cursor: pointer;
32
27
  max-width: 100%;
33
28
  width: 100%;
@@ -39,25 +34,25 @@ const O = r(V)`
39
34
  overflow: hidden;
40
35
  text-overflow: ellipsis;
41
36
  white-space: nowrap;
42
- background-color: ${({ $readonly: e }) => e ? o.colors.ui.background__default.rgba : o.colors.ui.background__light.rgba};
37
+ background-color: ${({ $readonly: o }) => o ? e.colors.ui.background__default.rgba : e.colors.ui.background__light.rgba};
43
38
  > span {
44
39
  overflow: hidden;
45
40
  text-overflow: ellipsis;
46
41
  white-space: nowrap;
47
42
  }
48
- font-family: ${o.typography.input.text.fontFamily};
49
- ${({ $variant: e, $readonly: i }) => e !== "error" && !i && "box-shadow: var(--shadow);"}
43
+ font-family: ${e.typography.input.text.fontFamily};
44
+ ${({ $variant: o, $readonly: i }) => o !== "error" && !i && "box-shadow: var(--shadow);"}
50
45
  span[data-placeholder] {
51
- color: ${o.colors.text.static_icons__tertiary.rgba};
46
+ color: ${e.colors.text.static_icons__tertiary.rgba};
52
47
  }
53
- height: ${({ $density: e }) => e === "compact" ? "24px" : "36px"};
48
+ height: ${({ $density: o }) => o === "compact" ? "24px" : "36px"};
54
49
 
55
50
  &:not([data-focused], [data-pressed]) {
56
- ${({ $variant: e }) => e === "error" && "outline: 1px solid var(--outline-color) !important;"}
51
+ ${({ $variant: o }) => o === "error" && "outline: 1px solid var(--outline-color) !important;"}
57
52
  }
58
53
  &:focus-visible,
59
54
  &[data-pressed] {
60
- ${({ $hasLabel: e }) => !e && `background-color: ${o.colors.ui.background__medium.rgba};`}
55
+ ${({ $hasLabel: o }) => !o && `background-color: ${e.colors.ui.background__medium.rgba};`}
61
56
  }
62
57
  &:focus-within,
63
58
  &[data-pressed] {
@@ -69,7 +64,7 @@ const O = r(V)`
69
64
  color: var(--text-color) !important;
70
65
  cursor: default;
71
66
  }
72
- `, te = r(A)`
67
+ `, re = r(K)`
73
68
  box-shadow: rgba(0, 0, 0, 0.2) 0px 7px 8px, rgba(0, 0, 0, 0.12) 0px 5px 22px,
74
69
  rgba(0, 0, 0, 0.14) 0px 12px 17px;
75
70
  background-color: var(--eds_ui_background__default, rgba(255, 255, 255, 1));
@@ -86,11 +81,11 @@ const O = r(V)`
86
81
  .react-aria-Header {
87
82
  padding-left: 1.571rem;
88
83
  }
89
- `, f = r(F)`
84
+ `, f = r(N)`
90
85
  cursor: pointer;
91
86
  outline: none;
92
87
  padding: 0 24px;
93
- height: ${({ $density: e }) => e === "compact" ? "32px" : "48px"};
88
+ height: ${({ $density: o }) => o === "compact" ? "32px" : "48px"};
94
89
  display: flex;
95
90
  min-width: calc(var(--trigger-width) - 63px);
96
91
  align-items: center;
@@ -103,7 +98,7 @@ const O = r(V)`
103
98
  text-overflow: ellipsis;
104
99
  }
105
100
  &:hover:not([data-disabled]) {
106
- background-color: ${o.colors.ui.background__medium.rgba};
101
+ background-color: ${e.colors.ui.background__medium.rgba};
107
102
  }
108
103
 
109
104
  &[data-focus-visible] {
@@ -129,22 +124,22 @@ const O = r(V)`
129
124
  background: var(--highlight-background);
130
125
  color: var(--highlight-foreground);
131
126
  }
132
- `, re = r(K)`
133
- font-size: ${o.typography.input.label.fontSize};
134
- font-family: ${o.typography.input.label.fontFamily};
135
- font-weight: ${o.typography.input.label.fontWeight};
136
- line-height: ${o.typography.input.label.lineHeight};
137
- text-align: ${o.typography.input.label.textAlign};
138
- color: ${o.colors.text.static_icons__tertiary.rgba};
127
+ `, ie = r(q)`
128
+ font-size: ${e.typography.input.label.fontSize};
129
+ font-family: ${e.typography.input.label.fontFamily};
130
+ font-weight: ${e.typography.input.label.fontWeight};
131
+ line-height: ${e.typography.input.label.lineHeight};
132
+ text-align: ${e.typography.input.label.textAlign};
133
+ color: ${e.colors.text.static_icons__tertiary.rgba};
139
134
 
140
135
  display: flex;
141
136
  justify-content: space-between;
142
137
  position: relative;
143
138
  margin: 0 8px;
144
- `, ie = r(N)`
145
- --text-color: ${o.colors.text.static_icons__default.rgba};
146
- --text-color-placeholder: ${o.colors.text.static_icons__tertiary.rgba};
147
- --highlight-background: ${o.colors.ui.background__medium.rgba};
139
+ `, ae = r(U)`
140
+ --text-color: ${e.colors.text.static_icons__default.rgba};
141
+ --text-color-placeholder: ${e.colors.text.static_icons__tertiary.rgba};
142
+ --highlight-background: ${e.colors.ui.background__medium.rgba};
148
143
  --highlight-foreground: var(--text-color);
149
144
  font-family: Equinor;
150
145
  max-width: var(--trigger-width);
@@ -154,91 +149,91 @@ const O = r(V)`
154
149
  `;
155
150
  f.displayName = "StyledListBoxItem";
156
151
  const s = {
157
- ListBox: te,
152
+ ListBox: re,
158
153
  ListBoxItem: f,
159
- Trigger: oe,
160
- Wrapper: ee,
161
- Label: re,
162
- Popover: ie,
154
+ Trigger: te,
155
+ Wrapper: oe,
156
+ Label: ie,
157
+ Popover: ae,
163
158
  HelperText: _
164
- }, ae = r.div`
159
+ }, ne = r.div`
165
160
  width: 24px;
166
161
  height: 24px;
167
162
  min-width: 18px;
168
163
  margin-right: 2px;
169
164
  cursor: pointer;
170
165
  border-radius: 50%;
171
- background-color: ${({ $isHover: e }) => e ? o.colors.interactive.primary__hover_alt.rgba : ""};
172
- `, xe = Q(function({
173
- children: e,
166
+ background-color: ${({ $isHover: o }) => o ? e.colors.interactive.primary__hover_alt.rgba : ""};
167
+ `, _e = X(function({
168
+ children: o,
174
169
  variant: i,
175
170
  selected: l,
176
171
  onSelectedChange: a,
177
172
  label: c,
178
173
  helperText: m,
179
174
  placeholder: y,
180
- items: w,
181
- ariaLabel: v,
182
- disabledKeys: ne,
175
+ items: v,
176
+ ariaLabel: w,
177
+ disabledKeys: se,
183
178
  disabled: $,
184
179
  readOnly: d,
185
180
  getValueText: k,
186
181
  onChange: p,
187
- showClearButton: se,
182
+ showClearButton: le,
188
183
  ...L
189
184
  }, S) {
190
- const [g, B] = u(), { density: I } = x(), T = X(() => l ? `select-option-${l}` : g ? `select-option-${g}` : "", [g, l]), H = Y(
191
- (R) => {
192
- let n = (R ?? "").toString().replace("select-option-", "");
185
+ const [g, B] = u(), { density: I, rootElement: T } = x(), E = Y(() => l ? `select-option-${l}` : g ? `select-option-${g}` : "", [g, l]), H = Z(
186
+ (W) => {
187
+ let n = (W ?? "").toString().replace("select-option-", "");
193
188
  n === "" && (n = null), a ? a(n) : p ? p({
194
189
  target: { value: n },
195
190
  currentTarget: { value: n }
196
191
  }) : B(n);
197
192
  },
198
193
  [p, a]
199
- ), E = Z(), M = S ?? E, [j, z] = u(!1), [C, h] = u(!1), D = () => {
194
+ ), M = O(), j = S ?? M, [z, C] = u(!1), [D, h] = u(!1), P = () => {
200
195
  h(!0);
201
- }, P = () => {
196
+ }, R = () => {
202
197
  h(!1);
203
198
  };
204
199
  return /* @__PURE__ */ b(
205
200
  s.Wrapper,
206
201
  {
207
202
  onSelectionChange: H,
208
- selectedKey: T,
203
+ selectedKey: E,
209
204
  $variant: i,
210
205
  autoComplete: "text",
211
206
  placeholder: y ?? " ",
212
- isOpen: d ? !1 : j,
213
- onOpenChange: z,
207
+ isOpen: d ? !1 : z,
208
+ onOpenChange: C,
214
209
  isDisabled: $ ?? d,
215
- "aria-label": v,
210
+ "aria-label": w,
216
211
  ...L,
217
212
  children: [
218
213
  c && /* @__PURE__ */ t(s.Label, { elementType: "label", children: c }),
219
214
  /* @__PURE__ */ b(
220
215
  s.Trigger,
221
216
  {
222
- ref: M,
217
+ ref: j,
223
218
  $density: I,
224
219
  $variant: i,
225
220
  $readonly: d ?? !1,
226
221
  "data-readonly": d,
227
222
  $hasLabel: !!c,
228
223
  children: [
229
- /* @__PURE__ */ t(U, { children: k }),
224
+ /* @__PURE__ */ t(V, { children: k }),
230
225
  !d && /* @__PURE__ */ t(
231
- ae,
226
+ ne,
232
227
  {
233
- onMouseEnter: D,
234
- onMouseLeave: P,
235
- $isHover: C,
228
+ onMouseEnter: P,
229
+ onMouseLeave: R,
230
+ $isHover: D,
236
231
  children: /* @__PURE__ */ t(
237
- G,
232
+ J,
238
233
  {
239
234
  size: 24,
240
- data: J,
241
- color: o.colors.interactive.primary__resting.rgba
235
+ data: Q,
236
+ color: e.colors.interactive.primary__resting.rgba
242
237
  }
243
238
  )
244
239
  }
@@ -250,16 +245,16 @@ const s = {
250
245
  s.Popover,
251
246
  {
252
247
  offset: 4,
253
- UNSTABLE_portalContainer: document.querySelector("#roma-deal") ?? document.body,
254
- children: /* @__PURE__ */ t(s.ListBox, { items: w, children: e })
248
+ UNSTABLE_portalContainer: T ?? document.body,
249
+ children: /* @__PURE__ */ t(s.ListBox, { items: v, children: o })
255
250
  }
256
251
  ),
257
252
  /* @__PURE__ */ t(_, { helperText: m })
258
253
  ]
259
254
  }
260
255
  );
261
- }), _e = ({
262
- value: e,
256
+ }), fe = ({
257
+ value: o,
263
258
  children: i,
264
259
  item: l,
265
260
  ...a
@@ -269,7 +264,7 @@ const s = {
269
264
  s.ListBoxItem,
270
265
  {
271
266
  $density: c,
272
- id: `select-option-${e}`,
267
+ id: `select-option-${o}`,
273
268
  value: l,
274
269
  isDisabled: a.disabled,
275
270
  ...a,
@@ -278,7 +273,7 @@ const s = {
278
273
  );
279
274
  };
280
275
  export {
281
- _e as Option,
282
- xe as Select,
276
+ fe as Option,
277
+ _e as Select,
283
278
  s as Styled
284
279
  };