@xui/divider 2.0.0-alpha.20 → 2.0.0-alpha.21

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.
@@ -36,6 +36,7 @@ class XuiDivider {
36
36
  /** The user-defined classes. Merged last so they win over the variant classes. */
37
37
  class = input('', /* @ts-ignore */
38
38
  ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
39
+ /** Which way the rule runs. A vertical divider needs a height from its container — it has none of its own. */
39
40
  orientation = input('horizontal', /* @ts-ignore */
40
41
  ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
41
42
  /** Drop the surrounding margin so the divider sits flush with its neighbours. */
@@ -1 +1 @@
1
- {"version":3,"file":"xui-divider.mjs","sources":["../../../../../../libs/ui/divider/xui/src/lib/divider.ts","../../../../../../libs/ui/divider/xui/src/index.ts","../../../../../../libs/ui/divider/xui/src/xui-divider.ts"],"sourcesContent":["import type { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, input } from '@angular/core';\nimport { xui } from '@xui/core';\nimport { cva, VariantProps } from 'class-variance-authority';\nimport type { ClassValue } from 'clsx';\n\nexport const dividerVariants = cva('border-border', {\n variants: {\n orientation: {\n horizontal: 'block w-auto border-t',\n vertical: 'inline-block h-auto self-stretch border-s'\n },\n compact: { true: '', false: '' }\n },\n compoundVariants: [\n { orientation: 'horizontal', compact: false, class: 'my-2' },\n { orientation: 'vertical', compact: false, class: 'mx-2' }\n ],\n defaultVariants: {\n orientation: 'horizontal',\n compact: false\n }\n});\n\nexport type XuiDividerVariants = VariantProps<typeof dividerVariants>;\n\n/**\n * A rule separating two groups of content.\n *\n * ```html\n * <div xuiDivider></div>\n * <div xuiDivider orientation=\"vertical\"></div>\n * ```\n *\n * The host is exposed as `role=\"separator\"` with a matching `aria-orientation`,\n * so the break is announced rather than being purely visual. A vertical divider\n * stretches to its flex parent's cross size instead of needing a set height.\n */\n@Directive({\n selector: '[xuiDivider]',\n exportAs: 'xuiDivider',\n host: {\n role: 'separator',\n '[attr.aria-orientation]': 'orientation()',\n '[class]': 'computedClass()'\n }\n})\nexport class XuiDivider {\n /** The user-defined classes. Merged last so they win over the variant classes. */\n readonly class = input<ClassValue>('');\n readonly orientation = input<NonNullable<XuiDividerVariants['orientation']>>('horizontal');\n\n /** Drop the surrounding margin so the divider sits flush with its neighbours. */\n readonly compact = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n protected readonly computedClass = computed(() =>\n xui(dividerVariants({ orientation: this.orientation(), compact: this.compact() }), this.class())\n );\n}\n","import { XuiDivider } from './lib/divider';\n\nexport * from './lib/divider';\n\nexport const XuiDividerImports = [XuiDivider] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAMO,MAAM,eAAe,GAAG,GAAG,CAAC,eAAe,EAAE;AAClD,IAAA,QAAQ,EAAE;AACR,QAAA,WAAW,EAAE;AACX,YAAA,UAAU,EAAE,uBAAuB;AACnC,YAAA,QAAQ,EAAE;AACX,SAAA;QACD,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE;AAC/B,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE;QAC5D,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM;AACzD,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,WAAW,EAAE,YAAY;AACzB,QAAA,OAAO,EAAE;AACV;AACF,CAAA;AAID;;;;;;;;;;;AAWG;MAUU,UAAU,CAAA;;IAEZ,KAAK,GAAG,KAAK,CAAa,EAAE;8EAAC;IAC7B,WAAW,GAAG,KAAK,CAAiD,YAAY;oFAAC;;IAGjF,OAAO,GAAG,KAAK,CAAwB,KAAK,+EAAI,SAA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oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,WAAW;AACjB,wBAAA,yBAAyB,EAAE,eAAe;AAC1C,wBAAA,SAAS,EAAE;AACZ;AACF,iBAAA;;;AC1CM,MAAM,iBAAiB,GAAG,CAAC,UAAU;;ACJ5C;;AAEG;;;;"}
1
+ {"version":3,"file":"xui-divider.mjs","sources":["../../../../../../libs/ui/divider/xui/src/lib/divider.ts","../../../../../../libs/ui/divider/xui/src/index.ts","../../../../../../libs/ui/divider/xui/src/xui-divider.ts"],"sourcesContent":["import type { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, input } from '@angular/core';\nimport { xui } from '@xui/core';\nimport { cva, VariantProps } from 'class-variance-authority';\nimport type { ClassValue } from 'clsx';\n\nexport const dividerVariants = cva('border-border', {\n variants: {\n orientation: {\n horizontal: 'block w-auto border-t',\n vertical: 'inline-block h-auto self-stretch border-s'\n },\n compact: { true: '', false: '' }\n },\n compoundVariants: [\n { orientation: 'horizontal', compact: false, class: 'my-2' },\n { orientation: 'vertical', compact: false, class: 'mx-2' }\n ],\n defaultVariants: {\n orientation: 'horizontal',\n compact: false\n }\n});\n\nexport type XuiDividerVariants = VariantProps<typeof dividerVariants>;\n\n/**\n * A rule separating two groups of content.\n *\n * ```html\n * <div xuiDivider></div>\n * <div xuiDivider orientation=\"vertical\"></div>\n * ```\n *\n * The host is exposed as `role=\"separator\"` with a matching `aria-orientation`,\n * so the break is announced rather than being purely visual. A vertical divider\n * stretches to its flex parent's cross size instead of needing a set height.\n */\n@Directive({\n selector: '[xuiDivider]',\n exportAs: 'xuiDivider',\n host: {\n role: 'separator',\n '[attr.aria-orientation]': 'orientation()',\n '[class]': 'computedClass()'\n }\n})\nexport class XuiDivider {\n /** The user-defined classes. Merged last so they win over the variant classes. */\n readonly class = input<ClassValue>('');\n /** Which way the rule runs. A vertical divider needs a height from its container — it has none of its own. */\n readonly orientation = input<NonNullable<XuiDividerVariants['orientation']>>('horizontal');\n\n /** Drop the surrounding margin so the divider sits flush with its neighbours. */\n readonly compact = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n protected readonly computedClass = computed(() =>\n xui(dividerVariants({ orientation: this.orientation(), compact: this.compact() }), this.class())\n );\n}\n","import { XuiDivider } from './lib/divider';\n\nexport * from './lib/divider';\n\nexport const XuiDividerImports = [XuiDivider] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAMO,MAAM,eAAe,GAAG,GAAG,CAAC,eAAe,EAAE;AAClD,IAAA,QAAQ,EAAE;AACR,QAAA,WAAW,EAAE;AACX,YAAA,UAAU,EAAE,uBAAuB;AACnC,YAAA,QAAQ,EAAE;AACX,SAAA;QACD,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE;AAC/B,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE;QAC5D,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM;AACzD,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,WAAW,EAAE,YAAY;AACzB,QAAA,OAAO,EAAE;AACV;AACF,CAAA;AAID;;;;;;;;;;;AAWG;MAUU,UAAU,CAAA;;IAEZ,KAAK,GAAG,KAAK,CAAa,EAAE;8EAAC;;IAE7B,WAAW,GAAG,KAAK,CAAiD,YAAY;oFAAC;;IAGjF,OAAO,GAAG,KAAK,CAAwB,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEpE,IAAA,aAAa,GAAG,QAAQ,CAAC,MAC1C,GAAG,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK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+1,6 @@
1
1
  {
2
2
  "name": "@xui/divider",
3
- "version": "2.0.0-alpha.20",
3
+ "version": "2.0.0-alpha.21",
4
4
  "description": "Modern Angular 22 UI Library based on TailwindCSS",
5
5
  "keywords": [
6
6
  "angular",
@@ -38,7 +38,7 @@
38
38
  "peerDependencies": {
39
39
  "@angular/cdk": "22",
40
40
  "@angular/core": "22",
41
- "@xui/core": "2.0.0-alpha.20",
41
+ "@xui/core": "2.0.0-alpha.21",
42
42
  "class-variance-authority": "^0.7.1",
43
43
  "clsx": "^2.1.1"
44
44
  },
@@ -24,6 +24,7 @@ type XuiDividerVariants = VariantProps<typeof dividerVariants>;
24
24
  declare class XuiDivider {
25
25
  /** The user-defined classes. Merged last so they win over the variant classes. */
26
26
  readonly class: _angular_core.InputSignal<ClassValue>;
27
+ /** Which way the rule runs. A vertical divider needs a height from its container — it has none of its own. */
27
28
  readonly orientation: _angular_core.InputSignal<NonNullable<"horizontal" | "vertical" | null | undefined>>;
28
29
  /** Drop the surrounding margin so the divider sits flush with its neighbours. */
29
30
  readonly compact: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;