ng-blatui 1.3.0 → 1.4.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/fesm2022/ng-blatui.mjs +352 -3
- package/fesm2022/ng-blatui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ng-blatui.d.ts +135 -1
package/fesm2022/ng-blatui.mjs
CHANGED
|
@@ -70,7 +70,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
70
70
|
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
71
71
|
|
|
72
72
|
const BASE = 'inline-flex items-center justify-center rounded-md border font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden';
|
|
73
|
-
const SIZES = {
|
|
73
|
+
const SIZES$1 = {
|
|
74
74
|
sm: 'px-1.5 py-px text-[0.625rem]',
|
|
75
75
|
default: 'px-2 py-0.5 text-xs',
|
|
76
76
|
lg: 'px-3 py-1 text-sm [&>svg]:size-3.5',
|
|
@@ -144,7 +144,7 @@ class BuiBadge {
|
|
|
144
144
|
computedClass = computed(() => {
|
|
145
145
|
const tone = this.tone();
|
|
146
146
|
const toneOrVariant = tone === null ? brandClass(this.variant()) : TONES[tone][intensityFor(this.variant())];
|
|
147
|
-
return cn(BASE, SIZES[this.size()], toneOrVariant, this.userClass());
|
|
147
|
+
return cn(BASE, SIZES$1[this.size()], toneOrVariant, this.userClass());
|
|
148
148
|
}, /* @ts-ignore */
|
|
149
149
|
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
150
150
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiBadge, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -2250,6 +2250,355 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
2250
2250
|
}]
|
|
2251
2251
|
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2252
2252
|
|
|
2253
|
+
/** Empty-state container. */
|
|
2254
|
+
class BuiEmpty {
|
|
2255
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2256
|
+
computedClass = computed(() => cn('flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border border-dashed p-6 text-center text-balance md:p-12', this.userClass()), /* @ts-ignore */
|
|
2257
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2258
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiEmpty, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2259
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiEmpty, isStandalone: true, selector: "[buiEmpty]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "empty" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
2260
|
+
}
|
|
2261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiEmpty, decorators: [{
|
|
2262
|
+
type: Directive,
|
|
2263
|
+
args: [{
|
|
2264
|
+
selector: '[buiEmpty]',
|
|
2265
|
+
host: { 'data-slot': 'empty', '[class]': 'computedClass()' },
|
|
2266
|
+
}]
|
|
2267
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2268
|
+
class BuiEmptyHeader {
|
|
2269
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2270
|
+
computedClass = computed(() => cn('flex max-w-sm flex-col items-center gap-2 text-center', this.userClass()), /* @ts-ignore */
|
|
2271
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2272
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiEmptyHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2273
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiEmptyHeader, isStandalone: true, selector: "[buiEmptyHeader]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "empty-header" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
2274
|
+
}
|
|
2275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiEmptyHeader, decorators: [{
|
|
2276
|
+
type: Directive,
|
|
2277
|
+
args: [{
|
|
2278
|
+
selector: '[buiEmptyHeader]',
|
|
2279
|
+
host: { 'data-slot': 'empty-header', '[class]': 'computedClass()' },
|
|
2280
|
+
}]
|
|
2281
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2282
|
+
class BuiEmptyMedia {
|
|
2283
|
+
variant = input('default', /* @ts-ignore */
|
|
2284
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
2285
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2286
|
+
computedClass = computed(() => cn('mb-2 flex shrink-0 items-center justify-center', this.variant() === 'icon' &&
|
|
2287
|
+
"size-10 rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6", this.userClass()), /* @ts-ignore */
|
|
2288
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2289
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiEmptyMedia, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2290
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiEmptyMedia, isStandalone: true, selector: "[buiEmptyMedia]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "empty-media" }, properties: { "attr.data-variant": "variant()", "class": "computedClass()" } }, ngImport: i0 });
|
|
2291
|
+
}
|
|
2292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiEmptyMedia, decorators: [{
|
|
2293
|
+
type: Directive,
|
|
2294
|
+
args: [{
|
|
2295
|
+
selector: '[buiEmptyMedia]',
|
|
2296
|
+
host: {
|
|
2297
|
+
'data-slot': 'empty-media',
|
|
2298
|
+
'[attr.data-variant]': 'variant()',
|
|
2299
|
+
'[class]': 'computedClass()',
|
|
2300
|
+
},
|
|
2301
|
+
}]
|
|
2302
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2303
|
+
class BuiEmptyTitle {
|
|
2304
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2305
|
+
computedClass = computed(() => cn('text-lg font-medium tracking-tight', this.userClass()), /* @ts-ignore */
|
|
2306
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2307
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiEmptyTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2308
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiEmptyTitle, isStandalone: true, selector: "[buiEmptyTitle]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "empty-title" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
2309
|
+
}
|
|
2310
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiEmptyTitle, decorators: [{
|
|
2311
|
+
type: Directive,
|
|
2312
|
+
args: [{
|
|
2313
|
+
selector: '[buiEmptyTitle]',
|
|
2314
|
+
host: { 'data-slot': 'empty-title', '[class]': 'computedClass()' },
|
|
2315
|
+
}]
|
|
2316
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2317
|
+
class BuiEmptyDescription {
|
|
2318
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2319
|
+
computedClass = computed(() => cn('text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary', this.userClass()), /* @ts-ignore */
|
|
2320
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2321
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiEmptyDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2322
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiEmptyDescription, isStandalone: true, selector: "[buiEmptyDescription]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "empty-description" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
2323
|
+
}
|
|
2324
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiEmptyDescription, decorators: [{
|
|
2325
|
+
type: Directive,
|
|
2326
|
+
args: [{
|
|
2327
|
+
selector: '[buiEmptyDescription]',
|
|
2328
|
+
host: { 'data-slot': 'empty-description', '[class]': 'computedClass()' },
|
|
2329
|
+
}]
|
|
2330
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2331
|
+
class BuiEmptyContent {
|
|
2332
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2333
|
+
computedClass = computed(() => cn('flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance', this.userClass()), /* @ts-ignore */
|
|
2334
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2335
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiEmptyContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2336
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiEmptyContent, isStandalone: true, selector: "[buiEmptyContent]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "empty-content" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
2337
|
+
}
|
|
2338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiEmptyContent, decorators: [{
|
|
2339
|
+
type: Directive,
|
|
2340
|
+
args: [{
|
|
2341
|
+
selector: '[buiEmptyContent]',
|
|
2342
|
+
host: { 'data-slot': 'empty-content', '[class]': 'computedClass()' },
|
|
2343
|
+
}]
|
|
2344
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2345
|
+
|
|
2346
|
+
const SIZES = {
|
|
2347
|
+
sm: 'max-w-3xl',
|
|
2348
|
+
md: 'max-w-5xl',
|
|
2349
|
+
lg: 'max-w-6xl',
|
|
2350
|
+
xl: 'max-w-7xl',
|
|
2351
|
+
prose: 'max-w-prose',
|
|
2352
|
+
full: 'max-w-full',
|
|
2353
|
+
};
|
|
2354
|
+
/** Centered, padded page container with a max-width scale. */
|
|
2355
|
+
class BuiContainer {
|
|
2356
|
+
size = input('lg', /* @ts-ignore */
|
|
2357
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2358
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2359
|
+
computedClass = computed(() => cn('mx-auto w-full px-4 sm:px-6 lg:px-8', SIZES[this.size()], this.userClass()), /* @ts-ignore */
|
|
2360
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2361
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiContainer, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2362
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiContainer, isStandalone: true, selector: "[buiContainer]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "container" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
2363
|
+
}
|
|
2364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiContainer, decorators: [{
|
|
2365
|
+
type: Directive,
|
|
2366
|
+
args: [{
|
|
2367
|
+
selector: '[buiContainer]',
|
|
2368
|
+
host: { 'data-slot': 'container', '[class]': 'computedClass()' },
|
|
2369
|
+
}]
|
|
2370
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2371
|
+
|
|
2372
|
+
const FIELD_ORIENT = {
|
|
2373
|
+
vertical: 'flex-col [&>*]:w-full [&>.sr-only]:w-auto',
|
|
2374
|
+
horizontal: 'flex-row items-center [&>[data-slot=field-label]]:flex-auto',
|
|
2375
|
+
responsive: 'flex-col [&>*]:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto',
|
|
2376
|
+
};
|
|
2377
|
+
/** A form field row grouping a label, control, description and error. */
|
|
2378
|
+
class BuiField {
|
|
2379
|
+
orientation = input('vertical', /* @ts-ignore */
|
|
2380
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
2381
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2382
|
+
computedClass = computed(() => cn('group/field flex w-full gap-2 data-[invalid=true]:text-destructive', FIELD_ORIENT[this.orientation()], this.userClass()), /* @ts-ignore */
|
|
2383
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2384
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiField, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2385
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiField, isStandalone: true, selector: "[buiField]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group", "data-slot": "field" }, properties: { "attr.data-orientation": "orientation()", "class": "computedClass()" } }, ngImport: i0 });
|
|
2386
|
+
}
|
|
2387
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiField, decorators: [{
|
|
2388
|
+
type: Directive,
|
|
2389
|
+
args: [{
|
|
2390
|
+
selector: '[buiField]',
|
|
2391
|
+
host: {
|
|
2392
|
+
role: 'group',
|
|
2393
|
+
'data-slot': 'field',
|
|
2394
|
+
'[attr.data-orientation]': 'orientation()',
|
|
2395
|
+
'[class]': 'computedClass()',
|
|
2396
|
+
},
|
|
2397
|
+
}]
|
|
2398
|
+
}], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2399
|
+
class BuiFieldSet {
|
|
2400
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2401
|
+
computedClass = computed(() => cn('flex flex-col gap-6 has-[>[data-slot=radio-group]]:gap-3', this.userClass()), /* @ts-ignore */
|
|
2402
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2403
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldSet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2404
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiFieldSet, isStandalone: true, selector: "fieldset[buiFieldSet]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "field-set" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
2405
|
+
}
|
|
2406
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldSet, decorators: [{
|
|
2407
|
+
type: Directive,
|
|
2408
|
+
args: [{
|
|
2409
|
+
selector: 'fieldset[buiFieldSet]',
|
|
2410
|
+
host: { 'data-slot': 'field-set', '[class]': 'computedClass()' },
|
|
2411
|
+
}]
|
|
2412
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2413
|
+
class BuiFieldLegend {
|
|
2414
|
+
variant = input('legend', /* @ts-ignore */
|
|
2415
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
2416
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2417
|
+
computedClass = computed(() => cn('mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base', this.userClass()), /* @ts-ignore */
|
|
2418
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2419
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldLegend, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2420
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiFieldLegend, isStandalone: true, selector: "legend[buiFieldLegend]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "field-legend" }, properties: { "attr.data-variant": "variant()", "class": "computedClass()" } }, ngImport: i0 });
|
|
2421
|
+
}
|
|
2422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldLegend, decorators: [{
|
|
2423
|
+
type: Directive,
|
|
2424
|
+
args: [{
|
|
2425
|
+
selector: 'legend[buiFieldLegend]',
|
|
2426
|
+
host: {
|
|
2427
|
+
'data-slot': 'field-legend',
|
|
2428
|
+
'[attr.data-variant]': 'variant()',
|
|
2429
|
+
'[class]': 'computedClass()',
|
|
2430
|
+
},
|
|
2431
|
+
}]
|
|
2432
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2433
|
+
class BuiFieldGroup {
|
|
2434
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2435
|
+
computedClass = computed(() => cn('group/field-group @container/field-group flex w-full flex-col gap-7', this.userClass()), /* @ts-ignore */
|
|
2436
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2437
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2438
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiFieldGroup, isStandalone: true, selector: "[buiFieldGroup]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "field-group" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
2439
|
+
}
|
|
2440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldGroup, decorators: [{
|
|
2441
|
+
type: Directive,
|
|
2442
|
+
args: [{
|
|
2443
|
+
selector: '[buiFieldGroup]',
|
|
2444
|
+
host: { 'data-slot': 'field-group', '[class]': 'computedClass()' },
|
|
2445
|
+
}]
|
|
2446
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2447
|
+
class BuiFieldLabel {
|
|
2448
|
+
forId = input(undefined, { ...(ngDevMode ? { debugName: "forId" } : /* istanbul ignore next */ {}), alias: 'for' });
|
|
2449
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2450
|
+
computedClass = computed(() => cn('flex w-fit gap-2 text-sm leading-snug font-medium select-none group-data-[disabled=true]/field:opacity-50', this.userClass()), /* @ts-ignore */
|
|
2451
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2452
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2453
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiFieldLabel, isStandalone: true, selector: "label[buiFieldLabel]", inputs: { forId: { classPropertyName: "forId", publicName: "for", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "field-label" }, properties: { "attr.for": "forId()", "class": "computedClass()" } }, ngImport: i0 });
|
|
2454
|
+
}
|
|
2455
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldLabel, decorators: [{
|
|
2456
|
+
type: Directive,
|
|
2457
|
+
args: [{
|
|
2458
|
+
selector: 'label[buiFieldLabel]',
|
|
2459
|
+
host: { 'data-slot': 'field-label', '[attr.for]': 'forId()', '[class]': 'computedClass()' },
|
|
2460
|
+
}]
|
|
2461
|
+
}], propDecorators: { forId: [{ type: i0.Input, args: [{ isSignal: true, alias: "for", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2462
|
+
class BuiFieldTitle {
|
|
2463
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2464
|
+
computedClass = computed(() => cn('flex w-fit items-center gap-2 text-sm leading-snug font-medium', this.userClass()), /* @ts-ignore */
|
|
2465
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2466
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2467
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiFieldTitle, isStandalone: true, selector: "[buiFieldTitle]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "field-title" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
2468
|
+
}
|
|
2469
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldTitle, decorators: [{
|
|
2470
|
+
type: Directive,
|
|
2471
|
+
args: [{
|
|
2472
|
+
selector: '[buiFieldTitle]',
|
|
2473
|
+
host: { 'data-slot': 'field-title', '[class]': 'computedClass()' },
|
|
2474
|
+
}]
|
|
2475
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2476
|
+
class BuiFieldDescription {
|
|
2477
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2478
|
+
computedClass = computed(() => cn('text-sm leading-normal font-normal text-muted-foreground', this.userClass()), /* @ts-ignore */
|
|
2479
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2480
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2481
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiFieldDescription, isStandalone: true, selector: "p[buiFieldDescription]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "field-description" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
2482
|
+
}
|
|
2483
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldDescription, decorators: [{
|
|
2484
|
+
type: Directive,
|
|
2485
|
+
args: [{
|
|
2486
|
+
selector: 'p[buiFieldDescription]',
|
|
2487
|
+
host: { 'data-slot': 'field-description', '[class]': 'computedClass()' },
|
|
2488
|
+
}]
|
|
2489
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2490
|
+
class BuiFieldContent {
|
|
2491
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2492
|
+
computedClass = computed(() => cn('group/field-content flex flex-1 flex-col gap-1.5 leading-snug', this.userClass()), /* @ts-ignore */
|
|
2493
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2494
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2495
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiFieldContent, isStandalone: true, selector: "[buiFieldContent]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "field-content" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
2496
|
+
}
|
|
2497
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldContent, decorators: [{
|
|
2498
|
+
type: Directive,
|
|
2499
|
+
args: [{
|
|
2500
|
+
selector: '[buiFieldContent]',
|
|
2501
|
+
host: { 'data-slot': 'field-content', '[class]': 'computedClass()' },
|
|
2502
|
+
}]
|
|
2503
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2504
|
+
/** Field validation message (`role="alert"`). */
|
|
2505
|
+
class BuiFieldError {
|
|
2506
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2507
|
+
computedClass = computed(() => cn('text-sm font-normal text-destructive', this.userClass()), /* @ts-ignore */
|
|
2508
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2509
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldError, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2510
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiFieldError, isStandalone: true, selector: "[buiFieldError]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "alert", "data-slot": "field-error" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
2511
|
+
}
|
|
2512
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldError, decorators: [{
|
|
2513
|
+
type: Directive,
|
|
2514
|
+
args: [{
|
|
2515
|
+
selector: '[buiFieldError]',
|
|
2516
|
+
host: { role: 'alert', 'data-slot': 'field-error', '[class]': 'computedClass()' },
|
|
2517
|
+
}]
|
|
2518
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2519
|
+
/** Labelled divider between fields. */
|
|
2520
|
+
class BuiFieldSeparator {
|
|
2521
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2522
|
+
computedClass = computed(() => cn('relative -my-2 block h-5 text-sm', this.userClass()), /* @ts-ignore */
|
|
2523
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2524
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldSeparator, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2525
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: BuiFieldSeparator, isStandalone: true, selector: "bui-field-separator", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "field-separator" }, properties: { "class": "computedClass()" } }, ngImport: i0, template: `
|
|
2526
|
+
<div class="absolute inset-0 top-1/2 h-px bg-border"></div>
|
|
2527
|
+
<span class="relative mx-auto block w-fit bg-background px-2 text-muted-foreground">
|
|
2528
|
+
<ng-content />
|
|
2529
|
+
</span>
|
|
2530
|
+
`, isInline: true });
|
|
2531
|
+
}
|
|
2532
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFieldSeparator, decorators: [{
|
|
2533
|
+
type: Component,
|
|
2534
|
+
args: [{
|
|
2535
|
+
selector: 'bui-field-separator',
|
|
2536
|
+
host: { 'data-slot': 'field-separator', '[class]': 'computedClass()' },
|
|
2537
|
+
template: `
|
|
2538
|
+
<div class="absolute inset-0 top-1/2 h-px bg-border"></div>
|
|
2539
|
+
<span class="relative mx-auto block w-fit bg-background px-2 text-muted-foreground">
|
|
2540
|
+
<ng-content />
|
|
2541
|
+
</span>
|
|
2542
|
+
`,
|
|
2543
|
+
}]
|
|
2544
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2545
|
+
|
|
2546
|
+
/** Accessible disclosure: a trigger toggles the visibility of its content. */
|
|
2547
|
+
class BuiCollapsible {
|
|
2548
|
+
open = model(false, /* @ts-ignore */
|
|
2549
|
+
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
2550
|
+
contentId = inject(_IdGenerator).getId('bui-collapsible-');
|
|
2551
|
+
toggle() {
|
|
2552
|
+
this.open.update((value) => !value);
|
|
2553
|
+
}
|
|
2554
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiCollapsible, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2555
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiCollapsible, isStandalone: true, selector: "[buiCollapsible]", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { attributes: { "data-slot": "collapsible" } }, exportAs: ["buiCollapsible"], ngImport: i0 });
|
|
2556
|
+
}
|
|
2557
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiCollapsible, decorators: [{
|
|
2558
|
+
type: Directive,
|
|
2559
|
+
args: [{
|
|
2560
|
+
selector: '[buiCollapsible]',
|
|
2561
|
+
exportAs: 'buiCollapsible',
|
|
2562
|
+
host: { 'data-slot': 'collapsible' },
|
|
2563
|
+
}]
|
|
2564
|
+
}], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }] } });
|
|
2565
|
+
class BuiCollapsibleTrigger {
|
|
2566
|
+
collapsible = inject(BuiCollapsible);
|
|
2567
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiCollapsibleTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2568
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: BuiCollapsibleTrigger, isStandalone: true, selector: "button[buiCollapsibleTrigger]", host: { attributes: { "type": "button", "data-slot": "collapsible-trigger" }, listeners: { "click": "collapsible.toggle()" }, properties: { "attr.aria-expanded": "collapsible.open()", "attr.aria-controls": "collapsible.contentId", "attr.data-state": "collapsible.open() ? 'open' : 'closed'" } }, ngImport: i0 });
|
|
2569
|
+
}
|
|
2570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiCollapsibleTrigger, decorators: [{
|
|
2571
|
+
type: Directive,
|
|
2572
|
+
args: [{
|
|
2573
|
+
selector: 'button[buiCollapsibleTrigger]',
|
|
2574
|
+
host: {
|
|
2575
|
+
type: 'button',
|
|
2576
|
+
'data-slot': 'collapsible-trigger',
|
|
2577
|
+
'[attr.aria-expanded]': 'collapsible.open()',
|
|
2578
|
+
'[attr.aria-controls]': 'collapsible.contentId',
|
|
2579
|
+
'[attr.data-state]': "collapsible.open() ? 'open' : 'closed'",
|
|
2580
|
+
'(click)': 'collapsible.toggle()',
|
|
2581
|
+
},
|
|
2582
|
+
}]
|
|
2583
|
+
}] });
|
|
2584
|
+
class BuiCollapsibleContent {
|
|
2585
|
+
collapsible = inject(BuiCollapsible);
|
|
2586
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiCollapsibleContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2587
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: BuiCollapsibleContent, isStandalone: true, selector: "[buiCollapsibleContent]", host: { attributes: { "data-slot": "collapsible-content" }, properties: { "id": "collapsible.contentId", "hidden": "!collapsible.open()", "attr.data-state": "collapsible.open() ? 'open' : 'closed'" } }, ngImport: i0 });
|
|
2588
|
+
}
|
|
2589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiCollapsibleContent, decorators: [{
|
|
2590
|
+
type: Directive,
|
|
2591
|
+
args: [{
|
|
2592
|
+
selector: '[buiCollapsibleContent]',
|
|
2593
|
+
host: {
|
|
2594
|
+
'data-slot': 'collapsible-content',
|
|
2595
|
+
'[id]': 'collapsible.contentId',
|
|
2596
|
+
'[hidden]': '!collapsible.open()',
|
|
2597
|
+
'[attr.data-state]': "collapsible.open() ? 'open' : 'closed'",
|
|
2598
|
+
},
|
|
2599
|
+
}]
|
|
2600
|
+
}] });
|
|
2601
|
+
|
|
2253
2602
|
/*
|
|
2254
2603
|
* Public API Surface of ng-blatui
|
|
2255
2604
|
*/
|
|
@@ -2258,5 +2607,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
2258
2607
|
* Generated bundle index. Do not edit.
|
|
2259
2608
|
*/
|
|
2260
2609
|
|
|
2261
|
-
export { BuiAccordion, BuiAccordionContent, BuiAccordionItem, BuiAccordionTrigger, BuiAlert, BuiAlertDescription, BuiAlertTitle, BuiAspectRatio, BuiAvatar, BuiBadge, BuiBreadcrumb, BuiBreadcrumbEllipsis, BuiBreadcrumbItem, BuiBreadcrumbLink, BuiBreadcrumbList, BuiBreadcrumbPage, BuiBreadcrumbSeparator, BuiButton, BuiButtonGroup, BuiButtonGroupText, BuiCard, BuiCardAction, BuiCardContent, BuiCardDescription, BuiCardFooter, BuiCardHeader, BuiCardTitle, BuiCheckbox, BuiDialogContent, BuiDialogDescription, BuiDialogFooter, BuiDialogHeader, BuiDialogTitle, BuiInput, BuiKbd, BuiLabel, BuiProgress, BuiRadioGroup, BuiRadioGroupItem, BuiSeparator, BuiSkeleton, BuiSwitch, BuiTabList, BuiTabPanel, BuiTabTrigger, BuiTabs, BuiTextarea, BuiThemeCustomizer, BuiTooltip, BuiTooltipContent, THEME_TOKENS, ThemeStore, buttonVariants, cn };
|
|
2610
|
+
export { BuiAccordion, BuiAccordionContent, BuiAccordionItem, BuiAccordionTrigger, BuiAlert, BuiAlertDescription, BuiAlertTitle, BuiAspectRatio, BuiAvatar, BuiBadge, BuiBreadcrumb, BuiBreadcrumbEllipsis, BuiBreadcrumbItem, BuiBreadcrumbLink, BuiBreadcrumbList, BuiBreadcrumbPage, BuiBreadcrumbSeparator, BuiButton, BuiButtonGroup, BuiButtonGroupText, BuiCard, BuiCardAction, BuiCardContent, BuiCardDescription, BuiCardFooter, BuiCardHeader, BuiCardTitle, BuiCheckbox, BuiCollapsible, BuiCollapsibleContent, BuiCollapsibleTrigger, BuiContainer, BuiDialogContent, BuiDialogDescription, BuiDialogFooter, BuiDialogHeader, BuiDialogTitle, BuiEmpty, BuiEmptyContent, BuiEmptyDescription, BuiEmptyHeader, BuiEmptyMedia, BuiEmptyTitle, BuiField, BuiFieldContent, BuiFieldDescription, BuiFieldError, BuiFieldGroup, BuiFieldLabel, BuiFieldLegend, BuiFieldSeparator, BuiFieldSet, BuiFieldTitle, BuiInput, BuiKbd, BuiLabel, BuiProgress, BuiRadioGroup, BuiRadioGroupItem, BuiSeparator, BuiSkeleton, BuiSwitch, BuiTabList, BuiTabPanel, BuiTabTrigger, BuiTabs, BuiTextarea, BuiThemeCustomizer, BuiTooltip, BuiTooltipContent, THEME_TOKENS, ThemeStore, buttonVariants, cn };
|
|
2262
2611
|
//# sourceMappingURL=ng-blatui.mjs.map
|