@ncino/web-components 1.0.0 → 1.1.0-preview.10
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 +42 -0
- package/dist/assets/index-chunk10.js +1 -1
- package/dist/assets/index-chunk5.js +1 -1
- package/dist/assets/index-chunk9.js +1 -1
- package/dist/components/accordion/accordion.js +1 -0
- package/dist/components/accordion/gator/base/accordion.gator.js +26 -0
- package/dist/components/accordion/gator/group/accordion-group.gator.js +5 -0
- package/dist/components/alert/gator/base/alert.gator.js +2 -2
- package/dist/components/alert/index.js +1 -1
- package/dist/components/banner/gator/banner.gator.js +1 -1
- package/dist/components/banner/index.js +1 -1
- package/dist/components/boolean/boolean.gator.js +2 -2
- package/dist/components/boolean/index.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/button/gator/button.gator.js +8 -4
- package/dist/components/button/slds/button.slds.js +2 -2
- package/dist/components/card/gator/title/card-title.gator.js +2 -2
- package/dist/components/checkbox/checkbox.gator.js +5 -5
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/checkbox-group.gator.js +10 -13
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/chip/chip.js +1 -1
- package/dist/components/chip/gator/chip.gator.js +5 -5
- package/dist/components/combobox/base/combobox.js +1 -1
- package/dist/components/combobox/base/combobox.slds.js +10 -10
- package/dist/components/combobox/base/index.js +1 -1
- package/dist/components/combobox/combobox-item/index.js +1 -1
- package/dist/components/combobox/combobox.types.js +1 -0
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/display-card/gator/display-card.gator.js +1 -1
- package/dist/components/display-card/index.js +1 -1
- package/dist/components/headline-card/gator/headline-card.gator.js +1 -1
- package/dist/components/headline-card/index.js +1 -1
- package/dist/components/icon/gator/icon.gator.js +1 -1
- package/dist/components/icon/gator/index.js +1 -1
- package/dist/components/icon/gator/templates/arrow-left.js +16 -0
- package/dist/components/icon/gator/templates/chevron-down.js +13 -0
- package/dist/components/icon/gator/templates/chevron-up.js +13 -0
- package/dist/components/icon/gator/templates/eye-crossed.js +6 -0
- package/dist/components/icon/gator/templates/index.js +1 -1
- package/dist/components/icon/icon-list.gator.js +10 -0
- package/dist/components/icon/index.js +1 -1
- package/dist/components/input/base/input-base.js +1 -1
- package/dist/components/input/gator/help-text/help-text.gator.js +2 -2
- package/dist/components/input/gator/input-text/input-text.gator.js +35 -0
- package/dist/components/input/index.js +1 -1
- package/dist/components/menu/base/index.js +1 -1
- package/dist/components/menu/base/slds/menu.slds.js +3 -5
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/menu-item/gator/menu-item.gator.js +5 -5
- package/dist/components/menu/menu-item/index.js +1 -1
- package/dist/components/menu/menu-item/menu-item.js +1 -1
- package/dist/components/menu/menu-item/slds/menu-item.slds.js +3 -3
- package/dist/components/menu/menu-submenu/index.js +1 -1
- package/dist/components/menu/menu-submenu/menu-submenu.js +1 -1
- package/dist/components/menu/menu-submenu/menu-submenu.slds.js +7 -9
- package/dist/components/modal/gator/modal.gator.js +79 -0
- package/dist/components/modal/index.js +1 -0
- package/dist/components/modal/modal.js +1 -0
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio/radio.gator.js +5 -5
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radio-group/radio-group.gator.js +1 -1
- package/dist/components/selection-box/index.js +1 -1
- package/dist/components/selection-box/selection-box.gator.js +1 -1
- package/dist/components/selection-box-group/index.js +1 -1
- package/dist/components/selection-box-group/selection-box-group.gator.js +8 -8
- package/dist/components/skeleton-loader/gator/skeleton-loader.gator.js +1 -1
- package/dist/components/toast/gator/toast.gator.js +2 -2
- package/dist/components/toast/index.js +1 -1
- package/dist/components/tooltip/gator/tooltip.gator.js +10 -4
- package/dist/components/tooltip/index.js +1 -1
- package/dist/index.gator.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.slds.js +1 -1
- package/dist/types/components/accordion/accordion.d.ts +23 -0
- package/dist/types/components/accordion/gator/base/accordion.gator.d.ts +18 -0
- package/dist/types/components/accordion/gator/base/accordion.gator.test.d.ts +0 -0
- package/dist/types/components/accordion/gator/group/accordion-group.gator.d.ts +26 -0
- package/dist/types/components/accordion/gator/group/accordion-group.gator.test.d.ts +0 -0
- package/dist/types/components/button/button.d.ts +11 -1
- package/dist/types/components/button/gator/button.gator.d.ts +8 -2
- package/dist/types/components/checkbox/checkbox.gator.d.ts +6 -0
- package/dist/types/components/checkbox-group/checkbox-group.gator.d.ts +5 -0
- package/dist/types/components/chip/chip.d.ts +5 -0
- package/dist/types/components/chip/gator/chip.gator.d.ts +1 -0
- package/dist/types/components/combobox/base/combobox.d.ts +6 -1
- package/dist/types/components/combobox/base/combobox.slds.d.ts +2 -0
- package/dist/types/components/combobox/combobox-item/combobox-item.d.ts +0 -4
- package/dist/types/components/combobox/combobox-item/combobox-item.slds.d.ts +2 -2
- package/dist/types/components/combobox/combobox.types.d.ts +4 -0
- package/dist/types/components/combobox/index.d.ts +1 -0
- package/dist/types/components/icon/gator/templates/arrow-left.d.ts +1 -0
- package/dist/types/components/icon/gator/templates/chevron-down.d.ts +1 -0
- package/dist/types/components/icon/gator/templates/chevron-up.d.ts +1 -0
- package/dist/types/components/icon/gator/templates/eye-crossed.d.ts +1 -0
- package/dist/types/components/icon/gator/templates/index.d.ts +4 -0
- package/dist/types/components/icon/icon-list.gator.d.ts +9 -0
- package/dist/types/components/input/base/input-base.d.ts +10 -0
- package/dist/types/components/input/gator/input-text/input-text.gator.d.ts +21 -0
- package/dist/types/components/input/gator/input-text/input-text.gator.test.d.ts +0 -0
- package/dist/types/components/input/index.d.ts +1 -0
- package/dist/types/components/menu/base/slds/menu.slds.d.ts +4 -1
- package/dist/types/components/menu/base/slds/menu.slds.test.d.ts +0 -0
- package/dist/types/components/menu/menu-item/gator/menu-item.gator.d.ts +0 -3
- package/dist/types/components/menu/menu-item/menu-item.d.ts +3 -0
- package/dist/types/components/menu/menu-item/slds/menu-item.slds.test.d.ts +0 -0
- package/dist/types/components/menu/menu-submenu/menu-submenu.d.ts +1 -1
- package/dist/types/components/menu/menu-submenu/menu-submenu.slds.test.d.ts +0 -0
- package/dist/types/components/modal/gator/modal.gator.d.ts +27 -0
- package/dist/types/components/modal/gator/modal.gator.test.d.ts +0 -0
- package/dist/types/components/modal/index.d.ts +1 -0
- package/dist/types/components/modal/modal.d.ts +34 -0
- package/dist/types/components/tooltip/gator/tooltip.gator.d.ts +5 -2
- package/dist/types/components/tooltip/gator/tooltip.gator.test.d.ts +0 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.gator.d.ts +4 -3
- package/dist/types/utils/components/slot-placeholder/index.d.ts +1 -0
- package/dist/types/utils/components/slot-placeholder/slot-placeholder.d.ts +4 -0
- package/dist/types/utils/storybook-utils.d.ts +2 -1
- package/dist/types/utils/string-utils.d.ts +1 -0
- package/dist/utils/components/slot-placeholder/index.js +1 -0
- package/dist/utils/components/slot-placeholder/slot-placeholder.js +5 -0
- package/package.json +34 -30
- package/web-types.json +386 -85
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
## Getting Started
|
|
2
|
+
### View the Docs & Component Playground
|
|
3
|
+
#### SLDS
|
|
4
|
+
[](https://release--66f6c809a4249c107d91c9f5.chromatic.com/)
|
|
5
|
+
#### Gator
|
|
6
|
+
[](https://release--647602387404abb8d86f89f6.chromatic.com/)
|
|
7
|
+
|
|
8
|
+
### Consuming the nCino Web Components
|
|
9
|
+
nCino Web Components are Native Web Components that can be consumed in any framework, or no framework at all.
|
|
10
|
+
|
|
11
|
+
#### Framework Samples
|
|
12
|
+
View the samples in the `./samples` directory for examples of how to consume the components for the framework of your choice.
|
|
13
|
+
|
|
14
|
+
#### Consumption Options
|
|
15
|
+
You can either import components individually or all components through a single file.
|
|
16
|
+
|
|
17
|
+
##### Single File
|
|
18
|
+
Simple import the `index.js` included in the Dist. This file includes all components.
|
|
19
|
+
|
|
20
|
+
```javascript
|
|
21
|
+
import '@ncino/web-components';
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
##### Individual Components
|
|
25
|
+
Import the components you need individually.
|
|
26
|
+
|
|
27
|
+
```javascript
|
|
28
|
+
// SLDS Component
|
|
29
|
+
import '@ncino/web-components/dist/components/button/button.slds';
|
|
30
|
+
|
|
31
|
+
// Gator Component
|
|
32
|
+
import '@ncino/web-components/dist/components/button/button.gator';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
#### Getting IntelliSense on the Components
|
|
36
|
+
Included in the distribution of these components will include both a `custom-elements.json` manifest file and a `web-types.json` file
|
|
37
|
+
These files can be used to provide IntelliSense in your IDE and should work OOTB but may need additional configuration depending on your IDE.
|
|
38
|
+
|
|
39
|
+
#### Using Typescript?
|
|
40
|
+
Each of the component declare a global definition for the custom web components. This means your IDE can recognize the components and provide intellisense.
|
|
41
|
+
|
|
42
|
+
All types are exported in the `dist/types` folder of the npm package.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a=".gator-card{position:var(--ngc-card-position, relative);display:var(--ngc-card-display, inline-flex);flex-direction:var(--ngc-card-flex-direction, column);justify-content:var(--ngc-card-justify-content, left);border-radius:var(--ngc-card-border-radius, .5rem);max-width:var(--ngc-card-max-width, 25rem);font-family:var(--ngc-font-family),sans-serif;width:var(--ngc-card-width, auto);height:var(--ngc-card-height, auto);padding:var(--ngc-card-padding, 0);box-shadow:var(--ngc-card-box-shadow, none);background-color:var(--ngc-card-background-color, var(--color-grey-10));
|
|
1
|
+
const a=".gator-card{position:var(--ngc-card-position, relative);display:var(--ngc-card-display, inline-flex);flex-direction:var(--ngc-card-flex-direction, column);justify-content:var(--ngc-card-justify-content, left);border-radius:var(--ngc-card-border-radius, .5rem);max-width:var(--ngc-card-max-width, 25rem);font-family:var(--ngc-font-family),sans-serif;width:var(--ngc-card-width, auto);height:var(--ngc-card-height, auto);padding:var(--ngc-card-padding, 0);box-shadow:var(--ngc-card-box-shadow, none);outline:var(--ngc-card-outline, none);transform:var(--ngc-card-transform);background-color:var(--ngc-card-background-color, var(--color-grey-10));top:var(--ngc-card-top);left:var(--ngc-card-left)}.gator-card_elevated{box-shadow:var(--ngc-card-box-shadow, 0px 1px 1.5px 0px rgba(31, 31, 31, .04), 0px 2px 5px 0px rgba(31, 31, 31, .1), 0px 3px 9px 6px rgba(31, 31, 31, .05))}.gator-card_outlined{outline:var(--ngc-card-outline, 1px solid var(--color-blue-25, #C3CDD6))}";export{a as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const r=':host,:root{--color-background-primary: var(--color-blue-10, #F3F5F7);--color-stroke-brand: var(--color-blue-30, #11395B);--color-stroke-primary: var(--color-neutral-40);--color-stroke-success: var(--color-green-20);--color-stroke-warning: var(--color-orange-20);--color-stroke-error-weak: var(--color-red-20);--color-stroke-error-strong: var(--color-red-30);--color-text-primary-base: var(--color-neutral-70, #1F1F1F);--color-text-secondary: var(--color-neutral-50, #6D6D6D);--color-text-brand: var(--color-blue-30, #11395B);--color-text-placeholder: var(--color-neutral-50, #6D6D6D);--color-text-error: var(--color-red-40, #AA330E);--color-text-disabled: var(--color-neutral-40, #BFBFBF);--color-text-inverse: var(--color-neutral-0, #FFFFFF);--color-surface-primary: var(--color-neutral-0, #FFFFFF);--color-surface-brand: var(--color-blue-10, #F3F5F7);--color-surface-brand-secondary: var(--color-blue-20, #C3CDD6);--color-surface-secondary: var(--color-neutral-10);--color-surface-error: var(--color-red-10);--color-surface-success: var(--color-green-10);--color-surface-warning: var(--color-orange-10);--color-surface-badge: var(--color-red-30);--color-icon-error: var(--color-red-30);--color-icon-success: var(--color-green-30);--color-icon-warning: var(--color-orange-30);--color-icon-disabled: var(--color-neutral-40, #BFBFBF);--color-icon-brand: var(--color-blue-30);--color-primary-03-base: var(--color-neutral-70, #1F1F1F);--color-primary-01-placeholder: var(--color-neutral-50, #6D6D6D);--color-underline-primary: var(--color-neutral-40, #BFBFBF);--color-button-pressed: var(--color-neutral-60, #404040);--size-stroke-1: 1px;--text-size-body-1: 1.0625rem;--text-line-height-body-1: 1.5rem;--text-size-button-small: .8125rem;--text-size-button-large: 1.0625rem;--text-family-sans-serif: "Open Sans", sans-serif;--spacing-padding-margin-16: 1rem;--spacing-padding-margin-4: .25rem;--spacing-gap-8: .5rem}';export{r as s};
|
|
1
|
+
const r=':host,:root{--color-background-primary: var(--color-blue-10, #F3F5F7);--color-stroke-brand: var(--color-blue-30, #11395B);--color-stroke-primary: var(--color-neutral-40);--color-stroke-success: var(--color-green-20);--color-stroke-warning: var(--color-orange-20);--color-stroke-error-weak: var(--color-red-20);--color-stroke-error-strong: var(--color-red-30);--color-text-primary-base: var(--color-neutral-70, #1F1F1F);--color-text-secondary: var(--color-neutral-50, #6D6D6D);--color-text-brand: var(--color-blue-30, #11395B);--color-text-placeholder: var(--color-neutral-50, #6D6D6D);--color-text-error: var(--color-red-40, #AA330E);--color-text-disabled: var(--color-neutral-40, #BFBFBF);--color-text-inverse: var(--color-neutral-0, #FFFFFF);--color-surface-primary: var(--color-neutral-0, #FFFFFF);--color-surface-brand: var(--color-blue-10, #F3F5F7);--color-surface-brand-secondary: var(--color-blue-20, #C3CDD6);--color-surface-secondary: var(--color-neutral-10);--color-surface-error: var(--color-red-10);--color-surface-success: var(--color-green-10);--color-surface-warning: var(--color-orange-10);--color-surface-badge: var(--color-red-30);--color-icon-error: var(--color-red-30);--color-icon-success: var(--color-green-30);--color-icon-warning: var(--color-orange-30);--color-icon-disabled: var(--color-neutral-40, #BFBFBF);--color-icon-brand: var(--color-blue-30);--color-primary-03-base: var(--color-neutral-70, #1F1F1F);--color-primary-01-placeholder: var(--color-neutral-50, #6D6D6D);--color-underline-primary: var(--color-neutral-40, #BFBFBF);--color-button-pressed: var(--color-neutral-60, #404040);--color-focus-gap: var(--color-neutral-0, #FFFFFF);--color-focus-border: var(--color-blue-30, #11395B);--size-stroke-1: 1px;--text-size-body-1: 1.0625rem;--text-line-height-body-1: 1.5rem;--text-size-button-small: .8125rem;--text-size-button-large: 1.0625rem;--text-family-sans-serif: "Open Sans", sans-serif;--spacing-padding-margin-16: 1rem;--spacing-padding-margin-4: .25rem;--spacing-gap-8: .5rem}';export{r as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const c=":host{--ngc-card-background-color: var(--color-grey-10);--ngc-card-max-width: 25rem;--ngc-card-width: auto;--ngc-card-height: auto;--ngc-card-padding: 0;--ngc-card-border-radius: 1rem}";export{c};
|
|
1
|
+
const c=":host{--ngc-card-background-color: var(--color-grey-10);--ngc-card-max-width: 25rem;--ngc-card-width: auto;--ngc-card-height: auto;--ngc-card-padding: 0;--ngc-card-top: 0;--ngc-card-left: 0;--ngc-card-border-radius: 1rem}";export{c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as a}from"../../assets/index-chunk.js";import{n as t}from"../../assets/index-chunk2.js";import{g as l,a as h}from"../../utils/string-utils.js";var c=Object.defineProperty,i=(s,n,r,m)=>{for(var e=void 0,o=s.length-1,p;o>=0;o--)(p=s[o])&&(e=p(n,r,e)||e);return e&&c(n,r,e),e};class d extends a{constructor(){super(...arguments),this.isExpanded=!1,this.title="",this.subtitle="",this.id="",this._randomId=l(),this.headingLevel=""}get elementId(){return h(this.id,this._randomId)}toggleAccordion(){this.isExpanded=!this.isExpanded;const n=this.isExpanded?"accordion-expanded":"accordion-collapsed";this.dispatchEvent(new CustomEvent(n,{detail:{id:this.elementId,expanded:this.isExpanded},bubbles:!0,composed:!0}))}}i([t({type:Boolean,attribute:"is-expanded"})],d.prototype,"isExpanded");i([t({type:String})],d.prototype,"title");i([t({type:String})],d.prototype,"subtitle");i([t({type:String})],d.prototype,"id");i([t({type:String})],d.prototype,"headingLevel");export{d as N};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import{N as l}from"../../accordion.js";import{r as t,k as s}from"../../../../assets/index-chunk.js";import{t as g}from"../../../../assets/index-chunk3.js";import{p as h}from"../../../../assets/index-chunk4.js";import{s as p}from"../../../../assets/index-chunk5.js";import"../../../icon/gator/icon.gator.js";import"../../../icon/gator/templates/arrow-left.js";import"../../../icon/gator/templates/arrow-right.js";import"../../../icon/gator/templates/balloons.js";import"../../../icon/gator/templates/check-circle.js";import"../../../icon/gator/templates/checkbox.js";import"../../../icon/gator/templates/checkbox-selected.js";import"../../../icon/gator/templates/chevron-down.js";import"../../../icon/gator/templates/chevron-right.js";import"../../../icon/gator/templates/chevron-up.js";import"../../../icon/gator/templates/exit.js";import"../../../icon/gator/templates/exit-circle.js";import"../../../icon/gator/templates/eye-crossed.js";import"../../../icon/gator/templates/info.js";import"../../../icon/gator/templates/picture.js";import"../../../icon/gator/templates/radio.js";import"../../../icon/gator/templates/radio-selected.js";import"../../../icon/gator/templates/restricted.js";import"../../../icon/gator/templates/warning.js";import{i as m}from"../../../../utils/string-utils.js";import"../../../../assets/index-chunk2.js";import"../../../icon/icon-registry.js";const v=".accordion-container{font-family:var(--ngc-font-family);font-style:normal;font-weight:400;border-bottom:var(--ngc-accordion-border-bottom);width:var(--ngc-accordion-width)}.accordion-header{display:flex;align-items:flex-start;width:100%;border:none;background:none;justify-content:space-between;padding:var(--ngc-accordion-header-padding);gap:1rem}.accordion-text-container{display:flex;flex-direction:column;align-items:flex-start;gap:.5rem;flex:1 0 0;letter-spacing:var(--text-letter-spacing-default, 0rem)}.accordion-title{color:var(--ngc-accordion-title-text-color);font-size:var(--ngc-accordion-title-font-size);line-height:var(--ngc-accordion-title-line-height)}.accordion-text-content{color:var(--ngc-accordion-subtitle-text-color);font-size:var(--ngc-accordion-subtitle-font-size);line-height:var(--ngc-accordion-subtitle-line-height)}.accordion-content{padding:var(--ngc-accordion-content-padding)}.hidden{display:none}.accordion-header:hover{background:var(--ngc-accordion-header-background-color-hover)}.accordion-header:active{border:var(--ngc-accordion-header-border-active)}.accordion-header:focus-visible{outline:none;border:var(--ngc-accordion-header-border-focus);background:var(--ngc-accordion-header-background-color-focus)}",b=":host,:root{--ngc-accordion-title-text-color: var(--primary-01-placeholder, var(--color-grey-50, #6D6D6D));--ngc-accordion-subtitle-text-color: var(--primary-03-base, var(--color-grey-70, #1F1F1F));--ngc-accordion-header-background-color-hover: var(--color-surface-brand, #F3F5F7);--ngc-accordion-header-background-color-focus: var(--color-surface-brand, #F3F5F7);--ngc-accordion-header-border-color-active: var(--color-stroke-brand, #11395B);--ngc-accordion-header-border-color-focus: var(--color-stroke-brand, #11395B);--ngc-accordion-border-bottom: none;--ngc-accordion-header-border-active: 1px solid var(--ngc-accordion-header-border-color-active);--ngc-accordion-header-border-focus: 2px solid var(--ngc-accordion-header-border-color-focus);--ngc-accordion-width: 25.25rem;--ngc-accordion-header-padding: var(--spacing-gap-16, 1rem);--ngc-accordion-content-padding: var(--spacing-gap-16, 1rem) var(--spacing-gap-16, 1rem) var(--spacing-gap-24, 1.5rem) var(--spacing-padding-margin-16, 1rem);--ngc-accordion-title-font-size: var(--text-size-caption, .8125rem);--ngc-accordion-subtitle-font-size: var(--text-size-body-1, 1.0625rem);--ngc-accordion-title-line-height: var(--text-line-height-caption, 1.125rem);--ngc-accordion-subtitle-line-height: var(--text-line-height-body-1, 1.5rem)}";var u=Object.defineProperty,f=Object.getOwnPropertyDescriptor,x=(e,o,n,c)=>{for(var r=c>1?void 0:c?f(o,n):o,i=e.length-1,a;i>=0;i--)(a=e[i])&&(r=(c?a(o,n,r):a(r))||r);return c&&r&&u(o,n,r),r};let d=class extends l{render(){return s`
|
|
2
|
+
<div class="accordion-container">
|
|
3
|
+
<div class="accordion-header-container">
|
|
4
|
+
<button id="${this.headerId}"
|
|
5
|
+
type="button"
|
|
6
|
+
class="accordion-header"
|
|
7
|
+
aria-expanded=${this.isExpanded}
|
|
8
|
+
aria-controls="${this.contentId}"
|
|
9
|
+
@click="${this.toggleAccordion}">
|
|
10
|
+
<slot name="header">
|
|
11
|
+
${this.headerMarkup}
|
|
12
|
+
</slot>
|
|
13
|
+
<ngc-icon name=${this.iconName}></ngc-icon>
|
|
14
|
+
</button>
|
|
15
|
+
</div>
|
|
16
|
+
<div id="${this.contentId}"
|
|
17
|
+
role="region"
|
|
18
|
+
aria-labelledby="${this.headerId}"
|
|
19
|
+
class="accordion-content ${this.isExpanded?"":"hidden"}">
|
|
20
|
+
<slot name="content"></slot>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
`}get headerMarkup(){return this.title?s`<div class="accordion-text-container">
|
|
24
|
+
<span class="accordion-title">${this.title}</span>
|
|
25
|
+
<span class="accordion-text-content">${this.subtitle}</span>
|
|
26
|
+
</div>`:null}get iconName(){return this.isExpanded?"chevron-up":"chevron-down"}get contentId(){return this.elementId+"-content"}get headerId(){return this.elementId+"-header"}updated(){var e;if(m(this.headingLevel)){const o=(e=this.shadowRoot)==null?void 0:e.querySelector(".accordion-header-container");o==null||o.setAttribute("role","heading"),o==null||o.setAttribute("aria-level",this.headingLevel)}}};d.styles=[t(v),t(b),t(h),t(p)];d=x([g("ngc-accordion")],d);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{N as m}from"../../accordion.js";import{r as p,k as l}from"../../../../assets/index-chunk.js";import{t as g}from"../../../../assets/index-chunk3.js";import{n as a}from"../../../../assets/index-chunk2.js";import{p as u}from"../../../../assets/index-chunk4.js";import{s as h}from"../../../../assets/index-chunk5.js";import"../../../icon/gator/icon.gator.js";import"../../../icon/gator/templates/arrow-left.js";import"../../../icon/gator/templates/arrow-right.js";import"../../../icon/gator/templates/balloons.js";import"../../../icon/gator/templates/check-circle.js";import"../../../icon/gator/templates/checkbox.js";import"../../../icon/gator/templates/checkbox-selected.js";import"../../../icon/gator/templates/chevron-down.js";import"../../../icon/gator/templates/chevron-right.js";import"../../../icon/gator/templates/chevron-up.js";import"../../../icon/gator/templates/exit.js";import"../../../icon/gator/templates/exit-circle.js";import"../../../icon/gator/templates/eye-crossed.js";import"../../../icon/gator/templates/info.js";import"../../../icon/gator/templates/picture.js";import"../../../icon/gator/templates/radio.js";import"../../../icon/gator/templates/radio-selected.js";import"../../../icon/gator/templates/restricted.js";import"../../../icon/gator/templates/warning.js";import"../base/accordion.gator.js";import{i as v}from"../../../../utils/string-utils.js";import"../../../icon/icon-registry.js";const f=".accordion-group ::slotted(ngc-accordion:not(:last-child)){--ngc-accordion-border-bottom: var(--ngc-accordion-group-divider) }",y=":host,:root{--ngc-accordion-group-divider-color: var(--color-stroke-primary);--ngc-accordion-group-divider: 1px solid var(--ngc-accordion-group-divider-color)}";var x=Object.defineProperty,E=Object.getOwnPropertyDescriptor,s=(i,t,o,c)=>{for(var r=c>1?void 0:c?E(t,o):t,n=i.length-1,d;n>=0;n--)(d=i[n])&&(r=(c?d(t,o,r):d(r))||r);return c&&r&&x(t,o,r),r};let e=class extends m{constructor(){super(...arguments),this.multiple=!1,this.headingLevel=""}firstUpdated(){this.addEventListener("accordion-expanded",this.handleExpanded)}updated(){v(this.headingLevel)&&this.querySelectorAll("ngc-accordion").forEach(i=>{i.headingLevel=this.headingLevel})}render(){return l`
|
|
2
|
+
<div class="accordion-group">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
`}handleExpanded(i){if(this.multiple)return;this.querySelectorAll("ngc-accordion").forEach(o=>{o!==i.target&&o.isExpanded&&o.toggleAccordion()})}};e.styles=[p(f),p(y),p(u),p(h)];s([a({type:Boolean})],e.prototype,"multiple",2);s([a({type:String})],e.prototype,"headingLevel",2);e=s([g("ngc-accordion-group")],e);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{N as
|
|
1
|
+
import{N as m}from"../../alert.js";import{r as a,k as l}from"../../../../assets/index-chunk.js";import{t as p}from"../../../../assets/index-chunk3.js";import{p as g}from"../../../../assets/index-chunk4.js";import{s as d}from"../../../../assets/index-chunk5.js";import"../../../icon/gator/icon.gator.js";import"../../../icon/gator/templates/arrow-left.js";import"../../../icon/gator/templates/arrow-right.js";import"../../../icon/gator/templates/balloons.js";import"../../../icon/gator/templates/check-circle.js";import"../../../icon/gator/templates/checkbox.js";import"../../../icon/gator/templates/checkbox-selected.js";import"../../../icon/gator/templates/chevron-down.js";import"../../../icon/gator/templates/chevron-right.js";import"../../../icon/gator/templates/chevron-up.js";import"../../../icon/gator/templates/exit.js";import"../../../icon/gator/templates/exit-circle.js";import"../../../icon/gator/templates/eye-crossed.js";import"../../../icon/gator/templates/info.js";import"../../../icon/gator/templates/picture.js";import"../../../icon/gator/templates/radio.js";import"../../../icon/gator/templates/radio-selected.js";import"../../../icon/gator/templates/restricted.js";import"../../../icon/gator/templates/warning.js";import"../../../../assets/index-chunk2.js";import"../../../../utils/mixins/attribute-deletion.js";import"../../../icon/icon-registry.js";const f=".gator-alert{display:flex;padding:var(--ngc-alert-padding, 1.5rem);border-radius:1rem;align-content:center;flex-direction:row;font-size:var(--ngc-alert-font-size, 1.0625rem);font-family:var(--ngc-font-family)}.gator-alert_icon{margin-right:.625rem;display:flex;flex-direction:column;justify-content:center}.gator-alert_icon ngc-icon{--ngc-icon-display: flex}.gator-alert_actions{display:flex;flex-direction:column;justify-content:center;margin-left:auto}.gator-alert_content{display:flex;flex-direction:column;justify-content:center}.gator-alert_info{border:1px solid var(--color-stroke-primary);background:var(--color-surface-secondary)}.gator-alert_warning{border:1px solid var(--color-stroke-warning);background:var(--color-surface-warning);--ngc-icon-color: var(--color-icon-warning)}.gator-alert_error{border:1px solid var(--color-stroke-error-weak);background:var(--color-surface-error);--ngc-icon-color: var(--color-icon-error)}.gator-alert_success{border:1px solid var(--color-stroke-success);background:var(--color-surface-success);--ngc-icon-color: var(--color-icon-success)}.gator-alert_inverse{border:1px solid var(--color-stroke-primary)}",v=":host,:root{--ngc-alert-padding: 1.5rem;--ngc-alert-font-size: 1.0625rem}";var u=Object.defineProperty,b=Object.getOwnPropertyDescriptor,_=(r,t,i,e)=>{for(var o=e>1?void 0:e?b(t,i):t,n=r.length-1,c;n>=0;n--)(c=r[n])&&(o=(e?c(t,i,o):c(o))||o);return e&&o&&u(t,i,o),o};let s=class extends m{render(){return l`
|
|
2
2
|
<div class="gator-alert ${this.variantClass}" role="status" aria-label="${this.dataset.ariaLabel}">
|
|
3
3
|
<div class="gator-alert_icon">
|
|
4
4
|
${this.iconMarkup}
|
|
@@ -10,4 +10,4 @@ import{N as g}from"../../alert.js";import{r as a,k as l}from"../../../../assets/
|
|
|
10
10
|
<slot name="actions"></slot>
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
13
|
-
`}get variantClass(){return`gator-alert_${this.variant}`}get iconMarkup(){let r="info";switch(this.variant){case"info":r="info";break;case"warning":r="warning";break;case"error":r="restricted";break;case"success":r="check-circle";break;case"inverse":r="info";break}return l`<ngc-icon name="${r}" label="${r}"></ngc-icon>`}};s.styles=[a(f),a(v),a(
|
|
13
|
+
`}get variantClass(){return`gator-alert_${this.variant}`}get iconMarkup(){let r="info";switch(this.variant){case"info":r="info";break;case"warning":r="warning";break;case"error":r="restricted";break;case"success":r="check-circle";break;case"inverse":r="info";break}return l`<ngc-icon name="${r}" label="${r}"></ngc-icon>`}};s.styles=[a(f),a(v),a(g),a(d)];s=_([p("ngc-alert")],s);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./gator/base/alert.gator.js";import"./gator/subtitle/alert-subtitle.gator.js";import"./gator/title/alert-title.gator.js";import"./alert.js";import"../../assets/index-chunk.js";import"../../assets/index-chunk2.js";import"../../utils/mixins/attribute-deletion.js";import"../../assets/index-chunk3.js";import"../../assets/index-chunk4.js";import"../../assets/index-chunk5.js";import"../icon/gator/icon.gator.js";import"../icon/icon-registry.js";import"../icon/gator/templates/arrow-right.js";import"../icon/gator/templates/balloons.js";import"../icon/gator/templates/check-circle.js";import"../icon/gator/templates/checkbox.js";import"../icon/gator/templates/checkbox-selected.js";import"../icon/gator/templates/chevron-right.js";import"../icon/gator/templates/exit.js";import"../icon/gator/templates/exit-circle.js";import"../icon/gator/templates/info.js";import"../icon/gator/templates/picture.js";import"../icon/gator/templates/radio.js";import"../icon/gator/templates/radio-selected.js";import"../icon/gator/templates/restricted.js";import"../icon/gator/templates/warning.js";
|
|
1
|
+
import"./gator/base/alert.gator.js";import"./gator/subtitle/alert-subtitle.gator.js";import"./gator/title/alert-title.gator.js";import"./alert.js";import"../../assets/index-chunk.js";import"../../assets/index-chunk2.js";import"../../utils/mixins/attribute-deletion.js";import"../../assets/index-chunk3.js";import"../../assets/index-chunk4.js";import"../../assets/index-chunk5.js";import"../icon/gator/icon.gator.js";import"../icon/gator/templates/arrow-left.js";import"../icon/icon-registry.js";import"../icon/gator/templates/arrow-right.js";import"../icon/gator/templates/balloons.js";import"../icon/gator/templates/check-circle.js";import"../icon/gator/templates/checkbox.js";import"../icon/gator/templates/checkbox-selected.js";import"../icon/gator/templates/chevron-down.js";import"../icon/gator/templates/chevron-right.js";import"../icon/gator/templates/chevron-up.js";import"../icon/gator/templates/exit.js";import"../icon/gator/templates/exit-circle.js";import"../icon/gator/templates/eye-crossed.js";import"../icon/gator/templates/info.js";import"../icon/gator/templates/picture.js";import"../icon/gator/templates/radio.js";import"../icon/gator/templates/radio-selected.js";import"../icon/gator/templates/restricted.js";import"../icon/gator/templates/warning.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as o,k as l}from"../../../assets/index-chunk.js";import{t as g}from"../../../assets/index-chunk3.js";import{p}from"../../../assets/index-chunk4.js";import{s as m}from"../../../assets/index-chunk5.js";import"../../icon/gator/icon.gator.js";import"../../icon/gator/templates/arrow-right.js";import"../../icon/gator/templates/balloons.js";import"../../icon/gator/templates/check-circle.js";import"../../icon/gator/templates/checkbox.js";import"../../icon/gator/templates/checkbox-selected.js";import"../../icon/gator/templates/chevron-right.js";import"../../icon/gator/templates/exit.js";import"../../icon/gator/templates/exit-circle.js";import"../../icon/gator/templates/info.js";import"../../icon/gator/templates/picture.js";import"../../icon/gator/templates/radio.js";import"../../icon/gator/templates/radio-selected.js";import"../../icon/gator/templates/restricted.js";import"../../icon/gator/templates/warning.js";import{N as f}from"../banner.js";import{i as d,K as b}from"../../../assets/index-chunk7.js";import"../../../assets/index-chunk2.js";import"../../icon/icon-registry.js";import"../../../utils/mixins/attribute-deletion.js";import"../../../assets/index-chunk8.js";const u='.gator-banner{display:flex;align-items:center;justify-content:space-between;padding:var(--ngc-banner-padding, 1.5rem);font-size:var(--ngc-banner-font-size, 1.0625rem);font-family:var(--ngc-font-family),"Open Sans",sans-serif;text-align:center}.gator-banner_centered{justify-content:center}.gator-banner_left-aligned{justify-content:space-between}.gator-banner_left-aligned .gator-banner-content-wrapper{justify-content:start}.gator-banner-content-wrapper{display:flex;align-items:center;justify-content:center;flex-grow:1}.gator-banner-icon{margin-right:.625rem;display:flex;align-items:center;justify-content:center}.gator-banner-content{display:flex;flex-direction:column;align-items:center;justify-content:center}.gator-banner-actions{display:flex;flex-direction:column;justify-content:center;margin-left:auto}.gator-banner_warning{background:var(--color-surface-warning);--ngc-icon-color: var(--color-icon-warning)}.gator-banner_error{background:var(--color-surface-error);--ngc-icon-color: var(--color-icon-error)}.gator-banner_success{background:var(--color-surface-success);--ngc-icon-color: var(--color-icon-success)}',v=":host,:root{--ngc-banner-padding: 1.5rem;--ngc-banner-font-size: 1.0625rem}";var h=Object.defineProperty,y=Object.getOwnPropertyDescriptor,_=(n,t,e,a)=>{for(var r=a>1?void 0:a?y(t,e):t,i=n.length-1,s;i>=0;i--)(s=n[i])&&(r=(a?s(t,e,r):s(r))||r);return a&&r&&h(t,e,r),r};let c=class extends f{constructor(){super(...arguments),this.contentRef=d(),this.hasActions=!1}render(){return l`
|
|
1
|
+
import{r as o,k as l}from"../../../assets/index-chunk.js";import{t as g}from"../../../assets/index-chunk3.js";import{p}from"../../../assets/index-chunk4.js";import{s as m}from"../../../assets/index-chunk5.js";import"../../icon/gator/icon.gator.js";import"../../icon/gator/templates/arrow-left.js";import"../../icon/gator/templates/arrow-right.js";import"../../icon/gator/templates/balloons.js";import"../../icon/gator/templates/check-circle.js";import"../../icon/gator/templates/checkbox.js";import"../../icon/gator/templates/checkbox-selected.js";import"../../icon/gator/templates/chevron-down.js";import"../../icon/gator/templates/chevron-right.js";import"../../icon/gator/templates/chevron-up.js";import"../../icon/gator/templates/exit.js";import"../../icon/gator/templates/exit-circle.js";import"../../icon/gator/templates/eye-crossed.js";import"../../icon/gator/templates/info.js";import"../../icon/gator/templates/picture.js";import"../../icon/gator/templates/radio.js";import"../../icon/gator/templates/radio-selected.js";import"../../icon/gator/templates/restricted.js";import"../../icon/gator/templates/warning.js";import{N as f}from"../banner.js";import{i as d,K as b}from"../../../assets/index-chunk7.js";import"../../../assets/index-chunk2.js";import"../../icon/icon-registry.js";import"../../../utils/mixins/attribute-deletion.js";import"../../../assets/index-chunk8.js";const u='.gator-banner{display:flex;align-items:center;justify-content:space-between;padding:var(--ngc-banner-padding, 1.5rem);font-size:var(--ngc-banner-font-size, 1.0625rem);font-family:var(--ngc-font-family),"Open Sans",sans-serif;text-align:center}.gator-banner_centered{justify-content:center}.gator-banner_left-aligned{justify-content:space-between}.gator-banner_left-aligned .gator-banner-content-wrapper{justify-content:start}.gator-banner-content-wrapper{display:flex;align-items:center;justify-content:center;flex-grow:1}.gator-banner-icon{margin-right:.625rem;display:flex;align-items:center;justify-content:center}.gator-banner-content{display:flex;flex-direction:column;align-items:center;justify-content:center}.gator-banner-actions{display:flex;flex-direction:column;justify-content:center;margin-left:auto}.gator-banner_warning{background:var(--color-surface-warning);--ngc-icon-color: var(--color-icon-warning)}.gator-banner_error{background:var(--color-surface-error);--ngc-icon-color: var(--color-icon-error)}.gator-banner_success{background:var(--color-surface-success);--ngc-icon-color: var(--color-icon-success)}',v=":host,:root{--ngc-banner-padding: 1.5rem;--ngc-banner-font-size: 1.0625rem}";var h=Object.defineProperty,y=Object.getOwnPropertyDescriptor,_=(n,t,e,a)=>{for(var r=a>1?void 0:a?y(t,e):t,i=n.length-1,s;i>=0;i--)(s=n[i])&&(r=(a?s(t,e,r):s(r))||r);return a&&r&&h(t,e,r),r};let c=class extends f{constructor(){super(...arguments),this.contentRef=d(),this.hasActions=!1}render(){return l`
|
|
2
2
|
<div
|
|
3
3
|
class="gator-banner ${this.variantClass} ${this.hasActions?"gator-banner_left-aligned":"gator-banner_centered"}"
|
|
4
4
|
role="status"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./gator/banner.gator.js";import"../../assets/index-chunk.js";import"../../assets/index-chunk3.js";import"../../assets/index-chunk4.js";import"../../assets/index-chunk5.js";import"../icon/gator/icon.gator.js";import"../../assets/index-chunk2.js";import"../icon/icon-registry.js";import"../icon/gator/templates/arrow-right.js";import"../icon/gator/templates/balloons.js";import"../icon/gator/templates/check-circle.js";import"../icon/gator/templates/checkbox.js";import"../icon/gator/templates/checkbox-selected.js";import"../icon/gator/templates/chevron-right.js";import"../icon/gator/templates/exit.js";import"../icon/gator/templates/exit-circle.js";import"../icon/gator/templates/info.js";import"../icon/gator/templates/picture.js";import"../icon/gator/templates/radio.js";import"../icon/gator/templates/radio-selected.js";import"../icon/gator/templates/restricted.js";import"../icon/gator/templates/warning.js";import"./banner.js";import"../../utils/mixins/attribute-deletion.js";import"../../assets/index-chunk7.js";import"../../assets/index-chunk8.js";
|
|
1
|
+
import"./gator/banner.gator.js";import"../../assets/index-chunk.js";import"../../assets/index-chunk3.js";import"../../assets/index-chunk4.js";import"../../assets/index-chunk5.js";import"../icon/gator/icon.gator.js";import"../../assets/index-chunk2.js";import"../icon/gator/templates/arrow-left.js";import"../icon/icon-registry.js";import"../icon/gator/templates/arrow-right.js";import"../icon/gator/templates/balloons.js";import"../icon/gator/templates/check-circle.js";import"../icon/gator/templates/checkbox.js";import"../icon/gator/templates/checkbox-selected.js";import"../icon/gator/templates/chevron-down.js";import"../icon/gator/templates/chevron-right.js";import"../icon/gator/templates/chevron-up.js";import"../icon/gator/templates/exit.js";import"../icon/gator/templates/exit-circle.js";import"../icon/gator/templates/eye-crossed.js";import"../icon/gator/templates/info.js";import"../icon/gator/templates/picture.js";import"../icon/gator/templates/radio.js";import"../icon/gator/templates/radio-selected.js";import"../icon/gator/templates/restricted.js";import"../icon/gator/templates/warning.js";import"./banner.js";import"../../utils/mixins/attribute-deletion.js";import"../../assets/index-chunk7.js";import"../../assets/index-chunk8.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as
|
|
1
|
+
import{r as i,h as p,k as b}from"../../assets/index-chunk.js";import{t as g}from"../../assets/index-chunk3.js";import{n as t}from"../../assets/index-chunk2.js";import{p as u}from"../../assets/index-chunk4.js";import{s as h}from"../../assets/index-chunk5.js";import{g as v,a as m}from"../../utils/string-utils.js";import"../radio-group/radio-group.gator.js";import"../../consts/key-constants.js";import"../radio/radio.gator.js";import"../icon/gator/icon.gator.js";import"../icon/gator/templates/arrow-left.js";import"../icon/icon-registry.js";import"../icon/gator/templates/arrow-right.js";import"../icon/gator/templates/balloons.js";import"../icon/gator/templates/check-circle.js";import"../icon/gator/templates/checkbox.js";import"../icon/gator/templates/checkbox-selected.js";import"../icon/gator/templates/chevron-down.js";import"../icon/gator/templates/chevron-right.js";import"../icon/gator/templates/chevron-up.js";import"../icon/gator/templates/exit.js";import"../icon/gator/templates/exit-circle.js";import"../icon/gator/templates/eye-crossed.js";import"../icon/gator/templates/info.js";import"../icon/gator/templates/picture.js";import"../icon/gator/templates/radio.js";import"../icon/gator/templates/radio-selected.js";import"../icon/gator/templates/restricted.js";import"../icon/gator/templates/warning.js";import"../../utils/lightdom-utils.js";import"../input/gator/help-text/help-text.gator.js";import"../input/gator/input-label/input-label.gator.js";const f=":root,:host{--ngc-radio-group-flex-direction: row;--ngc-radio-group-gap: 0}ngc-radio{display:flex;padding:1.5rem 5.1875rem;flex-direction:column;justify-content:center;align-items:center;flex:1 0 0;cursor:pointer;z-index:0;border:var(--ngc-boolean-border);background:var(--ngc-boolean-background-color)}.gator-boolean-option-0{border-radius:var(--ngc-boolean-outer-border-radius) 0 0 var(--ngc-boolean-outer-border-radius)}.gator-boolean-option-1{margin-top:0;margin-left:-1px;border-radius:0 var(--ngc-boolean-outer-border-radius) var(--ngc-boolean-outer-border-radius) 0}.gator-boolean_wrapped .gator-boolean-option-0{border-radius:var(--ngc-boolean-outer-border-radius) var(--ngc-boolean-outer-border-radius) 0 0}.gator-boolean_wrapped .gator-boolean-option-1{margin-top:-1px;margin-left:0;border-radius:0 0 var(--ngc-boolean-outer-border-radius) var(--ngc-boolean-outer-border-radius)}ngc-radio:has([aria-checked=true]):has([aria-disabled=false]):has([aria-invalid=false]){z-index:1;background:var(--ngc-boolean-background-color-selected);border:var(--ngc-boolean-border-selected);animation:.3s ease-out selectBoolean}@keyframes selectBoolean{0%{background:var(--ngc-boolean-background-color);border:var(--ngc-boolean-border)}to{background:var(--ngc-boolean-background-color-selected);border:var(--ngc-boolean-border-selected)}}ngc-radio:has([aria-disabled=false]):hover{z-index:1;box-shadow:var(--ngc-boolean-box-shadow-hover)}ngc-radio:has([aria-disabled=false]):has([aria-invalid=false]):hover{border:var(--ngc-boolean-border-hover)}ngc-radio:has([aria-disabled=true]):hover{cursor:not-allowed}ngc-radio:has(:focus-visible){z-index:1;border:var(--ngc-boolean-border-focus);outline:var(--ngc-boolean-outline-focus);outline-offset:1px}ngc-radio:has(:focus-visible) .gator-radio ngc-icon{border:none}ngc-radio:has(.gator-radio_error){border:var(--ngc-boolean-border-error)}ngc-radio:has(.gator-radio_error) ngc-icon{color:var(--color-neutral-40)}",x=":host,:root{--ngc-boolean-background-color: var(--color-neutral-0, #FFF);--ngc-boolean-background-color-selected: var(--color-blue-5, #F3F5F7);--ngc-boolean-border-color: var(--color-neutral-40, #BFBFBF);--ngc-boolean-border-color-selected: var(--color-blue-50, #11395B);--ngc-boolean-border-color-hover: var(--color-blue-50, #11395B);--ngc-boolean-border-color-focus: var(--color-blue-50, #11395B);--ngc-boolean-outline-color-focus: var(--color-blue-50, #11395B);--ngc-boolean-border-color-error: var(--color-stroke-error-strong);--ngc-boolean-border: var(--size-stroke-1, 1px) solid var(--ngc-boolean-border-color);--ngc-boolean-border-selected: var(--size-stroke-1, 1px) solid var(--ngc-boolean-border-color-selected);--ngc-boolean-border-hover: var(--size-stroke-1, 1px) solid var(--ngc-boolean-border-color-hover);--ngc-boolean-border-focus: var(--size-stroke-1, 1px) solid var(--ngc-boolean-border-color-focus);--ngc-boolean-border-error: var(--size-stroke-1, 1px) solid var(--ngc-boolean-border-color-error);--ngc-boolean-outline-focus: var(--size-stroke-1, 1px) solid var(--ngc-boolean-outline-color-focus);--ngc-boolean-box-shadow-hover: 0px 5px 10px 0px rgba(31, 31, 31, .1), 0px 7px 14px 0px rgba(31, 31, 31, .08), 0px 3px 6px 0px rgba(31, 31, 31, .08);--ngc-boolean-outer-border-radius: .125rem}";var y=Object.defineProperty,w=Object.getOwnPropertyDescriptor,a=(o,r,l,s)=>{for(var n=s>1?void 0:s?w(r,l):r,d=o.length-1,c;d>=0;d--)(c=o[d])&&(n=(s?c(r,l,n):c(n))||n);return s&&n&&y(r,l,n),n};let e=class extends p{constructor(){super(...arguments),this.id="",this.options=[],this.disabled=!1,this.value="",this.label="",this.helpText="",this.hasError=!1,this.errorMessage="",this._randomId=v()}firstUpdated(){this.handleResize(),window.addEventListener("resize",()=>this.handleResize())}render(){return b`
|
|
2
2
|
<ngc-radio-group
|
|
3
3
|
class=${this.booleanClasses}
|
|
4
4
|
id=${this.elementId}
|
|
@@ -19,4 +19,4 @@ import{r as l,h as g,k as b}from"../../assets/index-chunk.js";import{t as p}from
|
|
|
19
19
|
title-text=${o.label}
|
|
20
20
|
tabindex="-1"
|
|
21
21
|
></ngc-radio>
|
|
22
|
-
`)}`}handleChange(o){const r=o;r.stopImmediatePropagation(),this.value=r.detail,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:this.value}))}handleResize(){var r;const o=(r=this.shadowRoot)==null?void 0:r.querySelector("ngc-radio-group");this.isWrapped()?o==null||o.classList.add("gator-boolean_wrapped"):o==null||o.classList.remove("gator-boolean_wrapped")}isWrapped(){var r;const o=(r=this.shadowRoot)==null?void 0:r.querySelectorAll("ngc-radio");return!!(o&&o.length>0&&o[0].offsetTop<o[1].offsetTop||window.innerWidth<475)}};e.styles=[
|
|
22
|
+
`)}`}handleChange(o){const r=o;r.stopImmediatePropagation(),this.value=r.detail,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:this.value}))}handleResize(){var r;const o=(r=this.shadowRoot)==null?void 0:r.querySelector("ngc-radio-group");this.isWrapped()?o==null||o.classList.add("gator-boolean_wrapped"):o==null||o.classList.remove("gator-boolean_wrapped")}isWrapped(){var r;const o=(r=this.shadowRoot)==null?void 0:r.querySelectorAll("ngc-radio");return!!(o&&o.length>0&&o[0].offsetTop<o[1].offsetTop||window.innerWidth<475)}};e.styles=[i(f),i(x),i(u),i(h)];a([t({type:String})],e.prototype,"id",2);a([t({type:Array})],e.prototype,"options",2);a([t({type:Boolean})],e.prototype,"disabled",2);a([t({type:String})],e.prototype,"value",2);a([t({type:String})],e.prototype,"label",2);a([t({type:String,attribute:"help-text"})],e.prototype,"helpText",2);a([t({type:Boolean,attribute:"has-error"})],e.prototype,"hasError",2);a([t({type:String,attribute:"error-message"})],e.prototype,"errorMessage",2);e=a([g("ngc-boolean")],e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./boolean.gator.js";import"../../assets/index-chunk.js";import"../../assets/index-chunk3.js";import"../../assets/index-chunk2.js";import"../../assets/index-chunk4.js";import"../../assets/index-chunk5.js";import"../../utils/string-utils.js";import"../radio-group/radio-group.gator.js";import"../../consts/key-constants.js";import"../radio/radio.gator.js";import"../icon/gator/icon.gator.js";import"../icon/
|
|
1
|
+
import"./boolean.gator.js";import"../../assets/index-chunk.js";import"../../assets/index-chunk3.js";import"../../assets/index-chunk2.js";import"../../assets/index-chunk4.js";import"../../assets/index-chunk5.js";import"../../utils/string-utils.js";import"../radio-group/radio-group.gator.js";import"../../consts/key-constants.js";import"../radio/radio.gator.js";import"../icon/gator/icon.gator.js";import"../icon/gator/templates/arrow-left.js";import"../icon/icon-registry.js";import"../icon/gator/templates/arrow-right.js";import"../icon/gator/templates/balloons.js";import"../icon/gator/templates/check-circle.js";import"../icon/gator/templates/checkbox.js";import"../icon/gator/templates/checkbox-selected.js";import"../icon/gator/templates/chevron-down.js";import"../icon/gator/templates/chevron-right.js";import"../icon/gator/templates/chevron-up.js";import"../icon/gator/templates/exit.js";import"../icon/gator/templates/exit-circle.js";import"../icon/gator/templates/eye-crossed.js";import"../icon/gator/templates/info.js";import"../icon/gator/templates/picture.js";import"../icon/gator/templates/radio.js";import"../icon/gator/templates/radio-selected.js";import"../icon/gator/templates/restricted.js";import"../icon/gator/templates/warning.js";import"../../utils/lightdom-utils.js";import"../input/gator/help-text/help-text.gator.js";import"../input/gator/input-label/input-label.gator.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as
|
|
1
|
+
import{h as d}from"../../assets/index-chunk.js";import{n as e}from"../../assets/index-chunk2.js";var m=Object.defineProperty,r=(a,s,p,u)=>{for(var t=void 0,o=a.length-1,n;o>=0;o--)(n=a[o])&&(t=n(s,p,t)||t);return t&&m(s,p,t),t};class i extends d{constructor(){super(...arguments),this.variant="primary",this.size="medium",this.disabled=!1,this.dataTestid="",this.iconName=""}}r([e()],i.prototype,"variant");r([e()],i.prototype,"size");r([e({type:Boolean})],i.prototype,"disabled");r([e({type:String,attribute:"data-testid"})],i.prototype,"dataTestid");r([e({type:String,attribute:"icon-name"})],i.prototype,"iconName");export{i as N};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import{N as
|
|
2
|
-
<button
|
|
3
|
-
|
|
1
|
+
import{N as b}from"../button.js";import{r as a,k as c}from"../../../assets/index-chunk.js";import{t as d}from"../../../assets/index-chunk3.js";import{p as l}from"../../../assets/index-chunk4.js";import{s as g}from"../../../assets/index-chunk5.js";import{i as h}from"../../../utils/string-utils.js";import"../../../assets/index-chunk2.js";const v=":host{--ngc-button-background-color: unset;--ngc-button-color: white;--ngc-button-font-size: var(--text-size-button-small, .8125rem);--ngc-button-color-text-link: var(--color-neutral-70, #1F1F1F);--ngc-button-border-color: var(--color-neutral-70);--ngc-button-hover-box-shadow: 0px 3px 6px 0px rgba(31, 31, 31, .2);--ngc-button-focus-box-shadow: 0px 9px 15px rgba(31, 31, 31, .08), 0px 10px 20px rgba(31, 31, 31, .08), 0px 9px 20px rgba(31, 31, 31, .08), 0 0 0 2px #fff, 0 0 0 3px #11395B;--ngc-button-disabled-background-color: #bfbfbf;--ngc-button-pressed-background-color: #404040;--ngc-button-hover-background-color: unset;--ngc-button-border-radius: 2px;--ngc-button-border-width: 1px;--ngc-button-padding: .3125rem .75rem;--ngc-button-margin: auto}",p='.gator-button{border-style:none;cursor:pointer;font-family:var(--ngc-font-family),sans-serif;font-weight:600;margin:var(--ngc-button-margin, auto);width:var(--ngc-button-width);height:var(--ngc-button-height)}.gator-button_primary{background-color:var(--ngc-button-background-color, var(--color-neutral-70));color:var(--ngc-button-color);padding:var(--ngc-button-padding);border-radius:var(--ngc-button-border-radius, 2px);border-width:var(--ngc-button-border-width);border-color:var(--ngc-button-border-color);border-style:var(--ngc-button-border-style);transition:box-shadow .3s}.gator-button_primary:hover{background-color:var(--ngc-button-hover-background-color, var(--color-black-100));box-shadow:var(--ngc-button-hover-box-shadow)}.gator-button_primary:hover:disabled{box-shadow:none;cursor:not-allowed}.gator-button_primary:focus-visible{outline:none;box-shadow:var(--ngc-button-focus-box-shadow)}.gator-button_primary:hover{cursor:pointer}.gator-button_primary:disabled{background-color:var(--ngc-button-disabled-background-color)}.gator-button_primary:active{background-color:var(--ngc-button-pressed-background-color)}.gator-button_primary:active:disabled{background-color:var(--ngc-button-disabled-background-color)}.gator-button_secondary{position:relative;background-color:var(--ngc-button-background-color, transparent);color:var(--color-neutral-70);padding:var(--ngc-button-padding);border-radius:var(--ngc-button-border-radius);transition:box-shadow .3s}.gator-button_secondary:before{content:"";position:absolute;top:0;left:0;bottom:0;right:0;border-radius:var(--ngc-button-border-radius, 2px);border-width:var(--ngc-button-border-width, 1px);border-color:var(--ngc-button-border-color, var(--color-neutral-70));border-style:solid}.gator-button_secondary:hover{background-color:var(--ngc-button-background-color, var(--color-neutral-70));box-shadow:var(--ngc-button-hover-box-shadow);color:var(--color-grey-10)}.gator-button_secondary:focus-visible{outline:none;box-shadow:var(--ngc-button-focus-box-shadow)}.gator-button_secondary:active{background-color:var(--ngc-button-pressed-background-color);color:var(--color-grey-10)}.gator-button_text-link{color:var(--ngc-button-color-text-link);border-bottom:1px solid var(--color-underline-primary);padding:0;background:none}.gator-button_text-link:active{background-color:unset}.gator-button_icon{display:inline-flex;justify-content:center;align-items:center;padding:0;background-color:unset;border-radius:50%;width:2.5rem;height:2.5rem}.gator-button__small{font-size:.8125rem;line-height:1.125rem;padding:.3125rem .75rem}.gator-button__medium:not(.gator-button_icon){font-size:.9375rem;line-height:1.125rem;padding:.5625rem 1rem}.gator-button__large{font-size:1.0625rem;line-height:1.5rem;padding:.75rem 1rem}.gator-button__x-large{font-size:1rem;line-height:1.5rem;padding:1rem 2.5rem}';var m=Object.defineProperty,x=Object.getOwnPropertyDescriptor,f=(o,t,r,e)=>{for(var n=e>1?void 0:e?x(t,r):t,i=o.length-1,s;i>=0;i--)(s=o[i])&&(n=(e?s(t,r,n):s(n))||n);return e&&n&&m(t,r,n),n};let u=class extends b{render(){return c`
|
|
2
|
+
<button
|
|
3
|
+
tabindex="-1"
|
|
4
|
+
class="gator-button ${this.variantClass} ${this.sizeClass}"
|
|
5
|
+
.disabled="${this.disabled}"
|
|
6
|
+
>
|
|
7
|
+
${this.variant==="icon"?this.gatorButtonIconMarkup:c`<slot></slot>`}
|
|
4
8
|
</button>
|
|
5
|
-
`}get variantClass(){return this.variant?`gator-button_${this.variant}`:
|
|
9
|
+
`}get variantClass(){return this.variant?`gator-button_${this.variant}`:null}get sizeClass(){return this.size?`gator-button__${this.size}`:null}get gatorButtonIconMarkup(){return c`<ngc-icon .name="${this.iconName}"></ngc-icon>`}constructor(){super(),this.addEventListener("focus",this.handleFocus),this.addEventListener("blur",this.handleBlur),this.setAttribute("tabindex","0")}updated(){var t,r;const o=(t=this.shadowRoot)==null?void 0:t.querySelector("button");h(this.dataTestid)?o==null||o.setAttribute("data-testid",`${this.dataTestid}-button`):o==null||o.removeAttribute("data-testid"),(r=this.shadowRoot)==null||r.addEventListener("focus",this.handleFocus)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focus",this.handleFocus),this.removeEventListener("blur",this.handleBlur)}handleFocus(o){var t,r;o.preventDefault(),(r=(t=this.shadowRoot)==null?void 0:t.querySelector("button"))==null||r.focus(),this.setAttribute("tabindex","-1")}handleBlur(o){o.preventDefault(),this.setAttribute("tabindex","0")}};u.styles=[a(v),a(p),a(l),a(g)];u=f([d("ngc-button")],u);export{v as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{N as
|
|
1
|
+
import{N as u}from"../button.js";import{r as a,k as m}from"../../../assets/index-chunk.js";import{s as f}from"../../../assets/index-chunk6.js";import{t as p}from"../../../assets/index-chunk3.js";import"../../../assets/index-chunk2.js";var _=Object.defineProperty,v=Object.getOwnPropertyDescriptor,b=(i,s,e,r)=>{for(var t=r>1?void 0:r?v(s,e):s,o=i.length-1,n;o>=0;o--)(n=i[o])&&(t=(r?n(s,e,t):n(t))||t);return r&&t&&_(s,e,t),t};let l=class extends u{get _themeClass(){return this.variant?`slds-button_${this.variant}`:null}render(){return m`
|
|
2
2
|
<button class="slds-button ${this._themeClass}">
|
|
3
3
|
<slot>! Missing Text !</slot>
|
|
4
4
|
</button>
|
|
5
|
-
`}};
|
|
5
|
+
`}};l.styles=[a(f)];l=b([p("nsc-button")],l);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{r as
|
|
1
|
+
import{r as s,h as o,k as g}from"../../../../assets/index-chunk.js";import{p as f}from"../../../../assets/index-chunk4.js";import{s as v}from"../../../../assets/index-chunk5.js";import{t as d}from"../../../../assets/index-chunk3.js";const p=":host{--ngc-card-title-padding: var(--spacing-6) var(--spacing-6) 0 var(--spacing-6)}.gator-card-title{padding:var(--ngc-card-title-padding);font-size:var(--ngc-card-title-font-size, 2rem);font-weight:var(--ngc-card-title-font-weight, 700);font-family:var(--ngc-card-title-font-family),var(--ngc-font-family),sans-serif;color:var(--color-neutral-70);line-height:var(--ngc-card-title-line-height);margin:var(--ngc-card-title-margin)}";var m=Object.defineProperty,h=Object.getOwnPropertyDescriptor,_=(l,t,e,a)=>{for(var r=a>1?void 0:a?h(t,e):t,i=l.length-1,n;i>=0;i--)(n=l[i])&&(r=(a?n(t,e,r):n(r))||r);return a&&r&&m(t,e,r),r};let c=class extends o{render(){return g`
|
|
2
2
|
<div class="gator-card-title">
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</div>
|
|
5
|
-
`}};c.styles=[
|
|
5
|
+
`}};c.styles=[s(p),s(f),s(v)];c=_([d("ngc-card-title")],c);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{h,k as
|
|
2
|
-
<style>${
|
|
1
|
+
import{h,k as d}from"../../assets/index-chunk.js";import{t as b}from"../../assets/index-chunk3.js";import{n as r}from"../../assets/index-chunk2.js";import{g,a as x}from"../../utils/string-utils.js";import{c as p}from"../../utils/lightdom-utils.js";import{p as k}from"../../assets/index-chunk4.js";import{s as m}from"../../assets/index-chunk5.js";import"../icon/gator/icon.gator.js";import"../icon/gator/templates/arrow-left.js";import"../icon/gator/templates/arrow-right.js";import"../icon/gator/templates/balloons.js";import"../icon/gator/templates/check-circle.js";import"../icon/gator/templates/checkbox.js";import"../icon/gator/templates/checkbox-selected.js";import"../icon/gator/templates/chevron-down.js";import"../icon/gator/templates/chevron-right.js";import"../icon/gator/templates/chevron-up.js";import"../icon/gator/templates/exit.js";import"../icon/gator/templates/exit-circle.js";import"../icon/gator/templates/eye-crossed.js";import"../icon/gator/templates/info.js";import"../icon/gator/templates/picture.js";import"../icon/gator/templates/radio.js";import"../icon/gator/templates/radio-selected.js";import"../icon/gator/templates/restricted.js";import"../icon/gator/templates/warning.js";import{h as f}from"../../utils/datatestid-utils.js";import"../icon/icon-registry.js";const u=":root,:host{--ngc-checkbox-title-color-default: var(--color-text-primary-base);--ngc-checkbox-title-color-disabled: var(--color-text-disabled);--ngc-checkbox-icon-color-focus: var(--color-icon-brand);--ngc-checkbox-icon-color-hover: var(--color-icon-brand);--ngc-checkbox-icon-color-selected: var(--color-icon-brand);--ngc-checkbox-icon-color-unselected: var(--color-neutral-40);--ngc-checkbox-icon-color-disabled: var(--color-icon-disabled);--ngc-checkbox-icon-color-error: var(--color-icon-error);--ngc-checkbox-focus-border-color: var(--color-icon-brand);--ngc-checkbox-focus-border: var(--size-stroke-1, 1px) solid var(--ngc-checkbox-focus-border-color);--ngc-checkbox-icon-spacing: var(--spacing-padding-margin-4);--ngc-checkbox-title-font-size: var(--text-size-body-1, 1.0625rem);--ngc-checkbox-title-line-height: var(--text-line-height-body-1, 1.5rem)}",v='.gator-checkbox{display:flex;width:fit-content;flex-direction:row;align-items:center}.gator-checkbox-icon{display:flex;flex-direction:column;justify-content:center;margin-right:var(--ngc-checkbox-icon-spacing);color:var(--ngc-checkbox-icon-color-unselected)}.gator-checkbox-icon ngc-icon{--ngc-icon-display: flex}.gator-checkbox-title{font-feature-settings:"liga" off,"clig" off;font-style:normal;font-weight:400;font-family:var(--text-family-sans-serif, "Open Sans");color:var(--ngc-checkbox-title-color-default);font-size:var(--ngc-checkbox-title-font-size);line-height:var(--ngc-checkbox-title-line-height)}.gator-checkbox:focus-visible{outline:none}.gator-checkbox:focus-visible ngc-icon{color:var(--ngc-checkbox-icon-color-focus);border:var(--ngc-checkbox-focus-border);border-radius:.25rem}.gator-checkbox:hover:not(.gator-checkbox_disabled){cursor:pointer}.gator-checkbox:hover:not(.gator-checkbox_disabled) ngc-icon{color:var(--ngc-checkbox-icon-color-hover)}.gator-checkbox-title:hover{cursor:inherit}.gator-checkbox_disabled{cursor:not-allowed}.gator-checkbox_disabled ngc-icon{color:var(--ngc-checkbox-icon-color-disabled)}.gator-checkbox_disabled .gator-checkbox-title{color:var(--ngc-checkbox-title-color-disabled)}.gator-checkbox:is([aria-checked=true]):not(.gator-checkbox_disabled):not(.gator-checkbox_error) ngc-icon{color:var(--ngc-checkbox-icon-color-selected)}.gator-checkbox_error ngc-icon{color:var(--ngc-checkbox-icon-color-error)}';var y=Object.defineProperty,_=Object.getOwnPropertyDescriptor,t=(e,i,a,l)=>{for(var c=l>1?void 0:l?_(i,a):i,n=e.length-1,s;n>=0;n--)(s=e[n])&&(c=(l?s(i,a,c):s(c))||c);return l&&c&&y(i,a,c),c};let o=class extends h{constructor(){super(...arguments),this.id="",this.titleText="",this.value="",this.selected=!1,this.disabled=!1,this.hasError=!1,this.dataTestid="",this._randomId=g(),this._labelSlot=null}createRenderRoot(){return this}render(){const e=this.elementId;return d`
|
|
2
|
+
<style>${u}</style>
|
|
3
3
|
<style>${v}</style>
|
|
4
|
-
<style>${
|
|
5
|
-
<style>${
|
|
4
|
+
<style>${k}</style>
|
|
5
|
+
<style>${m}</style>
|
|
6
6
|
<div id="${e}-checkbox" class="gator-checkbox${this.disabled?" gator-checkbox_disabled":""}${this.hasError?" gator-checkbox_error":""}"
|
|
7
7
|
@click=${this.handleClick}
|
|
8
8
|
@keydown=${this.handleKeyDown}
|
|
@@ -18,4 +18,4 @@ import{h,k as b}from"../../assets/index-chunk.js";import{t as d}from"../../asset
|
|
|
18
18
|
></ngc-icon>
|
|
19
19
|
<label class="gator-checkbox-title">${this.labelContent}</label>
|
|
20
20
|
</div>
|
|
21
|
-
`}get elementId(){return x(this.id,this._randomId)}get labelContent(){if(this._labelSlot)return this._labelSlot;const e=
|
|
21
|
+
`}updated(){f(this.querySelector('[role="checkbox"]'),this.dataTestid,"checkbox")}get elementId(){return x(this.id,this._randomId)}get labelContent(){if(this._labelSlot)return this._labelSlot;const e=p(this,"label");return e?(this._labelSlot=e,this._labelSlot):this.titleText}handleClick(e){e.preventDefault(),!this.disabled&&(this.selected=!this.selected,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{value:this.value,selected:this.selected}})))}handleKeyDown(e){e.key===" "&&this.handleClick(e)}};t([r({type:String})],o.prototype,"id",2);t([r({type:String,attribute:"title-text"})],o.prototype,"titleText",2);t([r({type:String})],o.prototype,"value",2);t([r({type:Boolean})],o.prototype,"selected",2);t([r({type:Boolean})],o.prototype,"disabled",2);t([r({type:Boolean,attribute:"has-error"})],o.prototype,"hasError",2);t([r({type:String,attribute:"data-testid"})],o.prototype,"dataTestid",2);o=t([b("ngc-checkbox")],o);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./checkbox.gator.js";import"../../assets/index-chunk.js";import"../../assets/index-chunk3.js";import"../../assets/index-chunk2.js";import"../../utils/string-utils.js";import"../../utils/lightdom-utils.js";import"../../assets/index-chunk4.js";import"../../assets/index-chunk5.js";import"../icon/gator/icon.gator.js";import"../icon/icon-registry.js";import"../icon/gator/templates/arrow-right.js";import"../icon/gator/templates/balloons.js";import"../icon/gator/templates/check-circle.js";import"../icon/gator/templates/checkbox.js";import"../icon/gator/templates/checkbox-selected.js";import"../icon/gator/templates/chevron-right.js";import"../icon/gator/templates/exit.js";import"../icon/gator/templates/exit-circle.js";import"../icon/gator/templates/info.js";import"../icon/gator/templates/picture.js";import"../icon/gator/templates/radio.js";import"../icon/gator/templates/radio-selected.js";import"../icon/gator/templates/restricted.js";import"../icon/gator/templates/warning.js";
|
|
1
|
+
import"./checkbox.gator.js";import"../../assets/index-chunk.js";import"../../assets/index-chunk3.js";import"../../assets/index-chunk2.js";import"../../utils/string-utils.js";import"../../utils/lightdom-utils.js";import"../../assets/index-chunk4.js";import"../../assets/index-chunk5.js";import"../icon/gator/icon.gator.js";import"../icon/gator/templates/arrow-left.js";import"../icon/icon-registry.js";import"../icon/gator/templates/arrow-right.js";import"../icon/gator/templates/balloons.js";import"../icon/gator/templates/check-circle.js";import"../icon/gator/templates/checkbox.js";import"../icon/gator/templates/checkbox-selected.js";import"../icon/gator/templates/chevron-down.js";import"../icon/gator/templates/chevron-right.js";import"../icon/gator/templates/chevron-up.js";import"../icon/gator/templates/exit.js";import"../icon/gator/templates/exit-circle.js";import"../icon/gator/templates/eye-crossed.js";import"../icon/gator/templates/info.js";import"../icon/gator/templates/picture.js";import"../icon/gator/templates/radio.js";import"../icon/gator/templates/radio-selected.js";import"../icon/gator/templates/restricted.js";import"../icon/gator/templates/warning.js";import"../../utils/datatestid-utils.js";
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
import{r as
|
|
1
|
+
import{r as m,h as $,k as p}from"../../assets/index-chunk.js";import{t as S}from"../../assets/index-chunk3.js";import{n as l}from"../../assets/index-chunk2.js";import{g as k,a as T}from"../../utils/string-utils.js";import{p as E}from"../../assets/index-chunk4.js";import{s as w}from"../../assets/index-chunk5.js";import"../checkbox/checkbox.gator.js";import"../input/gator/input-label/input-label.gator.js";import"../input/gator/help-text/help-text.gator.js";import{h as d}from"../../utils/datatestid-utils.js";import"../../utils/lightdom-utils.js";import"../icon/gator/icon.gator.js";import"../icon/gator/templates/arrow-left.js";import"../icon/icon-registry.js";import"../icon/gator/templates/arrow-right.js";import"../icon/gator/templates/balloons.js";import"../icon/gator/templates/check-circle.js";import"../icon/gator/templates/checkbox.js";import"../icon/gator/templates/checkbox-selected.js";import"../icon/gator/templates/chevron-down.js";import"../icon/gator/templates/chevron-right.js";import"../icon/gator/templates/chevron-up.js";import"../icon/gator/templates/exit.js";import"../icon/gator/templates/exit-circle.js";import"../icon/gator/templates/eye-crossed.js";import"../icon/gator/templates/info.js";import"../icon/gator/templates/picture.js";import"../icon/gator/templates/radio.js";import"../icon/gator/templates/radio-selected.js";import"../icon/gator/templates/restricted.js";import"../icon/gator/templates/warning.js";const C=".gator-checkbox-group,.gator-checkbox-group-container{display:flex;flex-direction:column;gap:var(--spacing-gap-8)}";var I=Object.defineProperty,_=Object.getOwnPropertyDescriptor,i=(e,s,a,t)=>{for(var o=t>1?void 0:t?_(s,a):s,n=e.length-1,h;n>=0;n--)(h=e[n])&&(o=(t?h(s,a,o):h(o))||o);return t&&o&&I(s,a,o),o};let r=class extends ${constructor(){super(...arguments),this.dataTestid="",this.id="",this.label="",this.helpText="",this.value="",this.disabled=!1,this.hasError=!1,this.errorMessage="",this.options=[],this._randomId=k()}render(){const e=this.elementId;return p`
|
|
2
2
|
<div class="gator-checkbox-group-container">
|
|
3
|
-
${this.label?
|
|
3
|
+
${this.label?p`<ngc-input-label id="${e}-label">${this.label}</ngc-input-label>`:null}
|
|
4
4
|
<div id="${e}-group"
|
|
5
5
|
role="group"
|
|
6
6
|
class="gator-checkbox-group"
|
|
7
7
|
aria-labelledby="${e}-label"
|
|
8
8
|
aria-describedby=${this.describedBy}
|
|
9
9
|
>
|
|
10
|
-
${this.options.length>0?this.checkboxesFromOptions:
|
|
10
|
+
${this.options.length>0?this.checkboxesFromOptions:p`<slot @change=${this.handleCheckboxSelectionChange}></slot>`}
|
|
11
11
|
</div>
|
|
12
|
-
${this.hasError&&this.errorMessage!==""?
|
|
13
|
-
${this.helpText?
|
|
12
|
+
${this.hasError&&this.errorMessage!==""?p`<ngc-help-text id="${e}-error" icon="true" error="true">${this.errorMessage}</ngc-help-text>`:null}
|
|
13
|
+
${this.helpText?p`<ngc-help-text id="${e}-help">${this.helpText}</ngc-help-text>`:null}
|
|
14
14
|
</div>
|
|
15
|
-
`}get elementId(){return
|
|
16
|
-
${this.options.map(
|
|
15
|
+
`}get elementId(){return T(this.id,this._randomId)}get describedBy(){const e=[];return this.errorMessage&&e.push(`${this.elementId}-error`),this.helpText&&e.push(`${this.elementId}-help`),e.join(" ")}get checkboxesFromOptions(){return p`
|
|
16
|
+
${this.options.map(e=>p`
|
|
17
17
|
<ngc-checkbox
|
|
18
|
-
value="${
|
|
19
|
-
?disabled=${this.disabled}
|
|
20
|
-
?selected=${e.has(t.value)}
|
|
21
|
-
?has-error=${this.hasError}
|
|
18
|
+
value="${e.value}"
|
|
22
19
|
@change=${this.handleCheckboxSelectionChange}
|
|
23
|
-
title-text="${
|
|
20
|
+
title-text="${e.title}"
|
|
24
21
|
>
|
|
25
22
|
</ngc-checkbox>
|
|
26
23
|
`)}
|
|
27
|
-
`}handleCheckboxSelectionChange(e){var
|
|
24
|
+
`}handleCheckboxSelectionChange(e){var t;const s=e;e.stopImmediatePropagation();const a=new Set((t=this.value)==null?void 0:t.split(";"));s.detail.selected?a.add(s.detail.value):a.delete(s.detail.value),this.value=Array.from(a).join(";"),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:this.value}))}updated(){var h,g,u,b,x,y;const e=(h=this.shadowRoot)==null?void 0:h.querySelector("ngc-input-label");d(e,this.dataTestid,"label");const s=(g=this.shadowRoot)==null?void 0:g.querySelector("ngc-help-text:not([error])");d(s,this.dataTestid,"help-text");const a=(u=this.shadowRoot)==null?void 0:u.querySelector("ngc-help-text[error]");d(a,this.dataTestid,"error-message");const t=(b=this.shadowRoot)==null?void 0:b.querySelector("slot"),o=t?t==null?void 0:t.assignedElements():(x=this.shadowRoot)==null?void 0:x.querySelectorAll("ngc-checkbox"),n=new Set((y=this.value)==null?void 0:y.split(";"));o&&o.length>0&&o.forEach((v,f)=>{const c=v;c.selected=n.has(c.value),c.disabled=this.disabled,c.hasError=this.hasError,d(c,this.dataTestid,`checkbox-${f}`)})}};r.styles=[m(E),m(w),m(C)];i([l({type:String,attribute:"data-testid"})],r.prototype,"dataTestid",2);i([l({type:String})],r.prototype,"id",2);i([l({type:String})],r.prototype,"label",2);i([l({type:String,attribute:"help-text"})],r.prototype,"helpText",2);i([l({type:String})],r.prototype,"value",2);i([l({type:Boolean})],r.prototype,"disabled",2);i([l({type:Boolean,attribute:"has-error"})],r.prototype,"hasError",2);i([l({type:String,attribute:"error-message"})],r.prototype,"errorMessage",2);i([l({type:Array})],r.prototype,"options",2);r=i([S("ngc-checkbox-group")],r);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./checkbox-group.gator.js";import"../../assets/index-chunk.js";import"../../assets/index-chunk3.js";import"../../assets/index-chunk2.js";import"../../utils/string-utils.js";import"../../assets/index-chunk4.js";import"../../assets/index-chunk5.js";import"../checkbox/checkbox.gator.js";import"../../utils/lightdom-utils.js";import"../icon/gator/icon.gator.js";import"../icon/icon-registry.js";import"../icon/gator/templates/arrow-right.js";import"../icon/gator/templates/balloons.js";import"../icon/gator/templates/check-circle.js";import"../icon/gator/templates/checkbox.js";import"../icon/gator/templates/checkbox-selected.js";import"../icon/gator/templates/chevron-right.js";import"../icon/gator/templates/exit.js";import"../icon/gator/templates/exit-circle.js";import"../icon/gator/templates/info.js";import"../icon/gator/templates/picture.js";import"../icon/gator/templates/radio.js";import"../icon/gator/templates/radio-selected.js";import"../icon/gator/templates/restricted.js";import"../icon/gator/templates/warning.js";import"../input/gator/input-label/input-label.gator.js";import"../input/gator/help-text/help-text.gator.js";
|
|
1
|
+
import"./checkbox-group.gator.js";import"../../assets/index-chunk.js";import"../../assets/index-chunk3.js";import"../../assets/index-chunk2.js";import"../../utils/string-utils.js";import"../../assets/index-chunk4.js";import"../../assets/index-chunk5.js";import"../checkbox/checkbox.gator.js";import"../../utils/lightdom-utils.js";import"../icon/gator/icon.gator.js";import"../icon/gator/templates/arrow-left.js";import"../icon/icon-registry.js";import"../icon/gator/templates/arrow-right.js";import"../icon/gator/templates/balloons.js";import"../icon/gator/templates/check-circle.js";import"../icon/gator/templates/checkbox.js";import"../icon/gator/templates/checkbox-selected.js";import"../icon/gator/templates/chevron-down.js";import"../icon/gator/templates/chevron-right.js";import"../icon/gator/templates/chevron-up.js";import"../icon/gator/templates/exit.js";import"../icon/gator/templates/exit-circle.js";import"../icon/gator/templates/eye-crossed.js";import"../icon/gator/templates/info.js";import"../icon/gator/templates/picture.js";import"../icon/gator/templates/radio.js";import"../icon/gator/templates/radio-selected.js";import"../icon/gator/templates/restricted.js";import"../icon/gator/templates/warning.js";import"../../utils/datatestid-utils.js";import"../input/gator/input-label/input-label.gator.js";import"../input/gator/help-text/help-text.gator.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as
|
|
1
|
+
import{h as n}from"../../assets/index-chunk.js";import{n as a}from"../../assets/index-chunk2.js";var l=Object.defineProperty,o=(e,d,i,f)=>{for(var t=void 0,r=e.length-1,p;r>=0;r--)(p=e[r])&&(t=p(d,i,t)||t);return t&&l(d,i,t),t};class s extends n{constructor(){super(...arguments),this.disabled=!1,this.readonly=!1,this.dataTestid=""}}o([a({type:Boolean})],s.prototype,"disabled");o([a({type:Boolean})],s.prototype,"readonly");o([a({type:String,attribute:"data-testid"})],s.prototype,"dataTestid");export{s as N};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{r as
|
|
2
|
-
<button class="gator-chip" ?disabled="${this.disabled}">
|
|
1
|
+
import{r as i,k as s}from"../../../assets/index-chunk.js";import{t as p}from"../../../assets/index-chunk3.js";import{s as d}from"../../../assets/index-chunk5.js";import{p as h}from"../../../assets/index-chunk4.js";import{N as u}from"../chip.js";import"../../../assets/index-chunk2.js";const g=":host{--ngc-chip-disabled-color: var(--color-neutral-50);--ngc-chip-color: var(--color-neutral-70);--ngc-chip-background-color: var(--color-background-primary);--ngc-chip-hover-background-color: var(--color-neutral-20);--ngc-chip-active-background-color: var(--color-neutral-30);--ngc-chip-border-radius: 3rem;--ngc-chip-focus-box-shadow: var(--shadow-x-offset-0, 0px) var(--shadow-y-offset-0, 0px) var(--shadow-blur-0, 0px) var(--shadow-spread-2, 2px) var(--color-focus-gap, #FFF), var(--shadow-x-offset-0, 0px) var(--shadow-y-offset-0, 0px) var(--shadow-blur-0, 0px) var(--shadow-spread-4, 4px) var(--color-focus-border, #11395B);--ngc-chip-padding: .25rem .75rem;--ngc-chip-font-size: .9375rem;--ngc-chip-border: none}",v=".gator-chip{background-color:var(--ngc-chip-background-color);border-radius:var(--ngc-chip-border-radius);display:inline-block;padding:var(--ngc-chip-padding);font-size:var(--ngc-chip-font-size);line-height:var(--ngc-chip-line-height);border:var(--ngc-chip-border);color:var(--color-neutral-70);cursor:var(--ngc-chip-cursor, default)}button:hover{background-color:var(--ngc-chip-hover-background-color);cursor:var(--ngc-chip-cursor, pointer)}button:focus-visible{outline:none;box-shadow:var(--ngc-chip-focus-box-shadow);background-color:var(--ngc-chip-active-background-color)}button:active{background-color:var(--ngc-chip-active-background-color)}button:disabled{cursor:not-allowed;color:var(--color-neutral-70);outline:1px solid var(--color-neutral-40, #BFBFBF);background:var(--color-neutral-10, #F7F7F7)}.gator-chip__read-only{cursor:var(--ngc-chip-cursor, default !important)}.gator-chip__read-only:active{background-color:var(--ngc-chip-background-color)}";var b=Object.defineProperty,f=Object.getOwnPropertyDescriptor,k=(o,c,n,a)=>{for(var r=a>1?void 0:a?f(c,n):c,e=o.length-1,t;e>=0;e--)(t=o[e])&&(r=(a?t(c,n,r):t(r))||r);return a&&r&&b(c,n,r),r};let l=class extends u{render(){return this.readonly?this.readonlyChipMarkup:this.chipMarkup}get chipMarkup(){return s`
|
|
2
|
+
<button class="gator-chip" ?disabled="${this.disabled}" @click=${this.handleClick}>
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</button>
|
|
5
|
-
`}get readonlyChipMarkup(){return
|
|
6
|
-
<div class="gator-chip gator-chip__read-only">
|
|
5
|
+
`}get readonlyChipMarkup(){return s`
|
|
6
|
+
<div class="gator-chip gator-chip__read-only" @click=${this.handleClick}>
|
|
7
7
|
<slot></slot>
|
|
8
8
|
</div>
|
|
9
|
-
`}};
|
|
9
|
+
`}handleClick(o){o.stopPropagation(),o.preventDefault(),!(this.disabled||this.readonly)&&this.dispatchEvent(new Event("click",{bubbles:!0}))}};l.styles=[i(g),i(v),i(h),i(d)];l=k([p("ngc-chip")],l);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h
|
|
1
|
+
import{h}from"../../../assets/index-chunk.js";import{n as l}from"../../../assets/index-chunk2.js";import{r as p}from"../../../assets/index-chunk11.js";import{i as c}from"../../../assets/index-chunk7.js";import"../../../assets/index-chunk8.js";var u=Object.defineProperty,r=(a,t,e,o)=>{for(var s=void 0,n=a.length-1,d;n>=0;n--)(d=a[n])&&(s=d(t,e,s)||s);return s&&u(t,e,s),s};class i extends h{constructor(){super(...arguments),this.options=[],this.value="",this.label="",this.placeholder="Search...",this.open=!1,this.required=!1,this.valid=!0,this.requiredErrorText="Select an option from the picklist or remove the search term.",this.dataTestid="",this.displayedErrorText="",this._comboboxRef=c()}selectOption(t){this.open=!1,this.value=t.value,this.valid=!0,this.displayedErrorText="",this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0})),setTimeout(()=>{var o;let e=(o=this.shadowRoot)==null?void 0:o.querySelector('div[role="combobox"]');e==null||e.focus()})}setFocusClassForListItemAtIndex(t){var o,s;const e=(o=this.shadowRoot)==null?void 0:o.querySelectorAll('[role="option"]');e[t].classList.add("slds-has-focus"),(s=this._comboboxRef.value)==null||s.setAttribute("aria-activedescendant",e[t].id)}removeFocusClassForListItemAtIndex(t){var o;((o=this.shadowRoot)==null?void 0:o.querySelectorAll('[role="option"]'))[t].classList.remove("slds-has-focus")}getActiveIndexOfListItems(){var o,s;const t=(o=this.shadowRoot)==null?void 0:o.querySelectorAll('[role="option"]'),e=(s=this.shadowRoot)==null?void 0:s.querySelector(".slds-has-focus");return Array.from(t).indexOf(e)}getListItemNodes(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelectorAll('[role="option"]')}scrollIntoView(){var e;const t=(e=this.shadowRoot)==null?void 0:e.querySelector(".slds-has-focus");t==null||t.scrollIntoView({block:"nearest"})}handleArrowDown(){this.open||(this.open=!0);let t=this.getActiveIndexOfListItems();t===-1&&this.setFocusClassForListItemAtIndex(0);let e=t+1;e>this.getListItemNodes().length-1&&(e=0),this.setFocusClassForListItemAtIndex(e),this.removeFocusClassForListItemAtIndex(t),this.scrollIntoView()}handleArrowUp(){this.open||(this.open=!0);let t=this.getActiveIndexOfListItems(),e=t-1;e<0&&(e=this.getListItemNodes().length-1),this.setFocusClassForListItemAtIndex(e),this.removeFocusClassForListItemAtIndex(t),this.scrollIntoView()}}r([l()],i.prototype,"options");r([l()],i.prototype,"value");r([l()],i.prototype,"label");r([l()],i.prototype,"placeholder");r([l({type:Boolean})],i.prototype,"open");r([l({type:Boolean})],i.prototype,"required");r([l({type:Boolean})],i.prototype,"valid");r([l({attribute:"required-error-text"})],i.prototype,"requiredErrorText");r([l({type:String,attribute:"data-testid"})],i.prototype,"dataTestid");r([p()],i.prototype,"displayedErrorText");export{i as N};
|