@limetech/lime-elements 38.21.2 → 38.21.3
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/CHANGELOG.md +8 -0
- package/dist/cjs/{checkbox.template-882253c2.js → checkbox.template-d2c0b7fc.js} +4 -3
- package/dist/cjs/checkbox.template-d2c0b7fc.js.map +1 -0
- package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js +13 -14
- package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/limel-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-chip_2.cjs.entry.js +1 -1
- package/dist/cjs/limel-chip_2.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-dynamic-label_3.cjs.entry.js +1 -1
- package/dist/cjs/limel-dynamic-label_3.cjs.entry.js.map +1 -1
- package/dist/collection/components/checkbox/checkbox.css +72 -37
- package/dist/collection/components/checkbox/checkbox.template.js +2 -1
- package/dist/collection/components/checkbox/checkbox.template.js.map +1 -1
- package/dist/collection/components/chip-set/chip-set.css +2 -0
- package/dist/collection/components/input-field/input-field.css +9 -0
- package/dist/collection/components/list/list.css +282 -430
- package/dist/collection/components/list/radio-button/radio-button.template.js +6 -4
- package/dist/collection/components/list/radio-button/radio-button.template.js.map +1 -1
- package/dist/collection/components/menu-list/menu-list.css +282 -430
- package/dist/collection/components/notched-outline/notched-outline.css +1 -0
- package/dist/collection/style/internal/boolean-input.scss +178 -0
- package/dist/collection/style/internal/shared_input-select-picker.scss +3 -168
- package/dist/esm/{checkbox.template-0a54ff6e.js → checkbox.template-04a31caa.js} +4 -3
- package/dist/esm/checkbox.template-04a31caa.js.map +1 -0
- package/dist/esm/limel-breadcrumbs_7.entry.js +13 -14
- package/dist/esm/limel-breadcrumbs_7.entry.js.map +1 -1
- package/dist/esm/limel-checkbox.entry.js +2 -2
- package/dist/esm/limel-checkbox.entry.js.map +1 -1
- package/dist/esm/limel-chip_2.entry.js +1 -1
- package/dist/esm/limel-chip_2.entry.js.map +1 -1
- package/dist/esm/limel-dynamic-label_3.entry.js +1 -1
- package/dist/esm/limel-dynamic-label_3.entry.js.map +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-2869405b.entry.js → p-576a290b.entry.js} +2 -2
- package/dist/lime-elements/{p-2869405b.entry.js.map → p-576a290b.entry.js.map} +1 -1
- package/dist/lime-elements/{p-3fab45c9.entry.js → p-cc6195a9.entry.js} +7 -7
- package/dist/lime-elements/{p-3fab45c9.entry.js.map → p-cc6195a9.entry.js.map} +1 -1
- package/dist/lime-elements/p-d5b1f00e.js +2 -0
- package/dist/lime-elements/p-d5b1f00e.js.map +1 -0
- package/dist/lime-elements/{p-84f3deba.entry.js → p-e5ae9af8.entry.js} +2 -2
- package/dist/lime-elements/{p-84f3deba.entry.js.map → p-e5ae9af8.entry.js.map} +1 -1
- package/dist/lime-elements/p-e80040b7.entry.js +266 -0
- package/dist/lime-elements/p-e80040b7.entry.js.map +1 -0
- package/dist/lime-elements/style/internal/boolean-input.scss +178 -0
- package/dist/lime-elements/style/internal/shared_input-select-picker.scss +3 -168
- package/package.json +1 -1
- package/dist/cjs/checkbox.template-882253c2.js.map +0 -1
- package/dist/esm/checkbox.template-0a54ff6e.js.map +0 -1
- package/dist/lime-elements/p-6b746479.js +0 -2
- package/dist/lime-elements/p-6b746479.js.map +0 -1
- package/dist/lime-elements/p-6e698e38.entry.js +0 -266
- package/dist/lime-elements/p-6e698e38.entry.js.map +0 -1
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
@use '../mixins';
|
|
2
|
+
|
|
3
|
+
*,
|
|
4
|
+
*:before,
|
|
5
|
+
*:after {
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.boolean-input {
|
|
10
|
+
--limel-boolean-input-box-size: 1.25rem;
|
|
11
|
+
--limel-boolean-input-gap-size: 0.5rem;
|
|
12
|
+
position: relative;
|
|
13
|
+
isolation: isolate;
|
|
14
|
+
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
|
|
18
|
+
min-height: var(
|
|
19
|
+
--limel-checkbox-min-height,
|
|
20
|
+
2.5rem
|
|
21
|
+
); // helps align with other fields in the form, or within table rows
|
|
22
|
+
width: 100%;
|
|
23
|
+
|
|
24
|
+
input[type='checkbox'],
|
|
25
|
+
input[type='radio'] {
|
|
26
|
+
// Hide the native checkbox
|
|
27
|
+
@include mixins.visually-hidden;
|
|
28
|
+
-webkit-appearance: none;
|
|
29
|
+
-moz-appearance: none;
|
|
30
|
+
appearance: none;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
label.boolean-input-label {
|
|
35
|
+
// Ensure the label is always clickable, even when empty
|
|
36
|
+
min-width: var(--limel-boolean-input-box-size);
|
|
37
|
+
min-height: var(--limel-boolean-input-box-size);
|
|
38
|
+
padding-top: 0.125rem;
|
|
39
|
+
// ====
|
|
40
|
+
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
position: relative;
|
|
43
|
+
width: 100%;
|
|
44
|
+
|
|
45
|
+
font-size: var(--limel-theme-default-small-font-size);
|
|
46
|
+
color: var(--limel-theme-text-primary-on-background-color);
|
|
47
|
+
|
|
48
|
+
padding-left: calc(
|
|
49
|
+
var(--limel-boolean-input-box-size) +
|
|
50
|
+
var(--limel-boolean-input-gap-size)
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
.disabled:not([readonly]):not([readonly='true']) & {
|
|
54
|
+
cursor: not-allowed;
|
|
55
|
+
color: var(--limel-theme-text-disabled-color);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.required & {
|
|
59
|
+
&:after {
|
|
60
|
+
margin-left: 0.0625rem;
|
|
61
|
+
content: '*';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.invalid:not(.readonly) & {
|
|
66
|
+
color: var(--limel-theme-error-text-color);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:host(limel-checkbox.hide-label) &,
|
|
70
|
+
.hide-label & {
|
|
71
|
+
// this helper class of `hide-label` can be added for example to the `host` element,
|
|
72
|
+
// or if the `CheckboxTemplate` is imported to other components, the class can be
|
|
73
|
+
// added to the `checkbox` element itself
|
|
74
|
+
// and be used internally by other components such as `limel-table`
|
|
75
|
+
// to hide the `<label>`, while still keeping the checkbox
|
|
76
|
+
// both clickable for the users, and accessible for screen readers
|
|
77
|
+
@include mixins.truncate-text();
|
|
78
|
+
opacity: 0;
|
|
79
|
+
width: var(--limel-boolean-input-box-size);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.box {
|
|
84
|
+
position: absolute; // since `label` is the clickable part,
|
|
85
|
+
// and thus needs to
|
|
86
|
+
// stretch below the checkbox
|
|
87
|
+
pointer-events: none;
|
|
88
|
+
|
|
89
|
+
transition:
|
|
90
|
+
border-color 0.4s ease 0.2s,
|
|
91
|
+
background-color 0.2s ease,
|
|
92
|
+
box-shadow var(--limel-clickable-transform-speed, 0.4s) ease;
|
|
93
|
+
|
|
94
|
+
display: inline-block;
|
|
95
|
+
vertical-align: middle;
|
|
96
|
+
|
|
97
|
+
width: var(--limel-boolean-input-box-size);
|
|
98
|
+
height: var(--limel-boolean-input-box-size);
|
|
99
|
+
|
|
100
|
+
margin-right: var(--limel-boolean-input-gap-size);
|
|
101
|
+
border-radius: var(--limel-boolean-input-box-border-radius);
|
|
102
|
+
border: 0.125rem solid;
|
|
103
|
+
|
|
104
|
+
border-color: var(
|
|
105
|
+
--checkbox-unchecked-border-color,
|
|
106
|
+
rgb(var(--contrast-900))
|
|
107
|
+
);
|
|
108
|
+
background-color: var(
|
|
109
|
+
--limel-checkbox-background-color,
|
|
110
|
+
rgb(var(--contrast-300))
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
.checked &,
|
|
114
|
+
.boolean-input:has(input[type='checkbox']:checked) &,
|
|
115
|
+
.boolean-input:has(input[type='radio']:checked) & {
|
|
116
|
+
background-color: var(
|
|
117
|
+
--lime-primary-color,
|
|
118
|
+
var(--limel-theme-primary-color)
|
|
119
|
+
);
|
|
120
|
+
border-color: var(
|
|
121
|
+
--lime-primary-color,
|
|
122
|
+
var(--limel-theme-primary-color)
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.disabled & {
|
|
127
|
+
opacity: 0.4;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.boolean-input:not(.disabled):has(label.boolean-input-label:hover) & {
|
|
131
|
+
will-change: box-shadow;
|
|
132
|
+
box-shadow: var(--button-shadow-hovered);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.boolean-input:not(.disabled):has(label.boolean-input-label:active) & {
|
|
136
|
+
will-change: box-shadow;
|
|
137
|
+
box-shadow: var(--button-shadow-pressed);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&:before {
|
|
141
|
+
// For indicating the hover or focused state
|
|
142
|
+
transition: mixins.$clickable-normal-state-transitions;
|
|
143
|
+
content: '';
|
|
144
|
+
position: absolute;
|
|
145
|
+
inset: -0.1875rem; // 3px
|
|
146
|
+
border-radius: inherit;
|
|
147
|
+
|
|
148
|
+
.boolean-input:has(input[type='checkbox']:focus-visible) &,
|
|
149
|
+
.boolean-input:has(input[type='radio']:focus-visible) & {
|
|
150
|
+
will-change: box-shadow;
|
|
151
|
+
|
|
152
|
+
box-shadow: var(--shadow-depth-8-focused);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&:after {
|
|
157
|
+
// For indicating the indeterminate state in checkbox
|
|
158
|
+
// For indicating the the checked state in radio
|
|
159
|
+
transition:
|
|
160
|
+
opacity 0.2s ease,
|
|
161
|
+
width 0.4s ease,
|
|
162
|
+
box-shadow 0.6s cubic-bezier(0.68, -0.55, 0, 1.87),
|
|
163
|
+
transform 0.6s cubic-bezier(0.68, -0.55, 0, 1.87);
|
|
164
|
+
content: '';
|
|
165
|
+
position: absolute;
|
|
166
|
+
inset: 0;
|
|
167
|
+
margin: auto;
|
|
168
|
+
|
|
169
|
+
border-radius: 1rem;
|
|
170
|
+
opacity: 0;
|
|
171
|
+
|
|
172
|
+
background-color: rgb(var(--color-white));
|
|
173
|
+
|
|
174
|
+
.boolean-input:not(.disabled):has(label.boolean-input-label:hover) & {
|
|
175
|
+
will-change: opacity, box-shadow, transform, width;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
@@ -28,29 +28,12 @@ $input-text-color-disabled: rgba(var(--contrast-1400), 0.5);
|
|
|
28
28
|
$helper-text-color: $label-color;
|
|
29
29
|
|
|
30
30
|
$height-of-mdc-text-field: 2.5rem; //This is written directly in `rem`, becurse the variable used to calculate things elsewhere
|
|
31
|
-
$height-of-mdc-helper-text-block: 0.9375rem;
|
|
32
|
-
|
|
33
|
-
$mdc-chip-background-color: rgb(var(--contrast-100));
|
|
34
|
-
|
|
35
|
-
$height-of-helper-text-pseudo-before: 0.75rem; // There is strange a pseudo before in MD's helper texts, which sets their distance to the element on top of it. Originally in MD, this value is 1rem. In Lime Elements, we need to make it less due to our layout needs.
|
|
36
|
-
$cropped-label-hack--font-size: var(--limel-theme-default-font-size); //14px
|
|
37
31
|
|
|
38
32
|
@mixin looks-disabled() {
|
|
39
33
|
cursor: not-allowed;
|
|
40
34
|
opacity: 0.4;
|
|
41
35
|
}
|
|
42
36
|
|
|
43
|
-
@mixin looks-like-input-label() {
|
|
44
|
-
line-height: functions.pxToRem(28);
|
|
45
|
-
-moz-osx-font-smoothing: grayscale;
|
|
46
|
-
-webkit-font-smoothing: antialiased;
|
|
47
|
-
|
|
48
|
-
font-size: var(--limel-theme-default-font-size);
|
|
49
|
-
font-weight: 400;
|
|
50
|
-
letter-spacing: 0.009375em;
|
|
51
|
-
color: $label-color;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
37
|
@mixin looks-like-input-value() {
|
|
55
38
|
line-height: functions.pxToRem(28);
|
|
56
39
|
-moz-osx-font-smoothing: grayscale;
|
|
@@ -59,157 +42,15 @@ $cropped-label-hack--font-size: var(--limel-theme-default-font-size); //14px
|
|
|
59
42
|
color: $input-text-color;
|
|
60
43
|
font-size: var(--limel-theme-default-font-size);
|
|
61
44
|
font-weight: 400;
|
|
45
|
+
font-family: inherit;
|
|
62
46
|
letter-spacing: 0.009375em;
|
|
63
47
|
}
|
|
64
48
|
|
|
65
|
-
@mixin cropped-label-hack {
|
|
66
|
-
// Some font size applied to `label--float-above` causes the labels to get cut off
|
|
67
|
-
// when an empty field gets focused
|
|
68
|
-
.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-notched-outline--upgraded,
|
|
69
|
-
.mdc-text-field--outlined.mdc-text-field--with-leading-icon
|
|
70
|
-
.mdc-notched-outline--upgraded,
|
|
71
|
-
.mdc-text-field--outlined.mdc-text-field--textarea.mdc-notched-outline--upgraded,
|
|
72
|
-
.mdc-text-field--outlined.mdc-text-field--textarea
|
|
73
|
-
.mdc-notched-outline--upgraded,
|
|
74
|
-
.mdc-text-field--outlined.mdc-notched-outline--upgraded,
|
|
75
|
-
.mdc-text-field--outlined .mdc-notched-outline--upgraded {
|
|
76
|
-
.mdc-floating-label--float-above {
|
|
77
|
-
//font-size: 1rem; This is what we get from MD now, which causes the miscalculations
|
|
78
|
-
font-size: $cropped-label-hack--font-size;
|
|
79
|
-
// of course this is `14px` and the other one is `16px`.
|
|
80
|
-
// Unfortunately MD scales the floating label down, by applying a
|
|
81
|
-
// `transform` & `scale(0.75)` which is probably why they had to increase
|
|
82
|
-
// the font-size, to make it more readable.
|
|
83
|
-
// This is why I don't like this hack.
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
49
|
@mixin input-field-placeholder {
|
|
89
50
|
&::placeholder {
|
|
90
51
|
color: $input-placeholder-color !important;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
@mixin floating-label-overrides {
|
|
95
|
-
.mdc-text-field__input,
|
|
96
|
-
.mdc-floating-label {
|
|
97
|
-
// As long as this component is depended on MDC,
|
|
98
|
-
// we need to force it to be font-agnostic.
|
|
99
|
-
// When MDC-dependency is removed, this block can also be removed.
|
|
100
|
-
// However, on removal of MDC-dependency, we should also make sure to check
|
|
101
|
-
// other font-related styles that might be set by MDC,
|
|
102
|
-
// such as `letter-spacing` or `font-size`.
|
|
103
|
-
font-family: inherit;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.mdc-text-field {
|
|
107
|
-
&:not(.mdc-text-field--disabled) {
|
|
108
|
-
.mdc-floating-label {
|
|
109
|
-
color: $label-color;
|
|
110
|
-
}
|
|
111
|
-
.mdc-text-field__input {
|
|
112
|
-
color: $input-text-color;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
&.mdc-text-field--disabled {
|
|
116
|
-
.mdc-floating-label {
|
|
117
|
-
color: $label-color-disabled;
|
|
118
|
-
}
|
|
119
|
-
.mdc-text-field__input {
|
|
120
|
-
color: $input-text-color-disabled;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.mdc-floating-label--float-above {
|
|
126
|
-
transform: translateY(#{functions.pxToRem(-27)}) scale(0.75) !important;
|
|
127
|
-
|
|
128
|
-
.mdc-text-field--with-leading-icon & {
|
|
129
|
-
transform: translateY(#{functions.pxToRem(-25)})
|
|
130
|
-
translateX(#{functions.pxToRem(-20)}) scale(0.75) !important;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
@mixin outlined-style-overrides {
|
|
136
|
-
.mdc-text-field.mdc-text-field--outlined {
|
|
137
|
-
transition: background-color 0.2s ease;
|
|
138
|
-
border-radius: functions.pxToRem(4);
|
|
139
|
-
|
|
140
|
-
.mdc-notched-outline__leading,
|
|
141
|
-
.mdc-notched-outline__notch,
|
|
142
|
-
.mdc-notched-outline__trailing {
|
|
143
|
-
transition: border-color 0.2s ease;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
&:not(.mdc-text-field--disabled) {
|
|
147
|
-
background-color: $background-color-normal;
|
|
148
|
-
|
|
149
|
-
&:hover {
|
|
150
|
-
background-color: $background-color-hovered;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
&.mdc-text-field--focused {
|
|
155
|
-
background-color: $background-color-focused;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
&.mdc-text-field--disabled {
|
|
159
|
-
background-color: $background-color-disabled;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
&:not(.mdc-text-field--disabled):not(.mdc-text-field--invalid):not(
|
|
163
|
-
.force-invalid
|
|
164
|
-
) {
|
|
165
|
-
.mdc-notched-outline__leading,
|
|
166
|
-
.mdc-notched-outline__notch,
|
|
167
|
-
.mdc-notched-outline__trailing {
|
|
168
|
-
border-color: $lime-text-field-outline-color;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
&:not(.mdc-text-field--focused):not(.mdc-text-field--invalid):not(
|
|
172
|
-
.force-invalid
|
|
173
|
-
) {
|
|
174
|
-
&:hover .mdc-notched-outline {
|
|
175
|
-
.mdc-notched-outline__leading,
|
|
176
|
-
.mdc-notched-outline__notch,
|
|
177
|
-
.mdc-notched-outline__trailing {
|
|
178
|
-
border-color: $lime-text-field-outline-color--hovered;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
&.mdc-text-field--focused {
|
|
184
|
-
.mdc-notched-outline__leading,
|
|
185
|
-
.mdc-notched-outline__notch,
|
|
186
|
-
.mdc-notched-outline__trailing {
|
|
187
|
-
border-color: $lime-text-field-outline-color--focused;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.mdc-text-field,
|
|
194
|
-
.mdc-text-field.mdc-text-field--focused {
|
|
195
|
-
.mdc-notched-outline__leading,
|
|
196
|
-
.mdc-notched-outline__notch,
|
|
197
|
-
.mdc-notched-outline__trailing {
|
|
198
|
-
border-width: 1px;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.mdc-text-field.mdc-text-field--focused.mdc-text-field--outlined {
|
|
203
|
-
.mdc-notched-outline--notched {
|
|
204
|
-
.mdc-notched-outline__notch {
|
|
205
|
-
padding-top: 0;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.mdc-text-field__icon {
|
|
211
|
-
color: $input-text-leading-icon-color;
|
|
212
|
-
flex-shrink: 0;
|
|
52
|
+
font-size: var(--limel-theme-default-font-size) !important;
|
|
53
|
+
font-family: inherit !important;
|
|
213
54
|
}
|
|
214
55
|
}
|
|
215
56
|
|
|
@@ -345,12 +186,6 @@ $cropped-label-hack--font-size: var(--limel-theme-default-font-size); //14px
|
|
|
345
186
|
}
|
|
346
187
|
}
|
|
347
188
|
|
|
348
|
-
@mixin disabled-overrides {
|
|
349
|
-
.mdc-text-field--disabled {
|
|
350
|
-
background-color: transparent;
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
|
|
354
189
|
@mixin lime-empty-value-for-readonly {
|
|
355
190
|
.lime-empty-value-for-readonly {
|
|
356
191
|
z-index: z-index.$input-field--formatted-value;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"checkbox.template-882253c2.js","mappings":";;;;MAmBa,gBAAgB,GAA+C,CACxE,KAAK;EAEL,MAAM,UAAU,GAAG,EAAE,CAAC;EACtB,IAAI,KAAK,CAAC,QAAQ,EAAE;IAChB,IAAI,IAAI,GAAkB,OAAO,CAAC;IAClC,IAAI,KAAK,CAAC,OAAO,EAAE;MACf,IAAI,GAAG;QACH,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,6DAA6D;OACvE,CAAC;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,kBAAM,IAAI,EAAC,MAAM,EAAC,CAAC,EAAC,kCAAkC,GAAG,CACvD,CACJ;MACNA,mBAAO,OAAO,EAAE,KAAK,CAAC,EAAE,IAAG,KAAK,CAAC,KAAK,CAAS,CAC7C;IACNA,QAAC,UAAU,IACP,IAAI,EAAE,KAAK,CAAC,UAAU,EACtB,YAAY,EAAE,KAAK,CAAC,YAAY,EAChC,OAAO,EAAE,KAAK,CAAC,OAAO,GACxB;GACL,CAAC;AACN,EAAE;AAEF,MAAM,UAAU,GAIX,CAAC,KAAK;EACP,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;IAChC,OAAO;GACV;EAED,QACIA,+BACI,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,EAC7B,YAAY,EAAE,KAAK,CAAC,YAAY,EAChC,OAAO,EAAE,KAAK,CAAC,OAAO,GACxB,EACJ;AACN,CAAC;;;;","names":["h"],"sources":["./src/components/checkbox/checkbox.template.tsx"],"sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\nimport { Label } from '../dynamic-label/label.types';\nimport { Icon } from '../../interface';\n\ninterface CheckboxTemplateProps {\n disabled?: boolean;\n id: string;\n checked?: boolean;\n readonly?: boolean;\n indeterminate?: boolean;\n required?: boolean;\n invalid?: boolean;\n onChange?: (event: Event) => void;\n label?: string;\n helperText?: string;\n helperTextId?: string;\n readonlyLabels?: Array<Label<boolean>>;\n}\n\nexport const CheckboxTemplate: FunctionalComponent<CheckboxTemplateProps> = (\n props\n) => {\n const inputProps = {};\n if (props.readonly) {\n let icon: string | Icon = 'minus';\n if (props.checked) {\n icon = {\n name: 'ok',\n color: 'var(--lime-primary-color, var(--limel-theme-primary-color))',\n };\n }\n\n return [\n <limel-dynamic-label\n value={props.checked}\n aria-controls={props.helperTextId}\n defaultLabel={{ text: props.label, icon: icon }}\n labels={props.readonlyLabels}\n />,\n <HelperText\n text={props.helperText}\n helperTextId={props.helperTextId}\n invalid={props.invalid}\n />,\n ];\n }\n\n if (props.indeterminate) {\n inputProps['data-indeterminate'] = 'true';\n }\n\n return [\n <div\n class={{\n 'mdc-form-field': true, // required by MDC to work\n 'mdc-checkbox': true, // required by MDC to work\n checkbox: true,\n checked: props.checked,\n invalid: props.invalid,\n disabled: props.disabled,\n required: props.required,\n indeterminate: props.indeterminate,\n readonly: props.readonly,\n }}\n >\n <input\n type=\"checkbox\"\n class=\"mdc-checkbox__native-control\" // required by MDC to work\n id={props.id}\n checked={props.checked}\n disabled={props.disabled || props.readonly}\n required={props.required}\n onChange={props.onChange}\n aria-controls={props.helperTextId}\n aria-describedby={props.helperTextId}\n {...inputProps}\n />\n <div class=\"box\">\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path fill=\"none\" d=\"M1.73,12.91 8.1,19.28 22.79,4.59\" />\n </svg>\n </div>\n <label htmlFor={props.id}>{props.label}</label>\n </div>,\n <HelperText\n text={props.helperText}\n helperTextId={props.helperTextId}\n invalid={props.invalid}\n />,\n ];\n};\n\nconst HelperText: FunctionalComponent<{\n helperTextId: string;\n text: string;\n invalid?: boolean;\n}> = (props) => {\n if (typeof props.text !== 'string') {\n return;\n }\n\n return (\n <limel-helper-line\n helperText={props.text.trim()}\n helperTextId={props.helperTextId}\n invalid={props.invalid}\n />\n );\n};\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"checkbox.template-0a54ff6e.js","mappings":";;MAmBa,gBAAgB,GAA+C,CACxE,KAAK;EAEL,MAAM,UAAU,GAAG,EAAE,CAAC;EACtB,IAAI,KAAK,CAAC,QAAQ,EAAE;IAChB,IAAI,IAAI,GAAkB,OAAO,CAAC;IAClC,IAAI,KAAK,CAAC,OAAO,EAAE;MACf,IAAI,GAAG;QACH,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,6DAA6D;OACvE,CAAC;KACL;IAED,OAAO;MACH,2BACI,KAAK,EAAE,KAAK,CAAC,OAAO,mBACL,KAAK,CAAC,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EAAE,KAAK,CAAC,EAAE,IAAG,KAAK,CAAC,KAAK,CAAS,CAC7C;IACN,EAAC,UAAU,IACP,IAAI,EAAE,KAAK,CAAC,UAAU,EACtB,YAAY,EAAE,KAAK,CAAC,YAAY,EAChC,OAAO,EAAE,KAAK,CAAC,OAAO,GACxB;GACL,CAAC;AACN,EAAE;AAEF,MAAM,UAAU,GAIX,CAAC,KAAK;EACP,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;IAChC,OAAO;GACV;EAED,QACI,yBACI,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,EAC7B,YAAY,EAAE,KAAK,CAAC,YAAY,EAChC,OAAO,EAAE,KAAK,CAAC,OAAO,GACxB,EACJ;AACN,CAAC;;;;","names":[],"sources":["./src/components/checkbox/checkbox.template.tsx"],"sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\nimport { Label } from '../dynamic-label/label.types';\nimport { Icon } from '../../interface';\n\ninterface CheckboxTemplateProps {\n disabled?: boolean;\n id: string;\n checked?: boolean;\n readonly?: boolean;\n indeterminate?: boolean;\n required?: boolean;\n invalid?: boolean;\n onChange?: (event: Event) => void;\n label?: string;\n helperText?: string;\n helperTextId?: string;\n readonlyLabels?: Array<Label<boolean>>;\n}\n\nexport const CheckboxTemplate: FunctionalComponent<CheckboxTemplateProps> = (\n props\n) => {\n const inputProps = {};\n if (props.readonly) {\n let icon: string | Icon = 'minus';\n if (props.checked) {\n icon = {\n name: 'ok',\n color: 'var(--lime-primary-color, var(--limel-theme-primary-color))',\n };\n }\n\n return [\n <limel-dynamic-label\n value={props.checked}\n aria-controls={props.helperTextId}\n defaultLabel={{ text: props.label, icon: icon }}\n labels={props.readonlyLabels}\n />,\n <HelperText\n text={props.helperText}\n helperTextId={props.helperTextId}\n invalid={props.invalid}\n />,\n ];\n }\n\n if (props.indeterminate) {\n inputProps['data-indeterminate'] = 'true';\n }\n\n return [\n <div\n class={{\n 'mdc-form-field': true, // required by MDC to work\n 'mdc-checkbox': true, // required by MDC to work\n checkbox: true,\n checked: props.checked,\n invalid: props.invalid,\n disabled: props.disabled,\n required: props.required,\n indeterminate: props.indeterminate,\n readonly: props.readonly,\n }}\n >\n <input\n type=\"checkbox\"\n class=\"mdc-checkbox__native-control\" // required by MDC to work\n id={props.id}\n checked={props.checked}\n disabled={props.disabled || props.readonly}\n required={props.required}\n onChange={props.onChange}\n aria-controls={props.helperTextId}\n aria-describedby={props.helperTextId}\n {...inputProps}\n />\n <div class=\"box\">\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path fill=\"none\" d=\"M1.73,12.91 8.1,19.28 22.79,4.59\" />\n </svg>\n </div>\n <label htmlFor={props.id}>{props.label}</label>\n </div>,\n <HelperText\n text={props.helperText}\n helperTextId={props.helperTextId}\n invalid={props.invalid}\n />,\n ];\n};\n\nconst HelperText: FunctionalComponent<{\n helperTextId: string;\n text: string;\n invalid?: boolean;\n}> = (props) => {\n if (typeof props.text !== 'string') {\n return;\n }\n\n return (\n <limel-helper-line\n helperText={props.text.trim()}\n helperTextId={props.helperTextId}\n invalid={props.invalid}\n />\n );\n};\n"],"version":3}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./p-288f0842.js";const r=r=>{const i={};if(r.readonly){let i="minus";if(r.checked){i={name:"ok",color:"var(--lime-primary-color, var(--limel-theme-primary-color))"}}return[e("limel-dynamic-label",{value:r.checked,"aria-controls":r.helperTextId,defaultLabel:{text:r.label,icon:i},labels:r.readonlyLabels}),e(l,{text:r.helperText,helperTextId:r.helperTextId,invalid:r.invalid})]}if(r.indeterminate){i["data-indeterminate"]="true"}return[e("div",{class:{"mdc-form-field":true,"mdc-checkbox":true,checkbox:true,checked:r.checked,invalid:r.invalid,disabled:r.disabled,required:r.required,indeterminate:r.indeterminate,readonly:r.readonly}},e("input",Object.assign({type:"checkbox",class:"mdc-checkbox__native-control",id:r.id,checked:r.checked,disabled:r.disabled||r.readonly,required:r.required,onChange:r.onChange,"aria-controls":r.helperTextId,"aria-describedby":r.helperTextId},i)),e("div",{class:"box"},e("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false"},e("path",{fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"}))),e("label",{htmlFor:r.id},r.label)),e(l,{text:r.helperText,helperTextId:r.helperTextId,invalid:r.invalid})]};const l=r=>{if(typeof r.text!=="string"){return}return e("limel-helper-line",{helperText:r.text.trim(),helperTextId:r.helperTextId,invalid:r.invalid})};export{r as C};
|
|
2
|
-
//# sourceMappingURL=p-6b746479.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CheckboxTemplate","props","inputProps","readonly","icon","checked","name","color","h","value","helperTextId","defaultLabel","text","label","labels","readonlyLabels","HelperText","helperText","invalid","indeterminate","class","checkbox","disabled","required","Object","assign","type","id","onChange","viewBox","focusable","fill","d","htmlFor","trim"],"sources":["./src/components/checkbox/checkbox.template.tsx"],"sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\nimport { Label } from '../dynamic-label/label.types';\nimport { Icon } from '../../interface';\n\ninterface CheckboxTemplateProps {\n disabled?: boolean;\n id: string;\n checked?: boolean;\n readonly?: boolean;\n indeterminate?: boolean;\n required?: boolean;\n invalid?: boolean;\n onChange?: (event: Event) => void;\n label?: string;\n helperText?: string;\n helperTextId?: string;\n readonlyLabels?: Array<Label<boolean>>;\n}\n\nexport const CheckboxTemplate: FunctionalComponent<CheckboxTemplateProps> = (\n props\n) => {\n const inputProps = {};\n if (props.readonly) {\n let icon: string | Icon = 'minus';\n if (props.checked) {\n icon = {\n name: 'ok',\n color: 'var(--lime-primary-color, var(--limel-theme-primary-color))',\n };\n }\n\n return [\n <limel-dynamic-label\n value={props.checked}\n aria-controls={props.helperTextId}\n defaultLabel={{ text: props.label, icon: icon }}\n labels={props.readonlyLabels}\n />,\n <HelperText\n text={props.helperText}\n helperTextId={props.helperTextId}\n invalid={props.invalid}\n />,\n ];\n }\n\n if (props.indeterminate) {\n inputProps['data-indeterminate'] = 'true';\n }\n\n return [\n <div\n class={{\n 'mdc-form-field': true, // required by MDC to work\n 'mdc-checkbox': true, // required by MDC to work\n checkbox: true,\n checked: props.checked,\n invalid: props.invalid,\n disabled: props.disabled,\n required: props.required,\n indeterminate: props.indeterminate,\n readonly: props.readonly,\n }}\n >\n <input\n type=\"checkbox\"\n class=\"mdc-checkbox__native-control\" // required by MDC to work\n id={props.id}\n checked={props.checked}\n disabled={props.disabled || props.readonly}\n required={props.required}\n onChange={props.onChange}\n aria-controls={props.helperTextId}\n aria-describedby={props.helperTextId}\n {...inputProps}\n />\n <div class=\"box\">\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path fill=\"none\" d=\"M1.73,12.91 8.1,19.28 22.79,4.59\" />\n </svg>\n </div>\n <label htmlFor={props.id}>{props.label}</label>\n </div>,\n <HelperText\n text={props.helperText}\n helperTextId={props.helperTextId}\n invalid={props.invalid}\n />,\n ];\n};\n\nconst HelperText: FunctionalComponent<{\n helperTextId: string;\n text: string;\n invalid?: boolean;\n}> = (props) => {\n if (typeof props.text !== 'string') {\n return;\n }\n\n return (\n <limel-helper-line\n helperText={props.text.trim()}\n helperTextId={props.helperTextId}\n invalid={props.invalid}\n />\n );\n};\n"],"mappings":"0CAmBaA,EACTC,IAEA,MAAMC,EAAa,GACnB,GAAID,EAAME,SAAU,CAChB,IAAIC,EAAsB,QAC1B,GAAIH,EAAMI,QAAS,CACfD,EAAO,CACHE,KAAM,KACNC,MAAO,8D,CAIf,MAAO,CACHC,EAAA,uBACIC,MAAOR,EAAMI,QAAO,gBACLJ,EAAMS,aACrBC,aAAc,CAAEC,KAAMX,EAAMY,MAAOT,KAAMA,GACzCU,OAAQb,EAAMc,iBAElBP,EAACQ,EAAU,CACPJ,KAAMX,EAAMgB,WACZP,aAAcT,EAAMS,aACpBQ,QAASjB,EAAMiB,U,CAK3B,GAAIjB,EAAMkB,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