@aquera/nile-elements 0.0.74 → 0.0.75
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 +6 -0
- package/dist/index.iife.js +157 -206
- package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.esm.js +8 -0
- package/dist/nile-card/nile-card.css.cjs.js +1 -1
- package/dist/nile-card/nile-card.css.cjs.js.map +1 -1
- package/dist/nile-card/nile-card.css.esm.js +4 -4
- package/dist/nile-checkbox/nile-checkbox.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.cjs.js.map +1 -1
- package/dist/nile-checkbox/nile-checkbox.css.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.css.cjs.js.map +1 -1
- package/dist/nile-checkbox/nile-checkbox.css.esm.js +30 -47
- package/dist/nile-checkbox/nile-checkbox.esm.js +56 -54
- package/dist/nile-tag/nile-tag.cjs.js +1 -1
- package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
- package/dist/nile-tag/nile-tag.css.cjs.js +1 -1
- package/dist/nile-tag/nile-tag.css.cjs.js.map +1 -1
- package/dist/nile-tag/nile-tag.css.esm.js +50 -91
- package/dist/nile-tag/nile-tag.esm.js +13 -14
- package/dist/src/nile-calendar/nile-calendar.css.js +8 -0
- package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
- package/dist/src/nile-card/nile-card.css.js +2 -2
- package/dist/src/nile-card/nile-card.css.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.css.js +30 -47
- package/dist/src/nile-checkbox/nile-checkbox.css.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.d.ts +2 -4
- package/dist/src/nile-checkbox/nile-checkbox.js +63 -67
- package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
- package/dist/src/nile-tag/nile-tag.css.js +48 -89
- package/dist/src/nile-tag/nile-tag.css.js.map +1 -1
- package/dist/src/nile-tag/nile-tag.d.ts +2 -1
- package/dist/src/nile-tag/nile-tag.js +30 -13
- package/dist/src/nile-tag/nile-tag.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-calendar/nile-calendar.css.ts +8 -0
- package/src/nile-card/nile-card.css.ts +2 -2
- package/src/nile-checkbox/nile-checkbox.css.ts +34 -51
- package/src/nile-checkbox/nile-checkbox.ts +111 -108
- package/src/nile-tag/nile-tag.css.ts +48 -89
- package/src/nile-tag/nile-tag.ts +34 -15
package/README.md
CHANGED
@@ -79,6 +79,12 @@ To run a local development server that serves the basic demo located in `demo/in
|
|
79
79
|
|
80
80
|
In this section, you can find the updates for each release of `nile-elements`. It's a good practice to maintain detailed release notes to help users and developers understand what changes have been made from one version to another and how these changes might affect their projects.
|
81
81
|
|
82
|
+
#### Version 0.0.74
|
83
|
+
- Nile Checkbox - reverted facelift changes
|
84
|
+
- Nile Calender - fixed days alignment issue in safari
|
85
|
+
- Nile Card - fixed hover issue
|
86
|
+
- dependency: @aquera/nile@0.3.25
|
87
|
+
|
82
88
|
|
83
89
|
#### Version 0.0.74
|
84
90
|
- Nile input - Font size issue fixed
|
package/dist/index.iife.js
CHANGED
@@ -2107,25 +2107,26 @@ const rN=Symbol.for(""),xN=M=>{if((null==M?void 0:M.r)===rN)return null==M?void
|
|
2107
2107
|
:host {
|
2108
2108
|
display: inline-block;
|
2109
2109
|
}
|
2110
|
-
|
2110
|
+
|
2111
2111
|
:host(.full-width) {
|
2112
2112
|
width: 100%;
|
2113
2113
|
}
|
2114
|
-
|
2114
|
+
|
2115
2115
|
.checkbox {
|
2116
2116
|
position: relative;
|
2117
2117
|
display: inline-flex;
|
2118
|
-
align-items:
|
2118
|
+
align-items: top;
|
2119
2119
|
font-weight: 400;
|
2120
2120
|
color: var(--nile-colors-dark-900);
|
2121
2121
|
vertical-align: middle;
|
2122
2122
|
cursor: pointer;
|
2123
2123
|
}
|
2124
|
-
|
2125
|
-
.checkbox--
|
2126
|
-
|
2124
|
+
|
2125
|
+
.checkbox--medium {
|
2126
|
+
--toggle-size: var(--nile-type-scale-3);
|
2127
|
+
font-size: var(--nile-type-scale-3);
|
2127
2128
|
}
|
2128
|
-
|
2129
|
+
|
2129
2130
|
.checkbox__control {
|
2130
2131
|
flex: 0 0 auto;
|
2131
2132
|
position: relative;
|
@@ -2136,13 +2137,13 @@ const rN=Symbol.for(""),xN=M=>{if((null==M?void 0:M.r)===rN)return null==M?void
|
|
2136
2137
|
height: var(--nile-type-scale-3);
|
2137
2138
|
border: solid 1px var(--nile-checkbox-color-border-standard);
|
2138
2139
|
background-color: var(--nile-checkbox-color-background-standard);
|
2139
|
-
border-radius:
|
2140
|
+
border-radius: 4px;
|
2140
2141
|
transition: var(--nile-transition-duration-default border-color),
|
2141
2142
|
var(--nile-transition-duration-default) background-color,
|
2142
2143
|
var(--nile-transition-duration-default) color,
|
2143
2144
|
var(--nile-transition-duration-default box-shadow);
|
2144
2145
|
}
|
2145
|
-
|
2146
|
+
|
2146
2147
|
.checkbox__input {
|
2147
2148
|
position: absolute;
|
2148
2149
|
opacity: 0;
|
@@ -2150,11 +2151,11 @@ const rN=Symbol.for(""),xN=M=>{if((null==M?void 0:M.r)===rN)return null==M?void
|
|
2150
2151
|
margin: 0;
|
2151
2152
|
pointer-events: none;
|
2152
2153
|
}
|
2153
|
-
|
2154
|
+
|
2154
2155
|
/* svg {
|
2155
2156
|
display:none !important;
|
2156
2157
|
} */
|
2157
|
-
|
2158
|
+
|
2158
2159
|
/* Hover */
|
2159
2160
|
.checkbox:not(.checkbox--checked):not(.checkbox--disabled)
|
2160
2161
|
.checkbox__control:hover {
|
@@ -2162,7 +2163,7 @@ const rN=Symbol.for(""),xN=M=>{if((null==M?void 0:M.r)===rN)return null==M?void
|
|
2162
2163
|
border: 1px solid var(--nile-checkbox-color-border-hover);
|
2163
2164
|
border-radius: 4px;
|
2164
2165
|
}
|
2165
|
-
|
2166
|
+
|
2166
2167
|
/* Focus */
|
2167
2168
|
.checkbox:not(.checkbox--checked):not(.checkbox--disabled)
|
2168
2169
|
.checkbox__input:focus-visible
|
@@ -2170,14 +2171,14 @@ const rN=Symbol.for(""),xN=M=>{if((null==M?void 0:M.r)===rN)return null==M?void
|
|
2170
2171
|
outline: solid 3px hsl(198.6 88.7% 48.4% / 40%);
|
2171
2172
|
outline-offset: 1px;
|
2172
2173
|
}
|
2173
|
-
|
2174
|
+
|
2174
2175
|
/* Checked/indeterminate */
|
2175
2176
|
.checkbox--checked .checkbox__control,
|
2176
2177
|
.checkbox--indeterminate .checkbox__control {
|
2177
2178
|
border-color: var(--nile-checkbox-color-border-checked-standard);
|
2178
2179
|
background-color: var(--nile-checkbox-color-background-checked-standard);
|
2179
2180
|
}
|
2180
|
-
|
2181
|
+
|
2181
2182
|
/* Checked/indeterminate + hover */
|
2182
2183
|
.checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,
|
2183
2184
|
.checkbox.checkbox--indeterminate:not(.checkbox--disabled)
|
@@ -2185,7 +2186,7 @@ const rN=Symbol.for(""),xN=M=>{if((null==M?void 0:M.r)===rN)return null==M?void
|
|
2185
2186
|
background: var(--nile-checkbox-color-background-checked-hover);
|
2186
2187
|
border: 1px solid var(--nile-checkbox-color-border-checked-hover);
|
2187
2188
|
}
|
2188
|
-
|
2189
|
+
|
2189
2190
|
/* Checked/indeterminate + focus */
|
2190
2191
|
.checkbox.checkbox--checked:not(.checkbox--disabled)
|
2191
2192
|
.checkbox__input:focus-visible
|
@@ -2196,121 +2197,100 @@ const rN=Symbol.for(""),xN=M=>{if((null==M?void 0:M.r)===rN)return null==M?void
|
|
2196
2197
|
outline: solid 3px var(--nile-checkbox-color-outline-standard);
|
2197
2198
|
outline-offset: 1px;
|
2198
2199
|
}
|
2199
|
-
|
2200
|
+
|
2200
2201
|
/* Disabled */
|
2201
2202
|
.checkbox--disabled {
|
2202
2203
|
opacity: 0.3;
|
2203
2204
|
cursor: not-allowed;
|
2204
2205
|
}
|
2205
|
-
|
2206
|
+
|
2207
|
+
|
2206
2208
|
.checkbox__label {
|
2207
|
-
display:
|
2208
|
-
|
2209
|
-
|
2210
|
-
|
2211
|
-
margin-left: 8px;
|
2209
|
+
display: inline-block;
|
2210
|
+
line-height: 14px;
|
2211
|
+
font-size: 14px;
|
2212
|
+
margin-inline-start: 0.5em;
|
2212
2213
|
user-select: none;
|
2214
|
+
margin-top: 2px;
|
2213
2215
|
color: var(--nile-colors-dark-900);
|
2216
|
+
font-family: Colfax-regular;
|
2214
2217
|
font-style: normal;
|
2215
|
-
letter-spacing: 0.2px;
|
2216
|
-
box-sizing: border-box;
|
2217
|
-
}
|
2218
|
-
|
2219
|
-
.checkbox__icon__container{
|
2220
|
-
display:flex;
|
2221
|
-
align-items:center;
|
2222
|
-
}
|
2223
|
-
|
2224
|
-
.checkbox__label__text {
|
2225
|
-
display: block;
|
2226
|
-
font-size: 14px;
|
2227
|
-
font-weight: 500;
|
2228
|
-
color: #344054;
|
2229
|
-
}
|
2230
|
-
|
2231
|
-
.checkbox__sublabel__text {
|
2232
|
-
display: block;
|
2233
|
-
font-size: 14px;
|
2234
2218
|
font-weight: 400;
|
2235
|
-
|
2236
|
-
color: #475467;
|
2219
|
+
letter-spacing: 0.2px;
|
2237
2220
|
}
|
2238
|
-
|
2221
|
+
|
2239
2222
|
:host([required]) .checkbox__label::after {
|
2240
2223
|
content: '*';
|
2241
2224
|
margin-inline-start: -2px;
|
2242
2225
|
}
|
2243
|
-
|
2226
|
+
|
2244
2227
|
.checkbox__checked-icon {
|
2245
2228
|
--nile-svg-stroke: white;
|
2246
2229
|
}
|
2247
|
-
|
2230
|
+
|
2248
2231
|
.checkbox__indeterminate-icon {
|
2249
2232
|
--nile-svg-stroke: white;
|
2250
2233
|
}
|
2251
|
-
|
2234
|
+
|
2252
2235
|
.checkbox__helptext-icon {
|
2253
2236
|
float: right;
|
2254
2237
|
cursor: pointer;
|
2255
2238
|
margin-right: 12px;
|
2256
2239
|
}
|
2257
|
-
`;M.NileCheckbox=class extends kN{constructor(){super(),this.hasFocus=!1,this.title="",this.name="",this.size="medium",this.disabled=!1,this.checked=!1,this.label="",this.
|
2240
|
+
`;M.NileCheckbox=class extends kN{constructor(){super(),this.hasFocus=!1,this.title="",this.name="",this.size="medium",this.disabled=!1,this.checked=!1,this.label="",this.indeterminate=!1,this.defaultChecked=!1,this.helpText="",this.errorMessage="",this.showHelpText=!1,this.form="",this.required=!1}toggleHelpText(){this.showHelpText=!this.showHelpText}handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("valueChange",{composed:!0,bubbles:!0,detail:{checked:this.checked}}))}handleBlur(){this.hasFocus=!1,this.emit("blur")}handleInput(){this.emit("input")}handleFocus(){this.hasFocus=!0,this.emit("focus")}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate}click(){this.input.click()}focus(M){this.input.focus(M)}blur(){this.input.blur()}connectedCallback(){super.connectedCallback(),this.updateHostClass(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}updated(M){super.updated(M),M.has("helpText")&&this.updateHostClass()}updateHostClass(){this.helpText?this.classList.add("full-width"):this.classList.remove("full-width")}render(){const M=!!this.helpText,N=!!this.errorMessage;return EM`
|
2258
2241
|
<label
|
2259
2242
|
part="base"
|
2260
|
-
class=${uN({checkbox:!0,"checkbox--checked":this.checked,"checkbox--disabled":this.disabled,"checkbox--focused":this.hasFocus,"checkbox--indeterminate":this.indeterminate})}
|
2243
|
+
class=${uN({checkbox:!0,"checkbox--checked":this.checked,"checkbox--disabled":this.disabled,"checkbox--focused":this.hasFocus,"checkbox--indeterminate":this.indeterminate,"checkbox--medium":"medium"===this.size})}
|
2261
2244
|
>
|
2262
|
-
<
|
2263
|
-
|
2264
|
-
|
2265
|
-
|
2266
|
-
|
2267
|
-
|
2268
|
-
|
2269
|
-
|
2270
|
-
|
2271
|
-
|
2272
|
-
|
2273
|
-
|
2274
|
-
|
2275
|
-
|
2276
|
-
|
2277
|
-
|
2278
|
-
|
2279
|
-
|
2280
|
-
|
2281
|
-
|
2282
|
-
|
2283
|
-
|
2284
|
-
|
2285
|
-
|
2286
|
-
|
2287
|
-
|
2288
|
-
|
2289
|
-
|
2290
|
-
|
2291
|
-
|
2292
|
-
|
2293
|
-
|
2294
|
-
|
2295
|
-
|
2296
|
-
|
2297
|
-
|
2298
|
-
|
2299
|
-
|
2300
|
-
|
2301
|
-
|
2302
|
-
|
2303
|
-
|
2304
|
-
|
2305
|
-
|
2306
|
-
|
2307
|
-
<div part="label" class="checkbox__label" style="${this.label||this.subLabel?"":"margin-left:0;"}">
|
2308
|
-
${this.label?EM`<span class="checkbox__label__text">${this.label}</span>`:""}
|
2309
|
-
${this.subLabel?EM`<span class="checkbox__sublabel__text">${this.subLabel}</span>`:""}
|
2245
|
+
<input
|
2246
|
+
class="checkbox__input"
|
2247
|
+
type="checkbox"
|
2248
|
+
title=${this.title}
|
2249
|
+
name=${this.name}
|
2250
|
+
value=${SN(this.value)}
|
2251
|
+
.indeterminate=${vN(this.indeterminate)}
|
2252
|
+
.checked=${vN(this.checked)}
|
2253
|
+
.disabled=${this.disabled}
|
2254
|
+
.required=${this.required}
|
2255
|
+
aria-checked=${this.checked?"true":"false"}
|
2256
|
+
@click=${this.handleClick}
|
2257
|
+
@input=${this.handleInput}
|
2258
|
+
@blur=${this.handleBlur}
|
2259
|
+
@focus=${this.handleFocus}
|
2260
|
+
/>
|
2261
|
+
|
2262
|
+
<span
|
2263
|
+
part="control${this.checked?" control--checked":""}${this.indeterminate?" control--indeterminate":""}"
|
2264
|
+
class="checkbox__control"
|
2265
|
+
>
|
2266
|
+
${this.checked?EM`
|
2267
|
+
<nile-icon
|
2268
|
+
part="checked-icon"
|
2269
|
+
class="checkbox__checked-icon"
|
2270
|
+
color="white"
|
2271
|
+
library="system"
|
2272
|
+
name="tick"
|
2273
|
+
size="12"
|
2274
|
+
></nile-icon>
|
2275
|
+
`:""}
|
2276
|
+
${!this.checked&&this.indeterminate?EM`
|
2277
|
+
<nile-icon
|
2278
|
+
part="indeterminate-icon"
|
2279
|
+
class="checkbox__indeterminate-icon"
|
2280
|
+
library="system"
|
2281
|
+
color="white"
|
2282
|
+
name="minus"
|
2283
|
+
size="12"
|
2284
|
+
></nile-icon>
|
2285
|
+
`:""}
|
2286
|
+
</span>
|
2287
|
+
|
2288
|
+
<div part="label" class="checkbox__label">
|
2289
|
+
${"boolean"==typeof this.label?"":this.label}
|
2310
2290
|
<slot></slot>
|
2311
2291
|
</div>
|
2312
2292
|
</label>
|
2313
|
-
|
2293
|
+
|
2314
2294
|
${M?EM`
|
2315
2295
|
<nile-tooltip content="${this.helpText}" placement="bottom">
|
2316
2296
|
<nile-icon
|
@@ -2318,9 +2298,14 @@ const rN=Symbol.for(""),xN=M=>{if((null==M?void 0:M.r)===rN)return null==M?void
|
|
2318
2298
|
class="checkbox__helptext-icon"
|
2319
2299
|
></nile-icon>
|
2320
2300
|
</nile-tooltip>
|
2321
|
-
`:
|
2322
|
-
|
2323
|
-
|
2301
|
+
`:""}
|
2302
|
+
|
2303
|
+
${N?EM`
|
2304
|
+
<nile-form-error-message
|
2305
|
+
>${this.errorMessage}</nile-form-error-message
|
2306
|
+
>
|
2307
|
+
`:""}
|
2308
|
+
`}},M.NileCheckbox.styles=gD,N([KM('input[type="checkbox"]')],M.NileCheckbox.prototype,"input",void 0),N([_M()],M.NileCheckbox.prototype,"hasFocus",void 0),N([$M()],M.NileCheckbox.prototype,"title",void 0),N([$M()],M.NileCheckbox.prototype,"name",void 0),N([$M()],M.NileCheckbox.prototype,"value",void 0),N([$M({reflect:!0})],M.NileCheckbox.prototype,"size",void 0),N([$M({type:Boolean,reflect:!0})],M.NileCheckbox.prototype,"disabled",void 0),N([$M({type:Boolean,reflect:!0})],M.NileCheckbox.prototype,"checked",void 0),N([$M({type:String,reflect:!0})],M.NileCheckbox.prototype,"label",void 0),N([$M({type:Boolean,reflect:!0})],M.NileCheckbox.prototype,"indeterminate",void 0),N([UN("checked")],M.NileCheckbox.prototype,"defaultChecked",void 0),N([$M({attribute:"help-text",reflect:!0})],M.NileCheckbox.prototype,"helpText",void 0),N([$M({attribute:"error-message",reflect:!0})],M.NileCheckbox.prototype,"errorMessage",void 0),N([$M({type:Boolean})],M.NileCheckbox.prototype,"showHelpText",void 0),N([$M({reflect:!0})],M.NileCheckbox.prototype,"form",void 0),N([$M({type:Boolean,reflect:!0})],M.NileCheckbox.prototype,"required",void 0),N([hN(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],M.NileCheckbox.prototype,"handleStateChange",null),M.NileCheckbox=N([FM("nile-checkbox")],M.NileCheckbox);const eD=z`
|
2324
2309
|
:host {
|
2325
2310
|
display: block;
|
2326
2311
|
}
|
@@ -3527,21 +3512,22 @@ const rN=Symbol.for(""),xN=M=>{if((null==M?void 0:M.r)===rN)return null==M?void
|
|
3527
3512
|
`,di=z`
|
3528
3513
|
:host {
|
3529
3514
|
display: inline-block;
|
3530
|
-
--nile-remove-icon-color: var(--nile-colors-blue-500);
|
3531
3515
|
}
|
3532
3516
|
|
3533
3517
|
.tag {
|
3534
3518
|
display: flex;
|
3535
3519
|
align-items: center;
|
3536
|
-
|
3537
|
-
|
3538
|
-
gap: 3px;
|
3520
|
+
border: solid 2px;
|
3521
|
+
line-height: 1;
|
3539
3522
|
white-space: nowrap;
|
3540
3523
|
user-select: none;
|
3541
3524
|
border-radius: 4px;
|
3542
|
-
|
3543
|
-
|
3544
|
-
|
3525
|
+
gap: 6px;
|
3526
|
+
}
|
3527
|
+
|
3528
|
+
.tag__remove::part(base) {
|
3529
|
+
color: inherit;
|
3530
|
+
padding: 0;
|
3545
3531
|
}
|
3546
3532
|
|
3547
3533
|
/*
|
@@ -3549,120 +3535,101 @@ const rN=Symbol.for(""),xN=M=>{if((null==M?void 0:M.r)===rN)return null==M?void
|
|
3549
3535
|
*/
|
3550
3536
|
|
3551
3537
|
.tag--primary {
|
3552
|
-
background: #
|
3553
|
-
color: #
|
3554
|
-
|
3538
|
+
background: #005EA6;
|
3539
|
+
border-color: #005EA6;
|
3540
|
+
border: 2px solid #005EA6;
|
3541
|
+
color: #FFF;
|
3555
3542
|
}
|
3556
3543
|
|
3557
3544
|
.tag--primary:hover {
|
3558
|
-
|
3545
|
+
border: 2px solid rgba(0, 94, 166, 0.50);
|
3559
3546
|
}
|
3560
3547
|
|
3561
|
-
.tag--primary:active > nile-icon {
|
3548
|
+
.tag--primary:active > nile-icon-button {
|
3562
3549
|
color: hsl(200.4 98% 39.4%);
|
3563
3550
|
}
|
3564
3551
|
|
3565
3552
|
.tag--success {
|
3566
|
-
background: #
|
3553
|
+
background: #A5F3E1;
|
3554
|
+
border: 2px solid #A5F3E1;
|
3567
3555
|
color: #000;
|
3568
|
-
--nile-remove-icon-color: var(--nile-colors-green-500);
|
3569
3556
|
}
|
3570
3557
|
|
3571
3558
|
.tag--success:hover {
|
3572
|
-
|
3559
|
+
border: 2px solid #43E5C0;
|
3573
3560
|
}
|
3574
3561
|
|
3575
|
-
.tag--success:active > nile-icon {
|
3562
|
+
.tag--success:active > nile-icon-button {
|
3576
3563
|
color: hsl(142.1 76.2% 36.3%);
|
3577
3564
|
}
|
3578
3565
|
|
3579
3566
|
.tag--normal {
|
3580
|
-
background: #
|
3567
|
+
background: #E5E9EB;
|
3568
|
+
border: 2px solid #E5E9EB;
|
3581
3569
|
color: #000;
|
3582
|
-
--nile-remove-icon-color: var(--nile-colors-dark-500);
|
3583
3570
|
}
|
3584
3571
|
|
3585
3572
|
.tag--normal:hover {
|
3586
|
-
|
3573
|
+
border: 2px solid #C7CED4;
|
3587
3574
|
}
|
3588
3575
|
|
3589
|
-
|
3576
|
+
|
3577
|
+
.tag--normal:active > nile-icon-button {
|
3590
3578
|
color: hsl(240 5.2% 33.9%);
|
3591
3579
|
}
|
3592
3580
|
|
3593
3581
|
.tag--warning {
|
3594
|
-
background: #
|
3582
|
+
background: #F3E0A5;
|
3583
|
+
border: 2px solid #F3E0A5;
|
3595
3584
|
color: #000;
|
3596
|
-
--nile-remove-icon-color: var(--nile-colors-yellow-500);
|
3597
3585
|
}
|
3598
3586
|
|
3599
3587
|
.tag--warning:hover {
|
3600
|
-
|
3588
|
+
border: 2px solid #E5BF43;
|
3601
3589
|
}
|
3602
3590
|
|
3603
|
-
.tag--warning:active > nile-icon {
|
3591
|
+
.tag--warning:active > nile-icon-button {
|
3604
3592
|
color: hsl(32.1 94.6% 43.7%);
|
3605
3593
|
}
|
3606
3594
|
|
3595
|
+
|
3607
3596
|
.tag--error {
|
3608
|
-
background: #
|
3597
|
+
background: #F3A5AA;
|
3598
|
+
border: 2px solid #F3A5AA;
|
3609
3599
|
color: #000;
|
3610
|
-
--nile-remove-icon-color: var(--nile-colors-red-500);
|
3611
3600
|
}
|
3612
3601
|
|
3613
3602
|
.tag--error:hover {
|
3614
|
-
|
3603
|
+
border: 2px solid #E5434D;
|
3615
3604
|
}
|
3616
3605
|
|
3617
|
-
.tag--error:active > nile-icon {
|
3606
|
+
.tag--error:active > nile-icon-button {
|
3618
3607
|
color: hsl(0 72.2% 50.6%);
|
3619
3608
|
}
|
3620
3609
|
|
3621
3610
|
.tag--info {
|
3622
|
-
background: #
|
3611
|
+
background: #A5D3F3;
|
3612
|
+
border: 2px solid #A5D3F3;
|
3623
3613
|
color: #000000;
|
3624
|
-
--nile-remove-icon-color: var(--nile-colors-blue-500);
|
3625
3614
|
}
|
3626
3615
|
|
3627
3616
|
.tag--info:hover {
|
3628
|
-
|
3617
|
+
border: 2px solid #42A3E5;
|
3629
3618
|
}
|
3630
3619
|
|
3631
|
-
.tag--info:active > nile-icon {
|
3620
|
+
.tag--info:active > nile-icon-button {
|
3632
3621
|
color: hsl(0 72.2% 50.6%);
|
3633
3622
|
}
|
3634
3623
|
|
3635
|
-
.tag--gray {
|
3636
|
-
background: var(--nile-tag-gray-background-color);
|
3637
|
-
border: 1px solid var(--nile-colors-gray-light-mode-300);
|
3638
|
-
color: var(--nile-tag-gray-color);
|
3639
|
-
--nile-remove-icon-color: var(--nile-tag-gray-x-color);
|
3640
|
-
}
|
3641
|
-
|
3642
|
-
.tag--gray:hover {
|
3643
|
-
background-color: var(--nile-tag-gray-hover-background-color);
|
3644
|
-
}
|
3645
|
-
|
3646
|
-
/* .tag--gray:active > nile-icon {
|
3647
|
-
color: #101828;
|
3648
|
-
} */
|
3649
|
-
|
3650
|
-
.tag--small {
|
3651
|
-
height: 24px;
|
3652
|
-
padding: 3px 8px;
|
3653
|
-
font-size: 12px;
|
3654
|
-
font-style: normal;
|
3655
|
-
font-weight: 500;
|
3656
|
-
line-height: 18px;
|
3657
|
-
}
|
3658
3624
|
|
3659
3625
|
.tag--medium {
|
3660
|
-
height: 24px;
|
3661
|
-
padding: 2px 9px;
|
3662
3626
|
font-size: 14px;
|
3663
|
-
|
3664
|
-
|
3665
|
-
|
3627
|
+
height: 26px;
|
3628
|
+
padding: 0 0.75rem;
|
3629
|
+
}
|
3630
|
+
|
3631
|
+
.tag__remove {
|
3632
|
+
margin-inline-start: 0.5rem;
|
3666
3633
|
}
|
3667
3634
|
|
3668
3635
|
/*
|
@@ -3673,59 +3640,35 @@ const rN=Symbol.for(""),xN=M=>{if((null==M?void 0:M.r)===rN)return null==M?void
|
|
3673
3640
|
border-radius: 9999px;
|
3674
3641
|
}
|
3675
3642
|
|
3676
|
-
.
|
3677
|
-
|
3678
|
-
|
3679
|
-
|
3680
|
-
.tag--medium .tag__remove-wrapper {
|
3681
|
-
display: inline-flex;
|
3682
|
-
justify-content: centre;
|
3683
|
-
box-sizing: border-box;
|
3684
|
-
height: 16px;
|
3685
|
-
width: 16px;
|
3686
|
-
padding: 2px;
|
3687
|
-
}
|
3688
|
-
|
3689
|
-
.tag--small .tag__remove-wrapper {
|
3690
|
-
display: inline-flex;
|
3691
|
-
justify-content: centre;
|
3692
|
-
box-sizing: border-box;
|
3693
|
-
height: 14px;
|
3694
|
-
width: 14px;
|
3695
|
-
padding: 2px;
|
3696
|
-
}
|
3643
|
+
.tag__prefix {
|
3644
|
+
padding: 3px 6px;
|
3645
|
+
}
|
3697
3646
|
|
3698
|
-
|
3699
|
-
|
3700
|
-
|
3647
|
+
.tag__content {
|
3648
|
+
font-size: 14px;
|
3649
|
+
}
|
3701
3650
|
|
3702
|
-
|
3703
|
-
cursor: pointer;
|
3704
|
-
--nile-remove-icon-color: #101828;
|
3705
|
-
color: red;
|
3706
|
-
}
|
3707
|
-
`;M.NileTag=class extends kN{constructor(){super(...arguments),this.variant="normal",this.size="medium",this.pill=!1,this.removable=!1}handleRemoveClick(){this.emit("nile-remove")}render(){return EM`
|
3651
|
+
`;M.NileTag=class extends kN{constructor(){super(...arguments),this.variant="normal",this.size="medium",this.pill=!1,this.removable=!1}handleRemoveClick(){this.emit("nile-remove")}getCloseButtonColor(){switch(this.variant){case"primary":case"info":return"--nile-colors-blue-500";case"success":return"--nile-colors-green-500";case"normal":default:return"--nile-colors-dark-500";case"warning":return"--nile-colors-yellow-500";case"error":return"--nile-colors-red-500"}}render(){const M=this.getCloseButtonColor();return EM`
|
3708
3652
|
<span
|
3709
3653
|
part="base"
|
3710
|
-
class=${uN({tag:!0,"tag--primary":"primary"===this.variant,"tag--success":"success"===this.variant,"tag--normal":"normal"===this.variant,"tag--warning":"warning"===this.variant,"tag--error":"error"===this.variant,"tag--info":"info"===this.variant,"tag--
|
3654
|
+
class=${uN({tag:!0,"tag--primary":"primary"===this.variant,"tag--success":"success"===this.variant,"tag--normal":"normal"===this.variant,"tag--warning":"warning"===this.variant,"tag--error":"error"===this.variant,"tag--info":"info"===this.variant,"tag--small":"small"===this.size,"tag--medium":"medium"===this.size,"tag--large":"large"===this.size,"tag--pill":this.pill,"tag--removable":this.removable})}
|
3711
3655
|
>
|
3712
3656
|
<slot name="prefix" part="prefix" class="tag__prefix"></slot>
|
3713
3657
|
|
3714
3658
|
<slot part="content" class="tag__content"></slot>
|
3715
3659
|
|
3716
3660
|
${this.removable?EM`
|
3717
|
-
|
3718
|
-
|
3719
|
-
|
3720
|
-
|
3721
|
-
|
3722
|
-
|
3723
|
-
|
3724
|
-
|
3725
|
-
|
3726
|
-
|
3727
|
-
|
3728
|
-
</span>
|
3661
|
+
<nile-icon-button
|
3662
|
+
part="remove-button"
|
3663
|
+
exportparts="base:remove-button__base"
|
3664
|
+
name="close"
|
3665
|
+
library="system"
|
3666
|
+
label="remove"
|
3667
|
+
class="tag__remove"
|
3668
|
+
@click=${this.handleRemoveClick}
|
3669
|
+
tabindex="-1"
|
3670
|
+
color="var(${M})"
|
3671
|
+
></nile-icon-button>
|
3729
3672
|
`:""}
|
3730
3673
|
</span>
|
3731
3674
|
`}},M.NileTag.styles=di,N([$M({reflect:!0})],M.NileTag.prototype,"variant",void 0),N([$M({reflect:!0})],M.NileTag.prototype,"size",void 0),N([$M({type:Boolean,reflect:!0})],M.NileTag.prototype,"pill",void 0),N([$M({type:Boolean})],M.NileTag.prototype,"removable",void 0),M.NileTag=N([FM("nile-tag")],M.NileTag),M.NileSelect=class extends kN{constructor(){super(...arguments),this.formControlController=new nN(this,{assumeInteractionOn:["nile-blur","nile-input"]}),this.hasSlotController=new oN(this,"help-text","label"),this.typeToSelectString="",this.hasFocus=!1,this.displayLabel="",this.selectedOptions=[],this.oldValue="",this.name="",this.value="",this.defaultValue="",this.size="medium",this.placeholder="Select...",this.searchValue="",this.searchEnabled=!1,this.blockValueChange=!1,this.disableLocalSearch=!1,this.optionsLoading=!1,this.noWidthSync=!1,this.multiple=!1,this.helpText="",this.errorMessage="",this.warning=!1,this.error=!1,this.success=!1,this.maxOptionsVisible=3,this.disabled=!1,this.clearable=!1,this.open=!1,this.hoist=!1,this.filled=!1,this.pill=!1,this.label="",this.placement="bottom",this.form="",this.required=!1,this.showSelected=!1,this.oldMaxOptionsVisible=1,this.showNoResults=!1,this.noResultsMessage="No results found"}get validity(){return this.valueInput?.validity}get validationMessage(){return this.valueInput?.validationMessage}connectedCallback(){super.connectedCallback(),this.handleDocumentFocusIn=this.handleDocumentFocusIn.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.open=!1,this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("nile-focus",{value:this.value,name:this.name})}handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value,name:this.name})}handleDocumentFocusIn(M){const N=M.composedPath();this&&!N.includes(this)&&this.hide()}handleFooterClick(M){M.stopPropagation(),M.preventDefault()}toggleShowSelected(M){if(M.stopPropagation(),M.preventDefault(),0===this.selectedOptions?.length)return;this.showSelected=!this.showSelected;this.getAllOptions().forEach((M=>{M.selected||(M.hidden=this.showSelected)})),this.requestUpdate()}unSlectAll(){this.showSelected=!1;this.getAllOptions().forEach((M=>{M.selected=!1,M.hidden=!1})),this.value="",this.selectionChanged(),this.emit("nile-change",{value:this.value,name:this.name})}handleDocumentKeyDown(M){const N=M.target,D=null!==N.closest(".select__clear"),i=null!==N.closest("nile-icon-button");if(!D&&!i){if("Escape"===M.key&&this.open&&(M.preventDefault(),M.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),"Enter"===M.key||" "===M.key&&""===this.typeToSelectString)return M.preventDefault(),M.stopImmediatePropagation(),this.open?void(this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then((()=>{this.emit("nile-input",{value:this.value,name:this.name}),this.emit("nile-change",{value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))):void this.show();if(["ArrowUp","ArrowDown","Home","End"].includes(M.key)){const N=this.getAllOptions(),D=N.indexOf(this.currentOption);let i=Math.max(0,D);if(M.preventDefault(),!this.open&&(this.show(),this.currentOption))return;"ArrowDown"===M.key?(i=D+1,i>N.length-1&&(i=0)):"ArrowUp"===M.key?(i=D-1,i<0&&(i=N.length-1)):"Home"===M.key?i=0:"End"===M.key&&(i=N.length-1),this.setCurrentOption(N[i])}if(1===M.key.length||"Backspace"===M.key){const N=this.getAllOptions();if(M.metaKey||M.ctrlKey||M.altKey)return;if(!this.open){if("Backspace"===M.key)return;this.show()}M.stopPropagation(),M.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout((()=>this.typeToSelectString=""),1e3),"Backspace"===M.key?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=M.key.toLowerCase();for(const M of N){if(M.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(M);break}}}}}handleDocumentMouseDown(M){const N=M.composedPath();this&&!N.includes(this)&&this.hide()}handleLabelClick(){this.displayInput.focus(),this.hide()}handleComboboxMouseDown(M){const N=M.composedPath().some((M=>M instanceof Element&&"nile-icon-button"===M.tagName.toLowerCase()));this.disabled||N||(M.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(M){M.stopPropagation(),this.handleDocumentKeyDown(M)}handleClearClick(M){M.stopPropagation(),""!==this.value&&(this.setSelectedOptions([]),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then((()=>{this.emit("nile-clear",{value:this.value,name:this.name}),this.emit("nile-input",{value:this.value,name:this.name}),this.emit("nile-change",{value:this.value,name:this.name})})))}handleClearMouseDown(M){M.stopPropagation(),M.preventDefault()}handleOptionClick(M){const N=M.target.closest("nile-option");if(this.blockValueChange&&N)return this.emit("nile-block-change",{value:N?.value,name:this.name}),void this.hide();const D=this.value;if(this.oldValue=D,N&&!N.disabled&&(this.multiple?this.toggleOptionSelection(N):this.setSelectedOptions(N),this.updateComplete.then((()=>this.displayInput.focus({preventScroll:!0}))),this.value!==D&&this.updateComplete.then((()=>{this.emit("nile-input",{value:this.value,name:this.name}),this.emit("nile-change",{value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}))),this.showSelected){this.getAllOptions().forEach((M=>{M.selected||(M.hidden=this.showSelected)})),this.requestUpdate()}}handleDefaultSlotChange(){const M=this.getAllOptions(),N=Array.isArray(this.value)?this.value:[this.value],D=[];customElements.get("nile-option")?(M.forEach((M=>D.push(M.value))),this.setSelectedOptions(M.filter((M=>N.map(String).includes(M.value))))):customElements.whenDefined("nile-option").then((()=>this.handleDefaultSlotChange()))}handleTagRemove(M,N){if(M.stopPropagation(),!this.disabled){this.toggleOptionSelection(N,!1);this.getAllOptions().forEach((M=>{M.selected||(M.hidden=this.showSelected)})),this.updateComplete.then((()=>{this.emit("nile-input",{value:this.value,name:this.name}),this.emit("nile-change",{value:this.value,name:this.name})}))}}getAllOptions(){const M=[...this.querySelectorAll("nile-option")];return this.multiple&&this.oldValue?.length>0&&M.sort(((M,N)=>{let D=this.oldValue.indexOf(M.value),i=this.oldValue.indexOf(N.value);return-1===D&&(D=1/0),-1===i&&(i=1/0),D<i?-1:D>i?1:0})),M}getOptionPrefix(M){const N=M.shadowRoot?.querySelector('slot[name="prefix"]');if(!N)return"";const D=N.assignedNodes(),i=[];return D.forEach((M=>{M instanceof HTMLElement?i.push(M.outerHTML):M.nodeType===Node.TEXT_NODE&&i.push(M.textContent||"")})),i.join("")}getFirstOption(){return this.querySelector("nile-option")}setCurrentOption(M){this.getAllOptions().forEach((M=>{M.current=!1,M.tabIndex=-1})),M&&(this.currentOption=M,M.current=!0,M.tabIndex=0,M.focus())}setSelectedOptions(M){const N=this.getAllOptions(),D=Array.isArray(M)?M:[M];N.forEach((M=>M.selected=!1)),D.length&&D.forEach((M=>M.selected=!0)),this.selectionChanged()}toggleOptionSelection(M,N){M.selected=!0===N||!1===N?N:!M.selected,this.selectionChanged()}selectionChanged(){if(this.selectedOptions=this.getAllOptions().filter((M=>M.selected)),this.multiple){if(this.value=this.selectedOptions.map((M=>M.value)),this.placeholder&&0===this.value.length?this.displayLabel="":this.displayLabel=this.selectedOptions.length+" selected",0===this.selectedOptions.length){this.showSelected=!1;this.getAllOptions().forEach((M=>{M.selected||(M.hidden=this.showSelected)})),this.requestUpdate()}}else this.value=this.selectedOptions[0]?.value??this.value,this.displayLabel=this.selectedOptions[0]?.getTextLabel()?this.selectedOptions[0].getTextLabel():this.value??"";this.updateComplete.then((()=>{this.formControlController.updateValidity()})),this.calculateTotalWidthOfTags()}handleSearchFocus(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleSearchBlur(){document.addEventListener("keydown",this.handleDocumentKeyDown)}handleSearchChange(M){if(this.searchValue=M.detail.value,!this.disableLocalSearch){0===this.filterOptions(this.searchValue).length?this.showNoResults=!0:this.showNoResults=!1}}filterOptions(M){const N=this.getAllOptions(),D=M.toLowerCase();let i=[];return N.forEach((M=>{const N=M.getTextLabel().toLowerCase(),j=(M.value||"").toLowerCase();N.includes(D)||j.includes(D)?(M.hidden=!1,i.push(M)):M.hidden=!0})),i}handleInvalid(M){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(M)}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){const M=this.getAllOptions(),N=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(M.filter((M=>N.includes(M.value))))}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("nile-show",{value:this.value,name:this.name}),this.addOpenListeners(),this.showNoResults=!this.getAllOptions()?.length,await JN(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame((()=>{this.setCurrentOption(this.currentOption)}));const{keyframes:M,options:N}=_N(this,"select.show",{dir:"ltr"});await PN(this.popup.popup,M,N),this.currentOption&&ND(this.currentOption,this.listbox,"vertical","auto"),this.emit("nile-after-show",{value:this.value,name:this.name})}else{this.emit("nile-hide",{value:this.value,name:this.name}),this.searchValue="",this.filterOptions(this.searchValue),this.removeOpenListeners(),await JN(this);const{keyframes:M,options:N}=_N(this,"select.hide",{dir:"ltr"});await PN(this.popup.popup,M,N),this.listbox.hidden=!0,this.popup.active=!1,this.emit("nile-after-hide",{value:this.value,name:this.name})}}async show(){if(!this.open&&!this.disabled)return this.open=!0,iD(this,"nile-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,iD(this,"nile-after-hide");this.open=!1}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.valueInput.reportValidity()}setCustomValidity(M){this.valueInput.setCustomValidity(M),this.formControlController.updateValidity()}focus(M){this.displayInput.focus(M)}blur(){this.displayInput.blur()}onInputChange(M){M.stopPropagation()}calculateWidthOfSelectTagsDiv(){if(this.shadowRoot){const M=this.shadowRoot.querySelector("div.select__tags");if(M instanceof HTMLElement){return M.offsetWidth-70}}}calculateTotalWidthOfTags(){this.maxOptionsVisible!==1/0&&(this.oldMaxOptionsVisible=this.maxOptionsVisible),this.maxOptionsVisible=1/0,setTimeout((()=>{let M=[];if(this.shadowRoot){this.shadowRoot.querySelectorAll("nile-tag").forEach((N=>{N instanceof HTMLElement&&M.push(N.offsetWidth)}))}if(this.value.length!==M.length)return;const N=this.calculateWidthOfSelectTagsDiv();if(!N)return;let D=0,i=0;for(let j=0;j<M.length;j++)if(D+=M[j],D>N){i=j;break}this.maxOptionsVisible=i}),1)}render(){const M=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const N=this.hasSlotController.test("label-suffix"),D=this.hasSlotController.test("custom-select"),i=!!this.label||!!M,j=this.clearable&&!this.disabled&&this.value.length>0,t=this.placeholder&&0===this.value.length,I=!!this.helpText,z=!!this.errorMessage,u=this.selectedOptions[0]?this.getOptionPrefix(this.selectedOptions[0]):"";return EM`
|
@@ -5086,6 +5029,14 @@ const rN=Symbol.for(""),xN=M=>{if((null==M?void 0:M.r)===rN)return null==M?void
|
|
5086
5029
|
align-items: center;
|
5087
5030
|
gap: 4px 7px;
|
5088
5031
|
}
|
5032
|
+
|
5033
|
+
@media not all and (min-resolution: .001dpcm) {
|
5034
|
+
@supports (-webkit-appearance:none)
|
5035
|
+
{ .day-names, .days {
|
5036
|
+
column-gap: 6px;
|
5037
|
+
}
|
5038
|
+
}
|
5039
|
+
}
|
5089
5040
|
|
5090
5041
|
.days {
|
5091
5042
|
height: auto;
|
@@ -7210,7 +7161,7 @@ const rN=Symbol.for(""),xN=M=>{if((null==M?void 0:M.r)===rN)return null==M?void
|
|
7210
7161
|
flex-direction: column;
|
7211
7162
|
justify-items: strecth;
|
7212
7163
|
background-color: var(--nile-colors-white-base);
|
7213
|
-
|
7164
|
+
outline: solid var(--border-width) var(--border-color);
|
7214
7165
|
border-radius: var(--border-radius);
|
7215
7166
|
min-width: 273px;
|
7216
7167
|
max-width: 350px;
|
@@ -7253,7 +7204,7 @@ const rN=Symbol.for(""),xN=M=>{if((null==M?void 0:M.r)===rN)return null==M?void
|
|
7253
7204
|
.card:hover {
|
7254
7205
|
box-shadow: 0px 4px 8px -2px rgba(16, 24, 40, 0.1),
|
7255
7206
|
0px 2px 4px -2px rgba(16, 24, 40, 0.06);
|
7256
|
-
|
7207
|
+
outline: solid 1px var(--border-color);
|
7257
7208
|
}
|
7258
7209
|
`;M.NileCard=class extends kN{constructor(){super(...arguments),this.hasSlotController=new oN(this,"footer")}render(){return EM`
|
7259
7210
|
<div
|