@carbon/web-components 2.4.0-rc.0 → 2.4.0-rc.1
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/custom-elements.json +108 -0
- package/dist/16-2aa048a9.js +11 -8
- package/dist/16-44367639.js +11 -8
- package/dist/16-880e779e.js +11 -8
- package/dist/16-8ab58ede.js +11 -8
- package/dist/16-945f9ad8.js +11 -8
- package/dist/16-9bdb8b2e.js +11 -8
- package/dist/16-afc2ad08.js +11 -8
- package/dist/16-f2df91a2.js +11 -8
- package/dist/20-c1834a3b.js +11 -8
- package/dist/accordion.min.js +11 -8
- package/dist/ai-skeleton.min.js +11 -8
- package/dist/breadcrumb.min.js +11 -8
- package/dist/button-dade8f28.js +11 -8
- package/dist/button-set-5f5affa0.js +11 -8
- package/dist/button-skeleton-7325ea56.js +11 -8
- package/dist/button.min.js +11 -8
- package/dist/carbon-element-4ca9803f.js +11 -8
- package/dist/chat-button.min.js +11 -8
- package/dist/checkbox-a610152a.js +11 -8
- package/dist/checkbox.min.js +11 -8
- package/dist/class-map-b1739c02.js +11 -8
- package/dist/code-snippet.min.js +12 -9
- package/dist/collection-helpers-4e32fe16.js +11 -8
- package/dist/combo-box.min.js +11 -8
- package/dist/content-switcher-item-9714594a.js +11 -8
- package/dist/content-switcher.min.js +11 -8
- package/dist/{copy-button-1310f02a.js → copy-button-e4f754c9.js} +12 -9
- package/dist/copy-button.min.js +12 -9
- package/dist/custom-element-975be15f.js +11 -8
- package/dist/data-table.min.js +12 -9
- package/dist/date-picker.min.js +11 -8
- package/dist/directive-e2d48b9c.js +11 -8
- package/dist/dropdown-item-cc7cc1dc.js +11 -8
- package/dist/dropdown.min.js +11 -8
- package/dist/file-uploader.min.js +11 -8
- package/dist/floating-menu-6ec5c7fa.js +11 -8
- package/dist/floating-menu.min.js +11 -8
- package/dist/floating-ui-a76fcefc.js +69 -0
- package/dist/focus-92d82b5f.js +11 -8
- package/dist/form-group.min.js +11 -8
- package/dist/form.min.js +11 -8
- package/dist/get-d229c408.js +11 -8
- package/dist/host-listener-a948931e.js +11 -8
- package/dist/{icon-button-7b2540b4.js → icon-button-ab6ad963.js} +16 -12
- package/dist/icon-button.min.js +12 -9
- package/dist/if-defined-b99f5484.js +11 -8
- package/dist/if-non-empty-d69cc3f0.js +11 -8
- package/dist/inline-loading.min.js +11 -8
- package/dist/layer-62995057.js +11 -8
- package/dist/layer.min.js +11 -8
- package/dist/link-d5d53be2.js +11 -8
- package/dist/link.min.js +11 -8
- package/dist/list.min.js +11 -8
- package/dist/loading-0dcb7680.js +11 -8
- package/dist/loading-icon-2ac6de26.js +11 -8
- package/dist/loading.min.js +11 -8
- package/dist/modal.min.js +11 -8
- package/dist/multi-select.min.js +11 -8
- package/dist/notification.min.js +11 -8
- package/dist/number-input.min.js +11 -8
- package/dist/objectSpread2-0b7e8561.js +11 -8
- package/dist/on-6c264d49.js +11 -8
- package/dist/overflow-menu.min.js +12 -9
- package/dist/pagination.min.js +11 -8
- package/dist/popover-content-620200e8.js +75 -0
- package/dist/popover.min.js +12 -9
- package/dist/progress-bar.min.js +11 -8
- package/dist/progress-indicator.min.js +11 -8
- package/dist/query-6ca5e414.js +11 -8
- package/dist/query-assigned-elements-8e88277c.js +11 -8
- package/dist/radio-button.min.js +11 -8
- package/dist/radio-group-manager-3cfdd620.js +11 -8
- package/dist/search-4c0e8630.js +11 -8
- package/dist/search.min.js +11 -8
- package/dist/select-item-db3c6fa0.js +11 -8
- package/dist/select.min.js +11 -8
- package/dist/settings-387c0fa4.js +11 -8
- package/dist/shared-enums-c6fe8c39.js +11 -8
- package/dist/side-panel.min.js +11 -8
- package/dist/skeleton-icon-451d3c47.js +11 -8
- package/dist/skeleton-icon.min.js +11 -8
- package/dist/skeleton-placeholder-e6490dbd.js +11 -8
- package/dist/skeleton-placeholder.min.js +11 -8
- package/dist/skeleton-text-eeac3c87.js +11 -8
- package/dist/skeleton-text.min.js +11 -8
- package/dist/skip-to-content.min.js +11 -8
- package/dist/slider.min.js +11 -8
- package/dist/slug.min.js +18 -14
- package/dist/spread-6af5f657.js +11 -8
- package/dist/stack.min.js +11 -8
- package/dist/state-63312e74.js +11 -8
- package/dist/structured-list.min.js +11 -8
- package/dist/tabs.min.js +12 -9
- package/dist/tag.min.js +11 -8
- package/dist/text-input-8d011ae2.js +11 -8
- package/dist/text-input.min.js +11 -8
- package/dist/textarea.min.js +11 -8
- package/dist/tile.min.js +11 -8
- package/dist/toggle-tip.min.js +12 -9
- package/dist/toggle.min.js +11 -8
- package/dist/toggletip-17030a2a.js +114 -0
- package/dist/{tooltip-content-fbce4fed.js → tooltip-content-45723618.js} +12 -9
- package/dist/tooltip.min.js +12 -9
- package/dist/ui-shell.min.js +11 -8
- package/dist/validity-d86ffa4f.js +11 -8
- package/es/components/data-table/data-table.css.js +1 -1
- package/es/components/icon-button/icon-button.css.js +1 -1
- package/es/components/icon-button/icon-button.d.ts +5 -1
- package/es/components/icon-button/icon-button.js +18 -2
- package/es/components/icon-button/icon-button.js.map +1 -1
- package/es/components/popover/defs.d.ts +50 -2
- package/es/components/popover/defs.js +9 -2
- package/es/components/popover/defs.js.map +1 -1
- package/es/components/popover/popover-content.d.ts +5 -1
- package/es/components/popover/popover-content.js +32 -9
- package/es/components/popover/popover-content.js.map +1 -1
- package/es/components/popover/popover.css.js +1 -1
- package/es/components/popover/popover.d.ts +23 -1
- package/es/components/popover/popover.js +80 -4
- package/es/components/popover/popover.js.map +1 -1
- package/es/components/slug/slug.css.js +1 -1
- package/es/components/slug/slug.d.ts +1 -1
- package/es/components/slug/slug.js +5 -3
- package/es/components/slug/slug.js.map +1 -1
- package/es/components/tabs/tabs.css.js +1 -1
- package/es/components/toggle-tip/toggletip.css.js +1 -1
- package/es/components/toggle-tip/toggletip.d.ts +20 -0
- package/es/components/toggle-tip/toggletip.js +106 -17
- package/es/components/toggle-tip/toggletip.js.map +1 -1
- package/es/components/tooltip/tooltip.css.js +1 -1
- package/es/components/tooltip/tooltip.d.ts +5 -1
- package/es/components/tooltip/tooltip.js +17 -2
- package/es/components/tooltip/tooltip.js.map +1 -1
- package/es/globals/internal/floating-ui.d.ts +30 -0
- package/es/globals/internal/floating-ui.js +102 -0
- package/es/globals/internal/floating-ui.js.map +1 -0
- package/lib/components/popover/defs.js +9 -1
- package/lib/components/popover/defs.js.map +1 -1
- package/package.json +3 -2
- package/scss/components/data-table/_table-core.scss +0 -1
- package/scss/components/popover/popover.scss +83 -64
- package/scss/components/slug/slug.scss +162 -28
- package/scss/components/tabs/tabs.scss +1 -1
- package/scss/components/toggle-tip/toggletip.scss +13 -1
- package/dist/popover-content-e0c3132f.js +0 -68
- package/dist/toggletip-b2d3b8bf.js +0 -99
|
@@ -7,7 +7,7 @@ let _ = t => t,
|
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
*
|
|
10
|
-
* Copyright IBM Corp. 2019,
|
|
10
|
+
* Copyright IBM Corp. 2019, 2024
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -46,6 +46,16 @@ let CDSIconButton = _decorate([customElement(`${prefix}-icon-button`)], function
|
|
|
46
46
|
value() {
|
|
47
47
|
return 'top';
|
|
48
48
|
}
|
|
49
|
+
}, {
|
|
50
|
+
kind: "field",
|
|
51
|
+
decorators: [property({
|
|
52
|
+
type: Boolean,
|
|
53
|
+
reflect: true
|
|
54
|
+
})],
|
|
55
|
+
key: "autoalign",
|
|
56
|
+
value() {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
49
59
|
}, {
|
|
50
60
|
kind: "field",
|
|
51
61
|
decorators: [property({
|
|
@@ -104,6 +114,10 @@ let CDSIconButton = _decorate([customElement(`${prefix}-icon-button`)], function
|
|
|
104
114
|
* Specify how the trigger should align with the tooltip
|
|
105
115
|
*/
|
|
106
116
|
|
|
117
|
+
/**
|
|
118
|
+
* Specify whether a auto align functionality should be applied
|
|
119
|
+
*/
|
|
120
|
+
|
|
107
121
|
/**
|
|
108
122
|
* Determines whether the tooltip should close when inner content is activated (click, Enter or Space)
|
|
109
123
|
*/
|
|
@@ -150,6 +164,7 @@ let CDSIconButton = _decorate([customElement(`${prefix}-icon-button`)], function
|
|
|
150
164
|
value: function render() {
|
|
151
165
|
const {
|
|
152
166
|
align,
|
|
167
|
+
autoalign,
|
|
153
168
|
closeOnActivation,
|
|
154
169
|
defaultOpen,
|
|
155
170
|
enterDelayMs,
|
|
@@ -157,6 +172,7 @@ let CDSIconButton = _decorate([customElement(`${prefix}-icon-button`)], function
|
|
|
157
172
|
} = this;
|
|
158
173
|
return html(_t2 || (_t2 = _`
|
|
159
174
|
<cds-tooltip
|
|
175
|
+
?autoalign=${0}
|
|
160
176
|
align=${0}
|
|
161
177
|
?defaultOpen=${0}
|
|
162
178
|
close-on-activation="${0}"
|
|
@@ -164,7 +180,7 @@ let CDSIconButton = _decorate([customElement(`${prefix}-icon-button`)], function
|
|
|
164
180
|
leave-delay-ms=${0}>
|
|
165
181
|
${0} ${0}
|
|
166
182
|
</cds-tooltip>
|
|
167
|
-
`), align, defaultOpen, closeOnActivation, enterDelayMs, leaveDelayMs, _get(_getPrototypeOf(CDSIconButton.prototype), "render", this).call(this), this._renderTooltipContent());
|
|
183
|
+
`), autoalign, align, defaultOpen, closeOnActivation, enterDelayMs, leaveDelayMs, _get(_getPrototypeOf(CDSIconButton.prototype), "render", this).call(this), this._renderTooltipContent());
|
|
168
184
|
}
|
|
169
185
|
}, {
|
|
170
186
|
kind: "field",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.js","names":["html","property","customElement","prefix","CDSButton","ICON_BUTTON_SIZE","ICON_BUTTON_TOOLTIP_ALIGNMENT","styles","CDSIconButton","_decorate","_initialize","_CDSButton","constructor","args","F","d","kind","decorators","reflect","type","String","key","value","
|
|
1
|
+
{"version":3,"file":"icon-button.js","names":["html","property","customElement","prefix","CDSButton","ICON_BUTTON_SIZE","ICON_BUTTON_TOOLTIP_ALIGNMENT","styles","CDSIconButton","_decorate","_initialize","_CDSButton","constructor","args","F","d","kind","decorators","reflect","type","String","key","value","Boolean","attribute","Number","updated","changedProperties","_this$shadowRoot","_this$querySelector","_this$shadowRoot2","shadowRoot","querySelector","classList","add","tooltipContent","textContent","setAttribute","_renderTooltipContent","_t","_","render","align","autoalign","closeOnActivation","defaultOpen","enterDelayMs","leaveDelayMs","_t2","_get","_getPrototypeOf","prototype","call","static"],"sources":["components/icon-button/icon-button.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2024\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html } from 'lit';\nimport { property, customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport '../tooltip/index';\nimport '../button/index';\nimport CDSButton from '../button/button';\nimport { ICON_BUTTON_SIZE, ICON_BUTTON_TOOLTIP_ALIGNMENT } from './defs';\nimport styles from './icon-button.scss';\n\nexport { ICON_BUTTON_SIZE, ICON_BUTTON_TOOLTIP_ALIGNMENT };\n\n/**\n * Icon Button\n *\n */\n@customElement(`${prefix}-icon-button`)\nclass CDSIconButton extends CDSButton {\n /**\n * Specify how the trigger should align with the tooltip\n */\n @property({ reflect: true, type: String })\n align = 'top';\n\n /**\n * Specify whether a auto align functionality should be applied\n */\n @property({ type: Boolean, reflect: true })\n autoalign = false;\n\n /**\n * Determines whether the tooltip should close when inner content is activated (click, Enter or Space)\n */\n @property({ attribute: 'close-on-activation', reflect: true, type: Boolean })\n closeOnActivation = true;\n\n /**\n * Specify whether the tooltip should be open when it first renders\n */\n @property({ reflect: true, type: Boolean })\n defaultOpen = false;\n\n /**\n * Specify the duration in milliseconds to delay before displaying the tooltip\n */\n @property({ attribute: 'enter-delay-ms', type: Number })\n enterDelayMs = 100;\n\n /**\n * Specify the duration in milliseconds to delay before hiding the tooltip\n */\n @property({ attribute: 'leave-delay-ms', type: Number })\n leaveDelayMs = 300;\n\n /**\n * Specify the size of the Button. Defaults to `md`.\n */\n @property({ reflect: true })\n size = 'md';\n\n updated(changedProperties) {\n if (changedProperties) {\n this.shadowRoot\n ?.querySelector(`${prefix}-tooltip`)\n ?.shadowRoot?.querySelector(`.${prefix}--tooltip`)\n ?.classList.add(`${prefix}--icon-tooltip`);\n\n const tooltipContent = this.querySelector(\n '[slot=tooltip-content]'\n )?.textContent;\n this.shadowRoot\n ?.querySelector(`${prefix}-tooltip`)\n ?.querySelector(`button`)\n ?.setAttribute('aria-label', String(tooltipContent));\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n protected _renderTooltipContent() {\n return html`\n <cds-tooltip-content>\n <slot name=\"tooltip-content\"></slot>\n </cds-tooltip-content>\n `;\n }\n\n render() {\n const {\n align,\n autoalign,\n closeOnActivation,\n defaultOpen,\n enterDelayMs,\n leaveDelayMs,\n } = this;\n return html`\n <cds-tooltip\n ?autoalign=${autoalign}\n align=${align}\n ?defaultOpen=${defaultOpen}\n close-on-activation=\"${closeOnActivation}\"\n enter-delay-ms=${enterDelayMs}\n leave-delay-ms=${leaveDelayMs}>\n ${super.render()} ${this._renderTooltipContent()}\n </cds-tooltip>\n `;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\nexport default CDSIconButton;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,KAAK;AAC1B,SAASC,QAAQ,EAAEC,aAAa,QAAQ,mBAAmB;AAC3D,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,OAAO,kBAAkB;AACzB,OAAO,iBAAiB;AACxB,OAAOC,SAAS,MAAM,kBAAkB;AACxC,SAASC,gBAAgB,EAAEC,6BAA6B,QAAQ,QAAQ;AACxE,OAAOC,MAAM,MAAM,wBAAoB;AAEvC,SAASF,gBAAgB,EAAEC,6BAA6B;;AAExD;AACA;AACA;AACA;AAHA,IAKME,aA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CAAC,YAAY,EAAEjB,MAAM,CAACe,cAAc,CAAC,CAAC;QACxD;MACF;;MAEA;IAAA;MAAAnB,IAAA;MAAAK,GAAA;MAAAC,KAAA,EACA,SAAAgB,sBAAA,EAAkC;QAChC,OAAOtC,IAAI,CAAAuC,EAAA,KAAAA,EAAA,GAAAC,CAAC;AAChB;AACA;AACA;AACA,KAAI;MACF;IAAC;MAAAxB,IAAA;MAAAK,GAAA;MAAAC,KAAA,EAED,SAAAmB,OAAA,EAAS;QACP,MAAM;UACJC,KAAK;UACLC,SAAS;UACTC,iBAAiB;UACjBC,WAAW;UACXC,YAAY;UACZC;QACF,CAAC,GAAG,IAAI;QACR,OAAO/C,IAAI,CAAAgD,GAAA,KAAAA,GAAA,GAAAR,CAAC;AAChB;AACA,qBAAmB,CAAY;AAC/B,gBAAc,CAAQ;AACtB,uBAAqB,CAAc;AACnC,+BAA6B,CAAoB;AACjD,yBAAuB,CAAe;AACtC,yBAAuB,CAAe;AACtC,UAAQ,CAAiB,IAAC,CAA+B;AACzD;AACA,KAAI,GARiBG,SAAS,EACdD,KAAK,EACEG,WAAW,EACHD,iBAAiB,EACvBE,YAAY,EACZC,YAAY,EAAAE,IAAA,CAAAC,eAAA,CArF/B1C,aAAa,CAAA2C,SAAA,mBAAAC,IAAA,QAsFS,IAAI,CAACd,qBAAqB,CAAC,CAAC;MAGtD;IAAC;MAAAtB,IAAA;MAAAqC,MAAA;MAAAhC,GAAA;MAAAC,MAAA;QAAA,OAEef,MAAM;MAAA;IAAA;EAAA;AAAA,GA3FIH,SAAS;AA8FrC,eAAeI,aAAa"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*
|
|
4
|
-
* Copyright IBM Corp. 2020,
|
|
4
|
+
* Copyright IBM Corp. 2020, 2024
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -16,48 +16,96 @@ export declare enum POPOVER_ALIGNMENT {
|
|
|
16
16
|
TOP = "top",
|
|
17
17
|
/**
|
|
18
18
|
* Align the top-left position for the popover content.
|
|
19
|
+
*
|
|
20
|
+
* @deprecated
|
|
19
21
|
*/
|
|
20
22
|
TOP_LEFT = "top-left",
|
|
21
23
|
/**
|
|
22
24
|
* Align the top right position for the popover content.
|
|
25
|
+
*
|
|
26
|
+
* @deprecated
|
|
23
27
|
*/
|
|
24
28
|
TOP_RIGHT = "top-right",
|
|
29
|
+
/**
|
|
30
|
+
* Align the top-start position for the popover content.
|
|
31
|
+
*/
|
|
32
|
+
TOP_START = "top-start",
|
|
33
|
+
/**
|
|
34
|
+
* Align the top end position for the popover content.
|
|
35
|
+
*/
|
|
36
|
+
TOP_END = "top-end",
|
|
25
37
|
/**
|
|
26
38
|
* Align the bottom position for the popover content.
|
|
27
39
|
*/
|
|
28
40
|
BOTTOM = "bottom",
|
|
29
41
|
/**
|
|
30
42
|
* Align the bottom left position for the popover content.
|
|
43
|
+
*
|
|
44
|
+
* @deprecated
|
|
31
45
|
*/
|
|
32
46
|
BOTTOM_LEFT = "bottom-left",
|
|
33
47
|
/**
|
|
34
48
|
* Align the bottom right position for the popover content.
|
|
49
|
+
*
|
|
50
|
+
* @deprecated
|
|
35
51
|
*/
|
|
36
52
|
BOTTOM_RIGHT = "bottom-right",
|
|
53
|
+
/**
|
|
54
|
+
* Align the bottom start position for the popover content.
|
|
55
|
+
*/
|
|
56
|
+
BOTTOM_START = "bottom-start",
|
|
57
|
+
/**
|
|
58
|
+
* Align the bottom end position for the popover content.
|
|
59
|
+
*/
|
|
60
|
+
BOTTOM_END = "bottom-end",
|
|
37
61
|
/**
|
|
38
62
|
* Align the left position for the popover content.
|
|
39
63
|
*/
|
|
40
64
|
LEFT = "left",
|
|
41
65
|
/**
|
|
42
66
|
* Align the left bottom position for the popover content.
|
|
67
|
+
*
|
|
68
|
+
* @deprecated
|
|
43
69
|
*/
|
|
44
70
|
LEFT_BOTTOM = "left-bottom",
|
|
45
71
|
/**
|
|
46
72
|
* Align the left top position for the popover content.
|
|
73
|
+
*
|
|
74
|
+
* @deprecated
|
|
47
75
|
*/
|
|
48
76
|
LEFT_TOP = "left-top",
|
|
77
|
+
/**
|
|
78
|
+
* Align the left start position for the popover content.
|
|
79
|
+
*/
|
|
80
|
+
LEFT_START = "left-start",
|
|
81
|
+
/**
|
|
82
|
+
* Align the left end position for the popover content.
|
|
83
|
+
*/
|
|
84
|
+
LEFT_END = "left-end",
|
|
49
85
|
/**
|
|
50
86
|
* Align the right position for the popover content.
|
|
51
87
|
*/
|
|
52
88
|
RIGHT = "right",
|
|
53
89
|
/**
|
|
54
90
|
* Align the right bottom position for the popover content.
|
|
91
|
+
*
|
|
92
|
+
* @deprecated
|
|
55
93
|
*/
|
|
56
94
|
RIGHT_BOTTOM = "right-bottom",
|
|
57
95
|
/**
|
|
58
96
|
* Align the right top position for the popover content.
|
|
97
|
+
*
|
|
98
|
+
* @deprecated
|
|
99
|
+
*/
|
|
100
|
+
RIGHT_TOP = "right-top",
|
|
101
|
+
/**
|
|
102
|
+
* Align the right start position for the popover content.
|
|
103
|
+
*/
|
|
104
|
+
RIGHT_START = "right-start",
|
|
105
|
+
/**
|
|
106
|
+
* Align the right end position for the popover content.
|
|
59
107
|
*/
|
|
60
|
-
|
|
108
|
+
RIGHT_END = "right-end"
|
|
61
109
|
}
|
|
62
110
|
|
|
63
111
|
//# sourceMappingURL=defs.d.ts.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*
|
|
4
|
-
* Copyright IBM Corp. 2020,
|
|
4
|
+
* Copyright IBM Corp. 2020, 2024
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
9
|
/**
|
|
11
10
|
* The alignment choices of popover.
|
|
12
11
|
*/
|
|
@@ -15,14 +14,22 @@ export let POPOVER_ALIGNMENT;
|
|
|
15
14
|
POPOVER_ALIGNMENT["TOP"] = "top";
|
|
16
15
|
POPOVER_ALIGNMENT["TOP_LEFT"] = "top-left";
|
|
17
16
|
POPOVER_ALIGNMENT["TOP_RIGHT"] = "top-right";
|
|
17
|
+
POPOVER_ALIGNMENT["TOP_START"] = "top-start";
|
|
18
|
+
POPOVER_ALIGNMENT["TOP_END"] = "top-end";
|
|
18
19
|
POPOVER_ALIGNMENT["BOTTOM"] = "bottom";
|
|
19
20
|
POPOVER_ALIGNMENT["BOTTOM_LEFT"] = "bottom-left";
|
|
20
21
|
POPOVER_ALIGNMENT["BOTTOM_RIGHT"] = "bottom-right";
|
|
22
|
+
POPOVER_ALIGNMENT["BOTTOM_START"] = "bottom-start";
|
|
23
|
+
POPOVER_ALIGNMENT["BOTTOM_END"] = "bottom-end";
|
|
21
24
|
POPOVER_ALIGNMENT["LEFT"] = "left";
|
|
22
25
|
POPOVER_ALIGNMENT["LEFT_BOTTOM"] = "left-bottom";
|
|
23
26
|
POPOVER_ALIGNMENT["LEFT_TOP"] = "left-top";
|
|
27
|
+
POPOVER_ALIGNMENT["LEFT_START"] = "left-start";
|
|
28
|
+
POPOVER_ALIGNMENT["LEFT_END"] = "left-end";
|
|
24
29
|
POPOVER_ALIGNMENT["RIGHT"] = "right";
|
|
25
30
|
POPOVER_ALIGNMENT["RIGHT_BOTTOM"] = "right-bottom";
|
|
26
31
|
POPOVER_ALIGNMENT["RIGHT_TOP"] = "right-top";
|
|
32
|
+
POPOVER_ALIGNMENT["RIGHT_START"] = "right-start";
|
|
33
|
+
POPOVER_ALIGNMENT["RIGHT_END"] = "right-end";
|
|
27
34
|
})(POPOVER_ALIGNMENT || (POPOVER_ALIGNMENT = {}));
|
|
28
35
|
//# sourceMappingURL=defs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.js","names":["POPOVER_ALIGNMENT"],"sources":["components/popover/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020,
|
|
1
|
+
{"version":3,"file":"defs.js","names":["POPOVER_ALIGNMENT"],"sources":["components/popover/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2024\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/**\n * The alignment choices of popover.\n */\nexport enum POPOVER_ALIGNMENT {\n /**\n * Align the top position for the popover content.\n */\n TOP = 'top',\n\n /**\n * Align the top-left position for the popover content.\n *\n * @deprecated\n */\n TOP_LEFT = 'top-left',\n\n /**\n * Align the top right position for the popover content.\n *\n * @deprecated\n */\n TOP_RIGHT = 'top-right',\n\n /**\n * Align the top-start position for the popover content.\n */\n TOP_START = 'top-start',\n\n /**\n * Align the top end position for the popover content.\n */\n TOP_END = 'top-end',\n\n /**\n * Align the bottom position for the popover content.\n */\n BOTTOM = 'bottom',\n\n /**\n * Align the bottom left position for the popover content.\n *\n * @deprecated\n */\n BOTTOM_LEFT = 'bottom-left',\n\n /**\n * Align the bottom right position for the popover content.\n *\n * @deprecated\n */\n BOTTOM_RIGHT = 'bottom-right',\n\n /**\n * Align the bottom start position for the popover content.\n */\n BOTTOM_START = 'bottom-start',\n\n /**\n * Align the bottom end position for the popover content.\n */\n BOTTOM_END = 'bottom-end',\n\n /**\n * Align the left position for the popover content.\n */\n LEFT = 'left',\n\n /**\n * Align the left bottom position for the popover content.\n *\n * @deprecated\n */\n LEFT_BOTTOM = 'left-bottom',\n\n /**\n * Align the left top position for the popover content.\n *\n * @deprecated\n */\n LEFT_TOP = 'left-top',\n\n /**\n * Align the left start position for the popover content.\n */\n LEFT_START = 'left-start',\n\n /**\n * Align the left end position for the popover content.\n */\n LEFT_END = 'left-end',\n\n /**\n * Align the right position for the popover content.\n */\n RIGHT = 'right',\n\n /**\n * Align the right bottom position for the popover content.\n *\n * @deprecated\n */\n RIGHT_BOTTOM = 'right-bottom',\n\n /**\n * Align the right top position for the popover content.\n *\n * @deprecated\n */\n RIGHT_TOP = 'right-top',\n\n /**\n * Align the right start position for the popover content.\n */\n RIGHT_START = 'right-start',\n\n /**\n * Align the right end position for the popover content.\n */\n RIGHT_END = 'right-end',\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYA,iBAAiB;AAoH5B,WApHWA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;AAAA,GAAjBA,iBAAiB,KAAjBA,iBAAiB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*
|
|
4
|
-
* Copyright IBM Corp. 2019,
|
|
4
|
+
* Copyright IBM Corp. 2019, 2024
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -17,6 +17,10 @@ declare class CDSPopoverContent extends LitElement {
|
|
|
17
17
|
* Specify the popover alignment
|
|
18
18
|
*/
|
|
19
19
|
align: string;
|
|
20
|
+
/**
|
|
21
|
+
* Specify whether a auto align functionality should be applied
|
|
22
|
+
*/
|
|
23
|
+
autoalign: boolean;
|
|
20
24
|
/**
|
|
21
25
|
* Specify whether a caret should be rendered
|
|
22
26
|
*/
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _decorate from "@babel/runtime/helpers/esm/decorate";
|
|
2
2
|
let _ = t => t,
|
|
3
|
-
_t
|
|
3
|
+
_t,
|
|
4
|
+
_t2;
|
|
4
5
|
/**
|
|
5
6
|
* @license
|
|
6
7
|
*
|
|
7
|
-
* Copyright IBM Corp. 2019,
|
|
8
|
+
* Copyright IBM Corp. 2019, 2024
|
|
8
9
|
*
|
|
9
10
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
10
11
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -43,6 +44,16 @@ let CDSPopoverContent = _decorate([customElement(`${prefix}-popover-content`)],
|
|
|
43
44
|
value() {
|
|
44
45
|
return '';
|
|
45
46
|
}
|
|
47
|
+
}, {
|
|
48
|
+
kind: "field",
|
|
49
|
+
decorators: [property({
|
|
50
|
+
type: Boolean,
|
|
51
|
+
reflect: true
|
|
52
|
+
})],
|
|
53
|
+
key: "autoalign",
|
|
54
|
+
value() {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
46
57
|
}, {
|
|
47
58
|
kind: "field",
|
|
48
59
|
decorators: [property({
|
|
@@ -98,6 +109,10 @@ let CDSPopoverContent = _decorate([customElement(`${prefix}-popover-content`)],
|
|
|
98
109
|
* Specify the popover alignment
|
|
99
110
|
*/
|
|
100
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Specify whether a auto align functionality should be applied
|
|
114
|
+
*/
|
|
115
|
+
|
|
101
116
|
/**
|
|
102
117
|
* Specify whether a caret should be rendered
|
|
103
118
|
*/
|
|
@@ -119,13 +134,21 @@ let CDSPopoverContent = _decorate([customElement(`${prefix}-popover-content`)],
|
|
|
119
134
|
*/
|
|
120
135
|
|
|
121
136
|
function render() {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
<
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
137
|
+
if (this.autoalign) {
|
|
138
|
+
return html(_t || (_t = _`
|
|
139
|
+
<span class="${0}--popover-content">
|
|
140
|
+
<slot> </slot>
|
|
141
|
+
<span class="${0}--popover-caret"></span>
|
|
142
|
+
</span>
|
|
143
|
+
`), prefix, prefix);
|
|
144
|
+
} else {
|
|
145
|
+
return html(_t2 || (_t2 = _`
|
|
146
|
+
<span class="${0}--popover-content">
|
|
147
|
+
<slot> </slot>
|
|
148
|
+
</span>
|
|
149
|
+
<span class="${0}--popover-caret"></span>
|
|
150
|
+
`), prefix, prefix);
|
|
151
|
+
}
|
|
129
152
|
}
|
|
130
153
|
}, {
|
|
131
154
|
kind: "field",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-content.js","names":["LitElement","html","property","customElement","prefix","styles","CDSPopoverContent","_decorate","_initialize","_LitElement","constructor","args","F","d","kind","decorators","reflect","type","String","key","value","Boolean","render","_t","_","static"],"sources":["components/popover/popover-content.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019,
|
|
1
|
+
{"version":3,"file":"popover-content.js","names":["LitElement","html","property","customElement","prefix","styles","CDSPopoverContent","_decorate","_initialize","_LitElement","constructor","args","F","d","kind","decorators","reflect","type","String","key","value","Boolean","render","autoalign","_t","_","_t2","static"],"sources":["components/popover/popover-content.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2024\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html } from 'lit';\nimport { property, customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport styles from './popover.scss';\n\n/**\n * Popover.\n *\n * @element cds-popover\n */\n@customElement(`${prefix}-popover-content`)\nclass CDSPopoverContent extends LitElement {\n /**\n * Specify the popover alignment\n */\n @property({ reflect: true, type: String })\n align = '';\n\n /**\n * Specify whether a auto align functionality should be applied\n */\n @property({ type: Boolean, reflect: true })\n autoalign = false;\n\n /**\n * Specify whether a caret should be rendered\n */\n @property({ type: Boolean, reflect: true })\n caret;\n\n /**\n * Specify whether a dropShadow should be rendered\n */\n @property({ type: Boolean, reflect: true })\n dropShadow = true;\n\n /**\n * Specify whether the component is currently open or closed\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Render the component using the tab tip variant\n */\n @property({ type: Boolean, reflect: true })\n tabTip = false;\n\n /**\n * The shadow slot this popover content should be in.\n */\n @property({ reflect: true })\n slot = 'content';\n\n render() {\n if (this.autoalign) {\n return html`\n <span class=\"${prefix}--popover-content\">\n <slot> </slot>\n <span class=\"${prefix}--popover-caret\"></span>\n </span>\n `;\n } else {\n return html`\n <span class=\"${prefix}--popover-content\">\n <slot> </slot>\n </span>\n <span class=\"${prefix}--popover-caret\"></span>\n `;\n }\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\nexport default CDSPopoverContent;\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,EAAEC,IAAI,QAAQ,KAAK;AACtC,SAASC,QAAQ,EAAEC,aAAa,QAAQ,mBAAmB;AAC3D,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,OAAOC,MAAM,MAAM,oBAAgB;;AAEnC;AACA;AACA;AACA;AACA,GAJA;AACA;AACA;AACA;AACA;AAJA,IAMMC,iBAAiB,GAAAC,SAAA,EADtBJ,aAAa,CAAE,GAAEC,MAAO,kBAAiB,CAAC,aAAAI,WAAA,EAAAC,WAAA;EAA3C,MACMH,iBAAiB,SAAAG,WAAA,CAAoB;IAAAC,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MAAAH,WAAA;IAAA;EA8D3C;EAAC;IAAAI,CAAA,EA9DKN,iBAAiB;IAAAO,CAAA;MAAAC,IAAA;MAAAC,UAAA,GAIpBb,QAAQ,CAAC;QAAEc,OAAO,EAAE,IAAI;QAAEC,IAAI,EAAEC;MAAO,CAAC,CAAC;MAAAC,GAAA;MAAAC,MAAA;QAAA,OAClC,EAAE;MAAA;IAAA;MAAAN,IAAA;MAAAC,UAAA,GAKTb,QAAQ,CAAC;QAAEe,IAAI,EAAEI,OAAO;QAAEL,OAAO,EAA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