@codeandfunction/callaloo 1.10.0 → 1.11.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.
@@ -7,50 +7,59 @@ export interface Props {
7
7
  disclosureId: string;
8
8
  expanded?: boolean;
9
9
  expandedIcon?: CLIconNames;
10
- heading: string;
10
+ heading?: string;
11
11
  headingType?: CLHeadingTypes;
12
12
  headingLevel?: CLHeadingLevels;
13
- icon?: CLIconNames;
14
- iconSize?: CLSizes;
13
+ iconBefore?: CLIconNames;
14
+ iconBeforeSize?: CLSizes;
15
+ iconAfter?: CLIconNames;
16
+ iconAfterSize?: CLSizes;
15
17
  rounded?: boolean;
16
18
  subHeading?: string;
17
19
  subHeadingType?: CLTextTypes;
18
20
  testId?: string;
19
21
  transparent?: boolean;
22
+ triggerButtonSize?: CLSizes;
20
23
  }
21
24
  declare function __VLS_template(): {
22
25
  default?(_: {}): any;
23
26
  };
24
27
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
25
28
  contentSpacing: boolean;
29
+ disclosureId: string;
26
30
  expanded: boolean;
27
31
  expandedIcon: CLIconNames;
28
32
  headingType: CLHeadingTypes;
29
- icon: CLIconNames;
30
- iconSize: CLSizes;
33
+ iconAfter: CLIconNames;
34
+ iconAfterSize: CLSizes;
31
35
  rounded: boolean;
32
- testId: string;
33
36
  subHeadingType: CLTextTypes;
37
+ testId: string;
38
+ triggerButtonSize: CLSizes;
34
39
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
35
40
  contentSpacing: boolean;
41
+ disclosureId: string;
36
42
  expanded: boolean;
37
43
  expandedIcon: CLIconNames;
38
44
  headingType: CLHeadingTypes;
39
- icon: CLIconNames;
40
- iconSize: CLSizes;
45
+ iconAfter: CLIconNames;
46
+ iconAfterSize: CLSizes;
41
47
  rounded: boolean;
42
- testId: string;
43
48
  subHeadingType: CLTextTypes;
49
+ testId: string;
50
+ triggerButtonSize: CLSizes;
44
51
  }>>> & Readonly<{}>, {
45
52
  rounded: boolean;
46
53
  testId: string;
47
- iconSize: CLSizes;
54
+ iconAfter: CLIconNames;
55
+ iconAfterSize: CLSizes;
48
56
  contentSpacing: boolean;
57
+ disclosureId: string;
49
58
  expanded: boolean;
50
59
  expandedIcon: CLIconNames;
51
60
  headingType: CLHeadingTypes;
52
- icon: CLIconNames;
53
61
  subHeadingType: CLTextTypes;
62
+ triggerButtonSize: CLSizes;
54
63
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
55
64
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
56
65
  export default _default;
package/dist/index.js CHANGED
@@ -1511,19 +1511,22 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1511
1511
  borderRadius: {},
1512
1512
  compact: { type: Boolean },
1513
1513
  contentSpacing: { type: Boolean, default: true },
1514
- disclosureId: {},
1514
+ disclosureId: { default: "" },
1515
1515
  expanded: { type: Boolean, default: false },
1516
1516
  expandedIcon: { default: IconNames.ChevronUp },
1517
1517
  heading: {},
1518
1518
  headingType: { default: HeadingTypes.Title },
1519
1519
  headingLevel: {},
1520
- icon: { default: IconNames.ChevronDown },
1521
- iconSize: { default: Sizes.Medium },
1520
+ iconBefore: {},
1521
+ iconBeforeSize: {},
1522
+ iconAfter: { default: IconNames.ChevronDown },
1523
+ iconAfterSize: { default: Sizes.Medium },
1522
1524
  rounded: { type: Boolean, default: true },
1523
1525
  subHeading: {},
1524
1526
  subHeadingType: { default: TextTypes.Body },
1525
1527
  testId: { default: prefix$h },
1526
- transparent: { type: Boolean }
1528
+ transparent: { type: Boolean },
1529
+ triggerButtonSize: { default: Sizes.Medium }
1527
1530
  },
1528
1531
  setup(__props) {
1529
1532
  const props = __props;
@@ -1561,18 +1564,21 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1561
1564
  "aria-controls": `${prefix$h}--${_ctx.disclosureId}`,
1562
1565
  "aria-expanded": expanded.value,
1563
1566
  forwardRef: buttonForwardRefHandler,
1564
- "icon-after": !expanded.value ? _ctx.icon : _ctx.expandedIcon,
1565
- "icon-size": _ctx.iconSize,
1567
+ "icon-after": !expanded.value ? _ctx.iconAfter : _ctx.expandedIcon,
1568
+ "icon-after-size": _ctx.iconAfterSize,
1569
+ "icon-before": _ctx.iconBefore,
1570
+ "icon-size": _ctx.iconBeforeSize,
1566
1571
  id: `${prefix$h}__button--${_ctx.disclosureId}`,
1567
1572
  theme: unref(Themes).Transparent,
1568
1573
  "on-click": onTriggerClickedHandler,
1574
+ size: _ctx.triggerButtonSize,
1569
1575
  type: unref(ButtonTypes).Button,
1570
1576
  rounded: false,
1571
- width: "100%",
1572
- wrap: ""
1577
+ width: "100%"
1573
1578
  }, {
1574
1579
  default: withCtx(() => [
1575
- createVNode(unref(_sfc_main$l), {
1580
+ _ctx.heading ? (openBlock(), createBlock(unref(_sfc_main$l), {
1581
+ key: 0,
1576
1582
  type: _ctx.headingType,
1577
1583
  level: _ctx.headingLevel
1578
1584
  }, {
@@ -1580,9 +1586,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1580
1586
  createTextVNode(toDisplayString(_ctx.heading), 1)
1581
1587
  ]),
1582
1588
  _: 1
1583
- }, 8, ["type", "level"]),
1589
+ }, 8, ["type", "level"])) : createCommentVNode("", true),
1584
1590
  _ctx.subHeading ? (openBlock(), createBlock(unref(_sfc_main$2), {
1585
- key: 0,
1591
+ key: 1,
1586
1592
  type: _ctx.subHeadingType
1587
1593
  }, {
1588
1594
  default: withCtx(() => [
@@ -1592,12 +1598,15 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1592
1598
  }, 8, ["type"])) : createCommentVNode("", true)
1593
1599
  ]),
1594
1600
  _: 1
1595
- }, 8, ["aria-controls", "aria-expanded", "icon-after", "icon-size", "id", "theme", "type"])
1601
+ }, 8, ["aria-controls", "aria-expanded", "icon-after", "icon-after-size", "icon-before", "icon-size", "id", "theme", "size", "type"])
1596
1602
  ], 2),
1597
1603
  createElementVNode("div", {
1598
1604
  "aria-labelledby": `${prefix$h}__button--${_ctx.disclosureId}`,
1599
1605
  "aria-hidden": !expanded.value,
1600
- class: normalizeClass(`${prefix$h}__content`),
1606
+ class: normalizeClass([
1607
+ `${prefix$h}__content`,
1608
+ `${prefix$h}__content--${_ctx.triggerButtonSize}`
1609
+ ]),
1601
1610
  id: `${prefix$h}--${_ctx.disclosureId}`
1602
1611
  }, [
1603
1612
  renderSlot(_ctx.$slots, "default")