rei-kit 0.9.1 → 0.10.0
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.
|
@@ -16,6 +16,20 @@ type __VLS_Props = {
|
|
|
16
16
|
type?: 'text' | 'email' | 'password' | 'number' | 'search' | 'tel' | 'url' | 'date' | 'time' | 'datetime-local' | undefined;
|
|
17
17
|
/** `sm` for a field inside a row rather than in a form of its own. */
|
|
18
18
|
size?: 'sm' | 'md' | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* `unstyled` keeps the wiring and drops the surface.
|
|
21
|
+
*
|
|
22
|
+
* The label, the generated id, `aria-describedby` and the error are what a
|
|
23
|
+
* field is; the border and the height are what it looks like. A search box
|
|
24
|
+
* inside a bordered row, a url field in an editor popover — those places
|
|
25
|
+
* were hand-writing the whole thing to avoid the appearance, and losing the
|
|
26
|
+
* wiring with it.
|
|
27
|
+
*
|
|
28
|
+
* The same reasoning as `BaseButton`'s `unstyled`, and the same test: a
|
|
29
|
+
* primitive is finished when the app can take its behaviour without its
|
|
30
|
+
* paint.
|
|
31
|
+
*/
|
|
32
|
+
variant?: 'default' | 'unstyled' | undefined;
|
|
19
33
|
};
|
|
20
34
|
type __VLS_ModelProps = {
|
|
21
35
|
modelValue?: string | undefined;
|
|
@@ -22,6 +22,20 @@ declare const __VLS_export: <T extends string | number>(__VLS_props: NonNullable
|
|
|
22
22
|
* Every hand-written select across the three consuming apps was this one.
|
|
23
23
|
*/
|
|
24
24
|
size?: "sm" | "md" | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* `unstyled` keeps the wiring and drops the surface.
|
|
27
|
+
*
|
|
28
|
+
* The label, the generated id, `aria-describedby` and the error are what a
|
|
29
|
+
* field is; the border and the height are what it looks like. A search box
|
|
30
|
+
* inside a bordered row, a url field in an editor popover — those places
|
|
31
|
+
* were hand-writing the whole thing to avoid the appearance, and losing the
|
|
32
|
+
* wiring with it.
|
|
33
|
+
*
|
|
34
|
+
* The same reasoning as `BaseButton`'s `unstyled`, and the same test: a
|
|
35
|
+
* primitive is finished when the app can take its behaviour without its
|
|
36
|
+
* paint.
|
|
37
|
+
*/
|
|
38
|
+
variant?: "default" | "unstyled" | undefined;
|
|
25
39
|
} & {
|
|
26
40
|
modelValue?: T | undefined;
|
|
27
41
|
}) & {
|
|
@@ -11,6 +11,20 @@ type __VLS_Props = {
|
|
|
11
11
|
* base layer.
|
|
12
12
|
*/
|
|
13
13
|
size?: 'sm' | 'md' | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* `unstyled` keeps the wiring and drops the surface.
|
|
16
|
+
*
|
|
17
|
+
* The label, the generated id, `aria-describedby` and the error are what a
|
|
18
|
+
* field is; the border and the height are what it looks like. A search box
|
|
19
|
+
* inside a bordered row, a url field in an editor popover — those places
|
|
20
|
+
* were hand-writing the whole thing to avoid the appearance, and losing the
|
|
21
|
+
* wiring with it.
|
|
22
|
+
*
|
|
23
|
+
* The same reasoning as `BaseButton`'s `unstyled`, and the same test: a
|
|
24
|
+
* primitive is finished when the app can take its behaviour without its
|
|
25
|
+
* paint.
|
|
26
|
+
*/
|
|
27
|
+
variant?: 'default' | 'unstyled' | undefined;
|
|
14
28
|
};
|
|
15
29
|
type __VLS_ModelProps = {
|
|
16
30
|
modelValue?: string | undefined;
|
package/dist/index.js
CHANGED
|
@@ -1108,7 +1108,8 @@ var BaseInput_default = /* @__PURE__ */ defineComponent({
|
|
|
1108
1108
|
default: false
|
|
1109
1109
|
},
|
|
1110
1110
|
type: { default: "text" },
|
|
1111
|
-
size: { default: "md" }
|
|
1111
|
+
size: { default: "md" },
|
|
1112
|
+
variant: { default: "default" }
|
|
1112
1113
|
}, {
|
|
1113
1114
|
"modelValue": {},
|
|
1114
1115
|
"modelModifiers": {}
|
|
@@ -1130,7 +1131,11 @@ var BaseInput_default = /* @__PURE__ */ defineComponent({
|
|
|
1130
1131
|
type: __props.type,
|
|
1131
1132
|
"aria-invalid": invalid,
|
|
1132
1133
|
"aria-describedby": describedBy
|
|
1133
|
-
}, _ctx.$attrs, { class: [
|
|
1134
|
+
}, _ctx.$attrs, { class: [
|
|
1135
|
+
__props.variant === "unstyled" ? "" : "border-hair bg-surface text-ink rounded-card focus-visible:outline-primary border px-3 focus-visible:outline-2 focus-visible:outline-offset-1",
|
|
1136
|
+
__props.variant === "unstyled" ? "text-base" : CONTROL_CLASS,
|
|
1137
|
+
__props.variant !== "unstyled" && invalid ? "border-negative" : ""
|
|
1138
|
+
] }), null, 16, _hoisted_1$20), [[vModelDynamic, model.value]])]),
|
|
1134
1139
|
_: 1
|
|
1135
1140
|
}, 8, [
|
|
1136
1141
|
"label",
|
|
@@ -1473,7 +1478,8 @@ var BaseSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
1473
1478
|
default: false
|
|
1474
1479
|
},
|
|
1475
1480
|
placeholder: { default: "" },
|
|
1476
|
-
size: { default: "md" }
|
|
1481
|
+
size: { default: "md" },
|
|
1482
|
+
variant: { default: "default" }
|
|
1477
1483
|
}, {
|
|
1478
1484
|
"modelValue": {},
|
|
1479
1485
|
"modelModifiers": {}
|
|
@@ -1498,7 +1504,11 @@ var BaseSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
1498
1504
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
1499
1505
|
"aria-invalid": invalid,
|
|
1500
1506
|
"aria-describedby": describedBy,
|
|
1501
|
-
class: normalizeClass(["
|
|
1507
|
+
class: normalizeClass(["w-full appearance-none", [
|
|
1508
|
+
__props.variant === "unstyled" ? "" : "border-hair bg-surface text-ink rounded-card focus-visible:outline-primary border py-0 pr-10 pl-3 focus-visible:outline-2 focus-visible:outline-offset-1",
|
|
1509
|
+
__props.variant === "unstyled" ? "" : SIZE_CLASS[__props.size],
|
|
1510
|
+
__props.variant !== "unstyled" && invalid ? "border-negative" : ""
|
|
1511
|
+
]])
|
|
1502
1512
|
}, [__props.placeholder ? (openBlock(), createElementBlock("option", _hoisted_3$7, toDisplayString(__props.placeholder), 1)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option) => {
|
|
1503
1513
|
return openBlock(), createElementBlock("option", {
|
|
1504
1514
|
key: option.value,
|
|
@@ -1542,7 +1552,8 @@ var BaseTextarea_default = /* @__PURE__ */ defineComponent({
|
|
|
1542
1552
|
default: false
|
|
1543
1553
|
},
|
|
1544
1554
|
rows: { default: 4 },
|
|
1545
|
-
size: { default: "md" }
|
|
1555
|
+
size: { default: "md" },
|
|
1556
|
+
variant: { default: "default" }
|
|
1546
1557
|
}, {
|
|
1547
1558
|
"modelValue": {},
|
|
1548
1559
|
"modelModifiers": {}
|
|
@@ -1564,7 +1575,11 @@ var BaseTextarea_default = /* @__PURE__ */ defineComponent({
|
|
|
1564
1575
|
rows: __props.rows,
|
|
1565
1576
|
"aria-invalid": invalid,
|
|
1566
1577
|
"aria-describedby": describedBy
|
|
1567
|
-
}, _ctx.$attrs, { class: [
|
|
1578
|
+
}, _ctx.$attrs, { class: [
|
|
1579
|
+
__props.variant === "unstyled" ? "" : "border-hair bg-surface text-ink rounded-card focus-visible:outline-primary resize-y border px-3 py-2 leading-relaxed focus-visible:outline-2 focus-visible:outline-offset-1",
|
|
1580
|
+
"text-base",
|
|
1581
|
+
__props.variant !== "unstyled" && invalid ? "border-negative" : ""
|
|
1582
|
+
] }), null, 16, _hoisted_1$14), [[vModelText, model.value]])]),
|
|
1568
1583
|
_: 1
|
|
1569
1584
|
}, 8, [
|
|
1570
1585
|
"label",
|
|
@@ -2382,7 +2397,7 @@ function createI18nRuntime(options) {
|
|
|
2382
2397
|
*
|
|
2383
2398
|
* The fallback keeps `vitest` and `vite dev` honest, where no define runs.
|
|
2384
2399
|
*/
|
|
2385
|
-
var VERSION = "0.
|
|
2400
|
+
var VERSION = "0.10.0";
|
|
2386
2401
|
//#endregion
|
|
2387
2402
|
export { AppError, BaseAlert_default as BaseAlert, BaseBadge_default as BaseBadge, BaseButton_default as BaseButton, BaseCard_default as BaseCard, BaseCheckbox_default as BaseCheckbox, BaseInput_default as BaseInput, BaseRadioGroup_default as BaseRadioGroup, BaseSelect_default as BaseSelect, BaseSheet_default as BaseSheet, BaseTextarea_default as BaseTextarea, EmptyState_default as EmptyState, ErrorBoundary_default as ErrorBoundary, FormField_default as FormField, GoogleButton_default as GoogleButton, LocaleLinks_default as LocaleLinks, PageContainer_default as PageContainer, PageHeader_default as PageHeader, PriceCard_default as PriceCard, ProgressBar_default as ProgressBar, SectionHeading_default as SectionHeading, SegmentedControl_default as SegmentedControl, SettingsGroup_default as SettingsGroup, SettingsRow_default as SettingsRow, SkeletonList_default as SkeletonList, StatCard_default as StatCard, TabBar_default as TabBar, ToastHost_default as ToastHost, ToneDot_default as ToneDot, VERSION, addDays, applyTheme, createI18nRuntime, downloadJson, eachDayOfYear, formatDate, fromDateKey, isApplePortable, isInstalled, isThemePreference, lastNDays, leadingBlanks, needsIosInstall, readStoredTheme, registerErrorMapper, relativeDayLabel, safeRedirect, setFormatLocale, setThemeStorageKey, startOfWeek, tapFeedback, toAppError, toDateKey, todayKey, useDebouncedCallback, useDragScroll, useMediaQuery, useOnline, useTheme, useToast, useToday, useVisualViewport };
|
|
2388
2403
|
|