@frontile/theme 0.18.14 → 0.18.15
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/declarations/components/app-layout.d.ts +1 -0
- package/declarations/components/app-layout.d.ts.map +1 -1
- package/declarations/index.d.ts +20 -2
- package/declarations/index.d.ts.map +1 -1
- package/declarations/plugin/overlays.d.ts.map +1 -1
- package/dist/index.js +25 -1
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +7 -1
- package/dist/plugin.js.map +1 -1
- package/package.json +2 -2
- package/src/index.css +10 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-layout.d.ts","sourceRoot":"","sources":["../../src/components/app-layout.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AA2K1C,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"app-layout.d.ts","sourceRoot":"","sources":["../../src/components/app-layout.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AA2K1C,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CA4mBb,CAAC;AAEH,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,MAAM,MAAM,cAAc,GAAG,MAAM,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC"}
|
package/declarations/index.d.ts
CHANGED
|
@@ -2,8 +2,26 @@ import * as components from './components';
|
|
|
2
2
|
import type { ClassValue } from 'tailwind-variants';
|
|
3
3
|
export type * from './components';
|
|
4
4
|
export * from './tw';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type Components = typeof components;
|
|
6
|
+
/**
|
|
7
|
+
* What a style override has to be for the component that reads it: callable
|
|
8
|
+
* with that component's variant props, returning what the shipped style
|
|
9
|
+
* returns (a class string, or one function per slot).
|
|
10
|
+
*
|
|
11
|
+
* Only the call signature is kept. `typeof components` also carries each
|
|
12
|
+
* style's class strings as literal types (`base: 'bg-surface-input rounded-xl
|
|
13
|
+
* ...'`), and requiring those would reject every override that changes a class
|
|
14
|
+
* -- which is every override.
|
|
15
|
+
*
|
|
16
|
+
* Entries that are not styles at all (`overlayTransitions` is a plain object)
|
|
17
|
+
* keep their own type.
|
|
18
|
+
*/
|
|
19
|
+
type StyleOverride<T> = T extends (...args: infer A) => infer R ? (...args: A) => R : T;
|
|
20
|
+
export type CustomStyles = {
|
|
21
|
+
[K in keyof Components]?: StyleOverride<Components[K]>;
|
|
22
|
+
};
|
|
23
|
+
declare function registerCustomStyles(styles: CustomStyles): void;
|
|
24
|
+
declare function useStyles(): Components;
|
|
7
25
|
export type SlotsToClasses<S extends string> = {
|
|
8
26
|
[key in S]?: ClassValue;
|
|
9
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,mBAAmB,cAAc,CAAC;AAClC,cAAc,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,mBAAmB,cAAc,CAAC;AAClC,cAAc,MAAM,CAAC;AAErB,KAAK,UAAU,GAAG,OAAO,UAAU,CAAC;AAEpC;;;;;;;;;;;;GAYG;AACH,KAAK,aAAa,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,GAC3D,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GACjB,CAAC,CAAC;AAEN,MAAM,MAAM,YAAY,GAAG;KACxB,CAAC,IAAI,MAAM,UAAU,CAAC,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;CACvD,CAAC;AAIF,iBAAS,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAIxD;AAED,iBAAS,SAAS,IAAI,UAAU,CAE/B;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,IAAI;KAC5C,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,UAAU;CACxB,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC;AAC3C,YAAY,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlays.d.ts","sourceRoot":"","sources":["../../src/plugin/overlays.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,SAAS,CAAC;AAExD,iBAAS,WAAW,CAClB,aAAa,EAAE,SAAS,CAAC,eAAe,CAAC,EACzC,MAAM,EAAE,MAAM,GACb,IAAI,
|
|
1
|
+
{"version":3,"file":"overlays.d.ts","sourceRoot":"","sources":["../../src/plugin/overlays.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,SAAS,CAAC;AAExD,iBAAS,WAAW,CAClB,aAAa,EAAE,SAAS,CAAC,eAAe,CAAC,EACzC,MAAM,EAAE,MAAM,GACb,IAAI,CAgCN;AAED,iBAAS,UAAU,CACjB,aAAa,EAAE,SAAS,CAAC,eAAe,CAAC,EACzC,MAAM,EAAE,MAAM,GACb,IAAI,CAyBN;AAED,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3992,7 +3992,15 @@ const appLayout = tv({
|
|
|
3992
3992
|
// exit ends); `data-animated=false` and reduced motion turn it off.
|
|
3993
3993
|
aside: ['col-start-3 row-start-2 hidden w-72 shrink-0 overflow-y-auto overflow-x-clip p-4 font-body text-body-sm lg:block', 'data-[animated=true]:data-[state=open]:animate-[frontile-aside-in_200ms_ease-out]', 'data-[animated=true]:data-[state=closed]:animate-[frontile-aside-out_200ms_ease-in_forwards]', 'motion-reduce:animate-none'],
|
|
3994
3994
|
// The aside's `aside` element inside the drawer: as tall as the drawer.
|
|
3995
|
-
|
|
3995
|
+
// A flex column, so a single child that is itself a column (header,
|
|
3996
|
+
// scrolling body, footer) can take the aside's height with
|
|
3997
|
+
// `min-h-0 flex-1`. A percentage height would not resolve here: the sheet
|
|
3998
|
+
// is content-sized.
|
|
3999
|
+
mobileAside: 'flex min-h-0 flex-1 flex-col overflow-y-auto p-4 font-body text-body-sm',
|
|
4000
|
+
// Added to the aside's bottom `Drawer` when no size is passed, so the sheet
|
|
4001
|
+
// is as tall as its content (up to the drawer's `full` cap) instead of
|
|
4002
|
+
// filling the cap. Overrides the drawer's `h-full`.
|
|
4003
|
+
mobileSheet: 'h-auto',
|
|
3996
4004
|
asideToggle: iconButton,
|
|
3997
4005
|
// A `layout.Region`: its children lay out as children of its parent.
|
|
3998
4006
|
region: 'contents',
|
|
@@ -6491,8 +6499,24 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
6491
6499
|
tooltip: tooltip
|
|
6492
6500
|
});
|
|
6493
6501
|
|
|
6502
|
+
/**
|
|
6503
|
+
* What a style override has to be for the component that reads it: callable
|
|
6504
|
+
* with that component's variant props, returning what the shipped style
|
|
6505
|
+
* returns (a class string, or one function per slot).
|
|
6506
|
+
*
|
|
6507
|
+
* Only the call signature is kept. `typeof components` also carries each
|
|
6508
|
+
* style's class strings as literal types (`base: 'bg-surface-input rounded-xl
|
|
6509
|
+
* ...'`), and requiring those would reject every override that changes a class
|
|
6510
|
+
* -- which is every override.
|
|
6511
|
+
*
|
|
6512
|
+
* Entries that are not styles at all (`overlayTransitions` is a plain object)
|
|
6513
|
+
* keep their own type.
|
|
6514
|
+
*/
|
|
6515
|
+
|
|
6494
6516
|
let localStyles = components;
|
|
6495
6517
|
function registerCustomStyles(styles) {
|
|
6518
|
+
// Each override has the call signature of the style it replaces (see
|
|
6519
|
+
// `StyleOverride`), which is all a component uses -- so it stands in for it.
|
|
6496
6520
|
localStyles = {
|
|
6497
6521
|
...localStyles,
|
|
6498
6522
|
...styles
|