@ni/ok-components 1.12.2 → 1.12.3
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/dist/all-components-bundle.js +56 -41
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +53 -38
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/fv/split-button/index.d.ts +2 -2
- package/dist/esm/fv/split-button/index.js +4 -4
- package/dist/esm/fv/split-button/index.js.map +1 -1
- package/dist/esm/fv/split-button/styles.js +51 -36
- package/dist/esm/fv/split-button/styles.js.map +1 -1
- package/dist/esm/fv/split-button/template.js +2 -2
- package/dist/esm/fv/split-button/template.js.map +1 -1
- package/package.json +1 -1
|
@@ -20051,8 +20051,6 @@ const x8=It`
|
|
|
20051
20051
|
|
|
20052
20052
|
:host {
|
|
20053
20053
|
--ni-private-ok-fv-split-button-background-image: none;
|
|
20054
|
-
--ni-private-ok-fv-split-button-background-size: 100% 100%;
|
|
20055
|
-
--ni-private-ok-fv-split-button-background-size-emphasis: 100% 100%;
|
|
20056
20054
|
--ni-private-ok-fv-split-button-border: rgba(${Jl}, 0.3);
|
|
20057
20055
|
--ni-private-ok-fv-split-button-color: ${Hd};
|
|
20058
20056
|
position: relative;
|
|
@@ -20070,7 +20068,6 @@ const x8=It`
|
|
|
20070
20068
|
rgba(${dc}, 0.1)
|
|
20071
20069
|
);
|
|
20072
20070
|
--ni-private-ok-fv-split-button-border: rgba(${dc}, 0.1);
|
|
20073
|
-
--ni-private-ok-fv-split-button-background-size-emphasis: calc(100% - 4px) calc(100% - 4px);
|
|
20074
20071
|
}
|
|
20075
20072
|
|
|
20076
20073
|
:host([appearance='outline'][appearance-variant='primary']) {
|
|
@@ -20107,6 +20104,16 @@ const x8=It`
|
|
|
20107
20104
|
height: 100%;
|
|
20108
20105
|
}
|
|
20109
20106
|
|
|
20107
|
+
.split-button-container::before {
|
|
20108
|
+
content: '';
|
|
20109
|
+
position: absolute;
|
|
20110
|
+
inset: 0;
|
|
20111
|
+
border: ${Hc} solid var(--ni-private-ok-fv-split-button-border);
|
|
20112
|
+
background-image: var(--ni-private-ok-fv-split-button-background-image);
|
|
20113
|
+
background-repeat: no-repeat;
|
|
20114
|
+
pointer-events: none;
|
|
20115
|
+
}
|
|
20116
|
+
|
|
20110
20117
|
.split-button-primary,
|
|
20111
20118
|
.split-button-toggle {
|
|
20112
20119
|
appearance: none;
|
|
@@ -20115,12 +20122,12 @@ const x8=It`
|
|
|
20115
20122
|
height: 100%;
|
|
20116
20123
|
box-sizing: border-box;
|
|
20117
20124
|
margin: 0;
|
|
20118
|
-
border: ${Hc} solid
|
|
20125
|
+
border: ${Hc} solid transparent;
|
|
20119
20126
|
background-color: transparent;
|
|
20120
|
-
background-image: var(--ni-private-ok-fv-split-button-background-image);
|
|
20121
20127
|
background-position: center;
|
|
20122
20128
|
background-repeat: no-repeat;
|
|
20123
|
-
background-
|
|
20129
|
+
background-origin: border-box;
|
|
20130
|
+
background-size: 100% 100%;
|
|
20124
20131
|
color: var(--ni-private-ok-fv-split-button-color);
|
|
20125
20132
|
fill: currentcolor;
|
|
20126
20133
|
font: ${Vd};
|
|
@@ -20145,7 +20152,7 @@ const x8=It`
|
|
|
20145
20152
|
|
|
20146
20153
|
.split-button-primary {
|
|
20147
20154
|
padding: 0 ${Nc};
|
|
20148
|
-
|
|
20155
|
+
padding-inline-end: ${Pc};
|
|
20149
20156
|
white-space: nowrap;
|
|
20150
20157
|
}
|
|
20151
20158
|
|
|
@@ -20155,8 +20162,17 @@ const x8=It`
|
|
|
20155
20162
|
display: inline-flex;
|
|
20156
20163
|
align-items: center;
|
|
20157
20164
|
justify-content: center;
|
|
20158
|
-
|
|
20159
|
-
|
|
20165
|
+
padding: 0;
|
|
20166
|
+
}
|
|
20167
|
+
|
|
20168
|
+
.split-button-toggle::after {
|
|
20169
|
+
content: '';
|
|
20170
|
+
position: absolute;
|
|
20171
|
+
inset-block: ${Bc};
|
|
20172
|
+
inset-inline-start: calc(-1 * ${Hc});
|
|
20173
|
+
width: calc(2 * ${Hc});
|
|
20174
|
+
background: rgba(${dc}, 0.1);
|
|
20175
|
+
pointer-events: none;
|
|
20160
20176
|
}
|
|
20161
20177
|
|
|
20162
20178
|
.split-button-toggle > * {
|
|
@@ -20164,40 +20180,31 @@ const x8=It`
|
|
|
20164
20180
|
${vc.cssCustomProperty}: currentColor;
|
|
20165
20181
|
}
|
|
20166
20182
|
|
|
20167
|
-
:host([appearance='ghost']) .split-button-primary,
|
|
20168
|
-
:host([appearance='ghost']) .split-button-toggle {
|
|
20169
|
-
border-color: transparent;
|
|
20170
|
-
box-shadow: none;
|
|
20171
|
-
}
|
|
20172
|
-
|
|
20173
20183
|
slot[name='menu']::slotted(*) {
|
|
20174
20184
|
min-width: 100%;
|
|
20175
|
-
margin:
|
|
20185
|
+
margin: ${Bc} 0 0;
|
|
20176
20186
|
}
|
|
20177
20187
|
}
|
|
20178
20188
|
|
|
20179
20189
|
@layer hover {
|
|
20180
|
-
.split-button-primary:hover,
|
|
20181
|
-
.split-button-toggle:hover {
|
|
20190
|
+
.split-button-primary:enabled:hover,
|
|
20191
|
+
.split-button-toggle:enabled:hover {
|
|
20182
20192
|
border-color: ${gc};
|
|
20183
20193
|
box-shadow: 0 0 0 ${Hc} ${gc} inset;
|
|
20184
|
-
background-size: var(--ni-private-ok-fv-split-button-background-size-emphasis);
|
|
20185
20194
|
z-index: 1;
|
|
20186
20195
|
}
|
|
20187
20196
|
|
|
20188
|
-
|
|
20189
|
-
|
|
20190
|
-
|
|
20191
|
-
box-shadow: 0 0 0 ${Hc} ${gc} inset;
|
|
20197
|
+
.split-button-primary:enabled:hover + .split-button-toggle::after,
|
|
20198
|
+
.split-button-toggle:enabled:hover::after {
|
|
20199
|
+
visibility: hidden;
|
|
20192
20200
|
}
|
|
20193
20201
|
}
|
|
20194
20202
|
|
|
20195
20203
|
@layer focusVisible {
|
|
20196
|
-
.split-button-primary:focus-visible,
|
|
20197
|
-
.split-button-toggle:focus-visible {
|
|
20204
|
+
.split-button-primary:enabled:focus-visible,
|
|
20205
|
+
.split-button-toggle:enabled:focus-visible {
|
|
20198
20206
|
border-color: ${gc};
|
|
20199
20207
|
box-shadow: 0 0 0 ${Hc} ${gc} inset;
|
|
20200
|
-
background-size: var(--ni-private-ok-fv-split-button-background-size-emphasis);
|
|
20201
20208
|
z-index: 1;
|
|
20202
20209
|
}
|
|
20203
20210
|
|
|
@@ -20206,16 +20213,15 @@ const x8=It`
|
|
|
20206
20213
|
outline: ${Hc} solid ${gc};
|
|
20207
20214
|
}
|
|
20208
20215
|
|
|
20209
|
-
|
|
20210
|
-
|
|
20211
|
-
|
|
20212
|
-
box-shadow: 0 0 0 ${Hc} ${gc} inset;
|
|
20216
|
+
.split-button-primary:focus-visible + .split-button-toggle::after,
|
|
20217
|
+
.split-button-toggle:focus-visible::after {
|
|
20218
|
+
visibility: hidden;
|
|
20213
20219
|
}
|
|
20214
20220
|
}
|
|
20215
20221
|
|
|
20216
20222
|
@layer active {
|
|
20217
|
-
.split-button-primary:active,
|
|
20218
|
-
.split-button-toggle:active,
|
|
20223
|
+
.split-button-primary:enabled:active,
|
|
20224
|
+
.split-button-toggle:enabled:active,
|
|
20219
20225
|
:host([open]) .split-button-toggle {
|
|
20220
20226
|
border-color: ${gc};
|
|
20221
20227
|
box-shadow: none;
|
|
@@ -20223,10 +20229,19 @@ const x8=It`
|
|
|
20223
20229
|
background-size: calc(100% - 2px) calc(100% - 2px);
|
|
20224
20230
|
}
|
|
20225
20231
|
|
|
20226
|
-
:host([
|
|
20227
|
-
|
|
20232
|
+
:host([open]) .split-button-toggle {
|
|
20233
|
+
border-color: rgba(${rc}, 0.3);
|
|
20234
|
+
background-size: 100% 100%;
|
|
20235
|
+
}
|
|
20236
|
+
|
|
20237
|
+
:host([open]) .split-button-toggle::after {
|
|
20238
|
+
visibility: hidden;
|
|
20239
|
+
}
|
|
20240
|
+
|
|
20241
|
+
:host([appearance='block']) .split-button-primary:enabled:active,
|
|
20242
|
+
:host([appearance='block']) .split-button-toggle:enabled:active,
|
|
20228
20243
|
:host([appearance='block'][open]) .split-button-toggle {
|
|
20229
|
-
background-
|
|
20244
|
+
background-color: ${Ql};
|
|
20230
20245
|
}
|
|
20231
20246
|
|
|
20232
20247
|
:host([appearance='outline'][appearance-variant='accent']) .split-button-primary:active,
|
|
@@ -20261,7 +20276,6 @@ const x8=It`
|
|
|
20261
20276
|
`,C8=Q`
|
|
20262
20277
|
<div
|
|
20263
20278
|
class="split-button-container"
|
|
20264
|
-
${zt("splitButtonContainer")}
|
|
20265
20279
|
>
|
|
20266
20280
|
<button
|
|
20267
20281
|
class="split-button-primary"
|
|
@@ -20273,6 +20287,7 @@ const x8=It`
|
|
|
20273
20287
|
</button>
|
|
20274
20288
|
<button
|
|
20275
20289
|
class="split-button-toggle"
|
|
20290
|
+
${zt("toggleButton")}
|
|
20276
20291
|
type="button"
|
|
20277
20292
|
?disabled="${t=>t.disabled}"
|
|
20278
20293
|
aria-label="${t=>`More actions for ${t.label}`}"
|
|
@@ -20289,9 +20304,9 @@ const x8=It`
|
|
|
20289
20304
|
auto-update-mode="auto"
|
|
20290
20305
|
horizontal-inset
|
|
20291
20306
|
horizontal-positioning-mode="dynamic"
|
|
20307
|
+
horizontal-default-position="end"
|
|
20292
20308
|
vertical-positioning-mode="locktodefault"
|
|
20293
20309
|
vertical-default-position="bottom"
|
|
20294
|
-
horizontal-scaling="anchor"
|
|
20295
20310
|
${zt("region")}
|
|
20296
20311
|
>
|
|
20297
20312
|
<span part="menu">
|
|
@@ -20300,7 +20315,7 @@ const x8=It`
|
|
|
20300
20315
|
</${Iv}>
|
|
20301
20316
|
`)}
|
|
20302
20317
|
`,k8="outline",S8="default"
|
|
20303
|
-
class $8 extends qe{constructor(){super(...arguments),this.label="Primary function",this.disabled=!1,this.open=!1,this.appearance=k8,this.appearanceVariant=S8,this.documentClickHandler=t=>{this.open&&(t.composedPath().includes(this)||this.setOpen(!1))},this.keydownHandler=t=>{"Escape"===t.key&&this.setOpen(!1)},this.menuChangeHandler=()=>{this.handleMenuChange()}}disabledChanged(){this.disabled&&this.setOpen(!1)}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.documentClickHandler),document.addEventListener("keydown",this.keydownHandler)}disconnectedCallback(){document.removeEventListener("click",this.documentClickHandler),document.removeEventListener("keydown",this.keydownHandler),super.disconnectedCallback()}handlePrimaryClick(){this.disabled||this.dispatchEvent(new CustomEvent("trigger",{bubbles:!0,composed:!0}))}handleToggleClick(){this.disabled||this.setOpen(!this.open)}handleMenuChange(){this.setOpen(!1)}regionChanged(t,e){t&&t.removeEventListener("change",this.menuChangeHandler),this.region&&(this.region.anchorElement=this.
|
|
20318
|
+
class $8 extends qe{constructor(){super(...arguments),this.label="Primary function",this.disabled=!1,this.open=!1,this.appearance=k8,this.appearanceVariant=S8,this.documentClickHandler=t=>{this.open&&(t.composedPath().includes(this)||this.setOpen(!1))},this.keydownHandler=t=>{"Escape"===t.key&&this.setOpen(!1)},this.menuChangeHandler=()=>{this.handleMenuChange()}}disabledChanged(){this.disabled&&this.setOpen(!1)}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.documentClickHandler),document.addEventListener("keydown",this.keydownHandler)}disconnectedCallback(){document.removeEventListener("click",this.documentClickHandler),document.removeEventListener("keydown",this.keydownHandler),super.disconnectedCallback()}handlePrimaryClick(){this.disabled||this.dispatchEvent(new CustomEvent("trigger",{bubbles:!0,composed:!0}))}handleToggleClick(){this.disabled||this.setOpen(!this.open)}handleMenuChange(){this.setOpen(!1)}regionChanged(t,e){t&&t.removeEventListener("change",this.menuChangeHandler),this.region&&(this.region.anchorElement=this.toggleButton??this,this.region.addEventListener("change",this.menuChangeHandler,{capture:!0}))}toggleButtonChanged(){this.region&&(this.region.anchorElement=this.toggleButton??this)}setOpen(t){this.open!==t&&(this.open=t,this.dispatchEvent(new CustomEvent("toggle",{bubbles:!0,composed:!0,detail:{open:this.open}})))}}t([ft],$8.prototype,"label",void 0),t([ft({mode:"boolean"})],$8.prototype,"disabled",void 0),t([ft({mode:"boolean"})],$8.prototype,"open",void 0),t([ft()],$8.prototype,"appearance",void 0),t([ft({attribute:"appearance-variant"})],$8.prototype,"appearanceVariant",void 0),t([k],$8.prototype,"toggleButton",void 0),t([k],$8.prototype,"region",void 0)
|
|
20304
20319
|
const _8=$8.compose({baseName:"fv-split-button",template:C8,styles:x8})
|
|
20305
20320
|
Ei.getOrCreate().withPrefix("ok").register(_8())
|
|
20306
20321
|
const I8=It`
|