@limetech/lime-elements 34.1.0-next.25 → 34.1.0-next.29

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.
@@ -6,7 +6,7 @@
6
6
  */
7
7
  .color-palette {
8
8
  display: grid;
9
- grid-gap: 0.25rem;
9
+ gap: 0.25rem;
10
10
  grid-auto-flow: column;
11
11
  margin: 0.75rem auto 1.25rem auto;
12
12
  padding: 1.25rem 0.75rem;
@@ -23,7 +23,7 @@ slot {
23
23
  display: grid;
24
24
  grid-template-areas: var(--lime-grid-area, "");
25
25
  grid-template-columns: repeat(var(--lime-grid-columns, 4), minmax(0, 1fr));
26
- grid-gap: var(--lime-grid-gutter, 1rem);
26
+ gap: var(--lime-grid-gutter, 1rem);
27
27
  grid-auto-flow: row dense;
28
28
  grid-auto-rows: var(--lime-grid-cell-height, 2.5rem);
29
29
  margin: 0;
@@ -55,6 +55,7 @@ export class ListRenderer {
55
55
  'mdc-deprecated-list-item': true,
56
56
  'mdc-deprecated-list-item--disabled': item.disabled,
57
57
  'mdc-deprecated-list-item--selected': item.selected,
58
+ 'has-primary-component': this.hasPrimaryComponent(item),
58
59
  };
59
60
  const attributes = {};
60
61
  if (index === this.applyTabIndexToItemAtIndex) {
@@ -62,10 +63,15 @@ export class ListRenderer {
62
63
  }
63
64
  return (h("li", Object.assign({ class: classNames, "aria-disabled": item.disabled ? 'true' : 'false', "aria-selected": item.selected ? 'true' : 'false', "data-index": index }, attributes),
64
65
  item.icon ? this.renderIcon(this.config, item) : null,
66
+ this.getPrimaryComponent(item),
65
67
  this.renderText(item),
66
68
  this.twoLines && this.avatarList ? this.renderDivider() : null,
67
69
  this.renderActionMenu(item.actions)));
68
70
  };
71
+ this.hasPrimaryComponent = (item) => {
72
+ var _a;
73
+ return !!((_a = item === null || item === void 0 ? void 0 : item.primaryComponent) === null || _a === void 0 ? void 0 : _a.name);
74
+ };
69
75
  /**
70
76
  * Render the text of the list item
71
77
  *
@@ -135,6 +141,7 @@ export class ListRenderer {
135
141
  'mdc-deprecated-list-item': true,
136
142
  'mdc-deprecated-list-item--disabled': item.disabled,
137
143
  'mdc-deprecated-list-item__text': !item.secondaryText,
144
+ 'has-primary-component': this.hasPrimaryComponent(item),
138
145
  };
139
146
  const attributes = {};
140
147
  if (index === this.applyTabIndexToItemAtIndex) {
@@ -146,12 +153,14 @@ export class ListRenderer {
146
153
  if (this.hasIcons) {
147
154
  return [
148
155
  item.icon ? this.renderIcon(config, item) : null,
156
+ this.getPrimaryComponent(item),
149
157
  this.renderText(item),
150
158
  h("div", { class: "mdc-deprecated-list-item__meta" }, itemTemplate),
151
159
  ];
152
160
  }
153
161
  return [
154
162
  h("div", { class: "mdc-deprecated-list-item__graphic" }, itemTemplate),
163
+ this.getPrimaryComponent(item),
155
164
  this.renderText(item),
156
165
  ];
157
166
  };
@@ -191,4 +200,12 @@ export class ListRenderer {
191
200
  };
192
201
  return (h("ul", { class: classNames, role: role, "aria-orientation": "vertical" }, items.map(this.renderListItem)));
193
202
  }
203
+ getPrimaryComponent(item) {
204
+ if (!this.hasPrimaryComponent(item)) {
205
+ return;
206
+ }
207
+ const PrimaryComponent = item.primaryComponent.name;
208
+ const props = item.primaryComponent.props;
209
+ return h(PrimaryComponent, Object.assign({}, props));
210
+ }
194
211
  }
@@ -3085,6 +3085,9 @@ a.mdc-list-item {
3085
3085
  line-height: 100%;
3086
3086
  margin-right: -0.5rem;
3087
3087
  }
3088
+ .mdc-deprecated-list .mdc-deprecated-list-item__graphic {
3089
+ margin-right: 0.5rem;
3090
+ }
3088
3091
  .mdc-deprecated-list.mdc-deprecated-list--avatar-list {
3089
3092
  position: relative;
3090
3093
  }
@@ -3121,7 +3124,8 @@ a.mdc-list-item {
3121
3124
  display: none;
3122
3125
  }
3123
3126
  .mdc-deprecated-list.mdc-deprecated-list--two-line .mdc-deprecated-list-item__text {
3124
- padding: 0.5rem 0;
3127
+ padding-top: 0.5rem;
3128
+ padding-bottom: 0.5rem;
3125
3129
  }
3126
3130
  .mdc-deprecated-list.mdc-deprecated-list--two-line .mdc-deprecated-list-item__primary-text {
3127
3131
  margin-bottom: 0.25rem;
@@ -3146,6 +3150,9 @@ a.mdc-list-item {
3146
3150
  align-self: center;
3147
3151
  width: 100%;
3148
3152
  }
3153
+ .mdc-deprecated-list .has-primary-component .mdc-deprecated-list-item__text {
3154
+ margin-left: 0.5rem;
3155
+ }
3149
3156
  .mdc-deprecated-list .mdc-deprecated-list-item__primary-command-text {
3150
3157
  display: flex;
3151
3158
  flex-direction: row;
@@ -4064,6 +4071,322 @@ a.mdc-list-item {
4064
4071
  opacity: 0;
4065
4072
  }
4066
4073
  }
4074
+ .mdc-radio {
4075
+ padding: 10px;
4076
+ display: inline-block;
4077
+ position: relative;
4078
+ flex: 0 0 auto;
4079
+ box-sizing: content-box;
4080
+ width: 20px;
4081
+ height: 20px;
4082
+ cursor: pointer;
4083
+ /* @alternate */
4084
+ will-change: opacity, transform, border-color, color;
4085
+ }
4086
+
4087
+ .mdc-radio .mdc-radio__native-control:enabled:not(:checked) + .mdc-radio__background .mdc-radio__outer-circle {
4088
+ border-color: rgba(0, 0, 0, 0.54);
4089
+ }
4090
+
4091
+ .mdc-radio .mdc-radio__native-control:enabled:checked + .mdc-radio__background .mdc-radio__outer-circle {
4092
+ border-color: #575756;
4093
+ /* @alternate */
4094
+ border-color: var(--mdc-theme-secondary, #575756);
4095
+ }
4096
+
4097
+ .mdc-radio .mdc-radio__native-control:enabled + .mdc-radio__background .mdc-radio__inner-circle {
4098
+ border-color: #575756;
4099
+ /* @alternate */
4100
+ border-color: var(--mdc-theme-secondary, #575756);
4101
+ }
4102
+
4103
+ .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked) + .mdc-radio__background .mdc-radio__outer-circle,
4104
+ .mdc-radio .mdc-radio__native-control:disabled:not(:checked) + .mdc-radio__background .mdc-radio__outer-circle {
4105
+ border-color: rgba(0, 0, 0, 0.38);
4106
+ }
4107
+
4108
+ .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked + .mdc-radio__background .mdc-radio__outer-circle,
4109
+ .mdc-radio .mdc-radio__native-control:disabled:checked + .mdc-radio__background .mdc-radio__outer-circle {
4110
+ border-color: rgba(0, 0, 0, 0.38);
4111
+ }
4112
+
4113
+ .mdc-radio [aria-disabled=true] .mdc-radio__native-control + .mdc-radio__background .mdc-radio__inner-circle,
4114
+ .mdc-radio .mdc-radio__native-control:disabled + .mdc-radio__background .mdc-radio__inner-circle {
4115
+ border-color: rgba(0, 0, 0, 0.38);
4116
+ }
4117
+
4118
+ .mdc-radio .mdc-radio__background::before {
4119
+ background-color: #575756;
4120
+ /* @alternate */
4121
+ background-color: var(--mdc-theme-secondary, #575756);
4122
+ }
4123
+
4124
+ .mdc-radio .mdc-radio__background::before {
4125
+ top: -10px;
4126
+ left: -10px;
4127
+ width: 40px;
4128
+ height: 40px;
4129
+ }
4130
+
4131
+ .mdc-radio .mdc-radio__native-control {
4132
+ top: 0px;
4133
+ right: 0px;
4134
+ left: 0px;
4135
+ width: 40px;
4136
+ height: 40px;
4137
+ }
4138
+
4139
+ @media screen and (-ms-high-contrast: active) {
4140
+ .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked) + .mdc-radio__background .mdc-radio__outer-circle,
4141
+ .mdc-radio .mdc-radio__native-control:disabled:not(:checked) + .mdc-radio__background .mdc-radio__outer-circle {
4142
+ border-color: GrayText;
4143
+ }
4144
+
4145
+ .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked + .mdc-radio__background .mdc-radio__outer-circle,
4146
+ .mdc-radio .mdc-radio__native-control:disabled:checked + .mdc-radio__background .mdc-radio__outer-circle {
4147
+ border-color: GrayText;
4148
+ }
4149
+
4150
+ .mdc-radio [aria-disabled=true] .mdc-radio__native-control + .mdc-radio__background .mdc-radio__inner-circle,
4151
+ .mdc-radio .mdc-radio__native-control:disabled + .mdc-radio__background .mdc-radio__inner-circle {
4152
+ border-color: GrayText;
4153
+ }
4154
+ }
4155
+ .mdc-radio__background {
4156
+ display: inline-block;
4157
+ position: relative;
4158
+ box-sizing: border-box;
4159
+ width: 20px;
4160
+ height: 20px;
4161
+ }
4162
+
4163
+ .mdc-radio__background::before {
4164
+ position: absolute;
4165
+ transform: scale(0, 0);
4166
+ border-radius: 50%;
4167
+ opacity: 0;
4168
+ pointer-events: none;
4169
+ content: "";
4170
+ transition: opacity 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1), transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1);
4171
+ }
4172
+
4173
+ .mdc-radio__outer-circle {
4174
+ position: absolute;
4175
+ top: 0;
4176
+ left: 0;
4177
+ box-sizing: border-box;
4178
+ width: 100%;
4179
+ height: 100%;
4180
+ border-width: 2px;
4181
+ border-style: solid;
4182
+ border-radius: 50%;
4183
+ transition: border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1);
4184
+ }
4185
+
4186
+ .mdc-radio__inner-circle {
4187
+ position: absolute;
4188
+ top: 0;
4189
+ left: 0;
4190
+ box-sizing: border-box;
4191
+ width: 100%;
4192
+ height: 100%;
4193
+ transform: scale(0, 0);
4194
+ border-width: 10px;
4195
+ border-style: solid;
4196
+ border-radius: 50%;
4197
+ transition: transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1), border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1);
4198
+ }
4199
+
4200
+ .mdc-radio__native-control {
4201
+ position: absolute;
4202
+ margin: 0;
4203
+ padding: 0;
4204
+ opacity: 0;
4205
+ cursor: inherit;
4206
+ z-index: 1;
4207
+ }
4208
+
4209
+ .mdc-radio--touch {
4210
+ margin-top: 4px;
4211
+ margin-bottom: 4px;
4212
+ margin-right: 4px;
4213
+ margin-left: 4px;
4214
+ }
4215
+
4216
+ .mdc-radio--touch .mdc-radio__native-control {
4217
+ top: -4px;
4218
+ right: -4px;
4219
+ left: -4px;
4220
+ width: 48px;
4221
+ height: 48px;
4222
+ }
4223
+
4224
+ .mdc-radio__native-control:checked + .mdc-radio__background,
4225
+ .mdc-radio__native-control:disabled + .mdc-radio__background {
4226
+ transition: opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1), transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1);
4227
+ }
4228
+
4229
+ .mdc-radio__native-control:checked + .mdc-radio__background .mdc-radio__outer-circle,
4230
+ .mdc-radio__native-control:disabled + .mdc-radio__background .mdc-radio__outer-circle {
4231
+ transition: border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1);
4232
+ }
4233
+
4234
+ .mdc-radio__native-control:checked + .mdc-radio__background .mdc-radio__inner-circle,
4235
+ .mdc-radio__native-control:disabled + .mdc-radio__background .mdc-radio__inner-circle {
4236
+ transition: transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1), border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1);
4237
+ }
4238
+
4239
+ .mdc-radio--disabled {
4240
+ cursor: default;
4241
+ pointer-events: none;
4242
+ }
4243
+
4244
+ .mdc-radio__native-control:checked + .mdc-radio__background .mdc-radio__inner-circle {
4245
+ transform: scale(0.5);
4246
+ transition: transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1), border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1);
4247
+ }
4248
+
4249
+ .mdc-radio__native-control:disabled + .mdc-radio__background,
4250
+ [aria-disabled=true] .mdc-radio__native-control + .mdc-radio__background {
4251
+ cursor: default;
4252
+ }
4253
+
4254
+ .mdc-radio__native-control:focus + .mdc-radio__background::before {
4255
+ transform: scale(1);
4256
+ opacity: 0.12;
4257
+ transition: opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1), transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1);
4258
+ }
4259
+
4260
+ .mdc-radio {
4261
+ --mdc-ripple-fg-size: 0;
4262
+ --mdc-ripple-left: 0;
4263
+ --mdc-ripple-top: 0;
4264
+ --mdc-ripple-fg-scale: 1;
4265
+ --mdc-ripple-fg-translate-end: 0;
4266
+ --mdc-ripple-fg-translate-start: 0;
4267
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
4268
+ will-change: transform, opacity;
4269
+ }
4270
+
4271
+ .mdc-radio .mdc-radio__ripple::before,
4272
+ .mdc-radio .mdc-radio__ripple::after {
4273
+ position: absolute;
4274
+ border-radius: 50%;
4275
+ opacity: 0;
4276
+ pointer-events: none;
4277
+ content: "";
4278
+ }
4279
+
4280
+ .mdc-radio .mdc-radio__ripple::before {
4281
+ transition: opacity 15ms linear, background-color 15ms linear;
4282
+ z-index: 1;
4283
+ /* @alternate */
4284
+ z-index: var(--mdc-ripple-z-index, 1);
4285
+ }
4286
+
4287
+ .mdc-radio .mdc-radio__ripple::after {
4288
+ z-index: 0;
4289
+ /* @alternate */
4290
+ z-index: var(--mdc-ripple-z-index, 0);
4291
+ }
4292
+
4293
+ .mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::before {
4294
+ transform: scale(var(--mdc-ripple-fg-scale, 1));
4295
+ }
4296
+
4297
+ .mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after {
4298
+ top: 0;
4299
+ /* @noflip */
4300
+ left: 0;
4301
+ transform: scale(0);
4302
+ transform-origin: center center;
4303
+ }
4304
+
4305
+ .mdc-radio.mdc-ripple-upgraded--unbounded .mdc-radio__ripple::after {
4306
+ top: var(--mdc-ripple-top, 0);
4307
+ /* @noflip */
4308
+ left: var(--mdc-ripple-left, 0);
4309
+ }
4310
+
4311
+ .mdc-radio.mdc-ripple-upgraded--foreground-activation .mdc-radio__ripple::after {
4312
+ animation: mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards;
4313
+ }
4314
+
4315
+ .mdc-radio.mdc-ripple-upgraded--foreground-deactivation .mdc-radio__ripple::after {
4316
+ animation: mdc-ripple-fg-opacity-out 150ms;
4317
+ transform: translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));
4318
+ }
4319
+
4320
+ .mdc-radio .mdc-radio__ripple::before,
4321
+ .mdc-radio .mdc-radio__ripple::after {
4322
+ top: calc(50% - 50%);
4323
+ /* @noflip */
4324
+ left: calc(50% - 50%);
4325
+ width: 100%;
4326
+ height: 100%;
4327
+ }
4328
+
4329
+ .mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::before,
4330
+ .mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after {
4331
+ top: var(--mdc-ripple-top, calc(50% - 50%));
4332
+ /* @noflip */
4333
+ left: var(--mdc-ripple-left, calc(50% - 50%));
4334
+ width: var(--mdc-ripple-fg-size, 100%);
4335
+ height: var(--mdc-ripple-fg-size, 100%);
4336
+ }
4337
+
4338
+ .mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after {
4339
+ width: var(--mdc-ripple-fg-size, 100%);
4340
+ height: var(--mdc-ripple-fg-size, 100%);
4341
+ }
4342
+
4343
+ .mdc-radio .mdc-radio__ripple::before, .mdc-radio .mdc-radio__ripple::after {
4344
+ background-color: #575756;
4345
+ /* @alternate */
4346
+ background-color: var(--mdc-ripple-color, var(--mdc-theme-secondary, #575756));
4347
+ }
4348
+
4349
+ .mdc-radio:hover .mdc-radio__ripple::before, .mdc-radio.mdc-ripple-surface--hover .mdc-radio__ripple::before {
4350
+ opacity: 0.04;
4351
+ /* @alternate */
4352
+ opacity: var(--mdc-ripple-hover-opacity, 0.04);
4353
+ }
4354
+
4355
+ .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__ripple::before, .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__ripple::before {
4356
+ transition-duration: 75ms;
4357
+ opacity: 0.12;
4358
+ /* @alternate */
4359
+ opacity: var(--mdc-ripple-focus-opacity, 0.12);
4360
+ }
4361
+
4362
+ .mdc-radio:not(.mdc-ripple-upgraded) .mdc-radio__ripple::after {
4363
+ transition: opacity 150ms linear;
4364
+ }
4365
+
4366
+ .mdc-radio:not(.mdc-ripple-upgraded):active .mdc-radio__ripple::after {
4367
+ transition-duration: 75ms;
4368
+ opacity: 0.12;
4369
+ /* @alternate */
4370
+ opacity: var(--mdc-ripple-press-opacity, 0.12);
4371
+ }
4372
+
4373
+ .mdc-radio.mdc-ripple-upgraded {
4374
+ --mdc-ripple-fg-opacity: var(--mdc-ripple-press-opacity, 0.12);
4375
+ }
4376
+
4377
+ .mdc-radio.mdc-ripple-upgraded .mdc-radio__background::before, .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__background::before {
4378
+ content: none;
4379
+ }
4380
+
4381
+ .mdc-radio__ripple {
4382
+ position: absolute;
4383
+ top: 0;
4384
+ left: 0;
4385
+ width: 100%;
4386
+ height: 100%;
4387
+ pointer-events: none;
4388
+ }
4389
+
4067
4390
  .mdc-form-field {
4068
4391
  -moz-osx-font-smoothing: grayscale;
4069
4392
  -webkit-font-smoothing: antialiased;
@@ -4225,7 +4548,7 @@ a.mdc-list-item {
4225
4548
  }
4226
4549
  :host(.has-grid-layout) .mdc-deprecated-list {
4227
4550
  display: grid;
4228
- grid-gap: var(--gap);
4551
+ gap: var(--gap);
4229
4552
  grid-template-columns: repeat(auto-fit, minmax(min(100%, max(calc(var(--list-grid-item-max-width, 10rem) - var(--gap)), var(--list-grid-item-min-width, 7.5rem))), 1fr));
4230
4553
  max-width: var(--list-grid-max-width, 100%);
4231
4554
  }
@@ -18,6 +18,7 @@ const { ACTION_EVENT } = listStrings;
18
18
  * @exampleComponent limel-example-list-striped
19
19
  * @exampleComponent limel-example-list-badge-icons-with-multiple-lines
20
20
  * @exampleComponent limel-example-list-grid
21
+ * @exampleComponent limel-example-list-primary-component
21
22
  */
22
23
  export class List {
23
24
  constructor() {