@ncino/web-components 8.0.0-preview.4 → 8.0.0-preview.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index2.js +1 -1
- package/dist/_virtual/index3.js +1 -1
- package/dist/components/boolean/boolean.gator.js +5 -5
- package/dist/components/checkbox-group/checkbox-group.gator.js +10 -3
- package/dist/components/input/base/input-base.gator.js +9 -8
- package/dist/components/input/base/input-base.js +1 -1
- package/dist/components/input/gator/input-label/input-label.gator.js +5 -4
- package/dist/components/input/gator/input-search/input-search.gator.js +1 -0
- package/dist/components/input-rich-text/input-rich-text.slds.js +1 -1
- package/dist/components/radio/radio.gator.js +5 -5
- package/dist/components/radio-group/radio-group.gator.js +13 -5
- package/dist/components/selection-box-group/selection-box-group.gator.js +8 -2
- package/dist/node_modules/.pnpm/react@19.1.1/node_modules/react/index.js +1 -1
- package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.js +1 -1
- package/dist/packages/web-components/src/components/boolean/boolean.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/button/gator/button.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/input/gator/input-label/input-label.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/input/input.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/radio/radio.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/radio-group/radio-group.gator.scss.js +1 -1
- package/dist/types/components/input/base/input-base.d.ts +12 -2
- package/dist/types/components/input/base/input-base.gator.d.ts +5 -1
- package/dist/types/components/input/gator/dropdown/input-dropdown.gator.d.ts +1 -1
- package/dist/types/components/input/gator/input-label/input-label.gator.d.ts +5 -1
- package/dist/types/components/radio-group/radio-group.gator.d.ts +2 -2
- package/dist/types/utils/components/gradient-background.d.ts +5 -0
- package/dist/types/utils/storybook-args.d.ts +28 -0
- package/dist/utils/components/gradient-background.js +33 -0
- package/dist/utils/components/slot-placeholder/slot-placeholder.js +4 -3
- package/dist/utils/storybook-args.js +1 -1
- package/package.json +1 -1
- package/web-types.json +194 -1
- package/dist/packages/web-components/src/components/boolean/boolean.gator.tokens.scss.js +0 -1
- package/dist/packages/web-components/src/components/radio/radio.gator.tokens.scss.js +0 -1
|
@@ -11,10 +11,20 @@ export declare class InputBase extends TestableLitElement {
|
|
|
11
11
|
*/
|
|
12
12
|
id: string;
|
|
13
13
|
/**
|
|
14
|
-
@property required - Whether the input is required
|
|
14
|
+
@property required - Whether the input is required. By default, displays the required indicator in the label if a label is provided. If you do not want the required indicator to display, use the hideRequired property.
|
|
15
15
|
@type boolean
|
|
16
16
|
*/
|
|
17
17
|
required: boolean;
|
|
18
|
+
/**
|
|
19
|
+
@property hideRequired - Whether to hide the required indicator in the label. This would be used if the optional property is being used to distinguish between required and optional fields instead of the required text.
|
|
20
|
+
@type boolean
|
|
21
|
+
*/
|
|
22
|
+
hideRequired: boolean;
|
|
23
|
+
/**
|
|
24
|
+
@property optional - Whether the input should be marked as optional
|
|
25
|
+
@type boolean
|
|
26
|
+
*/
|
|
27
|
+
optional: boolean;
|
|
18
28
|
/**
|
|
19
29
|
@property disabled - Whether the input is disabled
|
|
20
30
|
@type boolean
|
|
@@ -48,7 +58,7 @@ export declare class InputBase extends TestableLitElement {
|
|
|
48
58
|
@property value - The value of the rendered input
|
|
49
59
|
@type string | number | undefined | null
|
|
50
60
|
*/
|
|
51
|
-
value: string | number | undefined | null | File | File[] | Date;
|
|
61
|
+
value: string | number | boolean | undefined | null | File | File[] | Date;
|
|
52
62
|
/**
|
|
53
63
|
@property errorText - The error text of the rendered input.
|
|
54
64
|
@type string
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { CSSResult } from 'lit';
|
|
1
2
|
import { InputBase } from './input-base.ts';
|
|
2
3
|
import { Ref } from 'lit/directives/ref.js';
|
|
3
4
|
export declare class NgcInputBase extends InputBase {
|
|
4
|
-
static
|
|
5
|
+
protected static primitiveStyles: CSSResult;
|
|
6
|
+
protected static semanticStyles: CSSResult;
|
|
7
|
+
protected static primitiveAndSemanticStyleFilter: (style: CSSResult) => boolean;
|
|
8
|
+
static styles: CSSResult[];
|
|
5
9
|
controlRef: Ref<HTMLDivElement>;
|
|
6
10
|
protected _startIconAsText: string | undefined;
|
|
7
11
|
protected _ariaDescribedBy: string | undefined;
|
|
@@ -103,7 +103,7 @@ export declare class NgcInputDropdown extends NgcInputBase {
|
|
|
103
103
|
private setupResizeObserver;
|
|
104
104
|
removeSelection(value: string): void;
|
|
105
105
|
get fauxInputMarkup(): import('lit').TemplateResult<1>;
|
|
106
|
-
get displayedValue(): string | number | File | File[] | Date;
|
|
106
|
+
get displayedValue(): string | number | true | File | File[] | Date;
|
|
107
107
|
get showPlaceholder(): boolean | "";
|
|
108
108
|
get listboxMarkup(): import('lit').TemplateResult<1>;
|
|
109
109
|
get selectAllIcon(): "checkbox-indeterminate" | "checkbox-selected" | "checkbox";
|
|
@@ -10,9 +10,13 @@ export declare class NgcInputLabel extends NgcComponent {
|
|
|
10
10
|
};
|
|
11
11
|
static styles: import('lit').CSSResult[];
|
|
12
12
|
/**
|
|
13
|
-
* @property {boolean} required - Whether the label is required.
|
|
13
|
+
* @property {boolean} required - Whether the label is marked as required.
|
|
14
14
|
*/
|
|
15
15
|
required: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @property {boolean} optional - Whether the label is marked as optional.
|
|
18
|
+
*/
|
|
19
|
+
optional: boolean;
|
|
16
20
|
/**
|
|
17
21
|
* @property {boolean} disabled - Whether the label is disabled.
|
|
18
22
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NgcRadio } from '../radio/radio.gator';
|
|
2
|
-
import { NgcInputText } from '../input/gator/input-text/input-text.gator.ts';
|
|
3
1
|
import { Ref } from 'lit/directives/ref.js';
|
|
2
|
+
import { NgcInputText } from '../input/gator/input-text/input-text.gator.ts';
|
|
3
|
+
import { NgcRadio } from '../radio/radio.gator';
|
|
4
4
|
/**
|
|
5
5
|
* @slot - The radios within the group
|
|
6
6
|
*/
|
|
@@ -67,6 +67,34 @@ export declare const INPUT_BASE_ARGS: {
|
|
|
67
67
|
summary: string;
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
|
+
control: {
|
|
71
|
+
type: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
hideRequired: {
|
|
75
|
+
name: string;
|
|
76
|
+
description: string;
|
|
77
|
+
control: {
|
|
78
|
+
type: string;
|
|
79
|
+
};
|
|
80
|
+
table: {
|
|
81
|
+
category: string;
|
|
82
|
+
defaultValue: {
|
|
83
|
+
summary: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
optional: {
|
|
88
|
+
description: string;
|
|
89
|
+
control: {
|
|
90
|
+
type: string;
|
|
91
|
+
};
|
|
92
|
+
table: {
|
|
93
|
+
category: string;
|
|
94
|
+
defaultValue: {
|
|
95
|
+
summary: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
70
98
|
};
|
|
71
99
|
disabled: {
|
|
72
100
|
description: string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as s}from"../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as m}from"../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{css as c}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var p=Object.getOwnPropertyDescriptor,g=(a,i,d,o)=>{for(var r=o>1?void 0:o?p(i,d):i,e=a.length-1,n;e>=0;e--)(n=a[e])&&(r=n(r)||r);return r};let t=class extends m{render(){return s`
|
|
2
|
+
<div class="top-area"></div>
|
|
3
|
+
<div class="body-area"></div>
|
|
4
|
+
|
|
5
|
+
<div class="content-area">
|
|
6
|
+
<slot></slot>
|
|
7
|
+
</div>
|
|
8
|
+
`}};t.styles=[c`
|
|
9
|
+
.top-area {
|
|
10
|
+
z-index: 1;
|
|
11
|
+
height: 300px;
|
|
12
|
+
background: linear-gradient(90deg, #11395B 0.68%, rgba(17, 57, 91, 0.50) 51.8%, #11395B 100%);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.body-area {
|
|
16
|
+
height: 100px;
|
|
17
|
+
z-index: 2;
|
|
18
|
+
margin-top: -100px;
|
|
19
|
+
border-radius: 5rem 5rem 0 0;
|
|
20
|
+
background: #FFF;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.content-area {
|
|
24
|
+
border-radius: 1rem;
|
|
25
|
+
background: #FFF;
|
|
26
|
+
margin: -200px auto 100px auto;
|
|
27
|
+
width: 35rem;
|
|
28
|
+
min-width: 18.75rem;
|
|
29
|
+
max-width: 37.4375rem;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
align-items: flex-start;
|
|
32
|
+
}
|
|
33
|
+
`];t=g([l("gradient-background")],t);export{t as GradientBackground};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as
|
|
1
|
+
import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as i}from"../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as d}from"../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as n}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as c}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{css as f}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var v=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p=(m,t,s,r)=>{for(var e=r>1?void 0:r?u(t,s):t,l=m.length-1,a;l>=0;l--)(a=m[l])&&(e=(r?a(t,s,e):a(e))||e);return r&&e&&v(t,s,e),e};let o=class extends d{constructor(){super(...arguments),this.slotName=""}render(){return i`
|
|
2
2
|
<div class="slot-placeholder">
|
|
3
3
|
${this.namedSlotMarkup}
|
|
4
4
|
</div>
|
|
5
|
-
`}get namedSlotMarkup(){return this.slotName?
|
|
5
|
+
`}get namedSlotMarkup(){return this.slotName?i`<div>Slot Name: ${this.slotName}</div>`:i`<div>Default slot</div>`}};o.styles=[f`
|
|
6
6
|
.slot-placeholder {
|
|
7
|
+
display: var(--slot-placeholder-display, block);
|
|
7
8
|
background: #D8C3F3;
|
|
8
9
|
border: 1px dashed #9747FF;
|
|
9
10
|
border-radius: 0.5rem;
|
|
@@ -13,4 +14,4 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
|
|
|
13
14
|
color: #6F1FC3;
|
|
14
15
|
text-align: center;
|
|
15
16
|
}
|
|
16
|
-
`];p([
|
|
17
|
+
`];p([c({attribute:"slot-name"})],o.prototype,"slotName",2);o=p([n("slot-placeholder")],o);export{o as SlotPlaceholder};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const n={errorText:{name:"error-text",description:"Custom error message to be displayed. This value overrides any native or internal error messaging. If this is set, the component will be styled in an error state.",table:{category:"Base Input",defaultValue:{summary:""}}},helpText:{name:"help-text",description:"Custom help text to be displayed inline below the component.",table:{category:"Base Input",defaultValue:{summary:""}}},placeholder:{description:"Placeholder text to be displayed in the input.",table:{category:"Base Input",defaultValue:{summary:""}}},value:{description:"Value of the component.",table:{category:"Base Input",defaultValue:{summary:"undefined"}}},label:{description:"Visible label for the component. This is the gold standard, best practice way to label an input for built in accessibility support. If this is not set, you must set the ariaLabelledByElements property for correct programmatic association between your custom label and the input element.",table:{category:"Base Input",defaultValue:{summary:""}}},ariaLabelledByElements:{name:"aria-labelled-by-elements",description:"Used to programmatically associate a custom label to the input. This should only be used when you are using a custom label outside of the ngc input component due to limitations of the shadow dom. Accepts a list of elements. For more information on ARIA element reflection, see [here](https://wicg.github.io/aom/aria-reflection-explainer.html).",type:{summary:"Element[]"},table:{category:"Base Input",defaultValue:{summary:""}}},required:{description:"Whether the component is required.",table:{category:"Base Input",defaultValue:{summary:"false"}}},disabled:{description:"Whether the component is disabled.",table:{category:"Base Input",defaultValue:{summary:"false"}}},readonly:{description:"Whether the component is readonly.",table:{category:"Base Input",defaultValue:{summary:"false"}}},id:{description:"Unique ID for the component. Required for accessibility.",table:{category:"Base Input",defaultValue:{summary:""}}},minLength:{name:"min-length",description:"The minimum length of the input value. See more information [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/minlength).",control:"number",table:{category:"Base Input",defaultValue:{summary:""}}},maxLength:{name:"max-length",description:"The maximum length of the input value. See more information [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/maxlength).",control:"number",table:{category:"Base Input",defaultValue:{summary:""}}}},i={pattern:{description:"The pattern attribute to be passed to the input. See more information [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern).",control:"text",table:{defaultValue:{summary:"undefined"}}}},r={min:{description:"The min attribute defines the minimum value that is acceptable and valid for the input containing the attribute. If the value of the element is less than this, the element fails validation. This value must be less than or equal to the value of the max attribute. See more information [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/min).",control:"string"},max:{description:"The max attribute defines the maximum value that is acceptable and valid for the input containing the attribute. If the value of the element is greater than this, the element fails validation. This value must be greater than or equal to the value of the min attribute. See more information [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/max).",control:"string"},step:{description:"The step attribute to be passed to the input for number inputs. See more information [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/step).",control:"number",table:{defaultValue:{summary:"1"}}}},l={ariaDescription:{name:"aria-description",description:"The aria-description attribute for the component."}},s={skeleton:{description:"Whether the component should be rendered in a skeleton/loading state.",control:{type:"boolean"},table:{defaultValue:{summary:"false"}}}},u={startIcon:{name:"start-icon",description:"Icon to be displayed at the start of the component. Should be a valid icon name from the [icon library](?path=/story/components-icon--gator-icon-list).",control:{type:"text"},table:{category:"Optional Icon(s)"}}},m={endIcon:{name:"end-icon",description:"Icon to be displayed at the end of the component. Should be a valid icon name from the [icon library](?path=/story/components-icon--gator-icon-list).",control:{type:"text"},table:{category:"Optional Icon(s)"}}},
|
|
1
|
+
const n={errorText:{name:"error-text",description:"Custom error message to be displayed. This value overrides any native or internal error messaging. If this is set, the component will be styled in an error state.",table:{category:"Base Input",defaultValue:{summary:""}}},helpText:{name:"help-text",description:"Custom help text to be displayed inline below the component.",table:{category:"Base Input",defaultValue:{summary:""}}},placeholder:{description:"Placeholder text to be displayed in the input.",table:{category:"Base Input",defaultValue:{summary:""}}},value:{description:"Value of the component.",table:{category:"Base Input",defaultValue:{summary:"undefined"}}},label:{description:"Visible label for the component. This is the gold standard, best practice way to label an input for built in accessibility support. If this is not set, you must set the ariaLabelledByElements property for correct programmatic association between your custom label and the input element.",table:{category:"Base Input",defaultValue:{summary:""}}},ariaLabelledByElements:{name:"aria-labelled-by-elements",description:"Used to programmatically associate a custom label to the input. This should only be used when you are using a custom label outside of the ngc input component due to limitations of the shadow dom. Accepts a list of elements. For more information on ARIA element reflection, see [here](https://wicg.github.io/aom/aria-reflection-explainer.html).",type:{summary:"Element[]"},table:{category:"Base Input",defaultValue:{summary:""}}},required:{description:"Whether the component is required.",table:{category:"Base Input",defaultValue:{summary:"false"}},control:{type:"boolean"}},hideRequired:{name:"hide-required",description:"Whether the visible required indicator should be hidden from the label when the component is required. This is useful for cases where majority of the fields are required so only the optional fields need to be marked (with the `optional` property).",control:{type:"boolean"},table:{category:"Base Input",defaultValue:{summary:"false"}}},optional:{description:"Whether the component should be marked as optional.",control:{type:"boolean"},table:{category:"Base Input",defaultValue:{summary:"false"}}},disabled:{description:"Whether the component is disabled.",table:{category:"Base Input",defaultValue:{summary:"false"}}},readonly:{description:"Whether the component is readonly.",table:{category:"Base Input",defaultValue:{summary:"false"}}},id:{description:"Unique ID for the component. Required for accessibility.",table:{category:"Base Input",defaultValue:{summary:""}}},minLength:{name:"min-length",description:"The minimum length of the input value. See more information [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/minlength).",control:"number",table:{category:"Base Input",defaultValue:{summary:""}}},maxLength:{name:"max-length",description:"The maximum length of the input value. See more information [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/maxlength).",control:"number",table:{category:"Base Input",defaultValue:{summary:""}}}},i={pattern:{description:"The pattern attribute to be passed to the input. See more information [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern).",control:"text",table:{defaultValue:{summary:"undefined"}}}},r={min:{description:"The min attribute defines the minimum value that is acceptable and valid for the input containing the attribute. If the value of the element is less than this, the element fails validation. This value must be less than or equal to the value of the max attribute. See more information [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/min).",control:"string"},max:{description:"The max attribute defines the maximum value that is acceptable and valid for the input containing the attribute. If the value of the element is greater than this, the element fails validation. This value must be greater than or equal to the value of the min attribute. See more information [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/max).",control:"string"},step:{description:"The step attribute to be passed to the input for number inputs. See more information [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/step).",control:"number",table:{defaultValue:{summary:"1"}}}},l={ariaDescription:{name:"aria-description",description:"The aria-description attribute for the component."}},s={skeleton:{description:"Whether the component should be rendered in a skeleton/loading state.",control:{type:"boolean"},table:{defaultValue:{summary:"false"}}}},u={startIcon:{name:"start-icon",description:"Icon to be displayed at the start of the component. Should be a valid icon name from the [icon library](?path=/story/components-icon--gator-icon-list).",control:{type:"text"},table:{category:"Optional Icon(s)"}}},m={endIcon:{name:"end-icon",description:"Icon to be displayed at the end of the component. Should be a valid icon name from the [icon library](?path=/story/components-icon--gator-icon-list).",control:{type:"text"},table:{category:"Optional Icon(s)"}}},d=(t,a)=>{let e,o={};for(e in t)t.hasOwnProperty(e)&&!a.includes(e)&&(o[e]=t[e]);return o},c=(t,a)=>{let e,o={};for(e in t)t.hasOwnProperty(e)&&a.includes(e)&&(o[e]=t[e]);return o};export{m as END_ICON_ARG,l as INPUT_A11Y_ARGS,n as INPUT_BASE_ARGS,r as INPUT_NUMERIC_ARGS,i as INPUT_TEXT_ARGS,s as SKELETON_ARG,u as START_ICON_ARG,d as argsExclude,c as argsOnly};
|
package/package.json
CHANGED