feat: publish ColorSwatchPicker and shared swatch picker parts
This commit is contained in:
@@ -182,6 +182,61 @@ for (const id of process.argv.slice(2)) {
|
||||
"ColorSwatch declarations leak Reka types",
|
||||
);
|
||||
}
|
||||
if (id === "color-swatch-picker") {
|
||||
assert(lib.ColorSwatchPicker === lib.ColorSwatchPickerRoot);
|
||||
assert(lib.ColorSwatchPickerItem);
|
||||
assert(lib.ColorSwatchPickerSwatch);
|
||||
assert(lib.ColorSwatchPickerIndicator);
|
||||
assert(
|
||||
lib
|
||||
.colorSwatchPickerVariants()
|
||||
.base()
|
||||
.includes("hv-color-swatch-picker"),
|
||||
);
|
||||
assert(
|
||||
lib
|
||||
.colorSwatchPickerVariants({ layout: "stack", variant: "square" })
|
||||
.base()
|
||||
.includes("hv-color-swatch-picker--stack"),
|
||||
);
|
||||
assert(
|
||||
lib
|
||||
.colorSwatchPickerVariants({ size: "xs" })
|
||||
.item() === "hv-color-swatch-picker__item",
|
||||
);
|
||||
assert(
|
||||
lib
|
||||
.colorSwatchPickerVariants()
|
||||
.swatch() === "hv-color-swatch-picker__swatch",
|
||||
);
|
||||
assert(
|
||||
lib
|
||||
.colorSwatchPickerVariants()
|
||||
.indicator() === "hv-color-swatch-picker__indicator",
|
||||
);
|
||||
const pickerDts = readFileSync(
|
||||
new URL(
|
||||
"./node_modules/@heroui-vue/components/dist/components/color-swatch-picker/ColorSwatchPicker.vue.d.ts",
|
||||
import.meta.url,
|
||||
),
|
||||
"utf8",
|
||||
);
|
||||
const itemDts = readFileSync(
|
||||
new URL(
|
||||
"./node_modules/@heroui-vue/components/dist/components/color-swatch-picker/ColorSwatchPickerItem.vue.d.ts",
|
||||
import.meta.url,
|
||||
),
|
||||
"utf8",
|
||||
);
|
||||
assert(
|
||||
!pickerDts.includes("reka-ui"),
|
||||
"ColorSwatchPicker declarations leak Reka types",
|
||||
);
|
||||
assert(
|
||||
!itemDts.includes("reka-ui"),
|
||||
"ColorSwatchPickerItem declarations leak Reka types",
|
||||
);
|
||||
}
|
||||
if (id === "color-slider") {
|
||||
assert(lib.ColorSlider === lib.ColorSliderRoot);
|
||||
assert(lib.ColorSliderOutput);
|
||||
|
||||
Reference in New Issue
Block a user