rei-kit 3.5.0 → 3.6.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.
- package/README.md +5 -5
- package/dist/app.js +1 -1
- package/dist/components/BaseInput.vue.d.ts +19 -0
- package/dist/components/BaseSelect.vue.d.ts +14 -0
- package/dist/components/BaseTextarea.vue.d.ts +14 -0
- package/dist/components/PasswordInput.vue.d.ts +14 -0
- package/dist/index.js +17 -8
- package/dist/index.js.map +1 -1
- package/dist/{use-announce-BGZnV78W.js → use-announce-B8Ln-LsE.js} +7 -5
- package/dist/use-announce-B8Ln-LsE.js.map +1 -0
- package/package.json +1 -1
- package/dist/use-announce-BGZnV78W.js.map +0 -1
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ demonstrates both, including the one that does not work.
|
|
|
66
66
|
|
|
67
67
|
### 2. The smallest of six, measured, with the trade stated
|
|
68
68
|
|
|
69
|
-
At ten components — a real screen — **31.
|
|
69
|
+
At ten components — a real screen — **31.8 KB against 104 to 195** for the
|
|
70
70
|
five kits measured beside it. The gap is not the total, it is the slope:
|
|
71
71
|
seven components past the first three cost this kit 5 KB and cost them 60 to
|
|
72
72
|
125, because the stylesheet here is flat and theirs is inside the JavaScript.
|
|
@@ -165,7 +165,7 @@ app, and the case *least* favourable to this kit:
|
|
|
165
165
|
|
|
166
166
|
| Kit | JS | CSS | Total |
|
|
167
167
|
| -------------------- | ---------: | ----------: | ----------: |
|
|
168
|
-
| **rei-kit 3.
|
|
168
|
+
| **rei-kit 3.6.0** | **3.7 KB** | **23.1 KB** | **26.8 KB** |
|
|
169
169
|
| element-plus 2.14.6 | 27.3 KB | 6.0 KB | 33.3 KB |
|
|
170
170
|
| naive-ui 2.45.3 | 51.2 KB | — | 51.2 KB |
|
|
171
171
|
| primevue 5.0.1 | 53.6 KB | — | 53.6 KB |
|
|
@@ -177,7 +177,7 @@ a data table, a tooltip and a card. A screen rather than a demo:
|
|
|
177
177
|
|
|
178
178
|
| Kit | JS | CSS | Total |
|
|
179
179
|
| -------------------- | ---------: | ----------: | -----------: |
|
|
180
|
-
| **rei-kit 3.
|
|
180
|
+
| **rei-kit 3.6.0** | **8.6 KB** | **23.1 KB** | **31.8 KB** |
|
|
181
181
|
| element-plus 2.14.6 | 90.1 KB | 14.0 KB | 104.1 KB |
|
|
182
182
|
| naive-ui 2.45.3 | 132.4 KB | — | 132.4 KB |
|
|
183
183
|
| primevue 5.0.1 | 135.8 KB | — | 135.8 KB |
|
|
@@ -185,7 +185,7 @@ a data table, a tooltip and a card. A screen rather than a demo:
|
|
|
185
185
|
| ant-design-vue 4.2.6 | 195.4 KB | — | 195.4 KB |
|
|
186
186
|
|
|
187
187
|
**The slope is the point, not the total.** Seven more components cost this kit
|
|
188
|
-
**
|
|
188
|
+
**5.0 KB**, because the stylesheet does not move and only the JavaScript grows.
|
|
189
189
|
The kits that put their styles in the JavaScript have no flat part at all, so
|
|
190
190
|
the same seven cost them **60 to 125 KB**. A quarter smaller at three
|
|
191
191
|
components; **3.3× smaller at ten**.
|
|
@@ -234,7 +234,7 @@ Each claim here is enforced by something that fails, not by a promise.
|
|
|
234
234
|
|
|
235
235
|
## Status
|
|
236
236
|
|
|
237
|
-
**v3.
|
|
237
|
+
**v3.6.0 — three consumers.**
|
|
238
238
|
|
|
239
239
|
| | |
|
|
240
240
|
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
package/dist/app.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as BaseCheckbox_default, o as BaseSheet_default, r as horizontalStep, s as inertOutside, t as focusTarget } from "./focus-target-BtcoJdmz.js";
|
|
2
|
-
import { _ as toRedirectPath, c as useToast, d as isThemePreference, g as safeRedirect, h as tapFeedback, i as BaseInput_default, l as useOnline, m as useTheme, r as GoogleButton_default, s as BaseAlert_default, t as announce } from "./use-announce-
|
|
2
|
+
import { _ as toRedirectPath, c as useToast, d as isThemePreference, g as safeRedirect, h as tapFeedback, i as BaseInput_default, l as useOnline, m as useTheme, r as GoogleButton_default, s as BaseAlert_default, t as announce } from "./use-announce-B8Ln-LsE.js";
|
|
3
3
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.js";
|
|
4
4
|
import { t as BaseButton_default } from "./BaseButton-BD2HKB1L.js";
|
|
5
5
|
import { t as SettingsRow_default } from "./SettingsRow-C6Spi7Np.js";
|
|
@@ -42,6 +42,25 @@ declare const __VLS_export: <T extends string | number | undefined = string>(__V
|
|
|
42
42
|
* its errors impossible without hand-writing the control.
|
|
43
43
|
*/
|
|
44
44
|
fieldId?: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Classes for the control itself, rather than for the field around it.
|
|
47
|
+
*
|
|
48
|
+
* `class` lands on the field, because that is where Vue puts a
|
|
49
|
+
* component's class and because a layout class means "space this field".
|
|
50
|
+
* That leaves `variant="unstyled"` with no way to paint the control it
|
|
51
|
+
* just stripped — the point of stripping it — which is why an app with a
|
|
52
|
+
* large amount field wrote the whole thing by hand instead.
|
|
53
|
+
*
|
|
54
|
+
* It appends, so with the default variant a conflict is settled by
|
|
55
|
+
* Tailwind's own order rather than by writing it here; reach for it with
|
|
56
|
+
* `unstyled`, where there is nothing to settle.
|
|
57
|
+
*
|
|
58
|
+
* Under `unstyled` it also takes over the 16px floor that stops iOS
|
|
59
|
+
* zooming on focus: `text-base` cannot be beaten by a larger utility, so
|
|
60
|
+
* the kit stops asserting it rather than overrule a caller who asked to
|
|
61
|
+
* paint the control. Keep the control at 16px or more.
|
|
62
|
+
*/
|
|
63
|
+
controlClass?: string | undefined;
|
|
45
64
|
} & Omit<InputHTMLAttributes, "type" | "size">) & {
|
|
46
65
|
"onUpdate:modelValue"?: (value: T) => any;
|
|
47
66
|
}> & (typeof globalThis extends {
|
|
@@ -44,6 +44,20 @@ declare const __VLS_export: <T extends string | number>(__VLS_props: NonNullable
|
|
|
44
44
|
* its errors impossible without hand-writing the control.
|
|
45
45
|
*/
|
|
46
46
|
fieldId?: string | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Classes for the control itself, rather than for the field around it.
|
|
49
|
+
*
|
|
50
|
+
* `class` lands on the field, because that is where Vue puts a
|
|
51
|
+
* component's class and because a layout class means "space this field".
|
|
52
|
+
* That leaves `variant="unstyled"` with no way to paint the control it
|
|
53
|
+
* just stripped — the point of stripping it — which is why an app with a
|
|
54
|
+
* large amount field wrote the whole thing by hand instead.
|
|
55
|
+
*
|
|
56
|
+
* It appends, so with the default variant a conflict is settled by
|
|
57
|
+
* Tailwind's own order rather than by writing it here; reach for it with
|
|
58
|
+
* `unstyled`, where there is nothing to settle.
|
|
59
|
+
*/
|
|
60
|
+
controlClass?: string | undefined;
|
|
47
61
|
} & {
|
|
48
62
|
modelValue?: T | undefined;
|
|
49
63
|
}) & {
|
|
@@ -35,6 +35,20 @@ type __VLS_Props = {
|
|
|
35
35
|
* its errors impossible without hand-writing the control.
|
|
36
36
|
*/
|
|
37
37
|
fieldId?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Classes for the control itself, rather than for the field around it.
|
|
40
|
+
*
|
|
41
|
+
* `class` lands on the field, because that is where Vue puts a
|
|
42
|
+
* component's class and because a layout class means "space this field".
|
|
43
|
+
* That leaves `variant="unstyled"` with no way to paint the control it
|
|
44
|
+
* just stripped — the point of stripping it — which is why an app with a
|
|
45
|
+
* large amount field wrote the whole thing by hand instead.
|
|
46
|
+
*
|
|
47
|
+
* It appends, so with the default variant a conflict is settled by
|
|
48
|
+
* Tailwind's own order rather than by writing it here; reach for it with
|
|
49
|
+
* `unstyled`, where there is nothing to settle.
|
|
50
|
+
*/
|
|
51
|
+
controlClass?: string | undefined;
|
|
38
52
|
};
|
|
39
53
|
/**
|
|
40
54
|
* Focus the control, for a caller that owns when it happens.
|
|
@@ -51,6 +51,20 @@ type __VLS_Props = {
|
|
|
51
51
|
/** The input's `id`, for an `ErrorSummary` that links to this field. */
|
|
52
52
|
fieldId?: string | undefined;
|
|
53
53
|
size?: 'sm' | 'md' | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Classes for the control itself, rather than for the field around it.
|
|
56
|
+
*
|
|
57
|
+
* `class` lands on the field, because that is where Vue puts a
|
|
58
|
+
* component's class and because a layout class means "space this field".
|
|
59
|
+
* That leaves `variant="unstyled"` with no way to paint the control it
|
|
60
|
+
* just stripped — the point of stripping it — which is why an app with a
|
|
61
|
+
* large amount field wrote the whole thing by hand instead.
|
|
62
|
+
*
|
|
63
|
+
* It appends, so with the default variant a conflict is settled by
|
|
64
|
+
* Tailwind's own order rather than by writing it here; reach for it with
|
|
65
|
+
* `unstyled`, where there is nothing to settle.
|
|
66
|
+
*/
|
|
67
|
+
controlClass?: string | undefined;
|
|
54
68
|
} & /* @vue-ignore */ Omit<InputHTMLAttributes, 'size' | 'type'>;
|
|
55
69
|
/**
|
|
56
70
|
* Focus the control, for a caller that owns when it happens.
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as addDays, c as lastNDays, d as toDateKey, f as todayKey, i as needsIosInstall, l as leadingBlanks, n as isApplePortable, o as eachDayOfYear, r as isInstalled, s as fromDateKey, t as SettingsGroup_default, u as startOfWeek } from "./SettingsGroup-BXkajKGl.js";
|
|
2
2
|
import { a as formatNumber, i as formatDate, o as setFormatLocale, r as watchVisibility } from "./environment-Cz5KiC1t.js";
|
|
3
3
|
import { a as BaseCheckbox_default, c as useBoundValue, d as ensureSheetRoot, i as textDirection, l as useVisualViewport, n as elementDirection, o as BaseSheet_default, r as horizontalStep, t as focusTarget, u as SHEET_ROOT_ID } from "./focus-target-BtcoJdmz.js";
|
|
4
|
-
import { _ as toRedirectPath, a as useFieldAttrs, c as useToast, d as isThemePreference, f as readStoredTheme, g as safeRedirect, h as tapFeedback, i as BaseInput_default, l as useOnline, m as useTheme, n as useAnnounce, o as FormField_default, p as setThemeStorageKey, r as GoogleButton_default, s as BaseAlert_default, t as announce, u as applyTheme } from "./use-announce-
|
|
4
|
+
import { _ as toRedirectPath, a as useFieldAttrs, c as useToast, d as isThemePreference, f as readStoredTheme, g as safeRedirect, h as tapFeedback, i as BaseInput_default, l as useOnline, m as useTheme, n as useAnnounce, o as FormField_default, p as setThemeStorageKey, r as GoogleButton_default, s as BaseAlert_default, t as announce, u as applyTheme } from "./use-announce-B8Ln-LsE.js";
|
|
5
5
|
import { n as registerErrorMapper, r as toAppError, t as AppError } from "./app-error-DF9cijE0.js";
|
|
6
6
|
import { a as BaseSkeleton_default, c as useMediaQuery, l as useDragScroll, n as ScrollArea_default, o as useMenuKeys, s as useAnchoredPanel, t as BaseListbox_default } from "./BaseListbox-D-NQ6nDd.js";
|
|
7
7
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.js";
|
|
@@ -1015,7 +1015,8 @@ var BaseSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
1015
1015
|
placeholder: { default: "" },
|
|
1016
1016
|
size: { default: "md" },
|
|
1017
1017
|
variant: { default: "default" },
|
|
1018
|
-
fieldId: { default: () => void 0 }
|
|
1018
|
+
fieldId: { default: () => void 0 },
|
|
1019
|
+
controlClass: { default: () => void 0 }
|
|
1019
1020
|
}, {
|
|
1020
1021
|
"modelValue": {},
|
|
1021
1022
|
"modelModifiers": {}
|
|
@@ -1063,7 +1064,8 @@ var BaseSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
1063
1064
|
class: normalizeClass(["w-full appearance-none", [
|
|
1064
1065
|
__props.variant === "unstyled" ? "" : "control text-ink rounded-card focus-visible:outline-primary py-0 pr-10 pl-3 focus-visible:outline-2 focus-visible:outline-offset-1",
|
|
1065
1066
|
__props.variant === "unstyled" ? "" : SIZE_CLASS[__props.size],
|
|
1066
|
-
__props.variant !== "unstyled" && invalid ? "border-negative" : ""
|
|
1067
|
+
__props.variant !== "unstyled" && invalid ? "border-negative" : "",
|
|
1068
|
+
__props.controlClass
|
|
1067
1069
|
]])
|
|
1068
1070
|
}, [__props.placeholder ? (openBlock(), createElementBlock("option", _hoisted_3$28, toDisplayString(__props.placeholder), 1)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option) => {
|
|
1069
1071
|
return openBlock(), createElementBlock("option", {
|
|
@@ -1621,7 +1623,8 @@ var BaseTextarea_default = /* @__PURE__ */ defineComponent({
|
|
|
1621
1623
|
rows: { default: 4 },
|
|
1622
1624
|
size: { default: "md" },
|
|
1623
1625
|
variant: { default: "default" },
|
|
1624
|
-
fieldId: { default: () => void 0 }
|
|
1626
|
+
fieldId: { default: () => void 0 },
|
|
1627
|
+
controlClass: { default: () => void 0 }
|
|
1625
1628
|
},
|
|
1626
1629
|
emits: ["update:modelValue"],
|
|
1627
1630
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -1667,7 +1670,8 @@ var BaseTextarea_default = /* @__PURE__ */ defineComponent({
|
|
|
1667
1670
|
}, unref(controlAttrs), { class: [
|
|
1668
1671
|
__props.variant === "unstyled" ? "" : "control text-ink rounded-card focus-visible:outline-primary resize-y px-3 py-2 leading-relaxed focus-visible:outline-2 focus-visible:outline-offset-1",
|
|
1669
1672
|
"text-base",
|
|
1670
|
-
__props.variant !== "unstyled" && invalid ? "border-negative" : ""
|
|
1673
|
+
__props.variant !== "unstyled" && invalid ? "border-negative" : "",
|
|
1674
|
+
__props.controlClass
|
|
1671
1675
|
] }), null, 16, _hoisted_1$40), [[vModelText, unref(model)]])]),
|
|
1672
1676
|
_: 1
|
|
1673
1677
|
}, 8, [
|
|
@@ -4763,7 +4767,8 @@ var PasswordInput_default = /* @__PURE__ */ defineComponent({
|
|
|
4763
4767
|
default: false
|
|
4764
4768
|
},
|
|
4765
4769
|
fieldId: { default: () => void 0 },
|
|
4766
|
-
size: { default: "md" }
|
|
4770
|
+
size: { default: "md" },
|
|
4771
|
+
controlClass: { default: () => void 0 }
|
|
4767
4772
|
},
|
|
4768
4773
|
emits: ["update:modelValue", "toggle"],
|
|
4769
4774
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -4849,7 +4854,11 @@ var PasswordInput_default = /* @__PURE__ */ defineComponent({
|
|
|
4849
4854
|
autocapitalize: "none",
|
|
4850
4855
|
spellcheck: false
|
|
4851
4856
|
}, unref(controlAttrs), {
|
|
4852
|
-
class: ["control text-ink rounded-card focus-visible:outline-primary w-full ps-3 pe-11 focus-visible:outline-2 focus-visible:outline-offset-1", [
|
|
4857
|
+
class: ["control text-ink rounded-card focus-visible:outline-primary w-full ps-3 pe-11 focus-visible:outline-2 focus-visible:outline-offset-1", [
|
|
4858
|
+
CONTROL_CLASS,
|
|
4859
|
+
invalid ? "border-negative" : "",
|
|
4860
|
+
__props.controlClass
|
|
4861
|
+
]],
|
|
4853
4862
|
onInput: _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event.target.value))
|
|
4854
4863
|
}), null, 16, _hoisted_2$2), createElementVNode("button", {
|
|
4855
4864
|
type: "button",
|
|
@@ -5189,7 +5198,7 @@ function createI18nRuntime(options) {
|
|
|
5189
5198
|
*
|
|
5190
5199
|
* The fallback keeps `vitest` and `vite dev` honest, where no define runs.
|
|
5191
5200
|
*/
|
|
5192
|
-
var VERSION = "3.
|
|
5201
|
+
var VERSION = "3.6.0";
|
|
5193
5202
|
//#endregion
|
|
5194
5203
|
export { ActivityGrid_default as ActivityGrid, AnnounceHost_default as AnnounceHost, AppError, AvatarStack_default as AvatarStack, BarChart_default as BarChart, BaseAlert_default as BaseAlert, BaseAvatar_default as BaseAvatar, BaseBadge_default as BaseBadge, BaseButton_default as BaseButton, BaseCalendar_default as BaseCalendar, BaseCard_default as BaseCard, BaseCheckbox_default as BaseCheckbox, BaseChip_default as BaseChip, BaseCombobox_default as BaseCombobox, BaseDatePicker_default as BaseDatePicker, BaseInput_default as BaseInput, BaseKbd_default as BaseKbd, BaseLink_default as BaseLink, BaseListbox_default as BaseListbox, BaseMenu_default as BaseMenu, BasePopconfirm_default as BasePopconfirm, BasePopover_default as BasePopover, BaseRadioGroup_default as BaseRadioGroup, BaseRating_default as BaseRating, BaseSelect_default as BaseSelect, BaseSeparator_default as BaseSeparator, BaseSheet_default as BaseSheet, BaseSkeleton_default as BaseSkeleton, BaseSlider_default as BaseSlider, BaseSpinner_default as BaseSpinner, BaseStepper_default as BaseStepper, BaseSwitch_default as BaseSwitch, BaseTable_default as BaseTable, BaseTextarea_default as BaseTextarea, BaseTimeline_default as BaseTimeline, CircularProgress_default as CircularProgress, CodeBlock_default as CodeBlock, ColorPicker_default as ColorPicker, CopyButton_default as CopyButton, DescriptionList_default as DescriptionList, DonutChart_default as DonutChart, EmptyState_default as EmptyState, ErrorBoundary_default as ErrorBoundary, ErrorSummary_default as ErrorSummary, FileDrop_default as FileDrop, FormField_default as FormField, GoogleButton_default as GoogleButton, LocaleLinks_default as LocaleLinks, MATERIALS, NumberInput_default as NumberInput, PALETTES, PageContainer_default as PageContainer, PageHeader_default as PageHeader, PasswordInput_default as PasswordInput, PinInput_default as PinInput, PriceCard_default as PriceCard, ProgressBar_default as ProgressBar, SHEET_ROOT_ID, ScrollArea_default as ScrollArea, SectionHeading_default as SectionHeading, SegmentedControl_default as SegmentedControl, SettingsGroup_default as SettingsGroup, SettingsRow_default as SettingsRow, SkeletonList_default as SkeletonList, SliderField_default as SliderField, StatCard_default as StatCard, TabBar_default as TabBar, TagsInput_default as TagsInput, TimePicker_default as TimePicker, ToastHost_default as ToastHost, ToggleGroup_default as ToggleGroup, ToneDot_default as ToneDot, VERSION, VirtualList_default as VirtualList, addDays, announce, applyMaterial, applyPalette, applyTheme, createI18nRuntime, downloadJson, eachDayOfYear, elementDirection, ensureSheetRoot, formatDate, formatNumber, fromDateKey, horizontalStep, isApplePortable, isInstalled, isMaterial, isPaletteName, isThemePreference, lastNDays, leadingBlanks, needsIosInstall, readStoredTheme, registerErrorMapper, relativeDayLabel, safeRedirect, setFormatLocale, setMaterialStorageKey, setPaletteStorageKey, setThemeStorageKey, startOfWeek, tapFeedback, textDirection, toAppError, toDateKey, toRedirectPath, todayKey, useAnnounce, useDebouncedCallback, useDragScroll, useMaterial, useMediaQuery, useOnline, usePalette, useTheme, useToast, useToday, useVisualViewport };
|
|
5195
5204
|
|