@rei/cedar 14.0.3 → 14.1.1
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/README.md +3 -0
- package/dist/cedar-compiled.css +1050 -1050
- package/dist/cedar.umd.js +9 -9
- package/dist/component-docgen.json +2865 -2865
- package/dist/icon-component-docgen.json +614 -614
- package/dist/lib.d.ts +4 -5
- package/dist/src/components/accordion/styles/CdrAccordion.module.scss.mjs +29 -29
- package/dist/src/components/accordion/styles/CdrAccordionGroup.module.scss.mjs +2 -2
- package/dist/src/components/banner/styles/CdrBanner.module.scss.mjs +14 -14
- package/dist/src/components/breadcrumb/styles/CdrBreadcrumb.module.scss.mjs +7 -7
- package/dist/src/components/button/styles/CdrButton.module.scss.mjs +31 -31
- package/dist/src/components/caption/styles/CdrCaption.module.scss.mjs +2 -2
- package/dist/src/components/card/styles/CdrCard.module.scss.mjs +1 -1
- package/dist/src/components/checkbox/styles/CdrCheckbox.module.scss.mjs +27 -27
- package/dist/src/components/chip/styles/CdrChip.module.scss.mjs +4 -4
- package/dist/src/components/chip/styles/CdrChipGroup.module.scss.mjs +4 -4
- package/dist/src/components/container/styles/CdrContainer.module.scss.mjs +2 -2
- package/dist/src/components/formError/styles/CdrFormError.module.scss.mjs +2 -2
- package/dist/src/components/formGroup/styles/CdrFormGroup.module.scss.mjs +8 -8
- package/dist/src/components/grid/styles/CdrGrid.module.scss.mjs +21 -21
- package/dist/src/components/icon/styles/CdrIcon.module.scss.mjs +12 -12
- package/dist/src/components/image/styles/CdrImg.module.scss.mjs +8 -8
- package/dist/src/components/input/CdrInput.vue2.mjs +32 -32
- package/dist/src/components/input/styles/CdrInput.module.scss.mjs +32 -32
- package/dist/src/components/labelStandalone/styles/CdrLabelStandalone.module.scss.mjs +12 -12
- package/dist/src/components/labelWrapper/styles/CdrLabelWrapper.module.scss.mjs +25 -25
- package/dist/src/components/link/styles/CdrLink.module.scss.mjs +3 -3
- package/dist/src/components/list/styles/CdrList.module.scss.mjs +5 -5
- package/dist/src/components/modal/CdrModal.vue2.mjs +37 -37
- package/dist/src/components/modal/styles/CdrModal.module.scss.mjs +12 -12
- package/dist/src/components/pagination/styles/CdrPagination.module.scss.mjs +53 -53
- package/dist/src/components/popover/styles/CdrPopover.module.scss.mjs +63 -63
- package/dist/src/components/popup/styles/CdrPopup.module.scss.mjs +14 -14
- package/dist/src/components/quote/styles/CdrQuote.module.scss.mjs +4 -4
- package/dist/src/components/radio/styles/CdrRadio.module.scss.mjs +27 -27
- package/dist/src/components/rating/styles/CdrRating.module.scss.mjs +44 -44
- package/dist/src/components/select/styles/CdrSelect.module.scss.mjs +42 -42
- package/dist/src/components/skeleton/styles/CdrSkeleton.module.scss.mjs +1 -1
- package/dist/src/components/skeleton/styles/CdrSkeletonBone.module.scss.mjs +7 -7
- package/dist/src/components/switch/styles/CdrSwitch.module.scss.mjs +8 -8
- package/dist/src/components/table/styles/CdrTable.module.scss.mjs +13 -13
- package/dist/src/components/tabs/styles/CdrTabPanel.module.scss.mjs +5 -5
- package/dist/src/components/tabs/styles/CdrTabs.module.scss.mjs +28 -28
- package/dist/src/components/text/styles/CdrText.module.scss.mjs +1 -1
- package/dist/src/components/toast/styles/CdrToast.module.scss.mjs +57 -57
- package/dist/src/components/toggleButton/styles/CdrToggleButton.module.scss.mjs +2 -2
- package/dist/src/components/toggleButton/styles/CdrToggleGroup.module.scss.mjs +5 -5
- package/dist/src/components/tooltip/styles/CdrTooltip.module.scss.mjs +16 -16
- package/dist/style/cdr-accordion-group.css +1 -1
- package/dist/style/cdr-accordion.css +1 -1
- package/dist/style/cdr-banner.css +1 -1
- package/dist/style/cdr-breadcrumb.css +1 -1
- package/dist/style/cdr-button.css +1 -1
- package/dist/style/cdr-caption.css +1 -1
- package/dist/style/cdr-card.css +1 -1
- package/dist/style/cdr-checkbox.css +1 -1
- package/dist/style/cdr-chip-group.css +1 -1
- package/dist/style/cdr-chip.css +1 -1
- package/dist/style/cdr-container.css +1 -1
- package/dist/style/cdr-form-error.css +1 -1
- package/dist/style/cdr-form-group.css +1 -1
- package/dist/style/cdr-grid.css +1 -1
- package/dist/style/cdr-icon.css +1 -1
- package/dist/style/cdr-img.css +1 -1
- package/dist/style/cdr-input.css +1 -1
- package/dist/style/cdr-label-standalone.css +1 -1
- package/dist/style/cdr-label-wrapper.css +1 -1
- package/dist/style/cdr-link.css +1 -1
- package/dist/style/cdr-list.css +1 -1
- package/dist/style/cdr-modal.css +1 -1
- package/dist/style/cdr-pagination.css +1 -1
- package/dist/style/cdr-popover.css +1 -1
- package/dist/style/cdr-popup.css +1 -1
- package/dist/style/cdr-quote.css +1 -1
- package/dist/style/cdr-radio.css +1 -1
- package/dist/style/cdr-rating.css +1 -1
- package/dist/style/cdr-select.css +1 -1
- package/dist/style/cdr-skeleton-bone.css +1 -1
- package/dist/style/cdr-skeleton.css +1 -1
- package/dist/style/cdr-switch.css +1 -1
- package/dist/style/cdr-tab-panel.css +1 -1
- package/dist/style/cdr-table.css +1 -1
- package/dist/style/cdr-tabs.css +1 -1
- package/dist/style/cdr-text.css +1 -1
- package/dist/style/cdr-toast.css +1 -1
- package/dist/style/cdr-toggle-button.css +1 -1
- package/dist/style/cdr-toggle-group.css +1 -1
- package/dist/style/cdr-tooltip.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as j, useSlots as O, useAttrs as G, useCssModule as J, ref as K, computed as
|
|
1
|
+
import { defineComponent as j, useSlots as O, useAttrs as G, useCssModule as J, ref as K, computed as l, openBlock as m, createBlock as P, unref as r, normalizeClass as v, createSlots as Q, withCtx as d, createElementVNode as z, withDirectives as N, createElementBlock as f, mergeProps as A, vModelText as W, vModelDynamic as X, renderSlot as u, createCommentVNode as y } from "vue";
|
|
2
2
|
import Y from "../../utils/propValidator.mjs";
|
|
3
3
|
import Z from "../labelStandalone/CdrLabelStandalone.vue.mjs";
|
|
4
4
|
import _ from "../formError/CdrFormError.vue.mjs";
|
|
5
5
|
import ee from "../../props/size.mjs";
|
|
6
6
|
import re from "../../props/background.mjs";
|
|
7
7
|
import $ from "../../utils/mapClasses.mjs";
|
|
8
|
-
import
|
|
9
|
-
const
|
|
8
|
+
import te from "../../utils/uid.mjs";
|
|
9
|
+
const oe = ["rows", "id", "disabled", "aria-required", "aria-invalid", "aria-errormessage", "aria-describedby"], ae = ["type", "disabled", "aria-required", "aria-invalid", "aria-errormessage", "aria-describedby"], le = ["id"], h = "cdr-input", ve = /* @__PURE__ */ j({
|
|
10
10
|
name: "CdrInput",
|
|
11
11
|
inheritAttrs: !1,
|
|
12
12
|
customOptions: {},
|
|
@@ -20,15 +20,15 @@ const te = ["rows", "id", "disabled", "aria-required", "aria-invalid", "aria-err
|
|
|
20
20
|
},
|
|
21
21
|
/**
|
|
22
22
|
* 'type' attribute for the input as defined by w3c.
|
|
23
|
-
* Only supporting text|email|number|password|search|url|date.
|
|
23
|
+
* Only supporting text|email|number|password|search|url|date|datetime-local.
|
|
24
24
|
* The increment/decrement webkit psuedo element is hidden for number.
|
|
25
25
|
* @demoSelectMultiple false
|
|
26
|
-
* @values text, email, number, password, search, url, tel, date
|
|
26
|
+
* @values text, email, number, password, search, url, tel, date, datetime-local
|
|
27
27
|
*/
|
|
28
28
|
type: {
|
|
29
29
|
type: [String],
|
|
30
30
|
default: "text",
|
|
31
|
-
validator: (e) => Y(e, ["text", "email", "number", "password", "search", "url", "tel", "date"])
|
|
31
|
+
validator: (e) => Y(e, ["text", "email", "number", "password", "search", "url", "tel", "date", "datetime-local"])
|
|
32
32
|
},
|
|
33
33
|
/**
|
|
34
34
|
* Sets the text value for the input label. Required for a11y compliance. Use ‘hideLabel’ if the label display is not desired. Required.
|
|
@@ -108,27 +108,27 @@ const te = ["rows", "id", "disabled", "aria-required", "aria-invalid", "aria-err
|
|
|
108
108
|
setup(e, {
|
|
109
109
|
emit: F
|
|
110
110
|
}) {
|
|
111
|
-
const a = e,
|
|
112
|
-
const
|
|
113
|
-
return a.error ? `${s}-error` :
|
|
114
|
-
}), R =
|
|
115
|
-
const
|
|
111
|
+
const a = e, i = O(), C = G(), c = J(), p = K(!1), M = i["helper-text-top"], E = i["helper-text-bottom"], g = i["pre-icon"], k = i["post-icon"], L = i["post-icon"] ? i["post-icon"]().length > 1 : !1, T = i.info, U = i["info-action"], s = a.id ? a.id : te(), D = l(() => a.rows > 1 ? "cdr-input--multiline" : ""), q = l(() => g ? "cdr-input--preicon" : ""), B = l(() => k ? "cdr-input--posticon" : ""), w = l(() => L ? "cdr-input--posticons" : ""), x = l(() => a.error ? "cdr-input--error" : ""), I = l(() => `cdr-input--${a.background}`), S = l(() => a.size ? `${h}--${a.size}` : ""), H = l(() => p.value ? "cdr-input--focus" : ""), V = l(() => {
|
|
112
|
+
const t = [i["helper-text-top"] ? `${s}-helper-text-top` : "", i["helper-text-bottom"] ? `${s}-helper-text-bottom` : "", C["aria-describedby"]].filter((o) => o).join(" ");
|
|
113
|
+
return a.error ? `${s}-error` : t;
|
|
114
|
+
}), R = l(() => {
|
|
115
|
+
const t = a.numeric || a.type === "number";
|
|
116
116
|
return {
|
|
117
117
|
id: s,
|
|
118
118
|
autocomplete: "off",
|
|
119
|
-
pattern:
|
|
120
|
-
inputmode:
|
|
119
|
+
pattern: t ? "[0-9]*" : void 0,
|
|
120
|
+
inputmode: t ? "numeric" : void 0,
|
|
121
121
|
...C
|
|
122
122
|
};
|
|
123
|
-
}), b =
|
|
123
|
+
}), b = l({
|
|
124
124
|
get() {
|
|
125
125
|
return a.modelValue;
|
|
126
126
|
},
|
|
127
|
-
set(
|
|
128
|
-
F("update:modelValue",
|
|
127
|
+
set(t) {
|
|
128
|
+
F("update:modelValue", t);
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
|
-
return (
|
|
131
|
+
return (t, o) => (m(), P(Z, {
|
|
132
132
|
"for-id": r(s),
|
|
133
133
|
label: e.label,
|
|
134
134
|
"hide-label": e.hideLabel,
|
|
@@ -149,11 +149,11 @@ const te = ["rows", "id", "disabled", "aria-required", "aria-invalid", "aria-err
|
|
|
149
149
|
"aria-invalid": !!e.error || void 0,
|
|
150
150
|
"aria-errormessage": !!e.error && `${r(s)}-error` || void 0,
|
|
151
151
|
"aria-describedby": V.value || void 0
|
|
152
|
-
},
|
|
153
|
-
onFocus:
|
|
154
|
-
onBlur:
|
|
155
|
-
"onUpdate:modelValue":
|
|
156
|
-
}), null, 16,
|
|
152
|
+
}, t.$attrs, {
|
|
153
|
+
onFocus: o[0] || (o[0] = (n) => p.value = !0),
|
|
154
|
+
onBlur: o[1] || (o[1] = (n) => p.value = !1),
|
|
155
|
+
"onUpdate:modelValue": o[2] || (o[2] = (n) => b.value = n)
|
|
156
|
+
}), null, 16, oe)), [[W, b.value]]) : N((m(), f("input", A({
|
|
157
157
|
key: 1,
|
|
158
158
|
type: e.type,
|
|
159
159
|
class: r($)(r(c), h, q.value, B.value, w.value, x.value, I.value, S.value),
|
|
@@ -163,35 +163,35 @@ const te = ["rows", "id", "disabled", "aria-required", "aria-invalid", "aria-err
|
|
|
163
163
|
"aria-errormessage": !!e.error && `${r(s)}-error` || void 0
|
|
164
164
|
}, R.value, {
|
|
165
165
|
"aria-describedby": V.value || void 0,
|
|
166
|
-
onFocus:
|
|
167
|
-
onBlur:
|
|
168
|
-
"onUpdate:modelValue":
|
|
166
|
+
onFocus: o[3] || (o[3] = (n) => p.value = !0),
|
|
167
|
+
onBlur: o[4] || (o[4] = (n) => p.value = !1),
|
|
168
|
+
"onUpdate:modelValue": o[5] || (o[5] = (n) => b.value = n)
|
|
169
169
|
}), null, 16, ae)), [[X, b.value]]), r(g) ? (m(), f("span", {
|
|
170
170
|
key: 2,
|
|
171
171
|
class: v(r(c)["cdr-input__pre-icon"])
|
|
172
|
-
}, [u(
|
|
172
|
+
}, [u(t.$slots, "pre-icon")], 2)) : y("", !0), r(k) ? (m(), f("span", {
|
|
173
173
|
key: 3,
|
|
174
174
|
class: v(r(c)["cdr-input__post-icon"])
|
|
175
|
-
}, [u(
|
|
175
|
+
}, [u(t.$slots, "post-icon")], 2)) : y("", !0)], 2)]),
|
|
176
176
|
_: 2
|
|
177
177
|
}, [r(M) ? {
|
|
178
178
|
name: "helper",
|
|
179
|
-
fn: d(() => [u(
|
|
179
|
+
fn: d(() => [u(t.$slots, "helper-text-top")]),
|
|
180
180
|
key: "0"
|
|
181
181
|
} : void 0, r(T) ? {
|
|
182
182
|
name: "info",
|
|
183
|
-
fn: d(() => [u(
|
|
183
|
+
fn: d(() => [u(t.$slots, "info")]),
|
|
184
184
|
key: "1"
|
|
185
185
|
} : void 0, r(U) ? {
|
|
186
186
|
name: "info-action",
|
|
187
|
-
fn: d(() => [u(
|
|
187
|
+
fn: d(() => [u(t.$slots, "info-action")]),
|
|
188
188
|
key: "2"
|
|
189
189
|
} : void 0, r(E) && !e.error ? {
|
|
190
190
|
name: "helper-text-bottom",
|
|
191
191
|
fn: d(() => [z("span", {
|
|
192
192
|
id: `${r(s)}-helper-text-bottom`,
|
|
193
193
|
class: v(r(c)["cdr-input__helper-text"])
|
|
194
|
-
}, [u(
|
|
194
|
+
}, [u(t.$slots, "helper-text-bottom")], 10, le)]),
|
|
195
195
|
key: "3"
|
|
196
196
|
} : void 0, e.error ? {
|
|
197
197
|
name: "error",
|
|
@@ -201,7 +201,7 @@ const te = ["rows", "id", "disabled", "aria-required", "aria-invalid", "aria-err
|
|
|
201
201
|
role: e.errorRole,
|
|
202
202
|
id: `${r(s)}-error`
|
|
203
203
|
}, {
|
|
204
|
-
error: d(() => [u(
|
|
204
|
+
error: d(() => [u(t.$slots, "error")]),
|
|
205
205
|
_: 3
|
|
206
206
|
}, 8, ["error", "role", "id"])) : y("", !0)]),
|
|
207
207
|
key: "4"
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
const n = {
|
|
2
|
-
"cdr-label-standalone": "cdr-label-standalone_14-
|
|
3
|
-
"cdr-label-standalone__label-wrapper": "cdr-label-standalone__label-wrapper_14-
|
|
4
|
-
"cdr-label-standalone__label": "cdr-label-standalone__label_14-
|
|
5
|
-
"cdr-label-standalone__label--sr-only": "cdr-label-standalone__label--sr-only_14-
|
|
6
|
-
"cdr-label-standalone__label--disabled": "cdr-label-standalone__label--disabled_14-
|
|
7
|
-
"cdr-label-standalone__optional": "cdr-label-standalone__optional_14-
|
|
8
|
-
"cdr-label-standalone__helper": "cdr-label-standalone__helper_14-
|
|
9
|
-
"cdr-label-standalone__info": "cdr-label-standalone__info_14-
|
|
10
|
-
"cdr-label-standalone__post-content": "cdr-label-standalone__post-content_14-
|
|
11
|
-
"cdr-label-standalone__info-action": "cdr-label-standalone__info-action_14-
|
|
12
|
-
"cdr-label-standalone__input-wrap": "cdr-label-standalone__input-wrap_14-
|
|
13
|
-
"cdr-label-standalone__input-spacing": "cdr-label-standalone__input-spacing_14-
|
|
14
|
-
"cdr-form-error": "cdr-form-error_14-
|
|
15
|
-
"cdr-form-error__icon": "cdr-form-error__icon_14-
|
|
16
|
-
"cdr-input": "cdr-input_14-
|
|
17
|
-
"cdr-input--focus": "cdr-input--focus_14-
|
|
18
|
-
"cdr-input--multiline": "cdr-input--multiline_14-
|
|
19
|
-
"cdr-input--preicon": "cdr-input--preicon_14-
|
|
20
|
-
"cdr-input--posticon": "cdr-input--posticon_14-
|
|
21
|
-
"cdr-input--posticons": "cdr-input--posticons_14-
|
|
22
|
-
"cdr-input--primary": "cdr-input--primary_14-
|
|
23
|
-
"cdr-input--secondary": "cdr-input--secondary_14-
|
|
24
|
-
"cdr-input--error": "cdr-input--error_14-
|
|
25
|
-
"cdr-input--large": "cdr-input--large_14-
|
|
26
|
-
"cdr-input--large@xs": "cdr-input--large@xs_14-
|
|
27
|
-
"cdr-input--large@sm": "cdr-input--large@sm_14-
|
|
28
|
-
"cdr-input--large@md": "cdr-input--large@md_14-
|
|
29
|
-
"cdr-input--large@lg": "cdr-input--large@lg_14-
|
|
30
|
-
"cdr-input__pre-icon": "cdr-input__pre-icon_14-
|
|
31
|
-
"cdr-input__post-icon": "cdr-input__post-icon_14-
|
|
32
|
-
"cdr-input__helper-text": "cdr-input__helper-text_14-
|
|
33
|
-
"cdr-input-wrap": "cdr-input-wrap_14-
|
|
2
|
+
"cdr-label-standalone": "cdr-label-standalone_14-1-1",
|
|
3
|
+
"cdr-label-standalone__label-wrapper": "cdr-label-standalone__label-wrapper_14-1-1",
|
|
4
|
+
"cdr-label-standalone__label": "cdr-label-standalone__label_14-1-1",
|
|
5
|
+
"cdr-label-standalone__label--sr-only": "cdr-label-standalone__label--sr-only_14-1-1",
|
|
6
|
+
"cdr-label-standalone__label--disabled": "cdr-label-standalone__label--disabled_14-1-1",
|
|
7
|
+
"cdr-label-standalone__optional": "cdr-label-standalone__optional_14-1-1",
|
|
8
|
+
"cdr-label-standalone__helper": "cdr-label-standalone__helper_14-1-1",
|
|
9
|
+
"cdr-label-standalone__info": "cdr-label-standalone__info_14-1-1",
|
|
10
|
+
"cdr-label-standalone__post-content": "cdr-label-standalone__post-content_14-1-1",
|
|
11
|
+
"cdr-label-standalone__info-action": "cdr-label-standalone__info-action_14-1-1",
|
|
12
|
+
"cdr-label-standalone__input-wrap": "cdr-label-standalone__input-wrap_14-1-1",
|
|
13
|
+
"cdr-label-standalone__input-spacing": "cdr-label-standalone__input-spacing_14-1-1",
|
|
14
|
+
"cdr-form-error": "cdr-form-error_14-1-1",
|
|
15
|
+
"cdr-form-error__icon": "cdr-form-error__icon_14-1-1",
|
|
16
|
+
"cdr-input": "cdr-input_14-1-1",
|
|
17
|
+
"cdr-input--focus": "cdr-input--focus_14-1-1",
|
|
18
|
+
"cdr-input--multiline": "cdr-input--multiline_14-1-1",
|
|
19
|
+
"cdr-input--preicon": "cdr-input--preicon_14-1-1",
|
|
20
|
+
"cdr-input--posticon": "cdr-input--posticon_14-1-1",
|
|
21
|
+
"cdr-input--posticons": "cdr-input--posticons_14-1-1",
|
|
22
|
+
"cdr-input--primary": "cdr-input--primary_14-1-1",
|
|
23
|
+
"cdr-input--secondary": "cdr-input--secondary_14-1-1",
|
|
24
|
+
"cdr-input--error": "cdr-input--error_14-1-1",
|
|
25
|
+
"cdr-input--large": "cdr-input--large_14-1-1",
|
|
26
|
+
"cdr-input--large@xs": "cdr-input--large@xs_14-1-1",
|
|
27
|
+
"cdr-input--large@sm": "cdr-input--large@sm_14-1-1",
|
|
28
|
+
"cdr-input--large@md": "cdr-input--large@md_14-1-1",
|
|
29
|
+
"cdr-input--large@lg": "cdr-input--large@lg_14-1-1",
|
|
30
|
+
"cdr-input__pre-icon": "cdr-input__pre-icon_14-1-1",
|
|
31
|
+
"cdr-input__post-icon": "cdr-input__post-icon_14-1-1",
|
|
32
|
+
"cdr-input__helper-text": "cdr-input__helper-text_14-1-1",
|
|
33
|
+
"cdr-input-wrap": "cdr-input-wrap_14-1-1"
|
|
34
34
|
};
|
|
35
35
|
export {
|
|
36
36
|
n as default
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
const l = {
|
|
2
|
-
"cdr-label-standalone": "cdr-label-standalone_14-
|
|
3
|
-
"cdr-label-standalone__label-wrapper": "cdr-label-standalone__label-wrapper_14-
|
|
4
|
-
"cdr-label-standalone__label": "cdr-label-standalone__label_14-
|
|
5
|
-
"cdr-label-standalone__label--sr-only": "cdr-label-standalone__label--sr-only_14-
|
|
6
|
-
"cdr-label-standalone__label--disabled": "cdr-label-standalone__label--disabled_14-
|
|
7
|
-
"cdr-label-standalone__optional": "cdr-label-standalone__optional_14-
|
|
8
|
-
"cdr-label-standalone__helper": "cdr-label-standalone__helper_14-
|
|
9
|
-
"cdr-label-standalone__info": "cdr-label-standalone__info_14-
|
|
10
|
-
"cdr-label-standalone__post-content": "cdr-label-standalone__post-content_14-
|
|
11
|
-
"cdr-label-standalone__info-action": "cdr-label-standalone__info-action_14-
|
|
12
|
-
"cdr-label-standalone__input-wrap": "cdr-label-standalone__input-wrap_14-
|
|
13
|
-
"cdr-label-standalone__input-spacing": "cdr-label-standalone__input-spacing_14-
|
|
2
|
+
"cdr-label-standalone": "cdr-label-standalone_14-1-1",
|
|
3
|
+
"cdr-label-standalone__label-wrapper": "cdr-label-standalone__label-wrapper_14-1-1",
|
|
4
|
+
"cdr-label-standalone__label": "cdr-label-standalone__label_14-1-1",
|
|
5
|
+
"cdr-label-standalone__label--sr-only": "cdr-label-standalone__label--sr-only_14-1-1",
|
|
6
|
+
"cdr-label-standalone__label--disabled": "cdr-label-standalone__label--disabled_14-1-1",
|
|
7
|
+
"cdr-label-standalone__optional": "cdr-label-standalone__optional_14-1-1",
|
|
8
|
+
"cdr-label-standalone__helper": "cdr-label-standalone__helper_14-1-1",
|
|
9
|
+
"cdr-label-standalone__info": "cdr-label-standalone__info_14-1-1",
|
|
10
|
+
"cdr-label-standalone__post-content": "cdr-label-standalone__post-content_14-1-1",
|
|
11
|
+
"cdr-label-standalone__info-action": "cdr-label-standalone__info-action_14-1-1",
|
|
12
|
+
"cdr-label-standalone__input-wrap": "cdr-label-standalone__input-wrap_14-1-1",
|
|
13
|
+
"cdr-label-standalone__input-spacing": "cdr-label-standalone__input-spacing_14-1-1"
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
16
16
|
l as default
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
const r = {
|
|
2
|
-
"cdr-label-wrapper": "cdr-label-wrapper_14-
|
|
3
|
-
"cdr-label-wrapper__container": "cdr-label-wrapper__container_14-
|
|
4
|
-
"cdr-label-wrapper--primary": "cdr-label-wrapper--primary_14-
|
|
5
|
-
"cdr-label-wrapper--secondary": "cdr-label-wrapper--secondary_14-
|
|
6
|
-
"cdr-label-wrapper--disabled": "cdr-label-wrapper--disabled_14-
|
|
7
|
-
"cdr-label-wrapper__figure": "cdr-label-wrapper__figure_14-
|
|
8
|
-
"cdr-label-wrapper__content": "cdr-label-wrapper__content_14-
|
|
9
|
-
"cdr-label-wrapper--hide-figure": "cdr-label-wrapper--hide-figure_14-
|
|
10
|
-
"cdr-checkbox__svg-box": "cdr-checkbox__svg-box_14-
|
|
11
|
-
"cdr-label-wrapper--small": "cdr-label-wrapper--small_14-
|
|
12
|
-
"cdr-label-wrapper--medium": "cdr-label-wrapper--medium_14-
|
|
13
|
-
"cdr-label-wrapper--large": "cdr-label-wrapper--large_14-
|
|
14
|
-
"cdr-checkbox__checkbox-box": "cdr-checkbox__checkbox-box_14-
|
|
15
|
-
"cdr-label-wrapper--small@xs": "cdr-label-wrapper--small@xs_14-
|
|
16
|
-
"cdr-label-wrapper--medium@xs": "cdr-label-wrapper--medium@xs_14-
|
|
17
|
-
"cdr-label-wrapper--large@xs": "cdr-label-wrapper--large@xs_14-
|
|
18
|
-
"cdr-label-wrapper--small@sm": "cdr-label-wrapper--small@sm_14-
|
|
19
|
-
"cdr-label-wrapper--medium@sm": "cdr-label-wrapper--medium@sm_14-
|
|
20
|
-
"cdr-label-wrapper--large@sm": "cdr-label-wrapper--large@sm_14-
|
|
21
|
-
"cdr-label-wrapper--small@md": "cdr-label-wrapper--small@md_14-
|
|
22
|
-
"cdr-label-wrapper--medium@md": "cdr-label-wrapper--medium@md_14-
|
|
23
|
-
"cdr-label-wrapper--large@md": "cdr-label-wrapper--large@md_14-
|
|
24
|
-
"cdr-label-wrapper--small@lg": "cdr-label-wrapper--small@lg_14-
|
|
25
|
-
"cdr-label-wrapper--medium@lg": "cdr-label-wrapper--medium@lg_14-
|
|
26
|
-
"cdr-label-wrapper--large@lg": "cdr-label-wrapper--large@lg_14-
|
|
2
|
+
"cdr-label-wrapper": "cdr-label-wrapper_14-1-1",
|
|
3
|
+
"cdr-label-wrapper__container": "cdr-label-wrapper__container_14-1-1",
|
|
4
|
+
"cdr-label-wrapper--primary": "cdr-label-wrapper--primary_14-1-1",
|
|
5
|
+
"cdr-label-wrapper--secondary": "cdr-label-wrapper--secondary_14-1-1",
|
|
6
|
+
"cdr-label-wrapper--disabled": "cdr-label-wrapper--disabled_14-1-1",
|
|
7
|
+
"cdr-label-wrapper__figure": "cdr-label-wrapper__figure_14-1-1",
|
|
8
|
+
"cdr-label-wrapper__content": "cdr-label-wrapper__content_14-1-1",
|
|
9
|
+
"cdr-label-wrapper--hide-figure": "cdr-label-wrapper--hide-figure_14-1-1",
|
|
10
|
+
"cdr-checkbox__svg-box": "cdr-checkbox__svg-box_14-1-1",
|
|
11
|
+
"cdr-label-wrapper--small": "cdr-label-wrapper--small_14-1-1",
|
|
12
|
+
"cdr-label-wrapper--medium": "cdr-label-wrapper--medium_14-1-1",
|
|
13
|
+
"cdr-label-wrapper--large": "cdr-label-wrapper--large_14-1-1",
|
|
14
|
+
"cdr-checkbox__checkbox-box": "cdr-checkbox__checkbox-box_14-1-1",
|
|
15
|
+
"cdr-label-wrapper--small@xs": "cdr-label-wrapper--small@xs_14-1-1",
|
|
16
|
+
"cdr-label-wrapper--medium@xs": "cdr-label-wrapper--medium@xs_14-1-1",
|
|
17
|
+
"cdr-label-wrapper--large@xs": "cdr-label-wrapper--large@xs_14-1-1",
|
|
18
|
+
"cdr-label-wrapper--small@sm": "cdr-label-wrapper--small@sm_14-1-1",
|
|
19
|
+
"cdr-label-wrapper--medium@sm": "cdr-label-wrapper--medium@sm_14-1-1",
|
|
20
|
+
"cdr-label-wrapper--large@sm": "cdr-label-wrapper--large@sm_14-1-1",
|
|
21
|
+
"cdr-label-wrapper--small@md": "cdr-label-wrapper--small@md_14-1-1",
|
|
22
|
+
"cdr-label-wrapper--medium@md": "cdr-label-wrapper--medium@md_14-1-1",
|
|
23
|
+
"cdr-label-wrapper--large@md": "cdr-label-wrapper--large@md_14-1-1",
|
|
24
|
+
"cdr-label-wrapper--small@lg": "cdr-label-wrapper--small@lg_14-1-1",
|
|
25
|
+
"cdr-label-wrapper--medium@lg": "cdr-label-wrapper--medium@lg_14-1-1",
|
|
26
|
+
"cdr-label-wrapper--large@lg": "cdr-label-wrapper--large@lg_14-1-1"
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
29
|
r as default
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const n = {
|
|
2
|
-
"cdr-link": "cdr-link_14-
|
|
3
|
-
"cdr-link--standalone": "cdr-link--standalone_14-
|
|
4
|
-
"cdr-link--inherit-color": "cdr-link--inherit-color_14-
|
|
2
|
+
"cdr-link": "cdr-link_14-1-1",
|
|
3
|
+
"cdr-link--standalone": "cdr-link--standalone_14-1-1",
|
|
4
|
+
"cdr-link--inherit-color": "cdr-link--inherit-color_14-1-1"
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
n as default
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const d = {
|
|
2
|
-
"cdr-list": "cdr-list_14-
|
|
3
|
-
"cdr-list--compact": "cdr-list--compact_14-
|
|
4
|
-
"cdr-list--ordered": "cdr-list--ordered_14-
|
|
5
|
-
"cdr-list--unordered": "cdr-list--unordered_14-
|
|
6
|
-
"cdr-list--inline": "cdr-list--inline_14-
|
|
2
|
+
"cdr-list": "cdr-list_14-1-1",
|
|
3
|
+
"cdr-list--compact": "cdr-list--compact_14-1-1",
|
|
4
|
+
"cdr-list--ordered": "cdr-list--ordered_14-1-1",
|
|
5
|
+
"cdr-list--unordered": "cdr-list--unordered_14-1-1",
|
|
6
|
+
"cdr-list--inline": "cdr-list--inline_14-1-1"
|
|
7
7
|
};
|
|
8
8
|
export {
|
|
9
9
|
d as default
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { debounce as
|
|
1
|
+
import { defineComponent as le, useAttrs as oe, useCssModule as ne, ref as l, computed as v, watch as ae, onMounted as se, onUnmounted as re, openBlock as de, createElementBlock as ce, normalizeClass as r, unref as o, createElementVNode as n, mergeProps as ie, renderSlot as E, normalizeStyle as z, toDisplayString as ue, createCommentVNode as me, createVNode as O, withCtx as fe, nextTick as A } from "vue";
|
|
2
|
+
import { debounce as ve } from "../../utils/debounce.mjs";
|
|
3
3
|
import R from "tabbable";
|
|
4
|
-
import { CdrSpaceTwoX as X, CdrSpaceOneX as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
4
|
+
import { CdrSpaceTwoX as X, CdrSpaceOneX as pe, CdrBreakpointSm as he } from "../../../node_modules/@rei/cdr-tokens/dist/rei-dot-com/js/cdr-tokens.mjs";
|
|
5
|
+
import ye from "./onTransitionEnd.mjs";
|
|
6
|
+
import be from "../button/CdrButton.vue.mjs";
|
|
7
|
+
import ge from "../icon/comps/x-lg.vue.mjs";
|
|
8
8
|
import P from "../../utils/mapClasses.mjs";
|
|
9
|
-
const
|
|
9
|
+
const we = ["tabIndex"], xe = ["role", "aria-label"], Ce = ["tabIndex"], Ee = "cdr-modal", We = /* @__PURE__ */ le({
|
|
10
10
|
name: "CdrModal",
|
|
11
|
+
inheritAttrs: !1,
|
|
11
12
|
__name: "CdrModal",
|
|
12
13
|
props: {
|
|
13
14
|
/**
|
|
@@ -71,21 +72,20 @@ const ge = ["tabIndex"], we = ["role", "aria-label"], xe = ["tabIndex"], Ce = "c
|
|
|
71
72
|
}
|
|
72
73
|
},
|
|
73
74
|
emits: {
|
|
74
|
-
/** Fires when modal is closed */
|
|
75
75
|
closed: null
|
|
76
76
|
},
|
|
77
77
|
setup(a, {
|
|
78
78
|
emit: V
|
|
79
79
|
}) {
|
|
80
|
-
const i = a, F =
|
|
80
|
+
const i = a, F = oe(), s = ne();
|
|
81
81
|
let y, b;
|
|
82
82
|
const g = l(!i.opened), w = l(!1), d = l({
|
|
83
83
|
x: void 0,
|
|
84
84
|
y: void 0
|
|
85
|
-
}), _ = l(0), S = l(0), k = l(0), L = l(0), H = l(0), T = l(0), N = l(!1), u = l(null),
|
|
85
|
+
}), _ = l(0), S = l(0), k = l(0), L = l(0), H = l(0), T = l(0), N = l(!1), u = l(null), p = l(null), m = l(null), B = l(null), x = () => {
|
|
86
86
|
A(() => {
|
|
87
|
-
var e, t, f, c,
|
|
88
|
-
S.value = window.innerHeight, N.value = window.innerWidth < +
|
|
87
|
+
var e, t, f, c, h;
|
|
88
|
+
S.value = window.innerHeight, N.value = window.innerWidth < +he, _.value = ((e = B.value) == null ? void 0 : e.offsetHeight) || 0, k.value = ((t = m.value) == null ? void 0 : t.scrollHeight) || 0, L.value = ((f = m.value) == null ? void 0 : f.offsetHeight) || 0, H.value = ((c = m.value) == null ? void 0 : c.offsetWidth) || 0, T.value = ((h = m.value) == null ? void 0 : h.clientWidth) || 0;
|
|
89
89
|
});
|
|
90
90
|
}, C = (e) => {
|
|
91
91
|
V("closed", e);
|
|
@@ -105,9 +105,9 @@ const ge = ["tabIndex"], we = ["role", "aria-label"], xe = ["tabIndex"], Ce = "c
|
|
|
105
105
|
} = document;
|
|
106
106
|
if ((M = u.value) != null && M.contains(e.target) || !t)
|
|
107
107
|
return;
|
|
108
|
-
const f = R(t), c = R(u.value),
|
|
108
|
+
const f = R(t), c = R(u.value), h = f.indexOf(e.target), te = f.indexOf(c[0]), D = h < te ? c[c.length - 1] : c[0];
|
|
109
109
|
D && D.focus();
|
|
110
|
-
}, I =
|
|
110
|
+
}, I = ve(() => {
|
|
111
111
|
x();
|
|
112
112
|
}, 300), K = () => {
|
|
113
113
|
const {
|
|
@@ -132,37 +132,40 @@ const ge = ["tabIndex"], we = ["role", "aria-label"], xe = ["tabIndex"], Ce = "c
|
|
|
132
132
|
} = document;
|
|
133
133
|
K(), w.value = !0, g.value = !1, b = e, A(() => {
|
|
134
134
|
u.value && u.value.focus(), x(), Y(), setTimeout(() => {
|
|
135
|
-
|
|
135
|
+
p.value && (p.value.scrollTop = 0), x();
|
|
136
136
|
});
|
|
137
137
|
});
|
|
138
138
|
}, j = () => {
|
|
139
139
|
const {
|
|
140
140
|
documentElement: e
|
|
141
141
|
} = document;
|
|
142
|
-
document.removeEventListener("keydown", W), document.removeEventListener("focusin", $, !0), w.value = !1, y =
|
|
142
|
+
document.removeEventListener("keydown", W), document.removeEventListener("focusin", $, !0), w.value = !1, y = ye(p.value, () => {
|
|
143
143
|
w.value || (y && y(), U(), g.value = !0, e && (e.style.scrollBehavior = "auto"), d.value.x !== void 0 && d.value.y !== void 0 && window.scrollTo(d.value.x, d.value.y), e && (e.style.scrollBehavior = ""), b && b.focus());
|
|
144
144
|
}, i.animationDuration + 16);
|
|
145
|
-
}, G =
|
|
145
|
+
}, G = v(() => ({
|
|
146
146
|
...F,
|
|
147
147
|
"aria-describedby": i.ariaDescribedby,
|
|
148
148
|
id: i.id
|
|
149
|
-
})), J =
|
|
150
|
-
const e = Number(X), t = Number(X) + Number(
|
|
149
|
+
})), J = v(() => {
|
|
150
|
+
const e = Number(X), t = Number(X) + Number(pe);
|
|
151
151
|
return N.value ? e : t + e;
|
|
152
|
-
}), Q =
|
|
152
|
+
}), Q = v(() => S.value - _.value - J.value), Z = v(() => {
|
|
153
153
|
const e = k.value > L.value, t = H.value - T.value > 0;
|
|
154
154
|
return e && t ? 4 : e ? 12 : 0;
|
|
155
|
-
})
|
|
156
|
-
|
|
155
|
+
}), ee = v(() => ({
|
|
156
|
+
maxHeight: `${Q.value}px`,
|
|
157
|
+
paddingRight: `${Z.value}px`
|
|
158
|
+
}));
|
|
159
|
+
return ae(() => i.opened, (e, t) => {
|
|
157
160
|
!!e != !!t && (e ? q() : j());
|
|
158
|
-
}), ae(() => {
|
|
159
|
-
i.opened && q(), window.addEventListener("resize", I);
|
|
160
161
|
}), se(() => {
|
|
162
|
+
i.opened && q(), window.addEventListener("resize", I);
|
|
163
|
+
}), re(() => {
|
|
161
164
|
window.removeEventListener("resize", I);
|
|
162
|
-
}), (e, t) => (
|
|
163
|
-
class: r(o(P)(o(s),
|
|
165
|
+
}), (e, t) => (de(), ce("div", {
|
|
166
|
+
class: r(o(P)(o(s), Ee, a.opened ? "" : "cdr-modal--closed")),
|
|
164
167
|
ref_key: "wrapperEl",
|
|
165
|
-
ref:
|
|
168
|
+
ref: p
|
|
166
169
|
}, [n("div", {
|
|
167
170
|
class: r([o(s)["cdr-modal__outerWrap"], a.wrapperClass])
|
|
168
171
|
}, [n("div", {
|
|
@@ -171,7 +174,7 @@ const ge = ["tabIndex"], we = ["role", "aria-label"], xe = ["tabIndex"], Ce = "c
|
|
|
171
174
|
class: r([o(s)["cdr-modal__overlay"], a.overlayClass])
|
|
172
175
|
}, null, 2), n("div", {
|
|
173
176
|
tabIndex: a.opened ? "0" : void 0
|
|
174
|
-
}, null, 8,
|
|
177
|
+
}, null, 8, we), n("div", ie({
|
|
175
178
|
ref_key: "modalEl",
|
|
176
179
|
ref: u,
|
|
177
180
|
class: o(P)(o(s), "cdr-modal__contentWrap", "cdr-modal__dialog"),
|
|
@@ -194,32 +197,29 @@ const ge = ["tabIndex"], we = ["role", "aria-label"], xe = ["tabIndex"], Ce = "c
|
|
|
194
197
|
class: r(o(s)["cdr-modal__title"])
|
|
195
198
|
}, [a.showTitle ? E(e.$slots, "title", {
|
|
196
199
|
key: 0
|
|
197
|
-
}, () => [n("h1", null,
|
|
200
|
+
}, () => [n("h1", null, ue(a.label), 1)]) : me("", !0)], 2), O(be, {
|
|
198
201
|
class: r(o(s)["cdr-modal__close-button"]),
|
|
199
202
|
"icon-only": "",
|
|
200
203
|
"with-background": !0,
|
|
201
204
|
onClick: C,
|
|
202
205
|
"aria-label": "Close"
|
|
203
206
|
}, {
|
|
204
|
-
icon:
|
|
207
|
+
icon: fe(() => [O(ge, {
|
|
205
208
|
"inherit-color": ""
|
|
206
209
|
})]),
|
|
207
210
|
_: 1
|
|
208
211
|
}, 8, ["class"])], 2), n("div", {
|
|
209
212
|
class: r(o(s)["cdr-modal__text-content"]),
|
|
210
|
-
style: z(
|
|
211
|
-
maxHeight: `${Q.value}px`,
|
|
212
|
-
paddingRight: `${Z.value}px`
|
|
213
|
-
}),
|
|
213
|
+
style: z(ee.value),
|
|
214
214
|
role: "document",
|
|
215
215
|
ref_key: "contentEl",
|
|
216
216
|
ref: m,
|
|
217
217
|
tabindex: "0"
|
|
218
|
-
}, [E(e.$slots, "default")], 6)], 2)])], 6)])], 16,
|
|
218
|
+
}, [E(e.$slots, "default")], 6)], 2)])], 6)])], 16, xe), n("div", {
|
|
219
219
|
tabIndex: a.opened ? "0" : void 0
|
|
220
|
-
}, null, 8,
|
|
220
|
+
}, null, 8, Ce)], 2)], 2));
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
223
|
export {
|
|
224
|
-
|
|
224
|
+
We as default
|
|
225
225
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
const d = {
|
|
2
|
-
"cdr-modal": "cdr-modal_14-
|
|
3
|
-
"cdr-modal__overlay": "cdr-modal__overlay_14-
|
|
4
|
-
"cdr-modal__outerWrap": "cdr-modal__outerWrap_14-
|
|
5
|
-
"cdr-modal__contentWrap": "cdr-modal__contentWrap_14-
|
|
6
|
-
"cdr-modal__innerWrap": "cdr-modal__innerWrap_14-
|
|
7
|
-
"cdr-modal__dialog": "cdr-modal__dialog_14-
|
|
8
|
-
"cdr-modal__content": "cdr-modal__content_14-
|
|
9
|
-
"cdr-modal__header": "cdr-modal__header_14-
|
|
10
|
-
"cdr-modal__title": "cdr-modal__title_14-
|
|
11
|
-
"cdr-modal__close-button": "cdr-modal__close-button_14-
|
|
12
|
-
"cdr-modal__text-content": "cdr-modal__text-content_14-
|
|
13
|
-
"cdr-modal--closed": "cdr-modal--closed_14-
|
|
2
|
+
"cdr-modal": "cdr-modal_14-1-1",
|
|
3
|
+
"cdr-modal__overlay": "cdr-modal__overlay_14-1-1",
|
|
4
|
+
"cdr-modal__outerWrap": "cdr-modal__outerWrap_14-1-1",
|
|
5
|
+
"cdr-modal__contentWrap": "cdr-modal__contentWrap_14-1-1",
|
|
6
|
+
"cdr-modal__innerWrap": "cdr-modal__innerWrap_14-1-1",
|
|
7
|
+
"cdr-modal__dialog": "cdr-modal__dialog_14-1-1",
|
|
8
|
+
"cdr-modal__content": "cdr-modal__content_14-1-1",
|
|
9
|
+
"cdr-modal__header": "cdr-modal__header_14-1-1",
|
|
10
|
+
"cdr-modal__title": "cdr-modal__title_14-1-1",
|
|
11
|
+
"cdr-modal__close-button": "cdr-modal__close-button_14-1-1",
|
|
12
|
+
"cdr-modal__text-content": "cdr-modal__text-content_14-1-1",
|
|
13
|
+
"cdr-modal--closed": "cdr-modal--closed_14-1-1"
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
16
16
|
d as default
|