@carbon/web-components 2.25.2 → 2.26.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/custom-elements.json +859 -39
- package/dist/16-10c4fb8b.js +8 -2
- package/dist/16-4855278a.js +8 -2
- package/dist/16-4be295f9.js +8 -2
- package/dist/16-65aac4b2.js +81 -0
- package/dist/16-6a577b04.js +8 -2
- package/dist/16-8449b4fa.js +8 -2
- package/dist/16-87933b87.js +8 -2
- package/dist/16-b826e67b.js +8 -2
- package/dist/16-e32fa89f.js +8 -2
- package/dist/16-eeb178ee.js +81 -0
- package/dist/16-f4420493.js +8 -2
- package/dist/16-fbe09c57.js +8 -2
- package/dist/20-68c1a445.js +8 -2
- package/dist/20-a9fc419f.js +8 -2
- package/dist/accordion.min.js +8 -2
- package/dist/ai-label.min.js +9 -3
- package/dist/ai-skeleton.min.js +8 -2
- package/dist/badge-indicator.min.js +8 -2
- package/dist/breadcrumb.min.js +18 -12
- package/dist/{button-882e4021.js → button-74696aa8.js} +9 -3
- package/dist/{button-set-470bff4f.js → button-set-6c836da5.js} +11 -5
- package/dist/{button-skeleton-c0570c01.js → button-skeleton-97434162.js} +20 -14
- package/dist/button.min.js +9 -3
- package/dist/carbon-element-017b212d.js +8 -2
- package/dist/chat-button.min.js +10 -4
- package/dist/checkbox-88e7237c.js +8 -2
- package/dist/checkbox-skeleton-d396e413.js +8 -2
- package/dist/checkbox.min.js +8 -2
- package/dist/class-map-e4ba9e2b.js +8 -2
- package/dist/code-snippet.min.js +9 -3
- package/dist/collection-helpers-8b117611.js +8 -2
- package/dist/combo-box.min.js +9 -3
- package/dist/content-switcher-item-787ef698.js +8 -2
- package/dist/content-switcher.min.js +8 -2
- package/dist/{copy-button-17009e29.js → copy-button-6ae3beb9.js} +9 -3
- package/dist/copy-button.min.js +9 -3
- package/dist/data-table.min.js +8 -2
- package/dist/date-picker.min.js +8 -2
- package/dist/defs-eaf95cbc.js +8 -2
- package/dist/directive-e2d48b9c.js +8 -2
- package/dist/{dropdown-item-6995171a.js → dropdown-item-c76d25fb.js} +36 -31
- package/dist/dropdown.min.js +9 -3
- package/dist/file-uploader.min.js +9 -3
- package/dist/floating-menu-381b1978.js +8 -2
- package/dist/floating-menu.min.js +8 -2
- package/dist/focus-969beaed.js +8 -2
- package/dist/form-a750a2ac.js +8 -2
- package/dist/form-group.min.js +8 -2
- package/dist/form.min.js +8 -2
- package/dist/heading.min.js +8 -2
- package/dist/host-listener-69c546a1.js +8 -2
- package/dist/{icon-button-8b63f6e9.js → icon-button-83bfdd07.js} +10 -4
- package/dist/icon-button.min.js +9 -3
- package/dist/icon-indicator.min.js +8 -2
- package/dist/if-defined-446d5754.js +8 -2
- package/dist/if-non-empty-0ab1b89b.js +8 -2
- package/dist/inline-loading.min.js +8 -2
- package/dist/{layer-f3ead524.js → layer-955eb55a.js} +9 -3
- package/dist/layer.min.js +9 -3
- package/dist/link-95fb4386.js +8 -2
- package/dist/link.min.js +8 -2
- package/dist/list.min.js +17 -15
- package/dist/loading-8f238aae.js +8 -2
- package/dist/loading-icon-502d6837.js +8 -2
- package/dist/loading.min.js +8 -2
- package/dist/menu.min.js +240 -0
- package/dist/{modal-label-54f55140.js → modal-label-fc9d6962.js} +13 -7
- package/dist/modal.min.js +9 -3
- package/dist/multi-select.min.js +9 -3
- package/dist/notification.min.js +9 -3
- package/dist/number-input.min.js +8 -2
- package/dist/on-8707857f.js +8 -2
- package/dist/overflow-menu.min.js +17 -9
- package/dist/pagination.min.js +39 -33
- package/dist/popover-content-d4ec4412.js +8 -2
- package/dist/popover-controller-97c2d68e.js +8 -2
- package/dist/popover.min.js +8 -2
- package/dist/progress-bar.min.js +8 -2
- package/dist/progress-indicator.min.js +8 -2
- package/dist/property-4de26c93.js +8 -2
- package/dist/query-602de8af.js +8 -2
- package/dist/query-assigned-elements-1bd68a6e.js +8 -2
- package/dist/radio-button-skeleton-67c6a836.js +8 -2
- package/dist/radio-button.min.js +8 -2
- package/dist/radio-group-manager-9b128b9b.js +8 -2
- package/dist/search-7f28fde3.js +8 -2
- package/dist/search.min.js +8 -2
- package/dist/select-01725ae4.js +8 -2
- package/dist/select.min.js +8 -2
- package/dist/settings-a9cb5e4b.js +8 -2
- package/dist/shape-indicator.min.js +8 -2
- package/dist/shared-enums-562e6b51.js +8 -2
- package/dist/side-panel.min.js +9 -3
- package/dist/skeleton-icon-60c9d437.js +8 -2
- package/dist/skeleton-icon.min.js +8 -2
- package/dist/skeleton-placeholder-3f62f258.js +8 -2
- package/dist/skeleton-placeholder.min.js +8 -2
- package/dist/skeleton-text-a37622a0.js +8 -2
- package/dist/skeleton-text.min.js +8 -2
- package/dist/skip-to-content.min.js +8 -2
- package/dist/slider.min.js +8 -2
- package/dist/slug.min.js +9 -3
- package/dist/spread-279bf949.js +8 -2
- package/dist/stack.min.js +8 -2
- package/dist/state-225ff428.js +8 -2
- package/dist/structured-list.min.js +8 -2
- package/dist/tabs.min.js +8 -2
- package/dist/tag.min.js +8 -2
- package/dist/tearsheet.min.js +11 -5
- package/dist/text-input-a7541a8d.js +8 -2
- package/dist/text-input.min.js +8 -2
- package/dist/textarea.min.js +8 -2
- package/dist/tile.min.js +8 -2
- package/dist/time-picker.min.js +158 -0
- package/dist/toggle-tip.min.js +8 -2
- package/dist/toggle.min.js +8 -2
- package/dist/toggletip-383477dd.js +8 -2
- package/dist/tooltip-content-3e3b3f8c.js +8 -2
- package/dist/tooltip.min.js +8 -2
- package/dist/ui-shell.min.js +9 -3
- package/dist/validity-45b7794a.js +8 -2
- package/es/components/breadcrumb/breadcrumb-item.d.ts +4 -0
- package/es/components/breadcrumb/breadcrumb-item.js +16 -1
- package/es/components/breadcrumb/breadcrumb-item.js.map +1 -1
- package/es/components/breadcrumb/breadcrumb.scss.js +1 -1
- package/es/components/button/button-set.d.ts +4 -0
- package/es/components/button/button-set.js +18 -1
- package/es/components/button/button-set.js.map +1 -1
- package/es/components/button/button.scss.js +1 -1
- package/es/components/chat-button/chat-button.scss.js +1 -1
- package/es/components/icon-button/icon-button.scss.js +1 -1
- package/es/components/layer/layer.d.ts +7 -0
- package/es/components/layer/layer.js +9 -2
- package/es/components/layer/layer.js.map +1 -1
- package/es/components/list/list-item.d.ts +0 -11
- package/es/components/list/list-item.js +1 -21
- package/es/components/list/list-item.js.map +1 -1
- package/es/components/list/list.scss.js +1 -1
- package/es/components/list/ordered-list.js +1 -1
- package/es/components/list/ordered-list.js.map +1 -1
- package/es/components/list/unordered-list.d.ts +5 -1
- package/es/components/list/unordered-list.js +11 -4
- package/es/components/list/unordered-list.js.map +1 -1
- package/es/components/menu/defs.d.ts +42 -0
- package/es/components/menu/defs.js +54 -0
- package/es/components/menu/defs.js.map +1 -0
- package/es/components/menu/index.d.ts +14 -0
- package/es/components/menu/index.js +14 -0
- package/es/components/menu/index.js.map +1 -0
- package/es/components/menu/menu-context.d.ts +18 -0
- package/es/components/menu/menu-context.js +27 -0
- package/es/components/menu/menu-context.js.map +1 -0
- package/es/components/menu/menu-item-divider.d.ts +19 -0
- package/es/components/menu/menu-item-divider.js +42 -0
- package/es/components/menu/menu-item-divider.js.map +1 -0
- package/es/components/menu/menu-item-group.d.ts +23 -0
- package/es/components/menu/menu-item-group.js +48 -0
- package/es/components/menu/menu-item-group.js.map +1 -0
- package/es/components/menu/menu-item-radio-group.d.ts +42 -0
- package/es/components/menu/menu-item-radio-group.js +104 -0
- package/es/components/menu/menu-item-radio-group.js.map +1 -0
- package/es/components/menu/menu-item-selectable.d.ts +39 -0
- package/es/components/menu/menu-item-selectable.js +98 -0
- package/es/components/menu/menu-item-selectable.js.map +1 -0
- package/es/components/menu/menu-item.d.ts +771 -0
- package/es/components/menu/menu-item.js +309 -0
- package/es/components/menu/menu-item.js.map +1 -0
- package/es/components/menu/menu-item.scss.js +13 -0
- package/es/components/menu/menu-item.scss.js.map +1 -0
- package/es/components/menu/menu.d.ts +471 -0
- package/es/components/menu/menu.js +469 -0
- package/es/components/menu/menu.js.map +1 -0
- package/es/components/menu/menu.scss.js +13 -0
- package/es/components/menu/menu.scss.js.map +1 -0
- package/es/components/overflow-menu/overflow-menu-item.d.ts +9 -0
- package/es/components/overflow-menu/overflow-menu-item.js +24 -2
- package/es/components/overflow-menu/overflow-menu-item.js.map +1 -1
- package/es/components/overflow-menu/overflow-menu.scss.js +1 -1
- package/es/components/tag/tag.d.ts +1 -1
- package/es/components/tag/tag.js +1 -1
- package/es/components/time-picker/defs.d.ts +26 -0
- package/es/components/time-picker/defs.js +38 -0
- package/es/components/time-picker/defs.js.map +1 -0
- package/es/components/time-picker/index.d.ts +10 -0
- package/es/components/time-picker/index.js +10 -0
- package/es/components/time-picker/index.js.map +1 -0
- package/es/components/time-picker/time-picker-select.d.ts +426 -0
- package/es/components/time-picker/time-picker-select.js +218 -0
- package/es/components/time-picker/time-picker-select.js.map +1 -0
- package/es/components/time-picker/time-picker.d.ts +802 -0
- package/es/components/time-picker/time-picker.js +288 -0
- package/es/components/time-picker/time-picker.js.map +1 -0
- package/es/components/time-picker/time-picker.scss.js +13 -0
- package/es/components/time-picker/time-picker.scss.js.map +1 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -0
- package/es/index.js.map +1 -1
- package/es-custom/components/breadcrumb/breadcrumb-item.d.ts +4 -0
- package/es-custom/components/breadcrumb/breadcrumb-item.js +16 -1
- package/es-custom/components/breadcrumb/breadcrumb-item.js.map +1 -1
- package/es-custom/components/breadcrumb/breadcrumb.scss.js +1 -1
- package/es-custom/components/button/button-set.d.ts +4 -0
- package/es-custom/components/button/button-set.js +18 -1
- package/es-custom/components/button/button-set.js.map +1 -1
- package/es-custom/components/button/button.scss.js +1 -1
- package/es-custom/components/chat-button/chat-button.scss.js +1 -1
- package/es-custom/components/icon-button/icon-button.scss.js +1 -1
- package/es-custom/components/layer/layer.d.ts +7 -0
- package/es-custom/components/layer/layer.js +9 -2
- package/es-custom/components/layer/layer.js.map +1 -1
- package/es-custom/components/list/list-item.d.ts +0 -11
- package/es-custom/components/list/list-item.js +1 -21
- package/es-custom/components/list/list-item.js.map +1 -1
- package/es-custom/components/list/list.scss.js +1 -1
- package/es-custom/components/list/ordered-list.js +1 -1
- package/es-custom/components/list/ordered-list.js.map +1 -1
- package/es-custom/components/list/unordered-list.d.ts +5 -1
- package/es-custom/components/list/unordered-list.js +11 -4
- package/es-custom/components/list/unordered-list.js.map +1 -1
- package/es-custom/components/menu/defs.d.ts +42 -0
- package/es-custom/components/menu/defs.js +54 -0
- package/es-custom/components/menu/defs.js.map +1 -0
- package/es-custom/components/menu/index.d.ts +14 -0
- package/es-custom/components/menu/index.js +14 -0
- package/es-custom/components/menu/index.js.map +1 -0
- package/es-custom/components/menu/menu-context.d.ts +18 -0
- package/es-custom/components/menu/menu-context.js +27 -0
- package/es-custom/components/menu/menu-context.js.map +1 -0
- package/es-custom/components/menu/menu-item-divider.d.ts +19 -0
- package/es-custom/components/menu/menu-item-divider.js +42 -0
- package/es-custom/components/menu/menu-item-divider.js.map +1 -0
- package/es-custom/components/menu/menu-item-group.d.ts +23 -0
- package/es-custom/components/menu/menu-item-group.js +48 -0
- package/es-custom/components/menu/menu-item-group.js.map +1 -0
- package/es-custom/components/menu/menu-item-radio-group.d.ts +42 -0
- package/es-custom/components/menu/menu-item-radio-group.js +104 -0
- package/es-custom/components/menu/menu-item-radio-group.js.map +1 -0
- package/es-custom/components/menu/menu-item-selectable.d.ts +39 -0
- package/es-custom/components/menu/menu-item-selectable.js +98 -0
- package/es-custom/components/menu/menu-item-selectable.js.map +1 -0
- package/es-custom/components/menu/menu-item.d.ts +771 -0
- package/es-custom/components/menu/menu-item.js +309 -0
- package/es-custom/components/menu/menu-item.js.map +1 -0
- package/es-custom/components/menu/menu-item.scss.js +13 -0
- package/es-custom/components/menu/menu-item.scss.js.map +1 -0
- package/es-custom/components/menu/menu.d.ts +471 -0
- package/es-custom/components/menu/menu.js +469 -0
- package/es-custom/components/menu/menu.js.map +1 -0
- package/es-custom/components/menu/menu.scss.js +13 -0
- package/es-custom/components/menu/menu.scss.js.map +1 -0
- package/es-custom/components/overflow-menu/overflow-menu-item.d.ts +9 -0
- package/es-custom/components/overflow-menu/overflow-menu-item.js +24 -2
- package/es-custom/components/overflow-menu/overflow-menu-item.js.map +1 -1
- package/es-custom/components/overflow-menu/overflow-menu.scss.js +1 -1
- package/es-custom/components/tag/tag.d.ts +1 -1
- package/es-custom/components/tag/tag.js +1 -1
- package/es-custom/components/time-picker/defs.d.ts +26 -0
- package/es-custom/components/time-picker/defs.js +38 -0
- package/es-custom/components/time-picker/defs.js.map +1 -0
- package/es-custom/components/time-picker/index.d.ts +10 -0
- package/es-custom/components/time-picker/index.js +10 -0
- package/es-custom/components/time-picker/index.js.map +1 -0
- package/es-custom/components/time-picker/time-picker-select.d.ts +426 -0
- package/es-custom/components/time-picker/time-picker-select.js +218 -0
- package/es-custom/components/time-picker/time-picker-select.js.map +1 -0
- package/es-custom/components/time-picker/time-picker.d.ts +802 -0
- package/es-custom/components/time-picker/time-picker.js +288 -0
- package/es-custom/components/time-picker/time-picker.js.map +1 -0
- package/es-custom/components/time-picker/time-picker.scss.js +13 -0
- package/es-custom/components/time-picker/time-picker.scss.js.map +1 -0
- package/es-custom/index.d.ts +2 -0
- package/es-custom/index.js +2 -0
- package/es-custom/index.js.map +1 -1
- package/lib/components/breadcrumb/breadcrumb-item.d.ts +4 -0
- package/lib/components/button/button-set.d.ts +4 -0
- package/lib/components/layer/layer.d.ts +7 -0
- package/lib/components/list/list-item.d.ts +0 -11
- package/lib/components/list/unordered-list.d.ts +5 -1
- package/lib/components/menu/defs.d.ts +42 -0
- package/lib/components/menu/defs.js +56 -0
- package/lib/components/menu/defs.js.map +1 -0
- package/lib/components/menu/index.d.ts +14 -0
- package/lib/components/menu/menu-context.d.ts +18 -0
- package/lib/components/menu/menu-item-divider.d.ts +19 -0
- package/lib/components/menu/menu-item-group.d.ts +23 -0
- package/lib/components/menu/menu-item-radio-group.d.ts +42 -0
- package/lib/components/menu/menu-item-selectable.d.ts +39 -0
- package/lib/components/menu/menu-item.d.ts +771 -0
- package/lib/components/menu/menu.d.ts +471 -0
- package/lib/components/overflow-menu/overflow-menu-item.d.ts +9 -0
- package/lib/components/tag/tag.d.ts +1 -1
- package/lib/components/time-picker/defs.d.ts +26 -0
- package/lib/components/time-picker/defs.js +45 -0
- package/lib/components/time-picker/defs.js.map +1 -0
- package/lib/components/time-picker/index.d.ts +10 -0
- package/lib/components/time-picker/time-picker-select.d.ts +426 -0
- package/lib/components/time-picker/time-picker.d.ts +802 -0
- package/lib/index.d.ts +2 -0
- package/package.json +5 -4
- package/scss/components/breadcrumb/breadcrumb.scss +5 -0
- package/scss/components/button/button.scss +4 -0
- package/scss/components/list/list.scss +7 -5
- package/scss/components/menu/menu-item.scss +109 -0
- package/scss/components/menu/menu-variables.scss +15 -0
- package/scss/components/menu/menu.scss +72 -0
- package/scss/components/overflow-menu/overflow-menu.scss +69 -14
- package/scss/components/time-picker/time-picker.scss +50 -0
|
@@ -7,6 +7,13 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import { LitElement } from 'lit';
|
|
10
|
+
/**
|
|
11
|
+
* Layer level constants
|
|
12
|
+
*/
|
|
13
|
+
export declare const MIN_LEVEL = 0;
|
|
14
|
+
export declare const MAX_LEVEL = 2;
|
|
15
|
+
export declare const levels: string[];
|
|
16
|
+
export type LayerLevel = 0 | 1 | 2;
|
|
10
17
|
/**
|
|
11
18
|
* Basic layer
|
|
12
19
|
*
|
|
@@ -20,6 +20,12 @@ import styles from './layer.scss.js';
|
|
|
20
20
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
22
22
|
*/
|
|
23
|
+
/**
|
|
24
|
+
* Layer level constants
|
|
25
|
+
*/
|
|
26
|
+
const MIN_LEVEL = 0;
|
|
27
|
+
const MAX_LEVEL = 2;
|
|
28
|
+
const levels = ['zero', 'one', 'two'];
|
|
23
29
|
/**
|
|
24
30
|
* Basic layer
|
|
25
31
|
*
|
|
@@ -41,7 +47,8 @@ let CDSLayer = class CDSLayer extends LitElement {
|
|
|
41
47
|
this.layers = this.querySelectorAll(this.constructor.selectorLayer);
|
|
42
48
|
}
|
|
43
49
|
this.layers.forEach((item) => {
|
|
44
|
-
|
|
50
|
+
const nextLevel = Math.max(MIN_LEVEL, Math.min(this.level + 1, MAX_LEVEL));
|
|
51
|
+
item.setAttribute('level', nextLevel.toString());
|
|
45
52
|
});
|
|
46
53
|
this.dispatchEvent(new CustomEvent(this.constructor.eventUseLayer, {
|
|
47
54
|
bubbles: true,
|
|
@@ -81,5 +88,5 @@ CDSLayer = __decorate([
|
|
|
81
88
|
], CDSLayer);
|
|
82
89
|
var CDSLayer$1 = CDSLayer;
|
|
83
90
|
|
|
84
|
-
export { CDSLayer$1 as default };
|
|
91
|
+
export { MAX_LEVEL, MIN_LEVEL, CDSLayer$1 as default, levels };
|
|
85
92
|
//# sourceMappingURL=layer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layer.js","sources":["../../../src/components/layer/layer.ts"],"sourcesContent":[null],"names":["customElement"],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAQH;;;;;;;AAOG;AAEH,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,UAAU,CAAA;AAAjC,IAAA,WAAA,GAAA;;AACE;;AAEG;QAEH,IAAK,CAAA,KAAA,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"layer.js","sources":["../../../src/components/layer/layer.ts"],"sourcesContent":[null],"names":["customElement"],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAQH;;AAEG;AACI,MAAM,SAAS,GAAG,EAAE;AACpB,MAAM,SAAS,GAAG,EAAE;AACd,MAAA,MAAM,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE;AAG7C;;;;;;;AAOG;AAEH,IAAM,QAAQ,GAAd,MAAM,QAAS,SA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A,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAChC,CAAA,EAAA,QAAA,CAAA,SAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAGV,UAAA,CAAA;AADC,IAAA,QAAQ,EAAE;AACJ,CAAA,EAAA,QAAA,CAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AARH,QAAQ,GAAA,UAAA,CAAA;AADb,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,MAAA,CAAQ,CAAC;AAC3B,CAAA,EAAA,QAAQ,CAyDb,CAAA;AAED,iBAAe,QAAQ;;;;"}
|
|
@@ -14,17 +14,6 @@ import { LitElement } from 'lit';
|
|
|
14
14
|
* @slot nested - The nested child list.
|
|
15
15
|
*/
|
|
16
16
|
declare class CDSListItem extends LitElement {
|
|
17
|
-
/**
|
|
18
|
-
* `true` if there is slotted nested child list.
|
|
19
|
-
*/
|
|
20
|
-
private _hasNestedChild;
|
|
21
|
-
/**
|
|
22
|
-
* Handles `slotchange` event for the `<slot>` for the nested child list.
|
|
23
|
-
*
|
|
24
|
-
* @param event The event.
|
|
25
|
-
* @param event.target The event target.
|
|
26
|
-
*/
|
|
27
|
-
private _handleSlotChangeNested;
|
|
28
17
|
/**
|
|
29
18
|
* `true` if this list item is a child of a nested list.
|
|
30
19
|
* `<cds-ordered-list>` or `<cds-unordered-list>` automatically sets this property.
|
|
@@ -29,27 +29,12 @@ import { carbonElement } from '../../globals/decorators/carbon-element.js';
|
|
|
29
29
|
let CDSListItem = class CDSListItem extends LitElement {
|
|
30
30
|
constructor() {
|
|
31
31
|
super(...arguments);
|
|
32
|
-
/**
|
|
33
|
-
* `true` if there is slotted nested child list.
|
|
34
|
-
*/
|
|
35
|
-
this._hasNestedChild = false;
|
|
36
32
|
/**
|
|
37
33
|
* `true` if this list item is a child of a nested list.
|
|
38
34
|
* `<cds-ordered-list>` or `<cds-unordered-list>` automatically sets this property.
|
|
39
35
|
*/
|
|
40
36
|
this.nested = false;
|
|
41
37
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Handles `slotchange` event for the `<slot>` for the nested child list.
|
|
44
|
-
*
|
|
45
|
-
* @param event The event.
|
|
46
|
-
* @param event.target The event target.
|
|
47
|
-
*/
|
|
48
|
-
_handleSlotChangeNested({ target }) {
|
|
49
|
-
this._hasNestedChild =
|
|
50
|
-
target.assignedNodes().length > 0;
|
|
51
|
-
this.requestUpdate();
|
|
52
|
-
}
|
|
53
38
|
connectedCallback() {
|
|
54
39
|
// Uses attribute for lookup from child
|
|
55
40
|
this.toggleAttribute('nested', Boolean(this.closest(this.constructor.selectorNestedList)));
|
|
@@ -59,14 +44,9 @@ let CDSListItem = class CDSListItem extends LitElement {
|
|
|
59
44
|
super.connectedCallback();
|
|
60
45
|
}
|
|
61
46
|
render() {
|
|
62
|
-
const { _hasNestedChild: hasNestedChild, _handleSlotChangeNested: handleSlotChangeNested, } = this;
|
|
63
47
|
return html `
|
|
64
48
|
<slot></slot>
|
|
65
|
-
<
|
|
66
|
-
?hidden="${!hasNestedChild}"
|
|
67
|
-
class="${prefix}-ce--list__item__nested-child">
|
|
68
|
-
<slot name="nested" @slotchange="${handleSlotChangeNested}"></slot>
|
|
69
|
-
</div>
|
|
49
|
+
<slot name="nested"></slot>
|
|
70
50
|
`;
|
|
71
51
|
}
|
|
72
52
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item.js","sources":["../../../src/components/list/list-item.ts"],"sourcesContent":[null],"names":["customElement"],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAQH;;;;;AAKG;AAEH,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU,CAAA;AAApC,IAAA,WAAA,GAAA;;AACE
|
|
1
|
+
{"version":3,"file":"list-item.js","sources":["../../../src/components/list/list-item.ts"],"sourcesContent":[null],"names":["customElement"],"mappings":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list--nested,.cds--list--ordered,.cds--list--ordered--native,.cds--list--unordered{border:0;box-sizing:border-box;font-family:inherit;font-size:100%;font-size:var(--cds-body-01-font-size,.875rem);font-weight:var(--cds-body-01-font-weight,400);letter-spacing:var(--cds-body-01-letter-spacing,.16px);line-height:var(--cds-body-01-line-height,1.42857);list-style:none;margin:0;padding:0;vertical-align:baseline}.cds--list--nested *,.cds--list--nested :after,.cds--list--nested :before,.cds--list--ordered *,.cds--list--ordered :after,.cds--list--ordered :before,.cds--list--ordered--native *,.cds--list--ordered--native :after,.cds--list--ordered--native :before,.cds--list--unordered *,.cds--list--unordered :after,.cds--list--unordered :before{box-sizing:inherit}.cds--list--unordered:not(.cds--list--nested){margin-inline-start:1rem}.cds--list--expressive,.cds--list--expressive .cds--list--nested{font-size:var(--cds-body-02-font-size,1rem);font-weight:var(--cds-body-02-font-weight,400);letter-spacing:var(--cds-body-02-letter-spacing,0);line-height:var(--cds-body-02-line-height,1.5)}.cds--list--ordered--native{list-style:decimal}.cds--list__item{color:var(--cds-text-primary,#161616)}.cds--list--nested{margin-inline-start:2rem}.cds--list--nested .cds--list__item{padding-inline-start:.25rem}.cds--list--ordered:not(.cds--list--nested){counter-reset:item}.cds--list--ordered:not(.cds--list--nested)>.cds--list__item{position:relative}.cds--list--ordered:not(.cds--list--nested)>.cds--list__item:before{content:counter(item) \".\";counter-increment:item;inset-inline-start:-1.5rem;position:absolute}.cds--list--ordered--native.cds--list--nested,.cds--list--ordered.cds--list--nested{list-style-type:lower-latin}.cds--list--unordered>.cds--list__item{position:relative}.cds--list--unordered>.cds--list__item:before{content:\"–\";inset-inline-start:-1rem;position:absolute}.cds--list--unordered.cds--list--nested>.cds--list__item:before{content:\"▪\";inset-inline-start:-.75rem}:host(cds-ordered-list) .cds--list--nested,:host(cds-unordered-list) .cds--list--nested{margin-inline-start:2rem}:host(cds-ordered-list) .cds--list--nested ::slotted(cds-list-item),:host(cds-unordered-list) .cds--list--nested ::slotted(cds-list-item){padding-inline-start:.25rem}:host(cds-ordered-list) .cds--list--ordered.cds--list--nested{list-style-type:lower-latin}:host(cds-ordered-list):not(.cds--list--nested){counter-reset:item}:host(cds-ordered-list) .cds--list--ordered:not(.cds--list--nested) ::slotted(cds-list-item){position:relative}:host(cds-ordered-list) .cds--list--ordered:not(.cds--list--nested) ::slotted(cds-list-item):before{content:counter(item) \".\";counter-increment:item;inset-inline-start:-1.5rem;position:absolute}:host(cds-unordered-list){--cds-ce--list-marker:\"–\"}:host(cds-unordered-list)[slot=nested]{--cds-ce--list-marker:\"▪\"}:host(cds-unordered-list) ::slotted(cds-list-item){position:relative}:host(cds-unordered-list) ::slotted(cds-list-item):before{content:\"–\";inset-inline-start:-1rem;position:absolute}:host(cds-unordered-list[slot=nested]) ::slotted(cds-list-item):before{content:\"▪\";inset-inline-start:-.75rem}:host(cds-list-item){color:var(--cds-text-primary,#161616);display:list-item}:host(cds-list-item):before{content:var(--cds-ce--list-marker,none);inset-inline-start:-1rem;position:absolute}:host(cds-list-item[nested]){margin-block:0}:host(cds-list-item[nested]) .cds-ce--list__item__nested-child{padding-block-start:0}"]);
|
|
10
|
+
var styles = css(["@charset \"UTF-8\";.cds--list--nested,.cds--list--ordered,.cds--list--ordered--native,.cds--list--unordered{border:0;box-sizing:border-box;font-family:inherit;font-size:100%;font-size:var(--cds-body-01-font-size,.875rem);font-weight:var(--cds-body-01-font-weight,400);letter-spacing:var(--cds-body-01-letter-spacing,.16px);line-height:var(--cds-body-01-line-height,1.42857);list-style:none;margin:0;padding:0;vertical-align:baseline}.cds--list--nested *,.cds--list--nested :after,.cds--list--nested :before,.cds--list--ordered *,.cds--list--ordered :after,.cds--list--ordered :before,.cds--list--ordered--native *,.cds--list--ordered--native :after,.cds--list--ordered--native :before,.cds--list--unordered *,.cds--list--unordered :after,.cds--list--unordered :before{box-sizing:inherit}.cds--list--unordered:not(.cds--list--nested){margin-inline-start:1rem}.cds--list--expressive,.cds--list--expressive .cds--list--nested{font-size:var(--cds-body-02-font-size,1rem);font-weight:var(--cds-body-02-font-weight,400);letter-spacing:var(--cds-body-02-letter-spacing,0);line-height:var(--cds-body-02-line-height,1.5)}.cds--list--ordered--native{list-style:decimal}.cds--list__item{color:var(--cds-text-primary,#161616)}.cds--list--nested{margin-inline-start:2rem}.cds--list--nested .cds--list__item{padding-inline-start:.25rem}.cds--list--ordered:not(.cds--list--nested){counter-reset:item}.cds--list--ordered:not(.cds--list--nested)>.cds--list__item{position:relative}.cds--list--ordered:not(.cds--list--nested)>.cds--list__item:before{content:counter(item) \".\";counter-increment:item;inset-inline-start:-1.5rem;position:absolute}.cds--list--ordered--native.cds--list--nested,.cds--list--ordered.cds--list--nested{list-style-type:lower-latin}.cds--list--unordered>.cds--list__item{position:relative}.cds--list--unordered>.cds--list__item:before{content:\"–\";inset-inline-start:-1rem;position:absolute}.cds--list--unordered.cds--list--nested>.cds--list__item:before{content:\"▪\";inset-inline-start:-.75rem}:host(cds-ordered-list) .cds--list--nested,:host(cds-unordered-list) .cds--list--nested{margin-inline-start:2rem}:host(cds-ordered-list) .cds--list--nested ::slotted(cds-list-item),:host(cds-unordered-list) .cds--list--nested ::slotted(cds-list-item){padding-inline-start:.25rem}:host(cds-ordered-list) .cds--list--ordered.cds--list--nested{list-style-type:lower-latin}:host(cds-ordered-list):not(.cds--list--nested){counter-reset:item}:host(cds-ordered-list) .cds--list--ordered:not(.cds--list--nested) ::slotted(cds-list-item){position:relative}:host(cds-ordered-list) .cds--list--ordered:not(.cds--list--nested) ::slotted(cds-list-item):before{content:counter(item) \".\";counter-increment:item;inset-inline-start:-1.5rem;position:absolute}:host(cds-unordered-list){--cds-ce--list-marker:\"–\"}:host(cds-unordered-list)[slot=nested]{--cds-ce--list-marker:\"▪\"}:host(cds-unordered-list) ::slotted(cds-list-item){position:relative}:host(cds-unordered-list) ::slotted(cds-list-item):before{content:\"–\";inset-inline-start:-1rem;position:absolute}:host(cds-unordered-list[nested]) ::slotted(cds-list-item):before,:host(cds-unordered-list[slot=nested]) ::slotted(cds-list-item):before{content:\"▪\";inset-inline-start:-.75rem}:host(cds-list-item){color:var(--cds-text-primary,#161616);display:list-item}:host(cds-list-item):before{content:var(--cds-ce--list-marker,none);inset-inline-start:-1rem;position:absolute}:host(cds-list-item[nested]){margin-block:0}:host(cds-list-item[nested]) .cds-ce--list__item__nested-child{padding-block-start:0}"]);
|
|
11
11
|
|
|
12
12
|
export { styles as default };
|
|
13
13
|
//# sourceMappingURL=list.scss.js.map
|
|
@@ -39,7 +39,7 @@ let CDSOrderedList = class CDSOrderedList extends CDSUnorderedList {
|
|
|
39
39
|
const classes = classMap({
|
|
40
40
|
[`${prefix}--list--ordered`]: !this.native,
|
|
41
41
|
[`${prefix}--list--ordered--native`]: this.native,
|
|
42
|
-
[`${prefix}--list--nested`]: this.getAttribute('slot') === 'nested',
|
|
42
|
+
[`${prefix}--list--nested`]: this.getAttribute('slot') === 'nested' || this.nested,
|
|
43
43
|
[`${prefix}--list--expressive`]: this.isExpressive,
|
|
44
44
|
});
|
|
45
45
|
return html `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ordered-list.js","sources":["../../../src/components/list/ordered-list.ts"],"sourcesContent":[null],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AASH;;;;AAIG;AAEH,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,gBAAgB,CAAA;AAA7C,IAAA,WAAA,GAAA;;AACE;;;AAGG;QAEH,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"ordered-list.js","sources":["../../../src/components/list/ordered-list.ts"],"sourcesContent":[null],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AASH;;;;AAIG;AAEH,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,gBAAgB,CAAA;AAA7C,IAAA,WAAA,GAAA;;AACE;;;AAGG;QAEH,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;KAgBhB;IAdC,MAAM,GAAA;QACJ,MAAM,OAAO,GAAG,QAAQ,CAAC;YACvB,CAAC,CAAA,EAAG,MAAM,CAAiB,eAAA,CAAA,GAAG,CAAC,IAAI,CAAC,MAAM;AAC1C,YAAA,CAAC,GAAG,MAAM,CAAA,uBAAA,CAAyB,GAAG,IAAI,CAAC,MAAM;AACjD,YAAA,CAAC,GAAG,MAAM,CAAA,cAAA,CAAgB,GACxB,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM;AACvD,YAAA,CAAC,GAAG,MAAM,CAAA,kBAAA,CAAoB,GAAG,IAAI,CAAC,YAAY;AACnD,SAAA,CAAC,CAAC;AACH,QAAA,OAAO,IAAI,CAAA,CAAA;mBACI,OAAO,CAAA;;;KAGrB,CAAC;KACH;CACF,CAAA;AAhBC,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC5B,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AANX,cAAc,GAAA,UAAA,CAAA;AADnB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,aAAA,CAAe,CAAC;AAClC,CAAA,EAAA,cAAc,CAsBnB,CAAA;AAED,uBAAe,cAAc;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*
|
|
4
|
-
* Copyright IBM Corp. 2019,
|
|
4
|
+
* Copyright IBM Corp. 2019, 2025
|
|
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 CDSUnorderedList extends LitElement {
|
|
|
17
17
|
* `true` if expressive theme enabled.
|
|
18
18
|
*/
|
|
19
19
|
isExpressive: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Specify whether the list is nested, or not
|
|
22
|
+
*/
|
|
23
|
+
nested: boolean;
|
|
20
24
|
connectedCallback(): void;
|
|
21
25
|
render(): import("lit-html").TemplateResult<1>;
|
|
22
26
|
/**
|
|
@@ -16,7 +16,7 @@ import { carbonElement } from '../../globals/decorators/carbon-element.js';
|
|
|
16
16
|
/**
|
|
17
17
|
* @license
|
|
18
18
|
*
|
|
19
|
-
* Copyright IBM Corp. 2019,
|
|
19
|
+
* Copyright IBM Corp. 2019, 2025
|
|
20
20
|
*
|
|
21
21
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
22
22
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -33,10 +33,14 @@ let CDSUnorderedList = class CDSUnorderedList extends LitElement {
|
|
|
33
33
|
* `true` if expressive theme enabled.
|
|
34
34
|
*/
|
|
35
35
|
this.isExpressive = false;
|
|
36
|
+
/**
|
|
37
|
+
* Specify whether the list is nested, or not
|
|
38
|
+
*/
|
|
39
|
+
this.nested = false;
|
|
36
40
|
}
|
|
37
41
|
connectedCallback() {
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
if (this.closest(this.constructor.selectorListItem) ||
|
|
43
|
+
this.nested) {
|
|
40
44
|
this.setAttribute('slot', 'nested');
|
|
41
45
|
}
|
|
42
46
|
else {
|
|
@@ -47,7 +51,7 @@ let CDSUnorderedList = class CDSUnorderedList extends LitElement {
|
|
|
47
51
|
render() {
|
|
48
52
|
const classes = classMap({
|
|
49
53
|
[`${prefix}--list--unordered`]: true,
|
|
50
|
-
[`${prefix}--list--nested`]: this.getAttribute('slot') === 'nested',
|
|
54
|
+
[`${prefix}--list--nested`]: this.getAttribute('slot') === 'nested' || this.nested,
|
|
51
55
|
[`${prefix}--list--expressive`]: this.isExpressive,
|
|
52
56
|
});
|
|
53
57
|
return html `
|
|
@@ -67,6 +71,9 @@ CDSUnorderedList.styles = styles;
|
|
|
67
71
|
__decorate([
|
|
68
72
|
property({ type: Boolean, reflect: true, attribute: 'is-expressive' })
|
|
69
73
|
], CDSUnorderedList.prototype, "isExpressive", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
property({ type: Boolean })
|
|
76
|
+
], CDSUnorderedList.prototype, "nested", void 0);
|
|
70
77
|
CDSUnorderedList = __decorate([
|
|
71
78
|
carbonElement(`${prefix}-unordered-list`)
|
|
72
79
|
], CDSUnorderedList);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unordered-list.js","sources":["../../../src/components/list/unordered-list.ts"],"sourcesContent":[null],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AASH;;;;AAIG;AAEH,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU,CAAA;AAAzC,IAAA,WAAA,GAAA;;AACE;;AAEG;QAEH,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"unordered-list.js","sources":["../../../src/components/list/unordered-list.ts"],"sourcesContent":[null],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AASH;;;;AAIG;AAEH,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU,CAAA;AAAzC,IAAA,WAAA,GAAA;;AACE;;AAEG;QAEH,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;AAErB;;AAEG;QAEH,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;KAsChB;IApCC,iBAAiB,GAAA;QACf,IACE,IAAI,CAAC,OAAO,CACT,IAAI,CAAC,WAAuC,CAAC,gBAAgB,CAC/D;YACD,IAAI,CAAC,MAAM,EACX;AACA,YAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;SACrC;aAAM;AACL,YAAA,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;SAC9B;QACD,KAAK,CAAC,iBAAiB,EAAE,CAAC;KAC3B;IAED,MAAM,GAAA;QACJ,MAAM,OAAO,G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0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Menu size.
|
|
11
|
+
*/
|
|
12
|
+
export declare enum MENU_SIZE {
|
|
13
|
+
/**
|
|
14
|
+
* extra small size.
|
|
15
|
+
*/
|
|
16
|
+
EXTRA_SMALL = "xs",
|
|
17
|
+
/**
|
|
18
|
+
* Small size.
|
|
19
|
+
*/
|
|
20
|
+
SMALL = "sm",
|
|
21
|
+
/**
|
|
22
|
+
* Medium size.
|
|
23
|
+
*/
|
|
24
|
+
MEDIUM = "md",
|
|
25
|
+
/**
|
|
26
|
+
* Large size.
|
|
27
|
+
*/
|
|
28
|
+
LARGE = "lg"
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* menu item kind
|
|
32
|
+
*/
|
|
33
|
+
export declare enum MENU_ITEM_KIND {
|
|
34
|
+
/**
|
|
35
|
+
* default kind
|
|
36
|
+
*/
|
|
37
|
+
DEFAULT = "default",
|
|
38
|
+
/**
|
|
39
|
+
* danger kind
|
|
40
|
+
*/
|
|
41
|
+
DANGER = "danger"
|
|
42
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2024
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
*
|
|
11
|
+
* Copyright IBM Corp. 2020, 2022, 2023
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Menu size.
|
|
18
|
+
*/
|
|
19
|
+
var MENU_SIZE;
|
|
20
|
+
(function (MENU_SIZE) {
|
|
21
|
+
/**
|
|
22
|
+
* extra small size.
|
|
23
|
+
*/
|
|
24
|
+
MENU_SIZE["EXTRA_SMALL"] = "xs";
|
|
25
|
+
/**
|
|
26
|
+
* Small size.
|
|
27
|
+
*/
|
|
28
|
+
MENU_SIZE["SMALL"] = "sm";
|
|
29
|
+
/**
|
|
30
|
+
* Medium size.
|
|
31
|
+
*/
|
|
32
|
+
MENU_SIZE["MEDIUM"] = "md";
|
|
33
|
+
/**
|
|
34
|
+
* Large size.
|
|
35
|
+
*/
|
|
36
|
+
MENU_SIZE["LARGE"] = "lg";
|
|
37
|
+
})(MENU_SIZE || (MENU_SIZE = {}));
|
|
38
|
+
/**
|
|
39
|
+
* menu item kind
|
|
40
|
+
*/
|
|
41
|
+
var MENU_ITEM_KIND;
|
|
42
|
+
(function (MENU_ITEM_KIND) {
|
|
43
|
+
/**
|
|
44
|
+
* default kind
|
|
45
|
+
*/
|
|
46
|
+
MENU_ITEM_KIND["DEFAULT"] = "default";
|
|
47
|
+
/**
|
|
48
|
+
* danger kind
|
|
49
|
+
*/
|
|
50
|
+
MENU_ITEM_KIND["DANGER"] = "danger";
|
|
51
|
+
})(MENU_ITEM_KIND || (MENU_ITEM_KIND = {}));
|
|
52
|
+
|
|
53
|
+
export { MENU_ITEM_KIND, MENU_SIZE };
|
|
54
|
+
//# sourceMappingURL=defs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defs.js","sources":["../../../src/components/menu/defs.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;;AAEG;IACS,UAmBX;AAnBD,CAAA,UAAY,SAAS,EAAA;AACnB;;AAEG;AACH,IAAA,SAAA,CAAA,aAAA,CAAA,GAAA,IAAkB,CAAA;AAClB;;AAEG;AACH,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,IAAY,CAAA;AAEZ;;AAEG;AACH,IAAA,SAAA,CAAA,QAAA,CAAA,GAAA,IAAa,CAAA;AAEb;;AAEG;AACH,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,IAAY,CAAA;AACd,CAAC,EAnBW,SAAS,KAAT,SAAS,GAmBpB,EAAA,CAAA,CAAA,CAAA;AACD;;AAEG;IACS,eASX;AATD,CAAA,UAAY,cAAc,EAAA;AACxB;;AAEG;AACH,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB;;AAEG;AACH,IAAA,cAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACnB,CAAC,EATW,cAAc,KAAd,cAAc,GASzB,EAAA,CAAA,CAAA;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2024
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import './menu';
|
|
10
|
+
import './menu-item';
|
|
11
|
+
import './menu-item-divider';
|
|
12
|
+
import './menu-item-group';
|
|
13
|
+
import './menu-item-selectable';
|
|
14
|
+
import './menu-item-radio-group';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2024
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import './menu.js';
|
|
9
|
+
import './menu-item.js';
|
|
10
|
+
import './menu-item-divider.js';
|
|
11
|
+
import './menu-item-group.js';
|
|
12
|
+
import './menu-item-selectable.js';
|
|
13
|
+
import './menu-item-radio-group.js';
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2024
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
export type StateType = {
|
|
10
|
+
isRoot: boolean;
|
|
11
|
+
hasSelectableItems: boolean;
|
|
12
|
+
size: 'xs' | 'sm' | 'md' | 'lg' | null;
|
|
13
|
+
updateFromChild: (item: {}) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare const menuDefaultState: StateType;
|
|
16
|
+
export declare const MenuContext: {
|
|
17
|
+
__context__: StateType;
|
|
18
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2024
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { createContext } from '@lit/context';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @license
|
|
12
|
+
*
|
|
13
|
+
* Copyright IBM Corp. 2024
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/
|
|
18
|
+
const menuDefaultState = {
|
|
19
|
+
isRoot: true,
|
|
20
|
+
hasSelectableItems: false,
|
|
21
|
+
size: null,
|
|
22
|
+
updateFromChild: () => { },
|
|
23
|
+
};
|
|
24
|
+
const MenuContext = createContext('myData');
|
|
25
|
+
|
|
26
|
+
export { MenuContext, menuDefaultState };
|
|
27
|
+
//# sourceMappingURL=menu-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-context.js","sources":["../../../src/components/menu/menu-context.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;AAOG;AAUU,MAAA,gBAAgB,GAAc;AACzC,IAAA,MAAM,EAAE,IAAI;AACZ,IAAA,kBAAkB,EAAE,KAAK;AACzB,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,eAAe,EAAE,MAAK,GAAG;EACzB;MAEW,WAAW,GAAG,aAAa,CAAY,QAAQ;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2024
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import { LitElement } from 'lit';
|
|
10
|
+
/**
|
|
11
|
+
* Menu Item.
|
|
12
|
+
*
|
|
13
|
+
* @element cds-menu-item-divider
|
|
14
|
+
*/
|
|
15
|
+
declare class CDSmenuItemDivider extends LitElement {
|
|
16
|
+
connectedCallback(): void;
|
|
17
|
+
static styles: any;
|
|
18
|
+
}
|
|
19
|
+
export default CDSmenuItemDivider;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2024
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { __decorate } from 'tslib';
|
|
9
|
+
import { LitElement } from 'lit';
|
|
10
|
+
import { prefix } from '../../globals/settings.js';
|
|
11
|
+
import styles from './menu-item.scss.js';
|
|
12
|
+
import { carbonElement } from '../../globals/decorators/carbon-element.js';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @license
|
|
16
|
+
*
|
|
17
|
+
* Copyright IBM Corp. 2024
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
20
|
+
* LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Menu Item.
|
|
24
|
+
*
|
|
25
|
+
* @element cds-menu-item-divider
|
|
26
|
+
*/
|
|
27
|
+
let CDSmenuItemDivider = class CDSmenuItemDivider extends LitElement {
|
|
28
|
+
connectedCallback() {
|
|
29
|
+
if (!this.hasAttribute('role')) {
|
|
30
|
+
this.setAttribute('role', 'separator');
|
|
31
|
+
}
|
|
32
|
+
super.connectedCallback();
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
CDSmenuItemDivider.styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
|
|
36
|
+
CDSmenuItemDivider = __decorate([
|
|
37
|
+
carbonElement(`${prefix}-menu-item-divider`)
|
|
38
|
+
], CDSmenuItemDivider);
|
|
39
|
+
var CDSmenuItemDivider$1 = CDSmenuItemDivider;
|
|
40
|
+
|
|
41
|
+
export { CDSmenuItemDivider$1 as default };
|
|
42
|
+
//# sourceMappingURL=menu-item-divider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-item-divider.js","sources":["../../../src/components/menu/menu-item-divider.ts"],"sourcesContent":[null],"names":["customElement"],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAMH;;;;AAIG;AAEH,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,UAAU,CAAA;IACzC,iBAAiB,GAAA;QACf,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;AAC9B,YAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;SACxC;QACD,KAAK,CAAC,iBAAiB,EAAE,CAAC;KAC3B;;AACM,kBAAA,CAAA,MAAM,GAAG,MAAM,CAAC;AAPnB,kBAAkB,GAAA,UAAA,CAAA;AADvB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,kBAAA,CAAoB,CAAC;AACvC,CAAA,EAAA,kBAAkB,CAQvB,CAAA;AACD,2BAAe,kBAAkB;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2024
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import { LitElement } from 'lit';
|
|
10
|
+
/**
|
|
11
|
+
* Menu Item.
|
|
12
|
+
*
|
|
13
|
+
* @element cds-menu-item-group
|
|
14
|
+
*/
|
|
15
|
+
declare class CDSmenuItemGroup extends LitElement {
|
|
16
|
+
/**
|
|
17
|
+
* Label for the menu item.
|
|
18
|
+
*/
|
|
19
|
+
label: any;
|
|
20
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
21
|
+
static styles: any;
|
|
22
|
+
}
|
|
23
|
+
export default CDSmenuItemGroup;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2024
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { __decorate } from 'tslib';
|
|
9
|
+
import { LitElement, html } from 'lit';
|
|
10
|
+
import { property } from 'lit/decorators.js';
|
|
11
|
+
import { prefix } from '../../globals/settings.js';
|
|
12
|
+
import styles from './menu-item.scss.js';
|
|
13
|
+
import { carbonElement } from '../../globals/decorators/carbon-element.js';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @license
|
|
17
|
+
*
|
|
18
|
+
* Copyright IBM Corp. 2024
|
|
19
|
+
*
|
|
20
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
|
+
* LICENSE file in the root directory of this source tree.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Menu Item.
|
|
25
|
+
*
|
|
26
|
+
* @element cds-menu-item-group
|
|
27
|
+
*/
|
|
28
|
+
let CDSmenuItemGroup = class CDSmenuItemGroup extends LitElement {
|
|
29
|
+
render() {
|
|
30
|
+
const { label } = this;
|
|
31
|
+
return html `
|
|
32
|
+
<ul role="group" aria-label="${label}">
|
|
33
|
+
<slot></slot>
|
|
34
|
+
</ul>
|
|
35
|
+
`;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
CDSmenuItemGroup.styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
|
|
39
|
+
__decorate([
|
|
40
|
+
property({ type: String })
|
|
41
|
+
], CDSmenuItemGroup.prototype, "label", void 0);
|
|
42
|
+
CDSmenuItemGroup = __decorate([
|
|
43
|
+
carbonElement(`${prefix}-menu-item-group`)
|
|
44
|
+
], CDSmenuItemGroup);
|
|
45
|
+
var CDSmenuItemGroup$1 = CDSmenuItemGroup;
|
|
46
|
+
|
|
47
|
+
export { CDSmenuItemGroup$1 as default };
|
|
48
|
+
//# sourceMappingURL=menu-item-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-item-group.js","sources":["../../../src/components/menu/menu-item-group.ts"],"sourcesContent":[null],"names":["customElement"],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH;;;;AAIG;AAEH,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU,CAAA;IAOvC,MAAM,GAAA;AACJ,QAAA,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;AACvB,QAAA,OAAO,IAAI,CAAA,CAAA;qCACsB,KAAK,CAAA;;;KAGrC,CAAC;KACH;;AACM,gBAAA,CAAA,MAAM,GAAG,MAAM,CAAC;AAVvB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACrB,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AALF,gBAAgB,GAAA,UAAA,CAAA;AADrB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,gBAAA,CAAkB,CAAC;AACrC,CAAA,EAAA,gBAAgB,CAgBrB,CAAA;AACD,yBAAe,gBAAgB;;;;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2024
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import { LitElement } from 'lit';
|
|
10
|
+
/**
|
|
11
|
+
* Menu Item.
|
|
12
|
+
*
|
|
13
|
+
* @element cds-menu-item-radio-group
|
|
14
|
+
*/
|
|
15
|
+
declare class CDSmenuItemRadioGroup extends LitElement {
|
|
16
|
+
context: any;
|
|
17
|
+
/**
|
|
18
|
+
* Label for the menu item radio group.
|
|
19
|
+
*/
|
|
20
|
+
label: any;
|
|
21
|
+
/**
|
|
22
|
+
* List of items in the radio group.
|
|
23
|
+
*/
|
|
24
|
+
items: never[];
|
|
25
|
+
/**
|
|
26
|
+
* Selected item in the radio group.
|
|
27
|
+
*/
|
|
28
|
+
selectedItem: any;
|
|
29
|
+
/**
|
|
30
|
+
* List of items in the radio group.
|
|
31
|
+
*/
|
|
32
|
+
itemToString?: (item: Array<String | number>) => String;
|
|
33
|
+
/**
|
|
34
|
+
* The name of the custom event fired when the selection state changes.
|
|
35
|
+
*/
|
|
36
|
+
static get eventOnChange(): string;
|
|
37
|
+
firstUpdated(): void;
|
|
38
|
+
protected updated(_changedProperties: any): void;
|
|
39
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
40
|
+
static styles: any;
|
|
41
|
+
}
|
|
42
|
+
export default CDSmenuItemRadioGroup;
|