lituix 0.0.7 → 0.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/components.json +8599 -0
- package/dist/apis/dialog.d.ts +11 -0
- package/dist/apis/dialog.d.ts.map +1 -1
- package/dist/components/datepicker-dark-styles.d.ts +3 -0
- package/dist/components/datepicker-dark-styles.d.ts.map +1 -0
- package/dist/components/lui-alert.d.ts +49 -0
- package/dist/components/lui-alert.d.ts.map +1 -0
- package/dist/components/lui-autocomplete.d.ts +89 -0
- package/dist/components/lui-autocomplete.d.ts.map +1 -0
- package/dist/components/lui-button.d.ts +1 -0
- package/dist/components/lui-button.d.ts.map +1 -1
- package/dist/components/lui-card.d.ts +1 -0
- package/dist/components/lui-card.d.ts.map +1 -1
- package/dist/components/lui-cascader.d.ts +85 -0
- package/dist/components/lui-cascader.d.ts.map +1 -0
- package/dist/components/lui-checkbox.d.ts.map +1 -1
- package/dist/components/lui-collapse.d.ts +78 -0
- package/dist/components/lui-collapse.d.ts.map +1 -0
- package/dist/components/lui-color-picker.d.ts.map +1 -1
- package/dist/components/lui-command-palette.d.ts.map +1 -1
- package/dist/components/lui-context-menu.d.ts.map +1 -1
- package/dist/components/lui-datepicker.d.ts.map +1 -1
- package/dist/components/lui-dialog.d.ts.map +1 -1
- package/dist/components/lui-drawer.d.ts.map +1 -1
- package/dist/components/lui-dropdown.d.ts.map +1 -1
- package/dist/components/lui-dropmenu.d.ts.map +1 -1
- package/dist/components/lui-form-item.d.ts.map +1 -1
- package/dist/components/lui-form.d.ts.map +1 -1
- package/dist/components/lui-icon-picker.d.ts.map +1 -1
- package/dist/components/lui-icon.d.ts +20 -0
- package/dist/components/lui-icon.d.ts.map +1 -1
- package/dist/components/lui-image.d.ts.map +1 -1
- package/dist/components/lui-input-number.d.ts.map +1 -1
- package/dist/components/lui-input-opt.d.ts.map +1 -1
- package/dist/components/lui-input.d.ts.map +1 -1
- package/dist/components/lui-overlay-root.d.ts.map +1 -1
- package/dist/components/lui-popconfirm.d.ts +72 -0
- package/dist/components/lui-popconfirm.d.ts.map +1 -0
- package/dist/components/lui-popover.d.ts +53 -0
- package/dist/components/lui-popover.d.ts.map +1 -1
- package/dist/components/lui-progress.d.ts.map +1 -1
- package/dist/components/lui-qrcode.d.ts +69 -0
- package/dist/components/lui-qrcode.d.ts.map +1 -0
- package/dist/components/lui-select.d.ts +6 -0
- package/dist/components/lui-select.d.ts.map +1 -1
- package/dist/components/lui-skeleton.d.ts.map +1 -1
- package/dist/components/lui-spinner.d.ts +48 -0
- package/dist/components/lui-spinner.d.ts.map +1 -0
- package/dist/components/lui-splitter.d.ts +57 -0
- package/dist/components/lui-splitter.d.ts.map +1 -0
- package/dist/components/lui-table.d.ts.map +1 -1
- package/dist/components/lui-textarea.d.ts.map +1 -1
- package/dist/components/lui-toast.d.ts.map +1 -1
- package/dist/components/lui-tooltip.d.ts.map +1 -1
- package/dist/components/lui-tree-select.d.ts +83 -0
- package/dist/components/lui-tree-select.d.ts.map +1 -0
- package/dist/components/lui-tree.d.ts +9 -0
- package/dist/components/lui-tree.d.ts.map +1 -1
- package/dist/index.browser.js +2582 -1282
- package/dist/index.browser.js.map +4 -4
- package/dist/index.cjs +2456 -1156
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +2515 -1215
- package/dist/index.mjs.map +4 -4
- package/dist/themes/control-shell.d.ts +17 -0
- package/dist/themes/control-shell.d.ts.map +1 -0
- package/dist/themes/option-row.d.ts +26 -0
- package/dist/themes/option-row.d.ts.map +1 -0
- package/dist/themes/tokens.d.ts +15 -0
- package/dist/themes/tokens.d.ts.map +1 -1
- package/dist/utils/format.d.ts +13 -0
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/i18n.d.ts.map +1 -1
- package/dist/utils/portal-styles.d.ts +17 -0
- package/dist/utils/portal-styles.d.ts.map +1 -0
- package/dist/utils/qrcode.d.ts +37 -0
- package/dist/utils/qrcode.d.ts.map +1 -0
- package/dist/utils/status.d.ts +32 -0
- package/dist/utils/status.d.ts.map +1 -0
- package/llm.txt +18 -3
- package/llms-full.txt +19 -7
- package/llms.txt +14 -7
- package/package.json +15 -15
- package/recipes.json +111 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The closed box of a text-like control that opens a panel.
|
|
3
|
+
*
|
|
4
|
+
* Four components had grown their own copy of this -- lui-select's
|
|
5
|
+
* `[part="trigger"]`, lui-icon-picker's and lui-color-picker's `.trigger`, and
|
|
6
|
+
* lui-datepicker's `.wrapper` -- and they had drifted apart in padding, gap, how
|
|
7
|
+
* the height is applied, and which properties transition. Include this and add
|
|
8
|
+
* the `control-shell` class to the element; keep only what genuinely differs in
|
|
9
|
+
* the component's own rules, which come later in the styles array and therefore
|
|
10
|
+
* still win.
|
|
11
|
+
*
|
|
12
|
+
* Deliberately not covered here: hover, open, focused and disabled. Their
|
|
13
|
+
* conditions differ for real (some exclude the open state, some do not), so they
|
|
14
|
+
* stay with each component. Focus rings go through --lui-ring-focus.
|
|
15
|
+
*/
|
|
16
|
+
export declare const controlShellStyles: import("lit").CSSResult;
|
|
17
|
+
//# sourceMappingURL=control-shell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-shell.d.ts","sourceRoot":"","sources":["../../src/themes/control-shell.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,yBAsE9B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A row inside a panel that offers a choice.
|
|
3
|
+
*
|
|
4
|
+
* Four components had grown their own copy -- lui-select in both its slotted and
|
|
5
|
+
* data-driven paths, lui-autocomplete's suggestions, lui-cascader's columns -- and
|
|
6
|
+
* they had drifted. The select's two paths alone disagreed on gap, margin and
|
|
7
|
+
* padding, and the two newer controls hardcoded a radius rather than reading the
|
|
8
|
+
* option token, so restyling options only moved some of them.
|
|
9
|
+
*
|
|
10
|
+
* Include this and add the `option-row` class to the element. The box model and the
|
|
11
|
+
* four states come from here; the inner layout does not, because it genuinely
|
|
12
|
+
* differs -- the select uses a grid with a fixed check column, the others a plain
|
|
13
|
+
* flex row. Set `display` and `grid-template-columns` in the component.
|
|
14
|
+
*
|
|
15
|
+
* State hooks are data attributes rather than classes so they can be bound with
|
|
16
|
+
* lit's `?data-x=${}` directly from the model:
|
|
17
|
+
* data-current on the active path / keyboard cursor, not chosen
|
|
18
|
+
* data-selected the chosen row
|
|
19
|
+
* data-disabled not choosable
|
|
20
|
+
*
|
|
21
|
+
* Not for menu items. lui-menu-item is a three-column grid whose side inset comes
|
|
22
|
+
* from the menu panel's padding, at body font size, with a primary-tinted active
|
|
23
|
+
* state -- a different thing that happens to also be a row.
|
|
24
|
+
*/
|
|
25
|
+
export declare const optionRowStyles: import("lit").CSSResult;
|
|
26
|
+
//# sourceMappingURL=option-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"option-row.d.ts","sourceRoot":"","sources":["../../src/themes/option-row.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,eAAe,yBAkC3B,CAAC"}
|
package/dist/themes/tokens.d.ts
CHANGED
|
@@ -7,5 +7,20 @@
|
|
|
7
7
|
* Override any token on the host element or any ancestor to customize the theme.
|
|
8
8
|
*/
|
|
9
9
|
export declare const tokens: import("lit").CSSResult;
|
|
10
|
+
/**
|
|
11
|
+
* Every custom property this sheet declares, read off the sheet itself.
|
|
12
|
+
*
|
|
13
|
+
* Exists for lui-popover's portal: a portaled surface is mounted outside the
|
|
14
|
+
* element it belongs to, so it inherits nothing and every token it needs has to
|
|
15
|
+
* be copied onto the portal host. That used to be a hand-kept list, which fell
|
|
16
|
+
* behind three separate times -- the semantic status colours, the overlay
|
|
17
|
+
* elevation step, and the focus rings all went missing at runtime while the CSS
|
|
18
|
+
* still looked correct. Deriving it means adding a token here is enough.
|
|
19
|
+
*
|
|
20
|
+
* Computed once at module load: it is a regex over static text, not a per-call
|
|
21
|
+
* cost. Names only -- values are read from the live element at sync time so
|
|
22
|
+
* theme overrides and per-instance overrides come along.
|
|
23
|
+
*/
|
|
24
|
+
export declare const tokenNames: readonly string[];
|
|
10
25
|
export declare const baseStyles: import("lit").CSSResult;
|
|
11
26
|
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/themes/tokens.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/themes/tokens.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,yBAyTlB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAEtC,CAAC;AAEH,eAAO,MAAM,UAAU,yBAsBtB,CAAC"}
|
package/dist/utils/format.d.ts
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turn a size into a CSS length.
|
|
3
|
+
*
|
|
4
|
+
* The case that matters is a bare numeric *string*, which is what an HTML attribute
|
|
5
|
+
* always gives you: `size="24"` arrives as `"24"`, and passing that straight through
|
|
6
|
+
* yields `width: 24`, an invalid length. The declaration is dropped, the element
|
|
7
|
+
* falls back to `auto`, and a component with no content collapses to nothing --
|
|
8
|
+
* which reads as "the size option does nothing" rather than as an error.
|
|
9
|
+
*
|
|
10
|
+
* Nine components were doing this conversion privately and five of them had this
|
|
11
|
+
* bug, so it lives here now.
|
|
12
|
+
*/
|
|
13
|
+
export declare function toCssLength(value: string | number | null | undefined): string;
|
|
1
14
|
export declare function formatSize(bytes: number | string | null | undefined): string;
|
|
2
15
|
export declare function formatDate(input?: string | number | null): string;
|
|
3
16
|
export declare function isImageIconSource(source?: string | null): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/utils/format.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GACxC,MAAM,CAmBR;AAED,wBAAgB,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,CAajE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAWjE"}
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/utils/format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GACxC,MAAM,CAQR;AAED,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GACxC,MAAM,CAmBR;AAED,wBAAgB,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,CAajE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAWjE"}
|
package/dist/utils/i18n.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/utils/i18n.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEpD,KAAK,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/utils/i18n.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEpD,KAAK,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AA8PtF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAK9D,CAAC;AAMF,wBAAgB,0BAA0B,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,cAAc,CAI1E;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,cAAc,GACzB,cAAc,CAOhB;AAED,wBAAgB,SAAS,CACvB,YAAY,EAAE,cAAc,GAAG,SAAS,EACxC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,iBAAiB,GACzB,MAAM,CAOR;AAED,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAK9C;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,GAAG,IAAI,CAUvF;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,kCAAkC,GAAG,MAAM,IAAI,CAGvF;AAED,wBAAgB,CAAC,CACf,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,iBAAiB,EAC1B,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,cAAc,GACzB,MAAM,CAER"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The stylesheets a host must hand to a popover it composes.
|
|
3
|
+
*
|
|
4
|
+
* CSS scoping follows the tree a node currently lives in. A component that slots
|
|
5
|
+
* pre-styled content into lui-popover keeps that content in its own shadow root,
|
|
6
|
+
* so when the portal moves it into the overlay root it keeps its markup and loses
|
|
7
|
+
* every rule -- panels collapse to unstyled blocks, which reads as "the layout
|
|
8
|
+
* broke" rather than "the styles are missing". The popover copies its own sheets
|
|
9
|
+
* across but cannot reach the host's; `portalStyleSources` is how they get there.
|
|
10
|
+
*
|
|
11
|
+
* Returns an empty list where constructable stylesheets are unavailable (jsdom),
|
|
12
|
+
* which is harmless: without them there is nothing to adopt in the first place.
|
|
13
|
+
*/
|
|
14
|
+
export declare function ownStyleSheets(host: {
|
|
15
|
+
renderRoot: HTMLElement | DocumentFragment;
|
|
16
|
+
}): readonly CSSStyleSheet[];
|
|
17
|
+
//# sourceMappingURL=portal-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal-styles.d.ts","sourceRoot":"","sources":["../../src/utils/portal-styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE;IAGnC,UAAU,EAAE,WAAW,GAAG,gBAAgB,CAAC;CAC5C,GAAG,SAAS,aAAa,EAAE,CAI3B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal QR encoder, byte mode.
|
|
3
|
+
*
|
|
4
|
+
* Written rather than pulled in: this is a published component library, so a
|
|
5
|
+
* runtime dependency lands in every consumer's bundle, and the UMD build inlines
|
|
6
|
+
* everything. The algorithm is self-contained and has no platform coupling, which
|
|
7
|
+
* makes it one of the few cases where owning the code is cheaper than depending on
|
|
8
|
+
* it. Verified against the published test vectors in the spec.
|
|
9
|
+
*
|
|
10
|
+
* Byte mode only, which covers any input once encoded as UTF-8. Numeric and
|
|
11
|
+
* alphanumeric modes would pack denser for digit-only payloads; that is a size
|
|
12
|
+
* optimisation, not a capability, so it is left out.
|
|
13
|
+
*/
|
|
14
|
+
export type QrErrorCorrection = "L" | "M" | "Q" | "H";
|
|
15
|
+
/** A square grid of modules; true is dark. */
|
|
16
|
+
export type QrMatrix = boolean[][];
|
|
17
|
+
export interface QrEncodeOptions {
|
|
18
|
+
/** Higher levels survive more damage at the cost of capacity. Defaults to M. */
|
|
19
|
+
errorCorrection?: QrErrorCorrection;
|
|
20
|
+
/** Force a version (1-40). Omit to pick the smallest that fits. */
|
|
21
|
+
version?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface QrResult {
|
|
24
|
+
matrix: QrMatrix;
|
|
25
|
+
size: number;
|
|
26
|
+
version: number;
|
|
27
|
+
errorCorrection: QrErrorCorrection;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Encode text as a QR matrix.
|
|
31
|
+
*
|
|
32
|
+
* Throws when the payload cannot fit, or when a forced version is too small --
|
|
33
|
+
* silently truncating would produce a code that scans to the wrong value, which is
|
|
34
|
+
* worse than refusing.
|
|
35
|
+
*/
|
|
36
|
+
export declare function encodeQr(text: string, options?: QrEncodeOptions): QrResult;
|
|
37
|
+
//# sourceMappingURL=qrcode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qrcode.d.ts","sourceRoot":"","sources":["../../src/utils/qrcode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,iBAAiB,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEtD,8CAA8C;AAC9C,MAAM,MAAM,QAAQ,GAAG,OAAO,EAAE,EAAE,CAAC;AAyanC,MAAM,WAAW,eAAe;IAC9B,gFAAgF;IAChF,eAAe,CAAC,EAAE,iBAAiB,CAAC;IACpC,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,QAAQ,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,iBAAiB,CAAC;CACpC;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,QAAQ,CAoC9E"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared semantic status layer.
|
|
3
|
+
*
|
|
4
|
+
* Every component that shows a success/warning/danger/info affordance resolves
|
|
5
|
+
* its icon and colour here instead of carrying a private mapping. Toast and
|
|
6
|
+
* Progress each used to own one, and they had already drifted apart: success was
|
|
7
|
+
* `circle-check-big` in one and `circle-check` in the other, danger was
|
|
8
|
+
* `circle-alert` in one and `circle-x` in the other. Add new consumers here.
|
|
9
|
+
*
|
|
10
|
+
* Pure data plus pure functions on purpose -- no Lit, no rendering -- so a
|
|
11
|
+
* component can call it from styles, render, or plain logic.
|
|
12
|
+
*/
|
|
13
|
+
/** The canonical set. Component-facing aliases normalise onto these. */
|
|
14
|
+
export type LuiStatus = "info" | "success" | "warning" | "danger";
|
|
15
|
+
/**
|
|
16
|
+
* Resolve any component-facing status string to the canonical set. Returns null
|
|
17
|
+
* for the neutral states and for anything unrecognised, so callers can treat
|
|
18
|
+
* "no status" and "unknown status" the same way -- render no affordance.
|
|
19
|
+
*/
|
|
20
|
+
export declare function normalizeStatus(value: string | null | undefined): LuiStatus | null;
|
|
21
|
+
/** Icon name for a status, or "" when the status carries no affordance. */
|
|
22
|
+
export declare function statusIcon(value: string | null | undefined): string;
|
|
23
|
+
/**
|
|
24
|
+
* The `--lui-color-*` token for a status. `soft` picks the translucent variant
|
|
25
|
+
* used for fills and borders; the solid one is for icons and text.
|
|
26
|
+
*/
|
|
27
|
+
export declare function statusColorToken(value: string | null | undefined, soft?: boolean): string;
|
|
28
|
+
/** `var(...)` wrapper around {@link statusColorToken}, ready for a style value. */
|
|
29
|
+
export declare function statusColorVar(value: string | null | undefined, soft?: boolean): string;
|
|
30
|
+
/** Canonical statuses in the order used for docs, stories, and story controls. */
|
|
31
|
+
export declare const statusOrder: readonly LuiStatus[];
|
|
32
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/utils/status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,wEAAwE;AACxE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AA8BlE;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,CAGlF;AAED,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAGnE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,IAAI,UAAQ,GACX,MAAM,CAIR;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,IAAI,UAAQ,GACX,MAAM,CAGR;AAED,kFAAkF;AAClF,eAAO,MAAM,WAAW,EAAE,SAAS,SAAS,EAK1C,CAAC"}
|
package/llm.txt
CHANGED
|
@@ -38,8 +38,6 @@ Important dependencies used by specific components:
|
|
|
38
38
|
- public library export surface and side-effect component registration
|
|
39
39
|
- `components.json`
|
|
40
40
|
- machine-readable component / API / story index for tooling and AI
|
|
41
|
-
- `recipes.json`
|
|
42
|
-
- machine-readable composition recipes for common UI patterns
|
|
43
41
|
- `stories/`
|
|
44
42
|
- Storybook stories; best place to understand intended public API usage
|
|
45
43
|
- `examples/`
|
|
@@ -100,6 +98,9 @@ Important dependencies used by specific components:
|
|
|
100
98
|
|
|
101
99
|
5.4 Feedback / rich data
|
|
102
100
|
- `lui-progress`
|
|
101
|
+
- `lui-alert` — inline notice; distinct from `dialog.alert()` and from toast
|
|
102
|
+
- `lui-spinner` — the one loading ring; button, card and tree all render it
|
|
103
|
+
- `lui-qrcode` — SVG QR code, encoder bundled in `src/utils/qrcode.ts`
|
|
103
104
|
- `lui-skeleton`
|
|
104
105
|
- `lui-toast`
|
|
105
106
|
- `lui-empty-state`
|
|
@@ -107,6 +108,21 @@ Important dependencies used by specific components:
|
|
|
107
108
|
- `lui-table`
|
|
108
109
|
- `lui-tree`
|
|
109
110
|
|
|
111
|
+
5.5 Added later
|
|
112
|
+
- `lui-collapse`, `lui-collapse-item` — accordion
|
|
113
|
+
- `lui-popconfirm` — bubble confirmation, composes `lui-popover`
|
|
114
|
+
- `lui-autocomplete` — free-text input with suggestions; value is what was typed
|
|
115
|
+
- `lui-tree-select` — a tree behind a select trigger; value is one key
|
|
116
|
+
- `lui-cascader` — column-per-level picker; value is the whole path
|
|
117
|
+
|
|
118
|
+
5.6 Sub-elements that only work inside their parent
|
|
119
|
+
- `lui-tabs` / `lui-tab-panel`
|
|
120
|
+
- `lui-table-column`
|
|
121
|
+
- `lui-breadcrumb-item`
|
|
122
|
+
- `lui-option` / `lui-option-group`
|
|
123
|
+
- `lui-collapse-item`
|
|
124
|
+
- `lui-context-menu` is standalone but is usually driven by `showContextMenu`
|
|
125
|
+
|
|
110
126
|
6. Important imperative APIs
|
|
111
127
|
Defined under `src/apis/` and re-exported from `src/index.ts`.
|
|
112
128
|
|
|
@@ -205,7 +221,6 @@ If you are an LLM or coding agent trying to understand the repo quickly, read in
|
|
|
205
221
|
- `README.md`
|
|
206
222
|
- `package.json`
|
|
207
223
|
- `components.json`
|
|
208
|
-
- `recipes.json`
|
|
209
224
|
- `src/index.ts`
|
|
210
225
|
- target component file in `src/components/`
|
|
211
226
|
- matching story in `stories/`
|
package/llms-full.txt
CHANGED
|
@@ -167,6 +167,9 @@ Form schema conventions:
|
|
|
167
167
|
- `lui-overlay-root`
|
|
168
168
|
|
|
169
169
|
### 5.5 Feedback / rich data
|
|
170
|
+
- `lui-alert` — inline notice; distinct from `dialog.alert()` and from toast
|
|
171
|
+
- `lui-spinner` — the one loading ring; button, card and tree all render it
|
|
172
|
+
- `lui-qrcode` — SVG QR code, encoder bundled in `src/utils/qrcode.ts`
|
|
170
173
|
- `lui-progress`
|
|
171
174
|
- `lui-skeleton`
|
|
172
175
|
- `lui-toast`
|
|
@@ -178,6 +181,17 @@ Form schema conventions:
|
|
|
178
181
|
|
|
179
182
|
---
|
|
180
183
|
|
|
184
|
+
### 5.6 Added later
|
|
185
|
+
|
|
186
|
+
- `lui-collapse`, `lui-collapse-item` — accordion; every level shares one shell
|
|
187
|
+
- `lui-popconfirm` — bubble confirmation; composes `lui-popover` rather than extending it
|
|
188
|
+
- `lui-autocomplete` — free-text input with suggestions; the value is what was typed
|
|
189
|
+
- `lui-tree-select` — a tree behind a select trigger; the value is a single key
|
|
190
|
+
- `lui-cascader` — column-per-level picker; the value is the whole path
|
|
191
|
+
- Sub-elements that must be used inside their parent: `lui-tabs` / `lui-tab-panel`,
|
|
192
|
+
`lui-table-column`, `lui-breadcrumb-item`, `lui-option` / `lui-option-group`,
|
|
193
|
+
`lui-menu-item` / `lui-menu-divider`, `lui-collapse-item`
|
|
194
|
+
|
|
181
195
|
## 6. Imperative APIs
|
|
182
196
|
|
|
183
197
|
Defined under `src/apis/` and exported from `src/index.ts`.
|
|
@@ -351,12 +365,11 @@ For fast repo understanding, use this order:
|
|
|
351
365
|
1. `README.md`
|
|
352
366
|
2. `package.json`
|
|
353
367
|
3. `components.json`
|
|
354
|
-
4. `
|
|
355
|
-
5. `
|
|
356
|
-
6. `
|
|
357
|
-
7. `
|
|
358
|
-
8.
|
|
359
|
-
9. matching `stories/lui-*.stories.ts`
|
|
368
|
+
4. `src/index.ts`
|
|
369
|
+
5. `llm.txt`
|
|
370
|
+
6. `llms.txt`
|
|
371
|
+
7. target `src/components/lui-*.ts`
|
|
372
|
+
8. matching `stories/lui-*.stories.ts`
|
|
360
373
|
10. related helpers in `src/utils/` or `src/apis/`
|
|
361
374
|
|
|
362
375
|
Recommended high-value stories:
|
|
@@ -406,7 +419,6 @@ Other useful commands:
|
|
|
406
419
|
- `README.md`
|
|
407
420
|
- `package.json`
|
|
408
421
|
- `components.json`
|
|
409
|
-
- `recipes.json`
|
|
410
422
|
- `src/index.ts`
|
|
411
423
|
- `src/components/lui-popover.ts`
|
|
412
424
|
- `src/components/lui-dialog.ts`
|
package/llms.txt
CHANGED
|
@@ -15,8 +15,15 @@
|
|
|
15
15
|
|
|
16
16
|
- `README.md` — overview, install, usage, theming, API naming
|
|
17
17
|
- `package.json` — scripts, build outputs, dependencies
|
|
18
|
-
- `components.json` — machine-readable
|
|
19
|
-
|
|
18
|
+
- `components.json` — machine-readable index of every element, its properties,
|
|
19
|
+
events, parts and CSS custom properties. Generated from source by
|
|
20
|
+
`pnpm docs:llm`; trust it over the prose files below, which are hand-written
|
|
21
|
+
and can lag. A property whose `attribute` is `null` can only be set as a
|
|
22
|
+
property (`.source=${...}`), never as an attribute.
|
|
23
|
+
- `recipes.json` — hand-written composition recipes: which component fits a
|
|
24
|
+
situation, how to wire it, and what to reach for instead. Judgement rather
|
|
25
|
+
than inventory, so it is not generated. Read it before choosing between the
|
|
26
|
+
collection controls or the three alert-like surfaces.
|
|
20
27
|
- `src/index.ts` — complete public export surface
|
|
21
28
|
- `llm.txt` — concise repo guide for coding agents
|
|
22
29
|
- `llms-full.txt` — expanded component and architecture guide
|
|
@@ -35,11 +42,11 @@
|
|
|
35
42
|
## Main Public APIs
|
|
36
43
|
|
|
37
44
|
### Components
|
|
38
|
-
- Foundation/display: `lui-button`, `lui-icon`, `lui-text`, `lui-card`, `lui-tag`, `lui-badge`, `lui-statistic`, `lui-avatar`, `lui-avatar-group`
|
|
39
|
-
- Navigation/layout: `lui-tab`, `lui-breadcrumb`, `lui-pagination`, `lui-row`, `lui-divider`, `lui-background`, `lui-scroll-area`
|
|
40
|
-
- Form: `lui-form`, `lui-form-item`, `lui-input`, `lui-input-number`, `lui-input-opt`, `lui-textarea`, `lui-select`, `lui-checkbox`, `lui-radio`, `lui-switch`, `lui-slider`, `lui-datepicker`, `lui-calendar`, `lui-date-range-picker`, `lui-file-input`, `lui-color-picker`
|
|
41
|
-
- Overlay/menu: `lui-popover`, `lui-tooltip`, `lui-dropdown`, `lui-dropmenu`, `lui-dialog`, `lui-drawer`, `lui-command-palette`, `lui-menu`, `lui-context-menu`
|
|
42
|
-
- Rich data/feedback: `lui-progress`, `lui-skeleton`, `lui-toast`, `lui-empty-state`, `lui-image`, `lui-image-cropper`, `lui-table`, `lui-tree`
|
|
45
|
+
- Foundation/display: `lui-button`, `lui-button-group`, `lui-button-group-item`, `lui-icon`, `lui-text`, `lui-card`, `lui-tag`, `lui-badge`, `lui-statistic`, `lui-avatar`, `lui-avatar-group`, `lui-config-provider`
|
|
46
|
+
- Navigation/layout: `lui-tab`, `lui-tabs`, `lui-tab-panel`, `lui-breadcrumb`, `lui-breadcrumb-item`, `lui-pagination`, `lui-row`, `lui-col`, `lui-divider`, `lui-background`, `lui-scroll-area`, `lui-collapse`, `lui-collapse-item`
|
|
47
|
+
- Form: `lui-form`, `lui-form-item`, `lui-input`, `lui-input-number`, `lui-input-opt`, `lui-textarea`, `lui-select` (+ `lui-option`, `lui-option-group`), `lui-autocomplete`, `lui-cascader`, `lui-tree-select`, `lui-checkbox`, `lui-checkbox-group`, `lui-radio`, `lui-radio-group`, `lui-switch`, `lui-slider`, `lui-datepicker`, `lui-calendar`, `lui-date-range-picker`, `lui-file-input`, `lui-color-picker`, `lui-icon-picker`
|
|
48
|
+
- Overlay/menu: `lui-popover`, `lui-tooltip`, `lui-popconfirm`, `lui-dropdown`, `lui-dropmenu`, `lui-dialog`, `lui-drawer`, `lui-command-palette`, `lui-menu`, `lui-menu-item`, `lui-menu-divider`, `lui-context-menu`, `lui-overlay-root`
|
|
49
|
+
- Rich data/feedback: `lui-alert`, `lui-progress`, `lui-spinner`, `lui-skeleton`, `lui-toast`, `lui-empty-state`, `lui-image`, `lui-image-cropper`, `lui-qrcode`, `lui-table`, `lui-table-column`, `lui-tree`
|
|
43
50
|
|
|
44
51
|
### Imperative APIs
|
|
45
52
|
- `dialog`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lituix",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Framework-agnostic UI components based on Lit Web Components",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
"README.md",
|
|
21
21
|
"llm.txt",
|
|
22
22
|
"llms.txt",
|
|
23
|
-
"llms-full.txt"
|
|
23
|
+
"llms-full.txt",
|
|
24
|
+
"components.json",
|
|
25
|
+
"recipes.json"
|
|
24
26
|
],
|
|
25
27
|
"scripts": {
|
|
26
28
|
"build:esm": "cross-env BUILD_FORMAT=es node esbuild.config.js",
|
|
@@ -33,11 +35,10 @@
|
|
|
33
35
|
"build-storybook": "storybook build",
|
|
34
36
|
"build:types": "tsc -p tsconfig.build.json",
|
|
35
37
|
"pack:dry-run": "npm pack --dry-run",
|
|
36
|
-
"release:check": "pnpm typecheck && pnpm build && pnpm pack:dry-run",
|
|
38
|
+
"release:check": "pnpm docs:llm && pnpm typecheck && pnpm build && pnpm pack:dry-run",
|
|
37
39
|
"prepack": "pnpm build",
|
|
38
|
-
"prepublishOnly": "pnpm typecheck && pnpm build",
|
|
39
|
-
"
|
|
40
|
-
"test:watch": "vitest"
|
|
40
|
+
"prepublishOnly": "pnpm docs:llm && pnpm typecheck && pnpm build",
|
|
41
|
+
"docs:llm": "node scripts/generate-llm-docs.mjs"
|
|
41
42
|
},
|
|
42
43
|
"keywords": [
|
|
43
44
|
"web-components",
|
|
@@ -62,20 +63,19 @@
|
|
|
62
63
|
"lit": "^3.3.1"
|
|
63
64
|
},
|
|
64
65
|
"devDependencies": {
|
|
65
|
-
"@storybook/addon-docs": "^10.
|
|
66
|
-
"@storybook/addon-links": "^10.
|
|
67
|
-
"@storybook/addon-themes": "^10.
|
|
68
|
-
"@storybook/web-components": "^10.
|
|
69
|
-
"@storybook/web-components-vite": "^10.
|
|
66
|
+
"@storybook/addon-docs": "^10.5.10",
|
|
67
|
+
"@storybook/addon-links": "^10.5.10",
|
|
68
|
+
"@storybook/addon-themes": "^10.5.10",
|
|
69
|
+
"@storybook/web-components": "^10.5.10",
|
|
70
|
+
"@storybook/web-components-vite": "^10.5.10",
|
|
70
71
|
"@types/node": "^22.5.4",
|
|
71
72
|
"cross-env": "^7.0.3",
|
|
72
73
|
"esbuild": "^0.24.0",
|
|
73
|
-
"
|
|
74
|
+
"react": "^19.2.5",
|
|
75
|
+
"storybook": "^10.5.10",
|
|
74
76
|
"typescript": "^5.5.4",
|
|
75
77
|
"vite": "^6.4.2",
|
|
76
|
-
"zod": "^4.4.3"
|
|
77
|
-
"vitest": "^3.2.4",
|
|
78
|
-
"jsdom": "^26.1.0"
|
|
78
|
+
"zod": "^4.4.3"
|
|
79
79
|
},
|
|
80
80
|
"pnpm": {
|
|
81
81
|
"onlyBuiltDependencies": [
|
package/recipes.json
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Hand-written, unlike components.json which is generated from source. This is judgement -- which component fits a situation, how to wire it, and what to reach for instead -- and none of it can be derived. Every entry comes from a mistake actually made against this library.",
|
|
3
|
+
"conventions": [
|
|
4
|
+
{
|
|
5
|
+
"topic": "attribute versus property",
|
|
6
|
+
"rule": "An array, object or function can only be set as a property: `.source=${[...]}`, not `source=\"...\"`.",
|
|
7
|
+
"why": "An HTML attribute is an untyped string, so the wrong form typechecks, builds, and silently does nothing. components.json records \"attribute\": null for exactly these.",
|
|
8
|
+
"wrong": "<lui-tree default-expanded-keys='[\"src\"]'>",
|
|
9
|
+
"right": "<lui-tree .defaultExpandedKeys=${[\"src\"]}>"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"topic": "camelCase property, kebab attribute",
|
|
13
|
+
"rule": "From markup, a camelCase property is set by its kebab attribute name.",
|
|
14
|
+
"wrong": "<lui-textarea autosize>",
|
|
15
|
+
"right": "<lui-textarea auto-resize>"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"topic": "collection inputs",
|
|
19
|
+
"rule": "Anything taking a list of choices names it `source`, never `options` or `items`. Holds for lui-select and for lui-form field schemas.",
|
|
20
|
+
"wrong": ".options=${[...]}",
|
|
21
|
+
"right": ".source=${[...]}"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"topic": "reflected booleans",
|
|
25
|
+
"rule": "A boolean that reflects needs `type: Boolean`.",
|
|
26
|
+
"why": "Without it the value reflects as a string, so a closed control still carries open=\"false\" and every :host([open]) rule matches while it is off. This shipped twice: an arrow pointing up when closed, and a shimmer that could not be turned off.",
|
|
27
|
+
"right": "@property({ type: Boolean, reflect: true }) open = false;"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"topic": "icon on a button",
|
|
31
|
+
"rule": "lui-button takes an `icon` property. It is not a slot.",
|
|
32
|
+
"wrong": "<lui-button><lui-icon slot=\"icon\" name=\"plus\"></lui-icon></lui-button>",
|
|
33
|
+
"right": "<lui-button icon=\"plus\">New</lui-button>"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"recipes": [
|
|
37
|
+
{
|
|
38
|
+
"name": "Pick one value from a fixed list",
|
|
39
|
+
"use": ["lui-select"],
|
|
40
|
+
"how": "`.source` with label/value objects. Add `search` for a long list, `multiple` plus multiple-display=\"tag\" for several values.",
|
|
41
|
+
"instead-of": "lui-autocomplete, whose value is free text and need not come from the list at all."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "Type freely, with suggestions",
|
|
45
|
+
"use": ["lui-autocomplete"],
|
|
46
|
+
"how": "`.source` for suggestions; the value is whatever was typed. `.filter` may return a promise for a remote lookup -- results that arrive after the query moved on are dropped.",
|
|
47
|
+
"instead-of": "lui-select with search, which filters a fixed set and cannot accept an unlisted value."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "Pick a node from a hierarchy",
|
|
51
|
+
"use": ["lui-tree-select"],
|
|
52
|
+
"how": "`.nodes` in the lui-tree shape. mode=\"single\" maps to the tree's single selection, \"multiple\" to its checkboxes. The value is one key.",
|
|
53
|
+
"instead-of": "lui-cascader, when a leaf is meaningful without its ancestors."
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "Pick a path, level by level",
|
|
57
|
+
"use": ["lui-cascader"],
|
|
58
|
+
"how": "`.nodes`, one column per level, value is the whole path array. Set change-on-select only if a partial path is a valid answer. `.childrenLoader` for lazy levels.",
|
|
59
|
+
"instead-of": "lui-tree-select, when the leaf means nothing without its ancestors -- region, category, org unit."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "Confirm a row action in place",
|
|
63
|
+
"use": ["lui-popconfirm", "lui-button"],
|
|
64
|
+
"how": "Wrap the trigger. Return a promise from `.onConfirm` to hold the button loading; a rejection leaves the panel open to retry. status=\"danger\" also makes the confirm button danger.",
|
|
65
|
+
"instead-of": "dialog.confirm(), which blocks the page -- too heavy for a per-row delete."
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "Tell the user something that must persist",
|
|
69
|
+
"use": ["lui-alert"],
|
|
70
|
+
"how": "Inline and non-transient; it takes part in the layout. For a form error summary or a page banner. Actions go in the `actions` slot.",
|
|
71
|
+
"instead-of": "toast, which leaves on its own, and dialog.alert(), which blocks until acknowledged. All three are named alike and none is interchangeable."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "Show that something is loading",
|
|
75
|
+
"use": ["lui-spinner"],
|
|
76
|
+
"how": "Defaults to 1em so it tracks surrounding text. variant=\"track\" standalone, \"current\" inline with text. lui-button, lui-card and lui-tree already render it internally.",
|
|
77
|
+
"instead-of": "hand-rolling a CSS ring -- three components each had one before this was shared, at three sizes and two colour strategies."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "Compose lui-popover inside your own component",
|
|
81
|
+
"use": ["lui-popover", "../utils/portal-styles"],
|
|
82
|
+
"how": "Slot your panel in and pass `.portalStyleSources=${ownStyleSheets(this)}`.",
|
|
83
|
+
"why": "CSS scoping follows the tree a node currently lives in. The portal moves slotted content into the overlay root, where your shadow styles no longer apply: the panel keeps its markup and loses every rule. Three components shipped without this and their panels had never been styled in a browser.",
|
|
84
|
+
"see": "lui-popconfirm and lui-tooltip compose it this way; lui-select extends it instead and needs extra plumbing as a result."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "Give a floating surface its elevation",
|
|
88
|
+
"use": ["--lui-shadow-overlay"],
|
|
89
|
+
"how": "Every floating surface reads this one token. Retarget it to move them together; --lui-shadow-lg and -xl remain for opting a single surface out.",
|
|
90
|
+
"instead-of": "choosing an elevation step per component, which is how three different steps ended up across ten overlays."
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "Build a control that opens a panel",
|
|
94
|
+
"use": ["../themes/control-shell", "../themes/option-row"],
|
|
95
|
+
"how": "Add the `control-shell` class to the closed box and `option-row` to each choice row, then set only what genuinely differs. A trailing arrow or clear button gets class=\"control-affordance\" with data-affordance=\"arrow\" or \"clear\", and the shell reserves room via --lui-control-gutter or -gutter-2.",
|
|
96
|
+
"why": "Five components had grown their own shell and four their own option row, disagreeing on padding, gap, height and what transitioned. The gutter arithmetic was wrong in all three places that did it by hand, so a clear button sat on top of the value text."
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "Show a status colour or glyph",
|
|
100
|
+
"use": ["../utils/status"],
|
|
101
|
+
"how": "statusIcon(status) and statusColorVar(status). Canonical set is info/success/warning/danger; `error` and `exception` normalise onto danger, `normal` and `active` onto no status.",
|
|
102
|
+
"instead-of": "mapping status to an icon yourself -- Toast and Progress each did, and disagreed about which glyph meant success."
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "Accept a size from the outside",
|
|
106
|
+
"use": ["../utils/format"],
|
|
107
|
+
"how": "toCssLength(value): converts a number or numeric string to px, passes a real length through untouched.",
|
|
108
|
+
"why": "An attribute is always a string, so size=\"24\" arrives unitless and emitting it as-is yields `width: 24`, which is invalid and collapses the element. Five components had this bug."
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}
|