@ni/nimble-components 33.6.0 → 33.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all-components-bundle.js +147 -1
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +3685 -3668
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/combobox/index.d.ts +1 -0
- package/dist/esm/combobox/index.js +4 -0
- package/dist/esm/combobox/index.js.map +1 -1
- package/dist/esm/icons/all-icons.d.ts +8 -0
- package/dist/esm/icons/all-icons.js +8 -0
- package/dist/esm/icons/all-icons.js.map +1 -1
- package/dist/esm/icons/arrows-rotate-reverse-dot.d.ts +13 -0
- package/dist/esm/icons/arrows-rotate-reverse-dot.js +15 -0
- package/dist/esm/icons/arrows-rotate-reverse-dot.js.map +1 -0
- package/dist/esm/icons/bell-and-message.d.ts +13 -0
- package/dist/esm/icons/bell-and-message.js +15 -0
- package/dist/esm/icons/bell-and-message.js.map +1 -0
- package/dist/esm/icons/calendar-arrows-rotate-reverse-dot.d.ts +13 -0
- package/dist/esm/icons/calendar-arrows-rotate-reverse-dot.js +15 -0
- package/dist/esm/icons/calendar-arrows-rotate-reverse-dot.js.map +1 -0
- package/dist/esm/icons/message.d.ts +13 -0
- package/dist/esm/icons/message.js +15 -0
- package/dist/esm/icons/message.js.map +1 -0
- package/dist/esm/icons/messages-sparkle.d.ts +13 -0
- package/dist/esm/icons/messages-sparkle.js +15 -0
- package/dist/esm/icons/messages-sparkle.js.map +1 -0
- package/dist/esm/icons/square-list-cog.d.ts +13 -0
- package/dist/esm/icons/square-list-cog.js +15 -0
- package/dist/esm/icons/square-list-cog.js.map +1 -0
- package/dist/esm/icons/window-dock.d.ts +13 -0
- package/dist/esm/icons/window-dock.js +15 -0
- package/dist/esm/icons/window-dock.js.map +1 -0
- package/dist/esm/icons/window-restore.d.ts +13 -0
- package/dist/esm/icons/window-restore.js +15 -0
- package/dist/esm/icons/window-restore.js.map +1 -0
- package/dist/esm/patterns/dropdown/styles.js +9 -0
- package/dist/esm/patterns/dropdown/styles.js.map +1 -1
- package/dist/esm/patterns/dropdown/types.d.ts +1 -0
- package/dist/esm/patterns/dropdown/types.js +2 -1
- package/dist/esm/patterns/dropdown/types.js.map +1 -1
- package/dist/esm/select/index.d.ts +1 -0
- package/dist/esm/select/index.js +4 -0
- package/dist/esm/select/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Icon } from '../icon-base';
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
'nimble-icon-messages-sparkle': IconMessagesSparkle;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The icon component for the 'messagesSparkle' icon
|
|
9
|
+
*/
|
|
10
|
+
export declare class IconMessagesSparkle extends Icon {
|
|
11
|
+
constructor();
|
|
12
|
+
}
|
|
13
|
+
export declare const iconMessagesSparkleTag = "nimble-icon-messages-sparkle";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
2
|
+
// See generation source in nimble-components/build/generate-icons
|
|
3
|
+
import { messagesSparkle16X16 } from '@ni/nimble-tokens/dist/icons/js';
|
|
4
|
+
import { Icon, registerIcon } from '../icon-base';
|
|
5
|
+
/**
|
|
6
|
+
* The icon component for the 'messagesSparkle' icon
|
|
7
|
+
*/
|
|
8
|
+
export class IconMessagesSparkle extends Icon {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(messagesSparkle16X16);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
registerIcon('icon-messages-sparkle', IconMessagesSparkle);
|
|
14
|
+
export const iconMessagesSparkleTag = 'nimble-icon-messages-sparkle';
|
|
15
|
+
//# sourceMappingURL=messages-sparkle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages-sparkle.js","sourceRoot":"","sources":["../../../src/icons/messages-sparkle.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,kEAAkE;AAElE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAQlD;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,IAAI;IACzC;QACI,KAAK,CAAC,oBAAoB,CAAC,CAAC;IAChC,CAAC;CACJ;AAED,YAAY,CAAC,uBAAuB,EAAE,mBAAmB,CAAC,CAAC;AAC3D,MAAM,CAAC,MAAM,sBAAsB,GAAG,8BAA8B,CAAC","sourcesContent":["// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY\n// See generation source in nimble-components/build/generate-icons\n\nimport { messagesSparkle16X16 } from '@ni/nimble-tokens/dist/icons/js';\nimport { Icon, registerIcon } from '../icon-base';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-icon-messages-sparkle': IconMessagesSparkle;\n }\n}\n\n/**\n * The icon component for the 'messagesSparkle' icon\n */\nexport class IconMessagesSparkle extends Icon {\n public constructor() {\n super(messagesSparkle16X16);\n }\n}\n\nregisterIcon('icon-messages-sparkle', IconMessagesSparkle);\nexport const iconMessagesSparkleTag = 'nimble-icon-messages-sparkle';\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Icon } from '../icon-base';
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
'nimble-icon-square-list-cog': IconSquareListCog;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The icon component for the 'squareListCog' icon
|
|
9
|
+
*/
|
|
10
|
+
export declare class IconSquareListCog extends Icon {
|
|
11
|
+
constructor();
|
|
12
|
+
}
|
|
13
|
+
export declare const iconSquareListCogTag = "nimble-icon-square-list-cog";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
2
|
+
// See generation source in nimble-components/build/generate-icons
|
|
3
|
+
import { squareListCog16X16 } from '@ni/nimble-tokens/dist/icons/js';
|
|
4
|
+
import { Icon, registerIcon } from '../icon-base';
|
|
5
|
+
/**
|
|
6
|
+
* The icon component for the 'squareListCog' icon
|
|
7
|
+
*/
|
|
8
|
+
export class IconSquareListCog extends Icon {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(squareListCog16X16);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
registerIcon('icon-square-list-cog', IconSquareListCog);
|
|
14
|
+
export const iconSquareListCogTag = 'nimble-icon-square-list-cog';
|
|
15
|
+
//# sourceMappingURL=square-list-cog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"square-list-cog.js","sourceRoot":"","sources":["../../../src/icons/square-list-cog.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,kEAAkE;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAQlD;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,IAAI;IACvC;QACI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAC9B,CAAC;CACJ;AAED,YAAY,CAAC,sBAAsB,EAAE,iBAAiB,CAAC,CAAC;AACxD,MAAM,CAAC,MAAM,oBAAoB,GAAG,6BAA6B,CAAC","sourcesContent":["// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY\n// See generation source in nimble-components/build/generate-icons\n\nimport { squareListCog16X16 } from '@ni/nimble-tokens/dist/icons/js';\nimport { Icon, registerIcon } from '../icon-base';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-icon-square-list-cog': IconSquareListCog;\n }\n}\n\n/**\n * The icon component for the 'squareListCog' icon\n */\nexport class IconSquareListCog extends Icon {\n public constructor() {\n super(squareListCog16X16);\n }\n}\n\nregisterIcon('icon-square-list-cog', IconSquareListCog);\nexport const iconSquareListCogTag = 'nimble-icon-square-list-cog';\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Icon } from '../icon-base';
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
'nimble-icon-window-dock': IconWindowDock;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The icon component for the 'windowDock' icon
|
|
9
|
+
*/
|
|
10
|
+
export declare class IconWindowDock extends Icon {
|
|
11
|
+
constructor();
|
|
12
|
+
}
|
|
13
|
+
export declare const iconWindowDockTag = "nimble-icon-window-dock";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
2
|
+
// See generation source in nimble-components/build/generate-icons
|
|
3
|
+
import { windowDock16X16 } from '@ni/nimble-tokens/dist/icons/js';
|
|
4
|
+
import { Icon, registerIcon } from '../icon-base';
|
|
5
|
+
/**
|
|
6
|
+
* The icon component for the 'windowDock' icon
|
|
7
|
+
*/
|
|
8
|
+
export class IconWindowDock extends Icon {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(windowDock16X16);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
registerIcon('icon-window-dock', IconWindowDock);
|
|
14
|
+
export const iconWindowDockTag = 'nimble-icon-window-dock';
|
|
15
|
+
//# sourceMappingURL=window-dock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window-dock.js","sourceRoot":"","sources":["../../../src/icons/window-dock.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,kEAAkE;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAQlD;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,IAAI;IACpC;QACI,KAAK,CAAC,eAAe,CAAC,CAAC;IAC3B,CAAC;CACJ;AAED,YAAY,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAC;AACjD,MAAM,CAAC,MAAM,iBAAiB,GAAG,yBAAyB,CAAC","sourcesContent":["// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY\n// See generation source in nimble-components/build/generate-icons\n\nimport { windowDock16X16 } from '@ni/nimble-tokens/dist/icons/js';\nimport { Icon, registerIcon } from '../icon-base';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-icon-window-dock': IconWindowDock;\n }\n}\n\n/**\n * The icon component for the 'windowDock' icon\n */\nexport class IconWindowDock extends Icon {\n public constructor() {\n super(windowDock16X16);\n }\n}\n\nregisterIcon('icon-window-dock', IconWindowDock);\nexport const iconWindowDockTag = 'nimble-icon-window-dock';\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Icon } from '../icon-base';
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
'nimble-icon-window-restore': IconWindowRestore;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The icon component for the 'windowRestore' icon
|
|
9
|
+
*/
|
|
10
|
+
export declare class IconWindowRestore extends Icon {
|
|
11
|
+
constructor();
|
|
12
|
+
}
|
|
13
|
+
export declare const iconWindowRestoreTag = "nimble-icon-window-restore";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
2
|
+
// See generation source in nimble-components/build/generate-icons
|
|
3
|
+
import { windowRestore16X16 } from '@ni/nimble-tokens/dist/icons/js';
|
|
4
|
+
import { Icon, registerIcon } from '../icon-base';
|
|
5
|
+
/**
|
|
6
|
+
* The icon component for the 'windowRestore' icon
|
|
7
|
+
*/
|
|
8
|
+
export class IconWindowRestore extends Icon {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(windowRestore16X16);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
registerIcon('icon-window-restore', IconWindowRestore);
|
|
14
|
+
export const iconWindowRestoreTag = 'nimble-icon-window-restore';
|
|
15
|
+
//# sourceMappingURL=window-restore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window-restore.js","sourceRoot":"","sources":["../../../src/icons/window-restore.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,kEAAkE;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAQlD;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,IAAI;IACvC;QACI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAC9B,CAAC;CACJ;AAED,YAAY,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,CAAC;AACvD,MAAM,CAAC,MAAM,oBAAoB,GAAG,4BAA4B,CAAC","sourcesContent":["// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY\n// See generation source in nimble-components/build/generate-icons\n\nimport { windowRestore16X16 } from '@ni/nimble-tokens/dist/icons/js';\nimport { Icon, registerIcon } from '../icon-base';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-icon-window-restore': IconWindowRestore;\n }\n}\n\n/**\n * The icon component for the 'windowRestore' icon\n */\nexport class IconWindowRestore extends Icon {\n public constructor() {\n super(windowRestore16X16);\n }\n}\n\nregisterIcon('icon-window-restore', IconWindowRestore);\nexport const iconWindowRestoreTag = 'nimble-icon-window-restore';\n"]}
|
|
@@ -285,6 +285,15 @@ export const styles = css `
|
|
|
285
285
|
:host([disabled]) .control {
|
|
286
286
|
background-color: rgba(${borderRgbPartialColor}, 0.07);
|
|
287
287
|
}
|
|
288
|
+
`), appearanceBehavior(DropdownAppearance.frameless, css `
|
|
289
|
+
.control {
|
|
290
|
+
border-width: 0;
|
|
291
|
+
padding: ${borderWidth};
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
:host([full-bleed]) .selected-value {
|
|
295
|
+
padding-left: 0;
|
|
296
|
+
}
|
|
288
297
|
`), themeBehavior(Theme.color, css `
|
|
289
298
|
.listbox slot {
|
|
290
299
|
background: ${hexToRgbaCssColor(White, 0.15)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/patterns/dropdown/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,kDAAkD,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EACH,0BAA0B,EAC1B,QAAQ,EACR,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,6BAA6B,EAChC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,kBAAkB;AAClB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,aAAa,CAAC;;;iBAGX,aAAa;g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AAW;;;;;yCAKT,qBAAqB;;SAErD,CACJ,EACD,aAAa,CACT,KAAK,CAAC,KAAK,EACX,GAAG,CAAA;;8BAEmB,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC;;SAEnD,CACJ,CACJ,CAAC","sourcesContent":["import { css } from '@ni/fast-element';\nimport { White } from '@ni/nimble-tokens/dist/styledictionary/js/tokens';\nimport { display } from '../../utilities/style/display';\nimport {\n applicationBackgroundColor,\n bodyFont,\n bodyFontColor,\n bodyDisabledFontColor,\n borderHoverColor,\n borderWidth,\n controlHeight,\n iconSize,\n menuMinWidth,\n popupBorderColor,\n smallDelay,\n smallPadding,\n borderRgbPartialColor,\n mediumPadding,\n failColor,\n elevation2BoxShadow,\n placeholderFontColor,\n controlLabelFontColor,\n controlLabelFont,\n controlLabelDisabledFontColor\n} from '../../theme-provider/design-tokens';\nimport { Theme } from '../../theme-provider/types';\nimport { appearanceBehavior } from '../../utilities/style/appearance';\nimport { hexToRgbaCssColor } from '../../utilities/style/colors';\nimport { focusVisible } from '../../utilities/style/focus';\nimport { themeBehavior } from '../../utilities/style/theme';\nimport { DropdownAppearance } from './types';\nimport { userSelectNone } from '../../utilities/style/user-select';\n\n// prettier-ignore\nexport const styles = css`\n ${display('inline-flex')}\n\n :host {\n color: ${bodyFontColor};\n font: ${bodyFont};\n position: relative;\n flex-direction: column;\n justify-content: flex-start;\n ${userSelectNone}\n min-width: ${menuMinWidth};\n outline: none;\n vertical-align: top;\n --ni-private-hover-indicator-width: calc(${borderWidth} + 1px);\n --ni-private-focus-indicator-width: 1px;\n --ni-private-indicator-lines-gap: 1px;\n }\n\n :host::before {\n content: '';\n position: absolute;\n bottom: calc(${borderWidth} + var(--ni-private-indicator-lines-gap));\n width: 0px;\n height: 0px;\n align-self: center;\n border-bottom: ${borderHoverColor}\n var(--ni-private-focus-indicator-width) solid;\n transition: width ${smallDelay} ease-in;\n }\n\n @media (prefers-reduced-motion) {\n :host::before {\n transition-duration: 0s;\n }\n }\n\n :host(${focusVisible})::before {\n width: calc(100% - 8px);\n }\n\n :host([error-visible]):before {\n border-bottom-color: ${failColor};\n }\n\n :host::after {\n content: '';\n position: absolute;\n bottom: calc(-1 * ${borderWidth});\n width: 0px;\n height: 0px;\n align-self: center;\n border-bottom: ${borderHoverColor}\n var(--ni-private-hover-indicator-width) solid;\n transition: width ${smallDelay} ease-in;\n }\n\n @media (prefers-reduced-motion) {\n :host::after {\n transition-duration: 0s;\n }\n }\n\n :host(:hover)::after,\n :host(${focusVisible})::after {\n width: 100%;\n }\n\n :host([error-visible]):after {\n border-bottom-color: ${failColor};\n }\n\n :host([disabled]:hover)::after {\n width: 0px;\n }\n\n .label {\n display: flex;\n color: ${controlLabelFontColor};\n font: ${controlLabelFont};\n }\n\n :host([disabled]) .label {\n color: ${controlLabelDisabledFontColor};\n }\n\n :host([disabled][appearance-readonly]) .label {\n color: ${controlLabelFontColor};\n }\n\n .control {\n align-items: center;\n cursor: pointer;\n display: flex;\n width: 100%;\n height: ${controlHeight};\n border: 0px solid rgba(${borderRgbPartialColor}, 0.3);\n background-color: transparent;\n padding: ${borderWidth};\n }\n\n :host([open]:not(:hover)) .control {\n border-bottom-color: ${borderHoverColor};\n }\n\n :host([disabled]) .control {\n cursor: default;\n color: ${bodyDisabledFontColor};\n border-color: rgba(${borderRgbPartialColor}, 0.1);\n }\n\n :host([disabled][appearance-readonly]) .control {\n color: ${bodyFontColor};\n border-color: rgba(${borderRgbPartialColor}, 0.3);\n }\n\n :host([error-visible]) .control,\n :host([error-visible][open]) .control,\n :host([error-visible][disabled]) .control {\n border-bottom-color: ${failColor};\n }\n\n [part='start'] {\n display: none;\n }\n\n .selected-value {\n flex: auto;\n font-family: inherit;\n text-align: start;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding: 0px;\n padding-left: ${mediumPadding};\n }\n\n :host([disabled][appearance-readonly]) .selected-value {\n cursor: text;\n user-select: text;\n -webkit-user-select: text;\n padding-right: ${smallPadding};\n }\n\n .indicator {\n flex: none;\n margin-left: ${smallPadding};\n padding-right: 8px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n :host([disabled][appearance-readonly]) .indicator {\n display: none;\n }\n\n .indicator slot[name='indicator'] svg {\n width: ${iconSize};\n height: ${iconSize};\n fill: ${bodyFontColor};\n }\n\n :host([disabled]) .indicator slot[name='indicator'] svg {\n fill: ${bodyDisabledFontColor};\n }\n\n [part='end'] {\n margin-inline-start: auto;\n }\n\n :host([open][position='above']) .anchored-region {\n padding-bottom: ${smallPadding};\n }\n\n :host([open][position='below']) .anchored-region {\n padding-top: ${smallPadding};\n }\n\n .listbox {\n display: inline-flex;\n flex-direction: column;\n width: 100%;\n --ni-private-listbox-visible-option-count: 10.5;\n --ni-private-listbox-anchor-element-gap: ${smallPadding};\n --ni-private-listbox-padding: ${smallPadding};\n --ni-private-listbox-filter-height: 0px;\n --ni-private-listbox-loading-indicator-height: 0px;\n max-height: min(\n calc(\n var(--ni-private-listbox-anchor-element-gap) + \n 2 * ${borderWidth} + \n var(--ni-private-listbox-padding) +\n ${controlHeight} * var(--ni-private-listbox-visible-option-count) +\n var(--ni-private-listbox-filter-height) +\n var(--ni-private-listbox-loading-indicator-height)\n ),\n calc(\n var(--ni-private-listbox-available-viewport-height) - \n var(--ni-private-listbox-anchor-element-gap)\n )\n );\n box-shadow: ${elevation2BoxShadow};\n border: ${borderWidth} solid ${popupBorderColor};\n background-color: ${applicationBackgroundColor};\n }\n\n .listbox:has(.filter-field) {\n --ni-private-listbox-filter-height: ${controlHeight};\n }\n\n .listbox:has(.loading-container) {\n --ni-private-listbox-loading-indicator-height: ${controlHeight};\n }\n\n :host([open][position='above']) .listbox {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n :host([open][position='below']) .listbox {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n\n .scrollable-region {\n overflow-y: auto;\n }\n\n .listbox slot {\n display: block;\n background: transparent;\n padding: var(--ni-private-listbox-padding);\n }\n\n .listbox.empty slot {\n display: none;\n }\n\n ::slotted([role='option']),\n ::slotted(option) {\n flex: none;\n }\n\n .no-results-label {\n color: ${placeholderFontColor};\n height: ${controlHeight};\n display: inline-flex;\n display: flex;\n flex: 1 0 auto;\n align-items: center;\n padding: ${smallPadding} ${mediumPadding};\n }\n`.withBehaviors(\n appearanceBehavior(\n DropdownAppearance.underline,\n css`\n .control {\n border-bottom-width: ${borderWidth};\n padding-bottom: 0;\n }\n `\n ),\n appearanceBehavior(\n DropdownAppearance.outline,\n css`\n .control {\n border-width: ${borderWidth};\n padding: 0;\n }\n `\n ),\n appearanceBehavior(\n DropdownAppearance.block,\n css`\n .control {\n background-color: rgba(${borderRgbPartialColor}, 0.1);\n }\n\n .control:focus-within {\n border-bottom-width: ${borderWidth};\n padding-bottom: 0;\n }\n\n :host([disabled]) .control {\n background-color: rgba(${borderRgbPartialColor}, 0.07);\n }\n `\n ),\n themeBehavior(\n Theme.color,\n css`\n .listbox slot {\n background: ${hexToRgbaCssColor(White, 0.15)};\n }\n `\n )\n);\n"]}
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/patterns/dropdown/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,kDAAkD,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EACH,0BAA0B,EAC1B,QAAQ,EACR,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,6BAA6B,EAChC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,4BA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3B,0BAA0B;;;;8CAIR,aAAa;;;;yDAIF,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiCrD,oBAAoB;kBACnB,aAAa;;;;;mBAKZ,YAAY,IAAI,aAAa;;CAE/C,CAAC,aAAa,CACX,kBAAkB,CACd,kBAAkB,CAAC,SAAS,EAC5B,GAAG,CAAA;;uCAE4B,WAAW;;;SAGzC,CACJ,EACD,kBAAkB,CACd,kBAAkB,CAAC,OAAO,EAC1B,GAAG,CAAA;;gCAEqB,WAAW;;;SAGlC,CACJ,EACD,kBAAkB,CACd,kBAAkB,CAAC,KAAK,EACxB,GAAG,CAAA;;yCAE8B,qBAAqB;;;;uCAIvB,WAAW;;;;;yCAKT,qBAAqB;;SAErD,CACJ,EACD,kBAAkB,CACd,kBAAkB,CAAC,SAAS,EAC5B,GAAG,CAAA;;;2BAGgB,WAAW;;;;;;SAM7B,CACJ,EACD,aAAa,CACT,KAAK,CAAC,KAAK,EACX,GAAG,CAAA;;8BAEmB,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC;;SAEnD,CACJ,CACJ,CAAC","sourcesContent":["import { css } from '@ni/fast-element';\nimport { White } from '@ni/nimble-tokens/dist/styledictionary/js/tokens';\nimport { display } from '../../utilities/style/display';\nimport {\n applicationBackgroundColor,\n bodyFont,\n bodyFontColor,\n bodyDisabledFontColor,\n borderHoverColor,\n borderWidth,\n controlHeight,\n iconSize,\n menuMinWidth,\n popupBorderColor,\n smallDelay,\n smallPadding,\n borderRgbPartialColor,\n mediumPadding,\n failColor,\n elevation2BoxShadow,\n placeholderFontColor,\n controlLabelFontColor,\n controlLabelFont,\n controlLabelDisabledFontColor\n} from '../../theme-provider/design-tokens';\nimport { Theme } from '../../theme-provider/types';\nimport { appearanceBehavior } from '../../utilities/style/appearance';\nimport { hexToRgbaCssColor } from '../../utilities/style/colors';\nimport { focusVisible } from '../../utilities/style/focus';\nimport { themeBehavior } from '../../utilities/style/theme';\nimport { DropdownAppearance } from './types';\nimport { userSelectNone } from '../../utilities/style/user-select';\n\n// prettier-ignore\nexport const styles = css`\n ${display('inline-flex')}\n\n :host {\n color: ${bodyFontColor};\n font: ${bodyFont};\n position: relative;\n flex-direction: column;\n justify-content: flex-start;\n ${userSelectNone}\n min-width: ${menuMinWidth};\n outline: none;\n vertical-align: top;\n --ni-private-hover-indicator-width: calc(${borderWidth} + 1px);\n --ni-private-focus-indicator-width: 1px;\n --ni-private-indicator-lines-gap: 1px;\n }\n\n :host::before {\n content: '';\n position: absolute;\n bottom: calc(${borderWidth} + var(--ni-private-indicator-lines-gap));\n width: 0px;\n height: 0px;\n align-self: center;\n border-bottom: ${borderHoverColor}\n var(--ni-private-focus-indicator-width) solid;\n transition: width ${smallDelay} ease-in;\n }\n\n @media (prefers-reduced-motion) {\n :host::before {\n transition-duration: 0s;\n }\n }\n\n :host(${focusVisible})::before {\n width: calc(100% - 8px);\n }\n\n :host([error-visible]):before {\n border-bottom-color: ${failColor};\n }\n\n :host::after {\n content: '';\n position: absolute;\n bottom: calc(-1 * ${borderWidth});\n width: 0px;\n height: 0px;\n align-self: center;\n border-bottom: ${borderHoverColor}\n var(--ni-private-hover-indicator-width) solid;\n transition: width ${smallDelay} ease-in;\n }\n\n @media (prefers-reduced-motion) {\n :host::after {\n transition-duration: 0s;\n }\n }\n\n :host(:hover)::after,\n :host(${focusVisible})::after {\n width: 100%;\n }\n\n :host([error-visible]):after {\n border-bottom-color: ${failColor};\n }\n\n :host([disabled]:hover)::after {\n width: 0px;\n }\n\n .label {\n display: flex;\n color: ${controlLabelFontColor};\n font: ${controlLabelFont};\n }\n\n :host([disabled]) .label {\n color: ${controlLabelDisabledFontColor};\n }\n\n :host([disabled][appearance-readonly]) .label {\n color: ${controlLabelFontColor};\n }\n\n .control {\n align-items: center;\n cursor: pointer;\n display: flex;\n width: 100%;\n height: ${controlHeight};\n border: 0px solid rgba(${borderRgbPartialColor}, 0.3);\n background-color: transparent;\n padding: ${borderWidth};\n }\n\n :host([open]:not(:hover)) .control {\n border-bottom-color: ${borderHoverColor};\n }\n\n :host([disabled]) .control {\n cursor: default;\n color: ${bodyDisabledFontColor};\n border-color: rgba(${borderRgbPartialColor}, 0.1);\n }\n\n :host([disabled][appearance-readonly]) .control {\n color: ${bodyFontColor};\n border-color: rgba(${borderRgbPartialColor}, 0.3);\n }\n\n :host([error-visible]) .control,\n :host([error-visible][open]) .control,\n :host([error-visible][disabled]) .control {\n border-bottom-color: ${failColor};\n }\n\n [part='start'] {\n display: none;\n }\n\n .selected-value {\n flex: auto;\n font-family: inherit;\n text-align: start;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding: 0px;\n padding-left: ${mediumPadding};\n }\n\n :host([disabled][appearance-readonly]) .selected-value {\n cursor: text;\n user-select: text;\n -webkit-user-select: text;\n padding-right: ${smallPadding};\n }\n\n .indicator {\n flex: none;\n margin-left: ${smallPadding};\n padding-right: 8px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n :host([disabled][appearance-readonly]) .indicator {\n display: none;\n }\n\n .indicator slot[name='indicator'] svg {\n width: ${iconSize};\n height: ${iconSize};\n fill: ${bodyFontColor};\n }\n\n :host([disabled]) .indicator slot[name='indicator'] svg {\n fill: ${bodyDisabledFontColor};\n }\n\n [part='end'] {\n margin-inline-start: auto;\n }\n\n :host([open][position='above']) .anchored-region {\n padding-bottom: ${smallPadding};\n }\n\n :host([open][position='below']) .anchored-region {\n padding-top: ${smallPadding};\n }\n\n .listbox {\n display: inline-flex;\n flex-direction: column;\n width: 100%;\n --ni-private-listbox-visible-option-count: 10.5;\n --ni-private-listbox-anchor-element-gap: ${smallPadding};\n --ni-private-listbox-padding: ${smallPadding};\n --ni-private-listbox-filter-height: 0px;\n --ni-private-listbox-loading-indicator-height: 0px;\n max-height: min(\n calc(\n var(--ni-private-listbox-anchor-element-gap) + \n 2 * ${borderWidth} + \n var(--ni-private-listbox-padding) +\n ${controlHeight} * var(--ni-private-listbox-visible-option-count) +\n var(--ni-private-listbox-filter-height) +\n var(--ni-private-listbox-loading-indicator-height)\n ),\n calc(\n var(--ni-private-listbox-available-viewport-height) - \n var(--ni-private-listbox-anchor-element-gap)\n )\n );\n box-shadow: ${elevation2BoxShadow};\n border: ${borderWidth} solid ${popupBorderColor};\n background-color: ${applicationBackgroundColor};\n }\n\n .listbox:has(.filter-field) {\n --ni-private-listbox-filter-height: ${controlHeight};\n }\n\n .listbox:has(.loading-container) {\n --ni-private-listbox-loading-indicator-height: ${controlHeight};\n }\n\n :host([open][position='above']) .listbox {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n :host([open][position='below']) .listbox {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n\n .scrollable-region {\n overflow-y: auto;\n }\n\n .listbox slot {\n display: block;\n background: transparent;\n padding: var(--ni-private-listbox-padding);\n }\n\n .listbox.empty slot {\n display: none;\n }\n\n ::slotted([role='option']),\n ::slotted(option) {\n flex: none;\n }\n\n .no-results-label {\n color: ${placeholderFontColor};\n height: ${controlHeight};\n display: inline-flex;\n display: flex;\n flex: 1 0 auto;\n align-items: center;\n padding: ${smallPadding} ${mediumPadding};\n }\n`.withBehaviors(\n appearanceBehavior(\n DropdownAppearance.underline,\n css`\n .control {\n border-bottom-width: ${borderWidth};\n padding-bottom: 0;\n }\n `\n ),\n appearanceBehavior(\n DropdownAppearance.outline,\n css`\n .control {\n border-width: ${borderWidth};\n padding: 0;\n }\n `\n ),\n appearanceBehavior(\n DropdownAppearance.block,\n css`\n .control {\n background-color: rgba(${borderRgbPartialColor}, 0.1);\n }\n\n .control:focus-within {\n border-bottom-width: ${borderWidth};\n padding-bottom: 0;\n }\n\n :host([disabled]) .control {\n background-color: rgba(${borderRgbPartialColor}, 0.07);\n }\n `\n ),\n appearanceBehavior(\n DropdownAppearance.frameless,\n css`\n .control {\n border-width: 0;\n padding: ${borderWidth};\n }\n\n :host([full-bleed]) .selected-value {\n padding-left: 0;\n }\n `\n ),\n themeBehavior(\n Theme.color,\n css`\n .listbox slot {\n background: ${hexToRgbaCssColor(White, 0.15)};\n }\n `\n )\n);\n"]}
|
|
@@ -16,6 +16,7 @@ export declare const DropdownAppearance: {
|
|
|
16
16
|
readonly underline: "underline";
|
|
17
17
|
readonly outline: "outline";
|
|
18
18
|
readonly block: "block";
|
|
19
|
+
readonly frameless: "frameless";
|
|
19
20
|
};
|
|
20
21
|
export type DropdownAppearance = (typeof DropdownAppearance)[keyof typeof DropdownAppearance];
|
|
21
22
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/patterns/dropdown/types.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;CACR,CAAC;AAIX,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/patterns/dropdown/types.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;CACR,CAAC;AAIX,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,WAAW;CAChB,CAAC","sourcesContent":["import type { ListOption } from '../../list-option';\nimport type { ErrorPattern } from '../error/types';\n\n/**\n * The interface that dropdowns of various types implement. The properties in this interface\n * are leveraged by the shared dropdown pattern css.\n */\nexport interface DropdownPattern extends ErrorPattern {\n position?: DropdownPosition;\n}\n\nexport const DropdownPosition = {\n above: 'above',\n below: 'below'\n} as const;\nexport type DropdownPosition =\n (typeof DropdownPosition)[keyof typeof DropdownPosition];\n\nexport const DropdownAppearance = {\n underline: 'underline',\n outline: 'outline',\n block: 'block',\n frameless: 'frameless'\n} as const;\nexport type DropdownAppearance =\n (typeof DropdownAppearance)[keyof typeof DropdownAppearance];\n\n/**\n * @internal\n *\n * This interface is used to register options with their parent once their\n * 'connectedCallback' method is run. This allows for the \"owner\", like the\n * Select, to have its value set to that newly registered option earlier than it\n * might otherwise in certain situations. One such scenario is in an Angular\n * reactive form, where the form value is set to an option immediately after\n * dynamically adding it.\n */\nexport interface ListOptionOwner extends HTMLElement {\n registerOption: (option: ListOption) => void;\n}\n"]}
|
|
@@ -32,6 +32,7 @@ declare const Select_base: (abstract new (...args: any[]) => {
|
|
|
32
32
|
export declare class Select extends Select_base implements ListOptionOwner {
|
|
33
33
|
appearance: DropdownAppearance;
|
|
34
34
|
appearanceReadOnly: boolean;
|
|
35
|
+
fullBleed: boolean;
|
|
35
36
|
/**
|
|
36
37
|
* Reflects the placement for the listbox when the select is open.
|
|
37
38
|
*
|
package/dist/esm/select/index.js
CHANGED
|
@@ -32,6 +32,7 @@ export class Select extends mixinErrorPattern(mixinRequiredVisiblePattern(FormAs
|
|
|
32
32
|
super(...arguments);
|
|
33
33
|
this.appearance = DropdownAppearance.underline;
|
|
34
34
|
this.appearanceReadOnly = false;
|
|
35
|
+
this.fullBleed = false;
|
|
35
36
|
this.filterMode = FilterMode.none;
|
|
36
37
|
this.clearable = false;
|
|
37
38
|
this.loadingVisible = false;
|
|
@@ -1025,6 +1026,9 @@ __decorate([
|
|
|
1025
1026
|
__decorate([
|
|
1026
1027
|
attr({ attribute: 'appearance-readonly', mode: 'boolean' })
|
|
1027
1028
|
], Select.prototype, "appearanceReadOnly", void 0);
|
|
1029
|
+
__decorate([
|
|
1030
|
+
attr({ attribute: 'full-bleed', mode: 'boolean' })
|
|
1031
|
+
], Select.prototype, "fullBleed", void 0);
|
|
1028
1032
|
__decorate([
|
|
1029
1033
|
attr({ attribute: 'position' })
|
|
1030
1034
|
], Select.prototype, "positionAttribute", void 0);
|