xv-webcomponents 0.1.26 → 0.1.28
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/cjs/app-globals-3a1e7e63.js +7 -0
- package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
- package/dist/cjs/index-782b9733.js +1535 -0
- package/dist/cjs/index-782b9733.js.map +1 -0
- package/dist/cjs/index.cjs.js +11 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +17 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/utils-aa46f72a.js +50 -0
- package/dist/cjs/utils-aa46f72a.js.map +1 -0
- package/dist/cjs/xv-accordion-v2_27.cjs.entry.js +1358 -0
- package/dist/cjs/xv-accordion-v2_27.cjs.entry.js.map +1 -0
- package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js +22 -0
- package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js.map +1 -0
- package/dist/cjs/xv-webcomponents.cjs.js +27 -0
- package/dist/cjs/xv-webcomponents.cjs.js.map +1 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-brands-400.svg +3717 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-duotone-900.svg +15326 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-light-300.svg +12420 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-regular-400.svg +11323 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-solid-900.svg +9653 -0
- package/dist/collection/collection-manifest.json +39 -0
- package/dist/collection/components/xv-accordion/xv-accordion.css +3 -0
- package/dist/collection/components/xv-accordion/xv-accordion.js +163 -0
- package/dist/collection/components/xv-accordion/xv-accordion.js.map +1 -0
- package/dist/collection/components/xv-accordion-item/xv-accordion-item.css +68 -0
- package/dist/collection/components/xv-accordion-item/xv-accordion-item.js +132 -0
- package/dist/collection/components/xv-accordion-item/xv-accordion-item.js.map +1 -0
- package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.css +3 -0
- package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.js +19 -0
- package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.js.map +1 -0
- package/dist/collection/components/xv-button/xv-button-v2.css +154 -0
- package/dist/collection/components/xv-button/xv-button.js +138 -0
- package/dist/collection/components/xv-button/xv-button.js.map +1 -0
- package/dist/collection/components/xv-card/xv-card.css +63 -0
- package/dist/collection/components/xv-card/xv-card.js +122 -0
- package/dist/collection/components/xv-card/xv-card.js.map +1 -0
- package/dist/collection/components/xv-checkbox/xv-checkbox.css +132 -0
- package/dist/collection/components/xv-checkbox/xv-checkbox.js +402 -0
- package/dist/collection/components/xv-checkbox/xv-checkbox.js.map +1 -0
- package/dist/collection/components/xv-dropdown/_vars.js +2 -0
- package/dist/collection/components/xv-dropdown/_vars.js.map +1 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.css +14 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +151 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js.map +1 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown.css +227 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +340 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown.js.map +1 -0
- package/dist/collection/components/xv-footer/xv-footer.css +230 -0
- package/dist/collection/components/xv-footer/xv-footer.js +37 -0
- package/dist/collection/components/xv-footer/xv-footer.js.map +1 -0
- package/dist/collection/components/xv-header/xv-header.css +22587 -0
- package/dist/collection/components/xv-header/xv-header.js +46 -0
- package/dist/collection/components/xv-header/xv-header.js.map +1 -0
- package/dist/collection/components/xv-link/xv-link.css +61 -0
- package/dist/collection/components/xv-link/xv-link.js +132 -0
- package/dist/collection/components/xv-link/xv-link.js.map +1 -0
- package/dist/collection/components/xv-loader/xv-loader.css +65 -0
- package/dist/collection/components/xv-loader/xv-loader.js +106 -0
- package/dist/collection/components/xv-loader/xv-loader.js.map +1 -0
- package/dist/collection/components/xv-modal/xv-modal.css +98 -0
- package/dist/collection/components/xv-modal/xv-modal.js +202 -0
- package/dist/collection/components/xv-modal/xv-modal.js.map +1 -0
- package/dist/collection/components/xv-notification/_vars.js +8 -0
- package/dist/collection/components/xv-notification/_vars.js.map +1 -0
- package/dist/collection/components/xv-notification/xv-notification.css +112 -0
- package/dist/collection/components/xv-notification/xv-notification.js +118 -0
- package/dist/collection/components/xv-notification/xv-notification.js.map +1 -0
- package/dist/collection/components/xv-overflow-menu/_vars.js +6 -0
- package/dist/collection/components/xv-overflow-menu/_vars.js.map +1 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.css +45 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +137 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js.map +1 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.css +102 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +202 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js.map +1 -0
- package/dist/collection/components/xv-progress-indicator/_vars.js +12 -0
- package/dist/collection/components/xv-progress-indicator/_vars.js.map +1 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.css +96 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +54 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js.map +1 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.css +45 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +157 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js.map +1 -0
- package/dist/collection/components/xv-table/defs.js +28 -0
- package/dist/collection/components/xv-table/defs.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.css +13 -0
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.js +111 -0
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.css +116 -0
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +199 -0
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.css +80 -0
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.js +172 -0
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.css +46 -0
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +275 -0
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-toolbar/xv-table-toolbar.css +47 -0
- package/dist/collection/components/xv-table/xv-table-toolbar/xv-table-toolbar.js +78 -0
- package/dist/collection/components/xv-table/xv-table-toolbar/xv-table-toolbar.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table.css +165 -0
- package/dist/collection/components/xv-table/xv-table.js +284 -0
- package/dist/collection/components/xv-table/xv-table.js.map +1 -0
- package/dist/collection/components/xv-tabs/_vars.js +11 -0
- package/dist/collection/components/xv-tabs/_vars.js.map +1 -0
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.css +3 -0
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +65 -0
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js.map +1 -0
- package/dist/collection/components/xv-tabs/xv-tabs.css +79 -0
- package/dist/collection/components/xv-tabs/xv-tabs.js +158 -0
- package/dist/collection/components/xv-tabs/xv-tabs.js.map +1 -0
- package/dist/collection/components/xv-tag/xv-tag.css +97 -0
- package/dist/collection/components/xv-tag/xv-tag.js +158 -0
- package/dist/collection/components/xv-tag/xv-tag.js.map +1 -0
- package/dist/collection/components/xv-tooltip/xv-tooltip.css +154 -0
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +70 -0
- package/dist/collection/components/xv-tooltip/xv-tooltip.js.map +1 -0
- package/dist/collection/index.js +11 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/scss/xv/images/xv-sprite.svg +1 -0
- package/dist/collection/scss/xv/sprite/images/xv-sprite.svg +1 -0
- package/dist/collection/types/enum.js +9 -0
- package/dist/collection/types/enum.js.map +1 -0
- package/dist/collection/utils/utils.js +46 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/esm/app-globals-0f993ce5.js +5 -0
- package/dist/esm/app-globals-0f993ce5.js.map +1 -0
- package/dist/esm/index-83ab73b7.js +1506 -0
- package/dist/esm/index-83ab73b7.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +13 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/utils-0d1c18d5.js +44 -0
- package/dist/esm/utils-0d1c18d5.js.map +1 -0
- package/dist/esm/xv-accordion-v2_27.entry.js +1328 -0
- package/dist/esm/xv-accordion-v2_27.entry.js.map +1 -0
- package/dist/esm/xv-breadcrumbs-v2.entry.js +18 -0
- package/dist/esm/xv-breadcrumbs-v2.entry.js.map +1 -0
- package/dist/esm/xv-webcomponents.js +22 -0
- package/dist/esm/xv-webcomponents.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/xv-accordion/xv-accordion.d.ts +20 -0
- package/dist/types/components/xv-accordion-item/xv-accordion-item.d.ts +15 -0
- package/dist/types/components/xv-breadcrumbs/xv-breadcrumbs.d.ts +3 -0
- package/dist/types/components/xv-button/xv-button.d.ts +16 -0
- package/dist/types/components/xv-card/xv-card.d.ts +8 -0
- package/dist/types/components/xv-checkbox/xv-checkbox.d.ts +74 -0
- package/dist/types/components/xv-dropdown/_vars.d.ts +5 -0
- package/dist/types/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.d.ts +17 -0
- package/dist/types/components/xv-dropdown/xv-dropdown.d.ts +28 -0
- package/dist/types/components/xv-footer/xv-footer.d.ts +6 -0
- package/dist/types/components/xv-header/xv-header.d.ts +6 -0
- package/dist/types/components/xv-link/xv-link.d.ts +9 -0
- package/dist/types/components/xv-loader/xv-loader.d.ts +16 -0
- package/dist/types/components/xv-modal/xv-modal.d.ts +26 -0
- package/dist/types/components/xv-notification/_vars.d.ts +6 -0
- package/dist/types/components/xv-notification/xv-notification.d.ts +11 -0
- package/dist/types/components/xv-overflow-menu/_vars.d.ts +8 -0
- package/dist/types/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.d.ts +10 -0
- package/dist/types/components/xv-overflow-menu/xv-overflow-menu.d.ts +21 -0
- package/dist/types/components/xv-progress-indicator/_vars.d.ts +9 -0
- package/dist/types/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.d.ts +6 -0
- package/dist/types/components/xv-progress-indicator/xv-progress-indicator.d.ts +25 -0
- package/dist/types/components/xv-table/defs.d.ts +38 -0
- package/dist/types/components/xv-table/xv-table-col/xv-table-col.d.ts +9 -0
- package/dist/types/components/xv-table/xv-table-expand/xv-table-expand.d.ts +24 -0
- package/dist/types/components/xv-table/xv-table-header-row/xv-table-header-row.d.ts +28 -0
- package/dist/types/components/xv-table/xv-table-row/xv-table-row.d.ts +52 -0
- package/dist/types/components/xv-table/xv-table-toolbar/xv-table-toolbar.d.ts +6 -0
- package/dist/types/components/xv-table/xv-table.d.ts +37 -0
- package/dist/types/components/xv-tabs/_vars.d.ts +7 -0
- package/dist/types/components/xv-tabs/xv-tab/xv-tab.d.ts +5 -0
- package/dist/types/components/xv-tabs/xv-tabs.d.ts +36 -0
- package/dist/types/components/xv-tag/xv-tag.d.ts +11 -0
- package/dist/types/components/xv-tooltip/xv-tooltip.d.ts +11 -0
- package/dist/types/components.d.ts +1217 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/stencil-public-runtime.d.ts +1680 -0
- package/dist/types/types/enum.d.ts +7 -0
- package/dist/types/utils/utils.d.ts +17 -0
- package/dist/xv-webcomponents/index.esm.js +2 -0
- package/dist/xv-webcomponents/index.esm.js.map +1 -0
- package/dist/xv-webcomponents/p-07dfeba3.entry.js +2 -0
- package/dist/xv-webcomponents/p-07dfeba3.entry.js.map +1 -0
- package/dist/xv-webcomponents/p-39bf1511.js +2 -0
- package/dist/xv-webcomponents/p-39bf1511.js.map +1 -0
- package/dist/xv-webcomponents/p-5f18d718.entry.js +2 -0
- package/dist/xv-webcomponents/p-5f18d718.entry.js.map +1 -0
- package/dist/xv-webcomponents/p-840929c5.js +3 -0
- package/dist/xv-webcomponents/p-840929c5.js.map +1 -0
- package/dist/xv-webcomponents/p-e1255160.js +2 -0
- package/dist/xv-webcomponents/p-e1255160.js.map +1 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +2 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-overflow-menu-item.js","sourceRoot":"","sources":["../../../../src/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AACtF,OAAO,EAAqB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAOlE,MAAM,OAAO,kBAAkB;IAL/B;QAM2B,aAAQ,GAAY,KAAK,CAAC;QAE3C,YAAO,GAAwB,mBAAmB,CAAC,OAAO,CAAC;KAqBpE;IAjBC,WAAW,CAAC,KAAmB;QAC7B,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAE1B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAC,uBAAuB,EAC7B,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;YAEvB,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Listen, Event, EventEmitter } from '@stencil/core';\nimport { OverflowMenuEvent, OverflowMenuVariant } from '../_vars';\n\n@Component({\n tag: 'xv-overflow-menu-v2-item',\n styleUrl: 'xv-overflow-menu-item.scss',\n shadow: true,\n})\nexport class XvOverflowMenuItem {\n @Prop({ reflect: true }) disabled: boolean = false;\n @Prop({ reflect: true }) value: OverflowMenuEvent['value'];\n @Prop() variant: OverflowMenuVariant = OverflowMenuVariant.DEFAULT;\n @Event() itemClick: EventEmitter<OverflowMenuEvent>;\n\n @Listen('click')\n handleClick(event: PointerEvent) {\n if (this.disabled) return;\n\n this.itemClick.emit({ event, value: this.value });\n }\n\n render() {\n return (\n <Host\n class=\"xv-overflow-menu-item\"\n role=\"menuitem\"\n disabled={this.disabled}\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--overflow-menu-size: 40px;
|
|
3
|
+
--overflow-menu-item-padding: 11px 16px;
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
position: relative;
|
|
7
|
+
}
|
|
8
|
+
:host .btn {
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
width: var(--overflow-menu-size);
|
|
13
|
+
height: var(--overflow-menu-size);
|
|
14
|
+
background-color: transparent;
|
|
15
|
+
border: 1px solid transparent;
|
|
16
|
+
transition: 300ms ease-in-out color, 300ms ease-in-out background-color, 200ms ease box-shadow;
|
|
17
|
+
font-size: calc(var(--overflow-menu-size) / 2);
|
|
18
|
+
color: var(--icon-primary);
|
|
19
|
+
border-radius: 5%;
|
|
20
|
+
margin: 0;
|
|
21
|
+
padding: 0;
|
|
22
|
+
}
|
|
23
|
+
:host .btn:hover {
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
color: var(--link-primary-hover);
|
|
26
|
+
background-color: var(--background-hover);
|
|
27
|
+
}
|
|
28
|
+
:host .btn:active {
|
|
29
|
+
background-color: var(--background-active);
|
|
30
|
+
color: var(--icon-disabled);
|
|
31
|
+
}
|
|
32
|
+
:host .btn:disabled {
|
|
33
|
+
background-color: transparent;
|
|
34
|
+
opacity: 0.5;
|
|
35
|
+
cursor: not-allowed;
|
|
36
|
+
}
|
|
37
|
+
:host .list {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
align-items: stretch;
|
|
41
|
+
justify-content: flex-start;
|
|
42
|
+
background-color: var(--layer-01);
|
|
43
|
+
position: absolute;
|
|
44
|
+
top: 100%;
|
|
45
|
+
left: 0;
|
|
46
|
+
max-height: 0;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
border-radius: 3px;
|
|
49
|
+
transition: 200ms ease-in-out max-height, 100ms ease box-shadow;
|
|
50
|
+
min-width: 128px;
|
|
51
|
+
max-width: 50vw;
|
|
52
|
+
width: max-content;
|
|
53
|
+
}
|
|
54
|
+
:host .list ::slotted(xv-overflow-menu-v2-item) {
|
|
55
|
+
padding: var(--overflow-menu-item-padding);
|
|
56
|
+
}
|
|
57
|
+
:host .list.position-right {
|
|
58
|
+
left: initial;
|
|
59
|
+
right: 0;
|
|
60
|
+
border-top-right-radius: 0;
|
|
61
|
+
}
|
|
62
|
+
:host .list.position-left {
|
|
63
|
+
border-top-left-radius: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:host([size=xs]) {
|
|
67
|
+
--overflow-menu-item-padding: 4px 16px;
|
|
68
|
+
--overflow-menu-size: 24px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:host([size=sm]) {
|
|
72
|
+
--overflow-menu-size: 32px;
|
|
73
|
+
--overflow-menu-item-padding: 7px 16px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:host([size=md]) {
|
|
77
|
+
--overflow-menu-size: 40px;
|
|
78
|
+
--overflow-menu-item-padding: 11px 16px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:host([size=lg]) {
|
|
82
|
+
--overflow-menu-size: 48px;
|
|
83
|
+
--overflow-menu-item-padding: 16px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:host([size=xl]) {
|
|
87
|
+
--overflow-menu-size: 56px;
|
|
88
|
+
--overflow-menu-item-padding: 16px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:host([open]) .btn {
|
|
92
|
+
border-bottom-left-radius: 0;
|
|
93
|
+
border-bottom-right-radius: 0;
|
|
94
|
+
background-color: var(--layer-01);
|
|
95
|
+
box-shadow: -2px 2px 2px 0 rgba(0, 0, 0, 0.1);
|
|
96
|
+
z-index: 1;
|
|
97
|
+
}
|
|
98
|
+
:host([open]) .list {
|
|
99
|
+
max-height: 500px;
|
|
100
|
+
z-index: 2;
|
|
101
|
+
box-shadow: -2px 2px 2px 0 rgba(0, 0, 0, 0.1);
|
|
102
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { SIZE_VAR } from "../../types/enum";
|
|
3
|
+
export class XvOverflowMenu {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.open = false;
|
|
6
|
+
this.disabled = false;
|
|
7
|
+
this.position = 'left';
|
|
8
|
+
this.size = SIZE_VAR.MD;
|
|
9
|
+
this.handleClose = () => {
|
|
10
|
+
if (this.open)
|
|
11
|
+
this.open = false;
|
|
12
|
+
};
|
|
13
|
+
this.removeListeners = () => {
|
|
14
|
+
this.el.removeEventListener('itemClick', this.handleSelectItem);
|
|
15
|
+
document.body.removeEventListener('click', this.handleClick);
|
|
16
|
+
};
|
|
17
|
+
this.handleClick = (ev) => {
|
|
18
|
+
if (!this.open || this.el.contains(ev.target))
|
|
19
|
+
return;
|
|
20
|
+
ev.stopPropagation();
|
|
21
|
+
ev.preventDefault();
|
|
22
|
+
this.handleClose();
|
|
23
|
+
};
|
|
24
|
+
this.onOpenToggle = () => {
|
|
25
|
+
this.open = !this.open;
|
|
26
|
+
};
|
|
27
|
+
this.handleSelectItem = ({ detail }) => {
|
|
28
|
+
this.selectItem.emit(detail);
|
|
29
|
+
this.handleClose();
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
handleKeyDown(ev) {
|
|
33
|
+
if (ev.key === 'Escape') {
|
|
34
|
+
ev.stopPropagation();
|
|
35
|
+
ev.preventDefault();
|
|
36
|
+
this.handleClose();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
openChangeHandle() {
|
|
40
|
+
if (this.disabled)
|
|
41
|
+
return;
|
|
42
|
+
if (this.open) {
|
|
43
|
+
this.el.addEventListener('itemClick', this.handleSelectItem);
|
|
44
|
+
document.body.addEventListener('click', this.handleClick);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
this.removeListeners();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
render() {
|
|
51
|
+
return (h(Host, { key: '38ab189c178b27de9de8cbd0174bc96b0beea5e6', class: "xv-overflow-menu", size: this.size, role: "menu", tabindex: -1 }, h("button", { key: '62a4ca90c866339ae4efeeb9579c5077ffed4f64', class: { btn: true, open: this.open }, onClick: this.onOpenToggle, disabled: this.disabled }, h("svg", { key: 'b46f8ca4e1073a1cca0c4c22c6e4d29f6f45b24c', xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 128 512" }, h("path", { key: '8a9f8d9b2e717a997d07ad3fb77c2ff9afbf2ac6', d: "M64 368a48 48 0 1 0 0 96 48 48 0 1 0 0-96zm0-160a48 48 0 1 0 0 96 48 48 0 1 0 0-96zM112 96A48 48 0 1 0 16 96a48 48 0 1 0 96 0z" }))), h("div", { key: 'cee611c895bb7386fe154b033c3c0da53e1ee493', class: { list: true, open: this.open, [`position-${this.position}`]: true } }, h("slot", { key: '9caf0adb12c16e7937df82c6bac4385be883ea22' }))));
|
|
52
|
+
}
|
|
53
|
+
componentDidLoad() {
|
|
54
|
+
this.openChangeHandle();
|
|
55
|
+
}
|
|
56
|
+
disconnectedCallback() {
|
|
57
|
+
this.removeListeners();
|
|
58
|
+
}
|
|
59
|
+
static get is() { return "xv-overflow-menu-v2"; }
|
|
60
|
+
static get encapsulation() { return "shadow"; }
|
|
61
|
+
static get originalStyleUrls() {
|
|
62
|
+
return {
|
|
63
|
+
"$": ["xv-overflow-menu.scss"]
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
static get styleUrls() {
|
|
67
|
+
return {
|
|
68
|
+
"$": ["xv-overflow-menu.css"]
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
static get properties() {
|
|
72
|
+
return {
|
|
73
|
+
"open": {
|
|
74
|
+
"type": "boolean",
|
|
75
|
+
"mutable": true,
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "boolean",
|
|
78
|
+
"resolved": "boolean",
|
|
79
|
+
"references": {}
|
|
80
|
+
},
|
|
81
|
+
"required": false,
|
|
82
|
+
"optional": false,
|
|
83
|
+
"docs": {
|
|
84
|
+
"tags": [],
|
|
85
|
+
"text": ""
|
|
86
|
+
},
|
|
87
|
+
"getter": false,
|
|
88
|
+
"setter": false,
|
|
89
|
+
"attribute": "open",
|
|
90
|
+
"reflect": true,
|
|
91
|
+
"defaultValue": "false"
|
|
92
|
+
},
|
|
93
|
+
"disabled": {
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"mutable": false,
|
|
96
|
+
"complexType": {
|
|
97
|
+
"original": "boolean",
|
|
98
|
+
"resolved": "boolean",
|
|
99
|
+
"references": {}
|
|
100
|
+
},
|
|
101
|
+
"required": false,
|
|
102
|
+
"optional": false,
|
|
103
|
+
"docs": {
|
|
104
|
+
"tags": [],
|
|
105
|
+
"text": ""
|
|
106
|
+
},
|
|
107
|
+
"getter": false,
|
|
108
|
+
"setter": false,
|
|
109
|
+
"attribute": "disabled",
|
|
110
|
+
"reflect": true,
|
|
111
|
+
"defaultValue": "false"
|
|
112
|
+
},
|
|
113
|
+
"position": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"mutable": false,
|
|
116
|
+
"complexType": {
|
|
117
|
+
"original": "'left' | 'right'",
|
|
118
|
+
"resolved": "\"left\" | \"right\"",
|
|
119
|
+
"references": {}
|
|
120
|
+
},
|
|
121
|
+
"required": false,
|
|
122
|
+
"optional": false,
|
|
123
|
+
"docs": {
|
|
124
|
+
"tags": [],
|
|
125
|
+
"text": ""
|
|
126
|
+
},
|
|
127
|
+
"getter": false,
|
|
128
|
+
"setter": false,
|
|
129
|
+
"attribute": "position",
|
|
130
|
+
"reflect": false,
|
|
131
|
+
"defaultValue": "'left'"
|
|
132
|
+
},
|
|
133
|
+
"size": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"mutable": false,
|
|
136
|
+
"complexType": {
|
|
137
|
+
"original": "SIZE_VAR",
|
|
138
|
+
"resolved": "SIZE_VAR.LG | SIZE_VAR.MD | SIZE_VAR.SM | SIZE_VAR.XL | SIZE_VAR.XS",
|
|
139
|
+
"references": {
|
|
140
|
+
"SIZE_VAR": {
|
|
141
|
+
"location": "import",
|
|
142
|
+
"path": "../../types/enum",
|
|
143
|
+
"id": "src/types/enum.ts::SIZE_VAR"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"required": false,
|
|
148
|
+
"optional": false,
|
|
149
|
+
"docs": {
|
|
150
|
+
"tags": [],
|
|
151
|
+
"text": ""
|
|
152
|
+
},
|
|
153
|
+
"getter": false,
|
|
154
|
+
"setter": false,
|
|
155
|
+
"attribute": "size",
|
|
156
|
+
"reflect": false,
|
|
157
|
+
"defaultValue": "SIZE_VAR.MD"
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
static get events() {
|
|
162
|
+
return [{
|
|
163
|
+
"method": "selectItem",
|
|
164
|
+
"name": "selectItem",
|
|
165
|
+
"bubbles": true,
|
|
166
|
+
"cancelable": true,
|
|
167
|
+
"composed": true,
|
|
168
|
+
"docs": {
|
|
169
|
+
"tags": [],
|
|
170
|
+
"text": ""
|
|
171
|
+
},
|
|
172
|
+
"complexType": {
|
|
173
|
+
"original": "OverflowMenuEvent",
|
|
174
|
+
"resolved": "OverflowMenuEvent",
|
|
175
|
+
"references": {
|
|
176
|
+
"OverflowMenuEvent": {
|
|
177
|
+
"location": "import",
|
|
178
|
+
"path": "./_vars",
|
|
179
|
+
"id": "src/components/xv-overflow-menu/_vars.ts::OverflowMenuEvent"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}];
|
|
184
|
+
}
|
|
185
|
+
static get elementRef() { return "el"; }
|
|
186
|
+
static get watchers() {
|
|
187
|
+
return [{
|
|
188
|
+
"propName": "open",
|
|
189
|
+
"methodName": "openChangeHandle"
|
|
190
|
+
}];
|
|
191
|
+
}
|
|
192
|
+
static get listeners() {
|
|
193
|
+
return [{
|
|
194
|
+
"name": "keydown",
|
|
195
|
+
"method": "handleKeyDown",
|
|
196
|
+
"target": undefined,
|
|
197
|
+
"capture": false,
|
|
198
|
+
"passive": false
|
|
199
|
+
}];
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=xv-overflow-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-overflow-menu.js","sourceRoot":"","sources":["../../../src/components/xv-overflow-menu/xv-overflow-menu.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, Element, h, Host, Listen, Prop, Watch, Event, EventEmitter } from '@stencil/core';\nimport { SIZE_VAR } from '../../types/enum';\nimport { OverflowMenuEvent } from './_vars';\n\n@Component({\n tag: 'xv-overflow-menu-v2',\n styleUrl: 'xv-overflow-menu.scss',\n shadow: true,\n})\nexport class XvOverflowMenu {\n @Element() el: HTMLElement;\n @Prop({ reflect: true, mutable: true }) open: boolean = false;\n @Prop({ reflect: true }) disabled: boolean = false;\n @Prop() position: 'left' | 'right' = 'left';\n @Prop() size: SIZE_VAR = SIZE_VAR.MD;\n @Event() selectItem: EventEmitter<OverflowMenuEvent>;\n\n @Listen('keydown')\n handleKeyDown(ev: KeyboardEvent) {\n if (ev.key === 'Escape'){\n ev.stopPropagation();\n ev.preventDefault();\n this.handleClose();\n }\n }\n\n @Watch('open')\n openChangeHandle() {\n if (this.disabled) return;\n\n if (this.open) {\n this.el.addEventListener('itemClick', this.handleSelectItem);\n document.body.addEventListener('click', this.handleClick);\n } else {\n this.removeListeners();\n }\n }\n\n private handleClose = () => {\n if (this.open) this.open = false;\n }\n\n private removeListeners = () => {\n this.el.removeEventListener('itemClick', this.handleSelectItem);\n document.body.removeEventListener('click', this.handleClick);\n }\n\n private handleClick = (ev: MouseEvent) => {\n if (!this.open || this.el.contains(ev.target as Node)) return;\n\n ev.stopPropagation();\n ev.preventDefault();\n this.handleClose()\n }\n\n private onOpenToggle = () => {\n this.open = !this.open;\n };\n\n private handleSelectItem = ({ detail }: CustomEvent<OverflowMenuEvent>) => {\n this.selectItem.emit(detail);\n this.handleClose();\n }\n\n render() {\n return (\n <Host\n class=\"xv-overflow-menu\"\n size={this.size}\n role=\"menu\"\n tabindex={-1}\n >\n <button class={{ btn: true, open: this.open }} onClick={this.onOpenToggle} disabled={this.disabled}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 128 512\">\n <path\n d=\"M64 368a48 48 0 1 0 0 96 48 48 0 1 0 0-96zm0-160a48 48 0 1 0 0 96 48 48 0 1 0 0-96zM112 96A48 48 0 1 0 16 96a48 48 0 1 0 96 0z\" />\n </svg>\n </button>\n <div class={{list: true, open: this.open, [`position-${this.position}`]: true }}>\n <slot></slot>\n </div>\n </Host>\n );\n }\n\n componentDidLoad() {\n this.openChangeHandle();\n }\n\n disconnectedCallback() {\n this.removeListeners();\n }\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export var PROGRESS_VARIANTS;
|
|
2
|
+
(function (PROGRESS_VARIANTS) {
|
|
3
|
+
PROGRESS_VARIANTS["DEFAULT"] = "";
|
|
4
|
+
PROGRESS_VARIANTS["HORIZONTAL"] = "horizontal";
|
|
5
|
+
})(PROGRESS_VARIANTS || (PROGRESS_VARIANTS = {}));
|
|
6
|
+
export var PROGRESS_ITEM_STATUS;
|
|
7
|
+
(function (PROGRESS_ITEM_STATUS) {
|
|
8
|
+
PROGRESS_ITEM_STATUS["DONE"] = "done";
|
|
9
|
+
PROGRESS_ITEM_STATUS["NO_STARTED"] = "not_started";
|
|
10
|
+
PROGRESS_ITEM_STATUS["IN_PROGRESS"] = "in_progress";
|
|
11
|
+
})(PROGRESS_ITEM_STATUS || (PROGRESS_ITEM_STATUS = {}));
|
|
12
|
+
//# sourceMappingURL=_vars.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_vars.js","sourceRoot":"","sources":["../../../src/components/xv-progress-indicator/_vars.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,iCAAY,CAAA;IACZ,8CAAyB,CAAA;AAC3B,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,kDAA0B,CAAA;IAC1B,mDAA2B,CAAA;AAC7B,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B","sourcesContent":["export enum PROGRESS_VARIANTS {\n DEFAULT = '',\n HORIZONTAL = 'horizontal'\n}\n\nexport enum PROGRESS_ITEM_STATUS {\n DONE = 'done',\n NO_STARTED = 'not_started',\n IN_PROGRESS = 'in_progress',\n}\n"]}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
:host(.xv-progress-indicator-item) {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex: 1;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
position: relative;
|
|
8
|
+
padding: 10px 16px;
|
|
9
|
+
row-gap: var(--gap-sm, 10px);
|
|
10
|
+
}
|
|
11
|
+
:host(.xv-progress-indicator-item):before {
|
|
12
|
+
width: 100%;
|
|
13
|
+
}
|
|
14
|
+
:host(.xv-progress-indicator-item):before, :host(.xv-progress-indicator-item) .line {
|
|
15
|
+
content: "";
|
|
16
|
+
z-index: 1;
|
|
17
|
+
display: inline-block;
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: 0;
|
|
20
|
+
left: 0;
|
|
21
|
+
right: 0;
|
|
22
|
+
height: 2px;
|
|
23
|
+
color: inherit;
|
|
24
|
+
background-color: var(--border-subtle-01, grey);
|
|
25
|
+
}
|
|
26
|
+
:host(.xv-progress-indicator-item) .line {
|
|
27
|
+
width: 0;
|
|
28
|
+
color: inherit;
|
|
29
|
+
transition: width 250ms ease;
|
|
30
|
+
background-color: var(--background-brand, currentColor);
|
|
31
|
+
}
|
|
32
|
+
:host(.xv-progress-indicator-item) .icon {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
width: var(--progress-indicator-icon-size, 22px);
|
|
37
|
+
height: var(--progress-indicator-icon-size, 22px);
|
|
38
|
+
min-width: var(--progress-indicator-icon-size, 22px);
|
|
39
|
+
min-height: var(--progress-indicator-icon-size, 22px);
|
|
40
|
+
max-width: var(--progress-indicator-icon-size, 22px);
|
|
41
|
+
max-height: var(--progress-indicator-icon-size, 22px);
|
|
42
|
+
border: 2px dashed var(--icon-primary, currentColor);
|
|
43
|
+
border-radius: 50%;
|
|
44
|
+
}
|
|
45
|
+
:host(.xv-progress-indicator-item) .icon svg {
|
|
46
|
+
width: calc(var(--progress-indicator-icon-size, 22px) * 0.637);
|
|
47
|
+
height: calc(var(--progress-indicator-icon-size, 22px) * 0.637);
|
|
48
|
+
opacity: 0;
|
|
49
|
+
transition: opacity 500ms ease-in-out;
|
|
50
|
+
}
|
|
51
|
+
:host(.xv-progress-indicator-item) .label {
|
|
52
|
+
margin: 0;
|
|
53
|
+
color: var(--text-primary);
|
|
54
|
+
font-size: var(--progress-indicator-font-size, 14px);
|
|
55
|
+
line-height: 1.1;
|
|
56
|
+
letter-spacing: 0.16px;
|
|
57
|
+
text-overflow: ellipsis;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:host([status=done]) .icon,
|
|
62
|
+
:host([status=in_progress]) .icon {
|
|
63
|
+
border-color: var(--background-brand, currentColor);
|
|
64
|
+
color: var(--background-brand, inherit);
|
|
65
|
+
border-style: solid;
|
|
66
|
+
}
|
|
67
|
+
:host([status=done]) .icon svg,
|
|
68
|
+
:host([status=in_progress]) .icon svg {
|
|
69
|
+
opacity: 1;
|
|
70
|
+
}
|
|
71
|
+
:host([status=done]) .line,
|
|
72
|
+
:host([status=in_progress]) .line {
|
|
73
|
+
width: 100%;
|
|
74
|
+
background-color: var(--background-brand, currentColor);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:host([status=in_progress]) .icon {
|
|
78
|
+
border-color: var(--background-brand, currentColor);
|
|
79
|
+
color: var(--background-brand, inherit);
|
|
80
|
+
border-style: solid;
|
|
81
|
+
position: relative;
|
|
82
|
+
}
|
|
83
|
+
:host([status=in_progress]) .icon:after {
|
|
84
|
+
content: "";
|
|
85
|
+
position: absolute;
|
|
86
|
+
top: 0;
|
|
87
|
+
left: 0;
|
|
88
|
+
width: 50%;
|
|
89
|
+
height: 100%;
|
|
90
|
+
background-color: var(--background-brand, currentColor);
|
|
91
|
+
border-top-left-radius: 50% 100%;
|
|
92
|
+
border-bottom-left-radius: 50% 100%;
|
|
93
|
+
}
|
|
94
|
+
:host([status=in_progress]) .icon svg {
|
|
95
|
+
opacity: 0;
|
|
96
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { PROGRESS_ITEM_STATUS } from "../_vars";
|
|
3
|
+
export class XvProgressIndicatorItem {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.status = PROGRESS_ITEM_STATUS.NO_STARTED;
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, { key: 'b1ab45057fee17bc449648e1c127239ada00f9c5', status: this.status, class: { 'xv-progress-indicator-item': true } }, h("span", { key: 'b933ea361bf3f97c4d50a08e15c6bb57c7ef1aaf', class: "line" }), h("span", { key: '267e7a12e4536b7b8ac9a102ebbbf4f072cb6302', class: "icon" }, h("svg", { key: '21694dc47b94fbbbbe3f6f864d8c500b6e9b0310', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512" }, h("path", { key: '03e39da95382ddc05bbd41d9768f30cdf0d3de6e', fill: "currentColor", d: "M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" }))), h("p", { key: '12399f0c9a664804e014db0e7be6b3c117a560ef', class: "label" }, h("slot", { key: 'b2fc1af75b062c83063530923de8621dd38a4572' }))));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "xv-progress-indicator-v2-item"; }
|
|
11
|
+
static get encapsulation() { return "shadow"; }
|
|
12
|
+
static get originalStyleUrls() {
|
|
13
|
+
return {
|
|
14
|
+
"$": ["xv-progress-indicator-item.scss"]
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
static get styleUrls() {
|
|
18
|
+
return {
|
|
19
|
+
"$": ["xv-progress-indicator-item.css"]
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
static get properties() {
|
|
23
|
+
return {
|
|
24
|
+
"status": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"mutable": false,
|
|
27
|
+
"complexType": {
|
|
28
|
+
"original": "PROGRESS_ITEM_STATUS",
|
|
29
|
+
"resolved": "PROGRESS_ITEM_STATUS.DONE | PROGRESS_ITEM_STATUS.IN_PROGRESS | PROGRESS_ITEM_STATUS.NO_STARTED",
|
|
30
|
+
"references": {
|
|
31
|
+
"PROGRESS_ITEM_STATUS": {
|
|
32
|
+
"location": "import",
|
|
33
|
+
"path": "../_vars",
|
|
34
|
+
"id": "src/components/xv-progress-indicator/_vars.ts::PROGRESS_ITEM_STATUS"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"required": false,
|
|
39
|
+
"optional": false,
|
|
40
|
+
"docs": {
|
|
41
|
+
"tags": [],
|
|
42
|
+
"text": ""
|
|
43
|
+
},
|
|
44
|
+
"getter": false,
|
|
45
|
+
"setter": false,
|
|
46
|
+
"attribute": "status",
|
|
47
|
+
"reflect": false,
|
|
48
|
+
"defaultValue": "PROGRESS_ITEM_STATUS.NO_STARTED"
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
static get elementRef() { return "el"; }
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=xv-progress-indicator-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-progress-indicator-item.js","sourceRoot":"","sources":["../../../../src/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAOhD,MAAM,OAAO,uBAAuB;IALpC;QAO4B,WAAM,GAAyB,oBAAoB,CAAC,UAAU,CAAC;KAqB1F;IAnBC,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,KAAK,EAAE,EAAC,4BAA4B,EAAE,IAAI,EAAC;YAE3C,6DAAM,KAAK,EAAC,MAAM,GAAE;YACpB,6DAAM,KAAK,EAAC,MAAM;gBAChB,4DAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,aAAa;oBACvD,6DACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,sLAAsL,GACxL,CACF,CACD;YACP,0DAAG,KAAK,EAAC,OAAO;gBAAC,8DAAO,CAAI,CACvB,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Element, Prop } from '@stencil/core';\nimport { PROGRESS_ITEM_STATUS } from '../_vars';\n\n@Component({\n tag: 'xv-progress-indicator-v2-item',\n styleUrl: 'xv-progress-indicator-item.scss',\n shadow: true,\n})\nexport class XvProgressIndicatorItem {\n @Element() el: HTMLElement;\n @Prop({ reflect: false }) status: PROGRESS_ITEM_STATUS = PROGRESS_ITEM_STATUS.NO_STARTED;\n\n render() {\n return (\n <Host\n status={this.status}\n class={{'xv-progress-indicator-item': true}}\n >\n <span class=\"line\"/>\n <span class=\"icon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\">\n <path\n fill=\"currentColor\"\n d=\"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z\"\n />\n </svg>\n </span>\n <p class=\"label\"><slot/></p>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--progress-indicator-icon-size: 22px;
|
|
3
|
+
--progress-indicator-font-size: var(--fz-md, 14px);
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: flex-start;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
font-family: var(--ff-body, inherit);
|
|
8
|
+
overflow-x: auto;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:host([variant=horizontal]) ::slotted(xv-progress-indicator-v2-item) {
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
column-gap: var(--gap-xs, 8px);
|
|
14
|
+
justify-content: flex-start;
|
|
15
|
+
padding-left: 0;
|
|
16
|
+
white-space: nowrap;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
text-overflow: ellipsis;
|
|
19
|
+
text-align: left;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:host([size=xs]) {
|
|
23
|
+
--progress-indicator-icon-size: 14px;
|
|
24
|
+
--progress-indicator-font-size: var(--fz-md, 14px);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host([size=sm]) {
|
|
28
|
+
--progress-indicator-icon-size: 16px;
|
|
29
|
+
--progress-indicator-font-size: var(--fz-md, 14px);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host([size=md]) {
|
|
33
|
+
--progress-indicator-icon-size: 22px;
|
|
34
|
+
--progress-indicator-font-size: var(--fz-md, 14px);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:host([size=lg]) {
|
|
38
|
+
--progress-indicator-icon-size: 24px;
|
|
39
|
+
--progress-indicator-font-size: var(--fz-lg, 18px);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host([size=xl]) {
|
|
43
|
+
--progress-indicator-icon-size: 32px;
|
|
44
|
+
--progress-indicator-font-size: var(--fz-xl, 20px);
|
|
45
|
+
}
|