@cupra/ui-kit 2.0.0-canary.236 → 2.0.0-canary.238
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/components/ds-chips/styles/common.styles.cjs +2 -13
- package/dist/cjs/components/ds-chips/styles/cupra-diagonal.styles.cjs +0 -1
- package/dist/cjs/components/ds-chips/styles/seat.styles.cjs +0 -1
- package/dist/cjs/components/ds-date-picker/ds-date-picker.cjs +3 -5
- package/dist/cjs/components/ds-date-picker/styles/common.styles.cjs +200 -0
- package/dist/cjs/components/ds-list-item/ds-list-item.cjs +2 -2
- package/dist/cjs/components/ds-list-item/styles/common.styles.cjs +117 -0
- package/dist/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
- package/dist/cjs/decorators/customUiKitElement.cjs +1 -1
- package/dist/cjs/utils/IconsManager.cjs +1 -1
- package/dist/cjs/utils/PubSub.cjs +1 -1
- package/dist/cjs/utils/version.cjs +1 -1
- package/dist/esm/components/ds-chips/styles/common.styles.js +2 -13
- package/dist/esm/components/ds-chips/styles/cupra-diagonal.styles.js +0 -1
- package/dist/esm/components/ds-chips/styles/seat.styles.js +0 -1
- package/dist/esm/components/ds-date-picker/ds-date-picker.js +13 -21
- package/dist/esm/components/ds-date-picker/styles/common.styles.js +200 -0
- package/dist/esm/components/ds-list-item/ds-list-item.js +7 -13
- package/dist/esm/components/ds-list-item/styles/common.styles.js +117 -0
- package/dist/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist/esm/decorators/customUiKitElement.js +1 -1
- package/dist/esm/utils/IconsManager.js +1 -1
- package/dist/esm/utils/PubSub.js +1 -1
- package/dist/esm/utils/version.js +1 -1
- package/dist-react/cjs/components/ds-chips/styles/common.styles.cjs +2 -13
- package/dist-react/cjs/components/ds-chips/styles/cupra-diagonal.styles.cjs +0 -1
- package/dist-react/cjs/components/ds-chips/styles/seat.styles.cjs +0 -1
- package/dist-react/cjs/components/ds-date-picker/ds-date-picker.cjs +3 -5
- package/dist-react/cjs/components/ds-date-picker/styles/common.styles.cjs +200 -0
- package/dist-react/cjs/components/ds-list-item/ds-list-item.cjs +2 -2
- package/dist-react/cjs/components/ds-list-item/styles/common.styles.cjs +117 -0
- package/dist-react/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
- package/dist-react/cjs/decorators/customUiKitElement.cjs +1 -1
- package/dist-react/cjs/utils/IconsManager.cjs +1 -1
- package/dist-react/cjs/utils/PubSub.cjs +1 -1
- package/dist-react/cjs/utils/version.cjs +1 -1
- package/dist-react/esm/components/ds-chips/styles/common.styles.js +2 -13
- package/dist-react/esm/components/ds-chips/styles/cupra-diagonal.styles.js +0 -1
- package/dist-react/esm/components/ds-chips/styles/seat.styles.js +0 -1
- package/dist-react/esm/components/ds-date-picker/ds-date-picker.js +13 -21
- package/dist-react/esm/components/ds-date-picker/styles/common.styles.js +200 -0
- package/dist-react/esm/components/ds-list-item/ds-list-item.js +7 -13
- package/dist-react/esm/components/ds-list-item/styles/common.styles.js +117 -0
- package/dist-react/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist-react/esm/decorators/customUiKitElement.js +1 -1
- package/dist-react/esm/utils/IconsManager.js +1 -1
- package/dist-react/esm/utils/PubSub.js +1 -1
- package/dist-react/esm/utils/version.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/components/ds-date-picker/styles/cupra-diagonal.styles.cjs +0 -202
- package/dist/cjs/components/ds-date-picker/styles/seat.styles.cjs +0 -201
- package/dist/cjs/components/ds-list-item/styles/cupra-diagonal.styles.cjs +0 -118
- package/dist/cjs/components/ds-list-item/styles/seat.styles.cjs +0 -118
- package/dist/esm/components/ds-date-picker/styles/cupra-diagonal.styles.js +0 -207
- package/dist/esm/components/ds-date-picker/styles/seat.styles.js +0 -206
- package/dist/esm/components/ds-list-item/styles/cupra-diagonal.styles.js +0 -123
- package/dist/esm/components/ds-list-item/styles/seat.styles.js +0 -123
- package/dist/types/components/ds-date-picker/styles/cupra-diagonal.styles.d.ts +0 -1
- package/dist/types/components/ds-date-picker/styles/seat.styles.d.ts +0 -1
- package/dist/types/components/ds-list-item/styles/cupra-diagonal.styles.d.ts +0 -1
- package/dist/types/components/ds-list-item/styles/seat.styles.d.ts +0 -1
- package/dist-react/cjs/components/ds-date-picker/styles/cupra-diagonal.styles.cjs +0 -202
- package/dist-react/cjs/components/ds-date-picker/styles/seat.styles.cjs +0 -201
- package/dist-react/cjs/components/ds-list-item/styles/cupra-diagonal.styles.cjs +0 -118
- package/dist-react/cjs/components/ds-list-item/styles/seat.styles.cjs +0 -118
- package/dist-react/esm/components/ds-date-picker/styles/cupra-diagonal.styles.js +0 -207
- package/dist-react/esm/components/ds-date-picker/styles/seat.styles.js +0 -206
- package/dist-react/esm/components/ds-list-item/styles/cupra-diagonal.styles.js +0 -123
- package/dist-react/esm/components/ds-list-item/styles/seat.styles.js +0 -123
- package/dist-react/types/components/ds-date-picker/styles/cupra-diagonal.styles.d.ts +0 -1
- package/dist-react/types/components/ds-date-picker/styles/seat.styles.d.ts +0 -1
- package/dist-react/types/components/ds-list-item/styles/cupra-diagonal.styles.d.ts +0 -1
- package/dist-react/types/components/ds-list-item/styles/seat.styles.d.ts +0 -1
|
@@ -2,4 +2,204 @@ const e=require("../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_mo
|
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
}
|
|
5
|
+
|
|
6
|
+
:host:has(.disabled),
|
|
7
|
+
:host:has(.readonly) {
|
|
8
|
+
pointer-events: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:host .container {
|
|
12
|
+
position: relative;
|
|
13
|
+
border-radius: var(--ds-border-radius-xxs, 4px);
|
|
14
|
+
display: flex;
|
|
15
|
+
width: 100%;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
align-items: flex-start;
|
|
18
|
+
gap: var(--ds-spacing-s-3);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host .container.focus-visible {
|
|
22
|
+
outline: 0.125rem solid var(--ds-color-border-focus-ring, #6b8494);
|
|
23
|
+
outline-offset: 0.125rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:host ::slotted(label) {
|
|
27
|
+
color: var(--ds-field-text-color-label-default, #c3c3cb);
|
|
28
|
+
font-family: var(--ds-typography-family-primary);
|
|
29
|
+
font-style: normal;
|
|
30
|
+
font-weight: 350;
|
|
31
|
+
letter-spacing: var(--ds-typography-letter-spacing-m);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host .large ::slotted(label) {
|
|
35
|
+
font-size: var(--ds-typography-size-body-m);
|
|
36
|
+
line-height: var(--ds-typography-height-body-m);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host .medium ::slotted(label) {
|
|
40
|
+
font-size: var(--ds-typography-size-body-s);
|
|
41
|
+
line-height: var(--ds-typography-height-body-s);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host .disabled ::slotted(label) {
|
|
45
|
+
color: var(--ds-field-text-color-label-disabled, #5a5c67);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:host .readonly ::slotted(label) {
|
|
49
|
+
color: var(--ds-field-text-color-label-default, #c3c3cb);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host ::slotted(input) {
|
|
53
|
+
width: 100%;
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
flex: 1 0 0;
|
|
56
|
+
color: var(--ds-field-text-color-placeholder-disabled, #5a5c67);
|
|
57
|
+
font-family: var(--ds-typography-family-primary);
|
|
58
|
+
font-style: normal;
|
|
59
|
+
font-weight: 400;
|
|
60
|
+
letter-spacing: var(--ds-typography-letter-spacing-m);
|
|
61
|
+
border: none;
|
|
62
|
+
outline: none;
|
|
63
|
+
background: transparent;
|
|
64
|
+
cursor: text;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:host .focus:not(.filled) ::slotted(input) {
|
|
68
|
+
color: var(--ds-field-text-color-placeholder-disabled, #5a5c67);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:host .filled ::slotted(input) {
|
|
72
|
+
color: var(--ds-field-text-color-input-default, #fafafa);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:host ::slotted(input:disabled) {
|
|
76
|
+
color: var(--ds-field-text-color-placeholder-disabled, #5a5c67);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:host .readonly ::slotted(input) {
|
|
80
|
+
color: var(--ds-field-text-color-placeholder-default, #c3c3cb);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:host .large ::slotted(input) {
|
|
84
|
+
font-size: var(--ds-typography-size-body-l);
|
|
85
|
+
line-height: var(--ds-typography-height-body-l);
|
|
86
|
+
height: var(--ds-sizing-48, 48px);
|
|
87
|
+
padding: var(--ds-spacing-m-1) 0;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:host .medium ::slotted(input) {
|
|
91
|
+
font-size: var(--ds-typography-size-body-m);
|
|
92
|
+
line-height: var(--ds-typography-height-body-m);
|
|
93
|
+
height: var(--ds-sizing-40, 40px);
|
|
94
|
+
padding: var(--ds-spacing-s-5) 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:host .input-container {
|
|
98
|
+
box-sizing: border-box;
|
|
99
|
+
display: flex;
|
|
100
|
+
justify-content: space-between;
|
|
101
|
+
align-items: flex-end;
|
|
102
|
+
width: 100%;
|
|
103
|
+
padding: var(--ds-spacing-s-5) var(--ds-spacing-s-5) 0 var(--ds-spacing-m-1);
|
|
104
|
+
background: var(--ds-field-bg-color-default, rgba(195, 195, 203, 0.05));
|
|
105
|
+
border-radius: var(--ds-border-radius-xxs) var(--ds-border-radius-xxs) var(--ds-border-radius-none)
|
|
106
|
+
var(--ds-border-radius-none);
|
|
107
|
+
border-bottom: var(--ds-border-width-m, 1px) solid var(--ds-field-border-color-default, #aeaeb7);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
:host .medium .input-container {
|
|
111
|
+
padding-left: var(--ds-spacing-s-5);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:host .input-container > div {
|
|
115
|
+
flex: 1 1 auto;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:host .input-container:hover,
|
|
119
|
+
:host .focus-visible .input-container {
|
|
120
|
+
background: var(--ds-field-bg-color-hover, rgba(195, 195, 203, 0.1));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:host .focus:not(.focus-visible) .input-container {
|
|
124
|
+
background: var(--ds-field-bg-color-default, rgba(195, 195, 203, 0.05));
|
|
125
|
+
border-bottom: var(--ds-border-width-m, 1px) solid var(--ds-field-border-color-selected, #b2764d);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:host .filled .input-container {
|
|
129
|
+
border-bottom: var(--ds-border-width-m, 1px) solid var(--ds-field-border-color-filled, #fafafa);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:host .container.error .input-container,
|
|
133
|
+
:host .container.invalid .input-container {
|
|
134
|
+
border-bottom: var(--ds-border-width-m, 1px) solid var(--ds-field-border-color-error, #ff403d);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:host .disabled .input-container,
|
|
138
|
+
:host .disabled.error .input-container,
|
|
139
|
+
:host .disabled.invalid .input-container {
|
|
140
|
+
background: var(--ds-field-bg-color-default, rgba(195, 195, 203, 0.05));
|
|
141
|
+
border-bottom: var(--ds-border-width-m, 1px) solid var(--ds-field-border-color-disabled, #5a5c67);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
:host .readonly .input-container {
|
|
145
|
+
background: var(--ds-field-bg-color-default, rgba(195, 195, 203, 0.05));
|
|
146
|
+
border-bottom: var(--ds-border-width-m, 1px) solid var(--ds-field-border-color-default, #aeaeb7);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
:host .footer {
|
|
150
|
+
box-sizing: border-box;
|
|
151
|
+
display: flex;
|
|
152
|
+
align-items: flex-start;
|
|
153
|
+
align-self: stretch;
|
|
154
|
+
gap: var(--ds-spacing-s-5, 8px);
|
|
155
|
+
overflow: hidden;
|
|
156
|
+
color: var(--ds-field-text-color-caption-default, #c3c3cb);
|
|
157
|
+
text-overflow: ellipsis;
|
|
158
|
+
font-family: var(--ds-typography-family-primary);
|
|
159
|
+
font-style: normal;
|
|
160
|
+
font-weight: 350;
|
|
161
|
+
letter-spacing: var(--ds-typography-letter-spacing-m);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:host .large .footer {
|
|
165
|
+
font-size: var(--ds-typography-size-body-m);
|
|
166
|
+
line-height: var(--ds-typography-height-body-m);
|
|
167
|
+
padding: var(--ds-spacing-s-1, 0) var(--ds-spacing-s-5, 8px) var(--ds-spacing-s-1, 0)
|
|
168
|
+
var(--ds-spacing-m-1, 12px);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
:host .medium .footer {
|
|
172
|
+
font-size: var(--ds-typography-size-body-s);
|
|
173
|
+
line-height: var(--ds-typography-height-body-s);
|
|
174
|
+
padding: var(--ds-spacing-s-1, 0) var(--ds-spacing-s-5, 8px);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:host .support-text {
|
|
178
|
+
flex: 1 1 auto;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
:host .helper-text,
|
|
182
|
+
:host .readonly-text {
|
|
183
|
+
color: var(--ds-field-text-color-caption-default, #c3c3cb);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
:host .error-text {
|
|
187
|
+
color: var(--ds-field-text-color-caption-error, #ff403d);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
:host .disabled .support-text {
|
|
191
|
+
color: var(--ds-field-text-color-caption-disabled, #5a5c67);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
:host .readonly .support-text {
|
|
195
|
+
color: var(--ds-field-text-color-caption-default, #c3c3cb);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
:host .calendar-dropdown {
|
|
199
|
+
position: absolute;
|
|
200
|
+
top: 100%;
|
|
201
|
+
left: 0;
|
|
202
|
+
z-index: 10;
|
|
203
|
+
margin-top: var(--ds-spacing-s-3, 4px);
|
|
204
|
+
}
|
|
5
205
|
`;exports.commonStyles=t;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/lit-html.cjs");require("../../node_modules/.pnpm/lit@3.3.3/node_modules/lit/index.cjs");const t=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.cjs");require("../../node_modules/.pnpm/lit@3.3.3/node_modules/lit/decorators.cjs");const n=require("../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.cjs"),r=require("../base/UiKitElement.cjs"),i=require("../../decorators/customUiKitElement.cjs"),a=require("../../utils/uiKitHtml.cjs"),o=require("../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/class-map.cjs");require("../../node_modules/.pnpm/lit@3.3.3/node_modules/lit/directives/class-map.cjs");const s=require("./styles/common.styles.cjs")
|
|
1
|
+
const e=require("../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/lit-html.cjs");require("../../node_modules/.pnpm/lit@3.3.3/node_modules/lit/index.cjs");const t=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.cjs");require("../../node_modules/.pnpm/lit@3.3.3/node_modules/lit/decorators.cjs");const n=require("../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.cjs"),r=require("../base/UiKitElement.cjs"),i=require("../../decorators/customUiKitElement.cjs"),a=require("../../utils/uiKitHtml.cjs"),o=require("../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/class-map.cjs");require("../../node_modules/.pnpm/lit@3.3.3/node_modules/lit/directives/class-map.cjs");const s=require("./styles/common.styles.cjs");var c=class extends r.UiKitElement{constructor(...e){super(...e),this.variant=`selection`,this.selected=!1,this.disabled=!1,this.size=`large`}get classes(){return{content:!0,[this.size]:!0,[`${this.variant}-variant`]:!0,selected:this.selected,disabled:this.disabled}}connectedCallback(){var e;if((e=super.connectedCallback)==null||e.call(this),!this.hasAttribute(`size`)){let e=this.closest(`ds-list`);e&&(this.size=e.size)}}renderSelectionTemplate(){return e.html`
|
|
2
2
|
<slot name="input-left"></slot>
|
|
3
3
|
<slot name="icon"></slot>
|
|
4
4
|
<div class="container-text">
|
|
@@ -33,4 +33,4 @@ const e=require("../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/l
|
|
|
33
33
|
</li>
|
|
34
34
|
|
|
35
35
|
${t?a.uiKitHtml`<ds-divider orientation="horizontal" variant="primary" role="presentation"></ds-divider>`:e.nothing}
|
|
36
|
-
`}},
|
|
36
|
+
`}},l=(c.styles=[s.commonStyles],c);n.default([t.property({type:String,reflect:!0})],l.prototype,`variant`,void 0),n.default([t.property({type:Boolean,reflect:!0})],l.prototype,`selected`,void 0),n.default([t.property({type:Boolean,reflect:!0})],l.prototype,`disabled`,void 0),n.default([t.property({type:String,reflect:!0})],l.prototype,`size`,void 0),l=n.default([i.customUiKitElement(`ds-list-item`)],l),Object.defineProperty(exports,"DsListItem",{enumerable:!0,get:function(){return l}});
|
|
@@ -3,4 +3,121 @@ const e=require("../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_mo
|
|
|
3
3
|
display: block;
|
|
4
4
|
width: fit-content;
|
|
5
5
|
}
|
|
6
|
+
|
|
7
|
+
:host .content {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
padding: var(--ds-sizing-08) 0;
|
|
11
|
+
font-family: var(--ds-typography-family-primary);
|
|
12
|
+
font-weight: 400;
|
|
13
|
+
gap: var(--ds-sizing-08);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:host .container {
|
|
17
|
+
display: flex;
|
|
18
|
+
gap: var(--ds-sizing-08);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host .container-text {
|
|
22
|
+
padding-right: var(--ds-sizing-24);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:host .content.info-variant,
|
|
26
|
+
:host .content.action-variant {
|
|
27
|
+
padding: var(--ds-sizing-08);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host ::slotted([slot='input-left']),
|
|
31
|
+
:host ::slotted([slot='input-right']) {
|
|
32
|
+
width: unset;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:host ::slotted([slot='primary-text']) {
|
|
36
|
+
color: var(--ds-color-text-default-subtlest);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host ::slotted([slot='primary-subtext']),
|
|
40
|
+
:host ::slotted([slot='secondary-text']),
|
|
41
|
+
:host ::slotted([slot='description-text']) {
|
|
42
|
+
color: var(--ds-color-text-default-subtle);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:host ::slotted([slot='description-text']) {
|
|
46
|
+
padding-top: var(--ds-sizing-08);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host([size='large']) ::slotted([slot='image-square']) {
|
|
50
|
+
width: var(--ds-sizing-48);
|
|
51
|
+
height: var(--ds-sizing-48);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([size='medium']) ::slotted([slot='image-square']) {
|
|
55
|
+
width: var(--ds-sizing-32);
|
|
56
|
+
height: var(--ds-sizing-32);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host ::slotted([slot='image-wide']) {
|
|
60
|
+
-o-object-fit: cover;
|
|
61
|
+
object-fit: cover;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host([size='large']) ::slotted([slot='image-wide']) {
|
|
65
|
+
width: var(--ds-sizing-96);
|
|
66
|
+
height: var(--ds-sizing-48);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:host([size='medium']) ::slotted([slot='image-wide']) {
|
|
70
|
+
width: var(--ds-sizing-64);
|
|
71
|
+
height: var(--ds-sizing-32);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:host([size='medium']) ::slotted([slot='primary-text']),
|
|
75
|
+
:host([size='medium']) ::slotted([slot='secondary-text']),
|
|
76
|
+
:host([size='medium']) ::slotted([slot='description-text']),
|
|
77
|
+
:host([size='medium']) ::slotted([slot='primary-subtext']),
|
|
78
|
+
:host([size='medium']) ::slotted([slot='aside']) {
|
|
79
|
+
font-size: var(--ds-typography-size-body-m);
|
|
80
|
+
line-height: var(--ds-typography-height-body-xs);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:host([size='large']) ::slotted([slot='primary-text']),
|
|
84
|
+
:host([size='large']) ::slotted([slot='secondary-text']),
|
|
85
|
+
:host([size='large']) ::slotted([slot='description-text']),
|
|
86
|
+
:host([size='large']) ::slotted([slot='primary-subtext']),
|
|
87
|
+
:host([size='large']) ::slotted([slot='aside']) {
|
|
88
|
+
font-size: var(--ds-typography-size-body-l);
|
|
89
|
+
line-height: var(--ds-typography-height-body-s);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:host([size='small']) ::slotted([slot='primary-text']),
|
|
93
|
+
:host([size='small']) ::slotted([slot='secondary-text']),
|
|
94
|
+
:host([size='small']) ::slotted([slot='description-text']),
|
|
95
|
+
:host([size='small']) ::slotted([slot='primary-subtext']),
|
|
96
|
+
:host([size='small']) ::slotted([slot='aside']) {
|
|
97
|
+
font-size: var(--ds-typography-size-body-s);
|
|
98
|
+
line-height: var(--ds-typography-height-body-xs);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:host .content:hover {
|
|
102
|
+
background: var(--ds-color-control-bg-hover);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
:host .content:active {
|
|
106
|
+
background: var(--ds-color-control-bg-pressed);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:host .content:focus-visible {
|
|
110
|
+
outline: var(--ds-border-width-l) solid var(--ds-color-border-focus-ring);
|
|
111
|
+
background-color: var(--ds-color-control-bg-hover);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:host .selected {
|
|
115
|
+
background: var(--ds-color-control-bg-default);
|
|
116
|
+
border-left: var(--ds-sizing-04) solid var(--ds-color-border-selected);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
:host .disabled {
|
|
120
|
+
opacity: 0.25;
|
|
121
|
+
pointer-events: none;
|
|
122
|
+
}
|
|
6
123
|
`;exports.commonStyles=t;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
const e=require("../../node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/provide.cjs"),t=require("./themeContext.cjs");require("../../core/theme.constants.cjs");const n=require("../../utils/PubSub.cjs"),r=require("../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/lit-html.cjs"),i=require("../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.cjs");require("../../node_modules/.pnpm/lit@3.3.3/node_modules/lit/index.cjs");const a=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.cjs"),o=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.cjs");require("../../node_modules/.pnpm/lit@3.3.3/node_modules/lit/decorators.cjs");const s=require("../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.cjs"),c=require("../../decorators/customUiKitElement.cjs"),l=require("../../utils/booleanConverter.cjs"),u=require("../../styles/source/shared/fonts-config.cjs");var d=class extends i.LitElement{constructor(...e){super(...e),this.loadFonts=!0,this.loadStyles=!0,this.loadUnusedStyles=!0,this.cssLoaded=!1,this.loadedFonts=new Set}updated(e){if(super.updated(e),e.has(`theme`)){var t,r;n.pubSub.publish(`theme`,this.theme),(t=sessionStorage)==null||t.setItem(`@cupra/ui-kit/theme`,this.theme),typeof FontFace<`u`&&(r=document)!=null&&r.fonts&&this.loadThemeFonts(),this.loadThemeStyles().then(()=>{this.cssLoaded=!0,this.dispatchEvent(new CustomEvent(`ui-kit:ready`,{bubbles:!0,composed:!0}))})}}loadThemeFonts(){var e;(e=u.fontsConfig[this.theme])==null||e.fonts.forEach(e=>{this.loadThemeFont(e)})}async loadThemeFont({weight:e,name:t,file:n}){if(!this.loadFonts)return Promise.resolve();let r=`${t}-${e}`;if(this.loadedFonts.has(r))return;let i=new FontFace(t,`url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.woff2') format('woff2'),
|
|
2
2
|
url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.woff') format('woff'),
|
|
3
3
|
url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.ttf') format('truetype'),
|
|
4
|
-
url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.otf') format('opentype')`,{style:`normal`,weight:e,display:`optional`});try{await i.load(),document.fonts.add(i),this.loadedFonts.add(r)}catch(n){console.error(`Error loading "${t}" font with "${e}" weight:`,n)}}loadThemeStyles(){let e=`/2.0.0-canary.
|
|
4
|
+
url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.otf') format('opentype')`,{style:`normal`,weight:e,display:`optional`});try{await i.load(),document.fonts.add(i),this.loadedFonts.add(r)}catch(n){console.error(`Error loading "${t}" font with "${e}" weight:`,n)}}loadThemeStyles(){let e=`/2.0.0-canary.238`;return this.loadUnusedStyles&&this.applyUnusedStyles(e),this.loadStyles?new Promise((t,n)=>{let r=`https://ds-assets.cupra.com${e}/styles/${this.theme}/theme.css`;if(document.head.querySelector(`link[href="${r}"]`))t();else{let i=`ui-kit-theme-${e}`,a=document.getElementById(i),o=document.createElement(`link`);o.id=i,o.rel=`stylesheet`,o.href=r,o.onload=()=>t(),o.onerror=()=>n(Error(`Failed to load theme CSS: ${r}`)),document.head.appendChild(o),a==null||a.remove()}}):Promise.resolve()}applyUnusedStyles(e){let t=`https://ds-assets.cupra.com${e}/styles/${this.theme}/unused-styles.css`;if(document.head.querySelector(`link[href="${t}"]`))return;let n=`ui-kit-unused-styles-${e}`,r=document.getElementById(n),i=document.createElement(`link`);i.id=n,i.rel=`preload`,i.as=`style`,i.href=t,i.onload=()=>{i.rel=`stylesheet`},document.head.appendChild(i),r==null||r.remove()}render(){return this.cssLoaded?r.html`<slot></slot>`:r.nothing}};s.default([a.property({type:Boolean,converter:l.booleanConverter,attribute:`load-fonts`})],d.prototype,`loadFonts`,void 0),s.default([a.property({type:Boolean,converter:l.booleanConverter,attribute:`load-styles`})],d.prototype,`loadStyles`,void 0),s.default([a.property({type:Boolean,converter:l.booleanConverter,attribute:`load-unused-styles`})],d.prototype,`loadUnusedStyles`,void 0),s.default([e.provide({context:t.themeContext}),a.property({type:String})],d.prototype,`theme`,void 0),s.default([o.state()],d.prototype,`cssLoaded`,void 0),s.default([o.state()],d.prototype,`loadedFonts`,void 0),d=s.default([c.customUiKitElement(`ds-theme-provider`)],d),Object.defineProperty(exports,"DsThemeProvider",{enumerable:!0,get:function(){return d}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../utils/version.cjs");function t(t){return function(n){var r,i,a;if(!(n!=null&&n.prototype))throw TypeError(`@customUiKitElement requires a class that extends HTMLElement.`);let o=`${t}${e.VERSION_TAG_SUFFIX}`;(r=globalThis)!=null&&(r=r.customElements)!=null&&r.get(o)||(i=globalThis)==null||(i=i.customElements)==null||(a=i.define)==null||a.call(i,o,class extends n{connectedCallback(){var e;(e=n.prototype.connectedCallback)==null||e.call(this),this.setAttribute(`data-ui-kit-version`,`2.0.0-canary.
|
|
1
|
+
const e=require("../utils/version.cjs");function t(t){return function(n){var r,i,a;if(!(n!=null&&n.prototype))throw TypeError(`@customUiKitElement requires a class that extends HTMLElement.`);let o=`${t}${e.VERSION_TAG_SUFFIX}`;(r=globalThis)!=null&&(r=r.customElements)!=null&&r.get(o)||(i=globalThis)==null||(i=i.customElements)==null||(a=i.define)==null||a.call(i,o,class extends n{connectedCallback(){var e;(e=n.prototype.connectedCallback)==null||e.call(this),this.setAttribute(`data-ui-kit-version`,`2.0.0-canary.238`),this.setAttribute(`data-ui-kit-component-name`,t)}})}}exports.customUiKitElement=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../core/theme.constants.cjs"),t=require("./PubSub.cjs");var n=class{constructor(){this.icons={},this.handleChangeTheme=e=>{if(this.theme===e)return;this.theme=e;let t=Object.keys(this.icons);this.icons={},t.forEach(e=>this.fetchIcon(e))},this.fetchIcon=async(t,n={})=>{var r;let i=typeof sessionStorage<`u`?(r=sessionStorage)==null?void 0:r.getItem(e.THEME_STORAGE_KEY):null;!this.theme&&i&&(this.theme=i);let a=this.icons[t];if(a)return await a;let o=this.loadIcon(t,n).catch(e=>{throw delete this.icons[t],e});return this.icons[t]=o,o},this.loadIcon=(e,{cache:t=`force-cache`,...n})=>!this.theme||typeof fetch>`u`?Promise.resolve(`<svg class="ds-icon"></svg>`):fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${e}.svg`,{cache:t,...n}).then(e=>e.text()).catch(t=>{if((t==null?void 0:t.name)===`AbortError`)throw t;return console.error(`Failed to fetch icon "${e}":`,t),``}),t.pubSub.subscribe(`theme`,this.handleChangeTheme)}},r=Symbol.for(`@cupra/ui-kit/icons-manager/2.0.0-canary.
|
|
1
|
+
const e=require("../core/theme.constants.cjs"),t=require("./PubSub.cjs");var n=class{constructor(){this.icons={},this.handleChangeTheme=e=>{if(this.theme===e)return;this.theme=e;let t=Object.keys(this.icons);this.icons={},t.forEach(e=>this.fetchIcon(e))},this.fetchIcon=async(t,n={})=>{var r;let i=typeof sessionStorage<`u`?(r=sessionStorage)==null?void 0:r.getItem(e.THEME_STORAGE_KEY):null;!this.theme&&i&&(this.theme=i);let a=this.icons[t];if(a)return await a;let o=this.loadIcon(t,n).catch(e=>{throw delete this.icons[t],e});return this.icons[t]=o,o},this.loadIcon=(e,{cache:t=`force-cache`,...n})=>!this.theme||typeof fetch>`u`?Promise.resolve(`<svg class="ds-icon"></svg>`):fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${e}.svg`,{cache:t,...n}).then(e=>e.text()).catch(t=>{if((t==null?void 0:t.name)===`AbortError`)throw t;return console.error(`Failed to fetch icon "${e}":`,t),``}),t.pubSub.subscribe(`theme`,this.handleChangeTheme)}},r=Symbol.for(`@cupra/ui-kit/icons-manager/2.0.0-canary.238`),i=globalThis,a=i[r];a||(a=new n,Object.defineProperty(i,r,{value:a,writable:!1,configurable:!1,enumerable:!1}));var o=a;exports.iconsManager=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=class{constructor(){this.subscribers={},this.lastPublishedData={}}subscribe(e,t){return this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push(t),this.lastPublishedData[e]}unsubscribe(e,t){this.subscribers[e]&&(this.subscribers[e]=this.subscribers[e].filter(e=>e!==t))}publish(e,t){this.lastPublishedData[e]=t,this.subscribers[e]&&this.subscribers[e].forEach(n=>{try{n(t)}catch(t){console.error(`Error in subscriber for event "${e}":`,t)}})}},t=Symbol.for(`@cupra/ui-kit/pubsub/2.0.0-canary.
|
|
1
|
+
var e=class{constructor(){this.subscribers={},this.lastPublishedData={}}subscribe(e,t){return this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push(t),this.lastPublishedData[e]}unsubscribe(e,t){this.subscribers[e]&&(this.subscribers[e]=this.subscribers[e].filter(e=>e!==t))}publish(e,t){this.lastPublishedData[e]=t,this.subscribers[e]&&this.subscribers[e].forEach(n=>{try{n(t)}catch(t){console.error(`Error in subscriber for event "${e}":`,t)}})}},t=Symbol.for(`@cupra/ui-kit/pubsub/2.0.0-canary.238`),n=globalThis,r=n[t];r||(r=new e,Object.defineProperty(n,t,{value:r,writable:!1,configurable:!1,enumerable:!1}));var i=r;exports.PubSub=e,exports.pubSub=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`2.0.0-canary.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`2.0.0-canary.238`,t=`--v${e.replaceAll(`.`,`-`)}`;exports.VERSION=e,exports.VERSION_TAG_SUFFIX=t;
|
|
@@ -13,23 +13,12 @@ var t = e`
|
|
|
13
13
|
box-sizing: border-box;
|
|
14
14
|
display: inline-flex;
|
|
15
15
|
justify-content: flex-start;
|
|
16
|
-
overflow-
|
|
16
|
+
overflow-x: auto;
|
|
17
|
+
overflow-y: hidden;
|
|
17
18
|
scrollbar-width: none;
|
|
18
19
|
scroll-behavior: smooth;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
//.chips-container.scroll-left.scroll-right {
|
|
22
|
-
// mask-image: linear-gradient(
|
|
23
|
-
// to right,
|
|
24
|
-
// rgba(0, 0, 0, 0) 0px,
|
|
25
|
-
// rgba(0, 0, 0, 0) 32px,
|
|
26
|
-
// rgba(0, 0, 0, 1) 48px,
|
|
27
|
-
// rgba(0, 0, 0, 1) calc(100% - 48px),
|
|
28
|
-
// rgba(0, 0, 0, 0) calc(100% - 32px),
|
|
29
|
-
// rgba(0, 0, 0, 0) 100%
|
|
30
|
-
// );
|
|
31
|
-
//}
|
|
32
|
-
|
|
33
22
|
.chips-container::-webkit-scrollbar {
|
|
34
23
|
display: none;
|
|
35
24
|
}
|
|
@@ -14,10 +14,8 @@ import "../../node_modules/.pnpm/lit@3.3.3/node_modules/lit/directives/if-define
|
|
|
14
14
|
import "../ds-icon-button/ds-icon-button.js";
|
|
15
15
|
import { inputStatesMixin as u } from "../../mixins/inputStatesMixin.js";
|
|
16
16
|
import { commonStyles as d } from "./styles/common.styles.js";
|
|
17
|
-
import { cupraDiagonalStyles as f } from "./styles/cupra-diagonal.styles.js";
|
|
18
|
-
import { seatStyles as p } from "./styles/seat.styles.js";
|
|
19
17
|
//#region src/components/ds-date-picker/ds-date-picker.ts
|
|
20
|
-
var
|
|
18
|
+
var f = class extends u(a) {
|
|
21
19
|
constructor(...e) {
|
|
22
20
|
super(...e), this.size = "large", this.helperText = "", this.forcedError = "", this.invalidError = "", this.readonlyText = "", this.dataAriaLabelCalendarButton = "", this.isExpanded = !1, this.syncCalendarValue = () => {
|
|
23
21
|
let e = this.calendarElement;
|
|
@@ -42,11 +40,11 @@ var m = class extends u(a) {
|
|
|
42
40
|
this.syncCalendarValue(), e.addEventListener("input", this.syncCalendarValue);
|
|
43
41
|
}
|
|
44
42
|
connectedCallback() {
|
|
45
|
-
super.connectedCallback(), this.classList.add("ds-date-picker"), document.addEventListener("click", this.handleDocumentClick), this.addEventListener("ds-calendar-change", this.handleCalendarChange),
|
|
43
|
+
super.connectedCallback(), this.classList.add("ds-date-picker"), document.addEventListener("click", this.handleDocumentClick), this.addEventListener("ds-calendar-change", this.handleCalendarChange), p.injectNativeInputStyles();
|
|
46
44
|
}
|
|
47
45
|
static injectNativeInputStyles() {
|
|
48
|
-
if (
|
|
49
|
-
|
|
46
|
+
if (p.nativeStylesInjected) return;
|
|
47
|
+
p.nativeStylesInjected = !0;
|
|
50
48
|
let e = document.createElement("style");
|
|
51
49
|
e.textContent = [".ds-date-picker input[type=\"date\"]::-webkit-calendar-picker-indicator { display: none !important; }", ".ds-date-picker input[type=\"date\"]::-webkit-inner-spin-button { display: none !important; }"].join("\n"), document.head.appendChild(e);
|
|
52
50
|
}
|
|
@@ -77,9 +75,7 @@ var m = class extends u(a) {
|
|
|
77
75
|
</div>
|
|
78
76
|
${this.calendarDropdownTemplate}
|
|
79
77
|
<div class="footer">
|
|
80
|
-
${this.readonlyTextTemplate}
|
|
81
|
-
${this.helperTextTemplate}
|
|
82
|
-
${this.forcedErrorTemplate}
|
|
78
|
+
${this.readonlyTextTemplate} ${this.helperTextTemplate} ${this.forcedErrorTemplate}
|
|
83
79
|
${this.invalidErrorTemplate}
|
|
84
80
|
</div>
|
|
85
81
|
</div>
|
|
@@ -116,26 +112,22 @@ var m = class extends u(a) {
|
|
|
116
112
|
get invalidErrorTemplate() {
|
|
117
113
|
return this.inputStates.readonly || this.forcedError || !this.inputStates.invalid || !this.invalidError ? t : e`<span class="support-text error-text invalid-error">${this.invalidError}</span>`;
|
|
118
114
|
}
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
f,
|
|
122
|
-
p
|
|
123
|
-
], m.nativeStylesInjected = !1, m);
|
|
124
|
-
i([n({ type: String })], g.prototype, "size", void 0), i([n({
|
|
115
|
+
}, p = f, m = (f.styles = [d], f.nativeStylesInjected = !1, f);
|
|
116
|
+
i([n({ type: String })], m.prototype, "size", void 0), i([n({
|
|
125
117
|
type: String,
|
|
126
118
|
attribute: "helper-text"
|
|
127
|
-
})],
|
|
119
|
+
})], m.prototype, "helperText", void 0), i([n({
|
|
128
120
|
type: String,
|
|
129
121
|
attribute: "forced-error"
|
|
130
|
-
})],
|
|
122
|
+
})], m.prototype, "forcedError", void 0), i([n({
|
|
131
123
|
type: String,
|
|
132
124
|
attribute: "invalid-error"
|
|
133
|
-
})],
|
|
125
|
+
})], m.prototype, "invalidError", void 0), i([n({
|
|
134
126
|
type: String,
|
|
135
127
|
attribute: "readonly-text"
|
|
136
|
-
})],
|
|
128
|
+
})], m.prototype, "readonlyText", void 0), i([n({
|
|
137
129
|
type: String,
|
|
138
130
|
attribute: "data-aria-label-calendar-button"
|
|
139
|
-
})],
|
|
131
|
+
})], m.prototype, "dataAriaLabelCalendarButton", void 0), i([r()], m.prototype, "isExpanded", void 0), m = p = i([o("ds-date-picker")], m);
|
|
140
132
|
//#endregion
|
|
141
|
-
export {
|
|
133
|
+
export { m as DsDatePicker };
|