diff --git a/src/colors.ts b/src/colors.ts deleted file mode 100644 index a0455fc9..00000000 --- a/src/colors.ts +++ /dev/null @@ -1,285 +0,0 @@ -import { omit } from './runtime/utils/lodash' -import { kebabCase, camelCase, upperFirst } from 'scule' - -const colorsToExclude = [ - 'inherit', - 'transparent', - 'current', - 'white', - 'black', - 'slate', - 'gray', - 'zinc', - 'neutral', - 'stone', - 'cool' -] - -const safelistByComponent = { - alert: (colorsAsRegex) => [{ - pattern: new RegExp(`bg-(${colorsAsRegex})-50`) - }, { - pattern: new RegExp(`bg-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`bg-(${colorsAsRegex})-500`) - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-500`) - }, { - pattern: new RegExp(`ring-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`ring-(${colorsAsRegex})-500`) - }], - avatar: (colorsAsRegex) => [{ - pattern: new RegExp(`bg-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`bg-(${colorsAsRegex})-500`) - }], - badge: (colorsAsRegex) => [{ - pattern: new RegExp(`bg-(${colorsAsRegex})-50`) - }, { - pattern: new RegExp(`bg-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`bg-(${colorsAsRegex})-500`) - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-500`) - }, { - pattern: new RegExp(`ring-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`ring-(${colorsAsRegex})-500`) - }], - button: (colorsAsRegex) => [{ - pattern: new RegExp(`bg-(${colorsAsRegex})-50`), - variants: ['hover', 'disabled'] - }, { - pattern: new RegExp(`bg-(${colorsAsRegex})-100`), - variants: ['hover'] - }, { - pattern: new RegExp(`bg-(${colorsAsRegex})-400`), - variants: ['dark', 'dark:disabled'] - }, { - pattern: new RegExp(`bg-(${colorsAsRegex})-500`), - variants: ['disabled', 'dark:hover'] - }, { - pattern: new RegExp(`bg-(${colorsAsRegex})-600`), - variants: ['hover'] - }, { - pattern: new RegExp(`bg-(${colorsAsRegex})-900`), - variants: ['dark:hover'] - }, { - pattern: new RegExp(`bg-(${colorsAsRegex})-950`), - variants: ['dark', 'dark:hover', 'dark:disabled'] - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-400`), - variants: ['dark', 'dark:disabled'] - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-500`), - variants: ['dark:hover', 'disabled'] - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-600`), - variants: ['hover'] - }, { - pattern: new RegExp(`outline-(${colorsAsRegex})-400`), - variants: ['dark:focus-visible'] - }, { - pattern: new RegExp(`outline-(${colorsAsRegex})-500`), - variants: ['focus-visible'] - }, { - pattern: new RegExp(`ring-(${colorsAsRegex})-400`), - variants: ['dark:focus-visible'] - }, { - pattern: new RegExp(`ring-(${colorsAsRegex})-500`), - variants: ['focus-visible'] - }], - input: (colorsAsRegex) => [{ - pattern: new RegExp(`text-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-500`) - }, { - pattern: new RegExp(`ring-(${colorsAsRegex})-400`), - variants: ['dark', 'dark:focus'] - }, { - pattern: new RegExp(`ring-(${colorsAsRegex})-500`), - variants: ['focus'] - }], - radio: (colorsAsRegex) => [{ - pattern: new RegExp(`text-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-500`) - }, { - pattern: new RegExp(`ring-(${colorsAsRegex})-400`), - variants: ['dark:focus-visible'] - }, { - pattern: new RegExp(`ring-(${colorsAsRegex})-500`), - variants: ['focus-visible'] - }], - checkbox: (colorsAsRegex) => [{ - pattern: new RegExp(`text-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-500`) - }, { - pattern: new RegExp(`ring-(${colorsAsRegex})-400`), - variants: ['dark:focus-visible'] - }, { - pattern: new RegExp(`ring-(${colorsAsRegex})-500`), - variants: ['focus-visible'] - }], - toggle: (colorsAsRegex) => [{ - pattern: new RegExp(`bg-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`bg-(${colorsAsRegex})-500`) - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-500`) - }, { - pattern: new RegExp(`ring-(${colorsAsRegex})-400`), - variants: ['dark:focus-visible'] - }, { - pattern: new RegExp(`ring-(${colorsAsRegex})-500`), - variants: ['focus-visible'] - }], - range: (colorsAsRegex) => [{ - pattern: new RegExp(`bg-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`bg-(${colorsAsRegex})-500`) - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-500`) - }, { - pattern: new RegExp(`ring-(${colorsAsRegex})-400`), - variants: ['dark:focus-visible'] - }, { - pattern: new RegExp(`ring-(${colorsAsRegex})-500`), - variants: ['focus-visible'] - }], - progress: (colorsAsRegex) => [{ - pattern: new RegExp(`text-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-500`) - }], - meter: (colorsAsRegex) => [{ - pattern: new RegExp(`bg-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`bg-(${colorsAsRegex})-500`) - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-500`) - }], - notification: (colorsAsRegex) => [{ - pattern: new RegExp(`bg-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`bg-(${colorsAsRegex})-500`) - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`text-(${colorsAsRegex})-500`) - }], - chip: (colorsAsRegex) => [{ - pattern: new RegExp(`bg-(${colorsAsRegex})-400`), - variants: ['dark'] - }, { - pattern: new RegExp(`bg-(${colorsAsRegex})-500`) - }] -} - -const safelistComponentAliasesMap = { - 'USelect': 'UInput', - 'USelectMenu': 'UInput', - 'UTextarea': 'UInput', - 'URadioGroup': 'URadio', - 'UMeterGroup': 'UMeter' -} - -const colorsAsRegex = (colors: string[]): string => colors.join('|') - -export const excludeColors = (colors: object): string[] => { - return Object.entries(omit(colors, colorsToExclude)) - .filter(([, value]) => typeof value === 'object') - .map(([key]) => kebabCase(key)) -} - -export const generateSafelist = (colors: string[], globalColors) => { - const baseSafelist = Object.keys(safelistByComponent).flatMap(component => safelistByComponent[component](colorsAsRegex(colors))) - - // Ensure `red` color is safelisted for form elements so that `error` prop of `UFormGroup` always works - const formsSafelist = ['input', 'radio', 'checkbox', 'toggle', 'range'].flatMap(component => safelistByComponent[component](colorsAsRegex(['red']))) - - return [ - ...baseSafelist, - ...formsSafelist, - // Ensure all global colors are safelisted for the Notification (toast.add) - ...safelistByComponent['notification'](colorsAsRegex(globalColors)), - // Gray safelist for Avatar & Notification - 'bg-gray-500', - 'dark:bg-gray-400', - 'text-gray-500', - 'dark:text-gray-400' - ] -} - -export const customSafelistExtractor = (prefix, content: string, colors: string[], safelistColors: string[]) => { - const classes: string[] = [] - const regex = /<([A-Za-z][A-Za-z0-9]*(?:-[A-Za-z][A-Za-z0-9]*)*)\s+(?![^>]*:color\b)[^>]*\bcolor=["']([^"']+)["'][^>]*>/gs - - const matches = content.matchAll(regex) - - const components = Object.keys(safelistByComponent).map(component => `${prefix}${component.charAt(0).toUpperCase() + component.slice(1)}`) - - for (const match of matches) { - const [, component, color] = match - - const camelComponent = upperFirst(camelCase(component)) - - if (!colors.includes(color) || safelistColors.includes(color)) { - continue - } - - let name = safelistComponentAliasesMap[camelComponent] ? safelistComponentAliasesMap[camelComponent] : camelComponent - - if (!components.includes(name)) { - continue - } - - name = name.replace(prefix, '').toLowerCase() - - const matchClasses = safelistByComponent[name](color).flatMap(group => { - return ['', ...(group.variants || [])].flatMap(variant => { - const matches = group.pattern.source.match(/\(([^)]+)\)/g) - - return matches.map(match => { - const colorOptions = match.substring(1, match.length - 1).split('|') - return colorOptions.map(color => `${variant ? variant + ':' : ''}` + group.pattern.source.replace(match, color)) - }).flat() - }) - }) - - classes.push(...matchClasses) - } - - return classes -} diff --git a/src/runtime/components/data/Table.vue b/src/runtime/components/data/Table.vue deleted file mode 100644 index 605a55d7..00000000 --- a/src/runtime/components/data/Table.vue +++ /dev/null @@ -1,319 +0,0 @@ - - - diff --git a/src/runtime/components/elements/Accordion.vue b/src/runtime/components/elements/Accordion.vue deleted file mode 100644 index 0e1adc86..00000000 --- a/src/runtime/components/elements/Accordion.vue +++ /dev/null @@ -1,187 +0,0 @@ - - - diff --git a/src/runtime/components/elements/Alert.vue b/src/runtime/components/elements/Alert.vue deleted file mode 100644 index 2ba3b71c..00000000 --- a/src/runtime/components/elements/Alert.vue +++ /dev/null @@ -1,144 +0,0 @@ - - - diff --git a/src/runtime/components/elements/Avatar.vue b/src/runtime/components/elements/Avatar.vue deleted file mode 100644 index 2e878106..00000000 --- a/src/runtime/components/elements/Avatar.vue +++ /dev/null @@ -1,170 +0,0 @@ - - - diff --git a/src/runtime/components/elements/AvatarGroup.ts b/src/runtime/components/elements/AvatarGroup.ts deleted file mode 100644 index dc87e34f..00000000 --- a/src/runtime/components/elements/AvatarGroup.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { h, cloneVNode, computed, toRef, defineComponent } from 'vue' -import type { PropType } from 'vue' -import { twMerge, twJoin } from 'tailwind-merge' -import UAvatar from './Avatar.vue' -import { useUI } from '../../composables/useUI' -import { mergeConfig, getSlotsChildren } from '../../utils' -import type { AvatarSize, Strategy } from '../../types' -// @ts-expect-error -import appConfig from '#build/app.config' -import { avatar, avatarGroup } from '#ui/ui.config' - -const avatarConfig = mergeConfig(appConfig.ui.strategy, appConfig.ui.avatar, avatar) - -const avatarGroupConfig = mergeConfig(appConfig.ui.strategy, appConfig.ui.avatarGroup, avatarGroup) - -export default defineComponent({ - inheritAttrs: false, - props: { - size: { - type: String as PropType, - default: null, - validator (value: string) { - return Object.keys(avatarConfig.size).includes(value) - } - }, - max: { - type: Number, - default: null - }, - class: { - type: [String, Object, Array] as PropType, - default: () => '' - }, - ui: { - type: Object as PropType & { strategy?: Strategy }>, - default: () => ({}) - } - }, - setup (props, { slots }) { - const { ui, attrs } = useUI('avatarGroup', toRef(props, 'ui'), avatarGroupConfig, toRef(props, 'class')) - - const children = computed(() => getSlotsChildren(slots)) - - const max = computed(() => typeof props.max === 'string' ? parseInt(props.max, 10) : props.max) - - const clones = computed(() => children.value.map((node, index) => { - const vProps: any = {} - - if (!props.max || (max.value && index < max.value)) { - if (props.size) { - vProps.size = props.size - } - - vProps.class = node.props.class || '' - vProps.class = twMerge(twJoin(vProps.class, ui.value.ring, ui.value.margin), vProps.class) - - return cloneVNode(node, vProps) - } - - if (max.value !== undefined && index === max.value) { - return h(UAvatar, { - size: props.size || (avatarConfig.default.size as AvatarSize), - text: `+${children.value.length - max.value}`, - class: twJoin(ui.value.ring, ui.value.margin) - }) - } - - return null - }).filter(Boolean).reverse()) - - return () => h('div', { class: ui.value.wrapper, ...attrs.value }, clones.value) - } -}) diff --git a/src/runtime/components/elements/Badge.vue b/src/runtime/components/elements/Badge.vue deleted file mode 100644 index 43bad879..00000000 --- a/src/runtime/components/elements/Badge.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - diff --git a/src/runtime/components/elements/Button.vue b/src/runtime/components/elements/Button.vue deleted file mode 100644 index cdcdf2dd..00000000 --- a/src/runtime/components/elements/Button.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - diff --git a/src/runtime/components/elements/ButtonGroup.ts b/src/runtime/components/elements/ButtonGroup.ts deleted file mode 100644 index 0d91d134..00000000 --- a/src/runtime/components/elements/ButtonGroup.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { h, computed, toRef, defineComponent } from 'vue' -import type { PropType } from 'vue' -import { twMerge, twJoin } from 'tailwind-merge' -import { useUI } from '../../composables/useUI' -import { mergeConfig, getSlotsChildren } from '../../utils' -import { useProvideButtonGroup } from '../../composables/useButtonGroup' -import type { ButtonSize, Strategy } from '../../types' -// @ts-expect-error -import appConfig from '#build/app.config' -import { button, buttonGroup } from '#ui/ui.config' - -const buttonConfig = mergeConfig(appConfig.ui.strategy, appConfig.ui.button, button) -const buttonGroupConfig = mergeConfig(appConfig.ui.strategy, appConfig.ui.buttonGroup, buttonGroup) - -export default defineComponent({ - name: 'ButtonGroup', - inheritAttrs: false, - props: { - size: { - type: String as PropType, - default: null, - validator (value: string) { - return Object.keys(buttonConfig.size).includes(value) - } - }, - orientation: { - type: String as PropType<'horizontal' | 'vertical'>, - default: 'horizontal', - validator (value: string) { - return ['horizontal', 'vertical'].includes(value) - } - }, - class: { - type: [String, Object, Array] as PropType, - default: () => '' - }, - ui: { - type: Object as PropType & { strategy?: Strategy }>, - default: () => ({}) - } - }, - setup (props, { slots }) { - const { ui, attrs } = useUI('buttonGroup', toRef(props, 'ui'), buttonGroupConfig) - - const children = computed(() => getSlotsChildren(slots)) - - const wrapperClass = computed(() => { - return twMerge(twJoin( - ui.value.wrapper[props.orientation], - ui.value.rounded, - ui.value.shadow - ), props.class) - }) - - const rounded = computed(() => ui.value.orientation[ui.value.rounded][props.orientation]) - - useProvideButtonGroup({ orientation: toRef(props, 'orientation'), size: toRef(props, 'size'), ui, rounded }) - - return () => h('div', { class: wrapperClass.value, ...attrs.value }, children.value) - } -}) diff --git a/src/runtime/components/elements/Carousel.vue b/src/runtime/components/elements/Carousel.vue deleted file mode 100644 index b8e00abc..00000000 --- a/src/runtime/components/elements/Carousel.vue +++ /dev/null @@ -1,187 +0,0 @@ - - - - - diff --git a/src/runtime/components/elements/Chip.vue b/src/runtime/components/elements/Chip.vue deleted file mode 100644 index a52d0a28..00000000 --- a/src/runtime/components/elements/Chip.vue +++ /dev/null @@ -1,92 +0,0 @@ - - - diff --git a/src/runtime/components/elements/Dropdown.vue b/src/runtime/components/elements/Dropdown.vue deleted file mode 100644 index 58f9a575..00000000 --- a/src/runtime/components/elements/Dropdown.vue +++ /dev/null @@ -1,290 +0,0 @@ - - - diff --git a/src/runtime/components/elements/Icon.vue b/src/runtime/components/elements/Icon.vue deleted file mode 100644 index 03efc166..00000000 --- a/src/runtime/components/elements/Icon.vue +++ /dev/null @@ -1,33 +0,0 @@ - - - diff --git a/src/runtime/components/elements/Kbd.vue b/src/runtime/components/elements/Kbd.vue deleted file mode 100644 index 297bf7cd..00000000 --- a/src/runtime/components/elements/Kbd.vue +++ /dev/null @@ -1,66 +0,0 @@ - - - diff --git a/src/runtime/components/elements/Link.vue b/src/runtime/components/elements/Link.vue deleted file mode 100644 index 501b70cd..00000000 --- a/src/runtime/components/elements/Link.vue +++ /dev/null @@ -1,100 +0,0 @@ - - - diff --git a/src/runtime/components/elements/Meter.vue b/src/runtime/components/elements/Meter.vue deleted file mode 100644 index 338a2e76..00000000 --- a/src/runtime/components/elements/Meter.vue +++ /dev/null @@ -1,191 +0,0 @@ - - - diff --git a/src/runtime/components/elements/MeterGroup.ts b/src/runtime/components/elements/MeterGroup.ts deleted file mode 100644 index ae0bf764..00000000 --- a/src/runtime/components/elements/MeterGroup.ts +++ /dev/null @@ -1,208 +0,0 @@ -import { h, cloneVNode, computed, toRef, defineComponent } from 'vue' -import type { ComputedRef, VNode, SlotsType, PropType } from 'vue' -import { twJoin } from 'tailwind-merge' -import UIcon from './Icon.vue' -import Meter from './Meter.vue' -import { useUI } from '../../composables/useUI' -import { mergeConfig, getSlotsChildren } from '../../utils' -import type { Strategy, MeterSize } from '../../types' -// @ts-expect-error -import appConfig from '#build/app.config' -import { meter, meterGroup } from '#ui/ui.config' - -const meterConfig = mergeConfig(appConfig.ui.strategy, appConfig.ui.meter, meter) -const meterGroupConfig = mergeConfig(appConfig.ui.strategy, appConfig.ui.meterGroup, meterGroup) - -export default defineComponent({ - components: { - UIcon - }, - inheritAttrs: false, - slots: Object as SlotsType<{ - default?: typeof Meter[], - indicator?: { percent: number }, - }>, - props: { - min: { - type: Number, - default: 0 - }, - max: { - type: Number, - default: 100 - }, - size: { - type: String as PropType, - default: () => meterConfig.default.size, - validator (value: string) { - return Object.keys(meterConfig.meter.bar.size).includes(value) - } - }, - indicator: { - type: Boolean, - default: false - }, - icon: { - type: String, - default: () => meterGroupConfig.default.icon - }, - class: { - type: [String, Object, Array] as PropType, - default: () => '' - }, - ui: { - type: Object as PropType & { strategy?: Strategy }>, - default: () => ({}) - } - }, - setup (props, { slots }) { - const { ui, attrs } = useUI('meterGroup', toRef(props, 'ui'), meterGroupConfig) - const { ui: uiMeter } = useUI('meter', undefined, meterConfig) - - // If there is no children, throw an expressive error. - if (!slots.default) { - throw new Error('Meter Group has no Meter children.') - } - - // Normalize the min and max numbers, if these are inversed. - const normalizedMin = computed(() => props.min > props.max ? props.max : props.min) - const normalizedMax = computed(() => props.max < props.min ? props.min : props.max) - - const children = computed(() => getSlotsChildren(slots)) - - const rounded = computed(() => ui.value.orientation[ui.value.rounded]) - - function clampPercent (value: number, min: number, max: number): number { - if (min == max) { - return value < min ? 0 : 100 - } - - if (min > max) { - max = [min, min = max][0] - } - - const percent = (value - min) / (max - min) * 100 - - return Math.max(0, Math.min(100, percent)) - } - - // We have to store the labels outside to preserve reactivity later. - const labels = computed(() => { - return children.value.map(node => node.props.label) - }) - - const percents = computed(() => { - return children.value.map(node => clampPercent(node.props.value, props.min, props.max)) - }) - - const percent = computed(() => { - return Math.max(0, Math.max(percents.value.reduce((prev, percent) => prev + percent, 0))) - }) - - const clones: ComputedRef = computed(() => children.value.map((node, index) => { - const vProps: any = {} - - vProps.style = { width: `${percents.value[index]}%` } - - // Normalize the props to be the same on all groups - vProps.size = props.size - vProps.min = normalizedMin.value - vProps.max = normalizedMax.value - - // Adjust the style of all meters, so they appear in a row. - vProps.ui = node.props?.ui || {} - vProps.ui.wrapper = node.props?.ui?.wrapper || '' - vProps.ui.wrapper += [ - node.props?.ui?.wrapper, - ui.value.background, - ui.value.transition - ].filter(Boolean).join(' ') - - // Override the background to make the bar appear "full" - vProps.ui.meter = node.props?.ui?.meter || {} - vProps.ui.meter.background = `bg-${node.props.color}-500 dark:bg-${node.props.color}-400` - vProps.ui.meter.rounded = 'rounded-none' - vProps.ui.meter.bar = node.props?.ui?.meter?.bar || {} - - if (index === 0) { - vProps.ui.meter.rounded = `${rounded.value.left} rounded-e-none` - } - - if (index === children.value.length - 1) { - vProps.ui.meter.rounded = `${rounded.value.right} rounded-s-none` - } - - // Move the labels out of the node so these can be checked later - labels.value[index] = node.props.label - - const clone = cloneVNode(node, vProps) - - // @ts-expect-error - delete(clone.children?.label) - delete(clone.props?.indicator) - delete(clone.props?.label) - - return clone - })) - - const baseClass = computed(() => { - return twJoin( - ui.value.base, - ui.value.background, - ui.value.rounded, - ui.value.shadow, - uiMeter.value.meter.size[props.size] - ) - }) - - const indicatorContainerClass = computed(() => { - return twJoin( - uiMeter.value.indicator.container - ) - }) - - const indicatorClass = computed(() => { - return twJoin( - uiMeter.value.indicator.text, - uiMeter.value.indicator.size[props.size] - ) - }) - - const vNodeChildren = computed(() => { - const vNodeSlots = [ - undefined, - h('div', { class: baseClass.value }, clones.value), - undefined - ] - - if (props.indicator) { - vNodeSlots[0] = h('div', { class: indicatorContainerClass.value }, [ - h('div', { class: indicatorClass.value, style: { width: `${percent.value}%` } }, Math.round(percent.value) + '%') - ]) - } else if (slots.indicator) { - // @ts-expect-error - vNodeSlots[0] = slots.indicator({ percent: percent.value }) - } - - vNodeSlots[2] = h('ol', { class: ui.value.list }, labels.value.map((label, key) => { - const labelClass = computed(() => { - return twJoin( - uiMeter.value.label.base, - uiMeter.value.label.text, - uiMeter.value.color[clones.value[key]?.props.color] ?? uiMeter.value.label.color.replaceAll('{color}', clones.value[key]?.props.color ?? uiMeter.value.default.color), - uiMeter.value.label.size[props.size] - ) - }) - - return h('li', { class: labelClass.value }, [ - h(UIcon, { name: clones.value[key]?.props.icon ?? props.icon }), - `${label} (${ Math.round(percents.value[key]) }%)` - ]) - })) - - return vNodeSlots - }) - - return () => h('div', { class: ui.value.wrapper, ...attrs.value }, vNodeChildren.value) - } -}) diff --git a/src/runtime/components/elements/Progress.vue b/src/runtime/components/elements/Progress.vue deleted file mode 100644 index 379e4875..00000000 --- a/src/runtime/components/elements/Progress.vue +++ /dev/null @@ -1,359 +0,0 @@ - - - - - diff --git a/src/runtime/components/forms/Checkbox.vue b/src/runtime/components/forms/Checkbox.vue deleted file mode 100644 index 98c44cce..00000000 --- a/src/runtime/components/forms/Checkbox.vue +++ /dev/null @@ -1,152 +0,0 @@ - - - diff --git a/src/runtime/components/forms/Form.vue b/src/runtime/components/forms/Form.vue deleted file mode 100644 index 27fd0baa..00000000 --- a/src/runtime/components/forms/Form.vue +++ /dev/null @@ -1,276 +0,0 @@ - - - diff --git a/src/runtime/components/forms/FormGroup.vue b/src/runtime/components/forms/FormGroup.vue deleted file mode 100644 index 720c01ed..00000000 --- a/src/runtime/components/forms/FormGroup.vue +++ /dev/null @@ -1,140 +0,0 @@ - - - diff --git a/src/runtime/components/forms/Input.vue b/src/runtime/components/forms/Input.vue deleted file mode 100644 index 55f4f3d6..00000000 --- a/src/runtime/components/forms/Input.vue +++ /dev/null @@ -1,334 +0,0 @@ - - - diff --git a/src/runtime/components/forms/InputMenu.vue b/src/runtime/components/forms/InputMenu.vue deleted file mode 100644 index 67e5bc8b..00000000 --- a/src/runtime/components/forms/InputMenu.vue +++ /dev/null @@ -1,467 +0,0 @@ - - - diff --git a/src/runtime/components/forms/Radio.vue b/src/runtime/components/forms/Radio.vue deleted file mode 100644 index b1bc9e17..00000000 --- a/src/runtime/components/forms/Radio.vue +++ /dev/null @@ -1,150 +0,0 @@ - - - diff --git a/src/runtime/components/forms/RadioGroup.vue b/src/runtime/components/forms/RadioGroup.vue deleted file mode 100644 index ed8c9f46..00000000 --- a/src/runtime/components/forms/RadioGroup.vue +++ /dev/null @@ -1,151 +0,0 @@ - - - diff --git a/src/runtime/components/forms/Range.vue b/src/runtime/components/forms/Range.vue deleted file mode 100644 index 4c26ba30..00000000 --- a/src/runtime/components/forms/Range.vue +++ /dev/null @@ -1,188 +0,0 @@ - - - diff --git a/src/runtime/components/forms/Select.vue b/src/runtime/components/forms/Select.vue deleted file mode 100644 index 03ebc8d3..00000000 --- a/src/runtime/components/forms/Select.vue +++ /dev/null @@ -1,356 +0,0 @@ - - - - - diff --git a/src/runtime/components/forms/SelectMenu.vue b/src/runtime/components/forms/SelectMenu.vue deleted file mode 100644 index 38bd6fad..00000000 --- a/src/runtime/components/forms/SelectMenu.vue +++ /dev/null @@ -1,553 +0,0 @@ - - - diff --git a/src/runtime/components/forms/Textarea.vue b/src/runtime/components/forms/Textarea.vue deleted file mode 100644 index 41046003..00000000 --- a/src/runtime/components/forms/Textarea.vue +++ /dev/null @@ -1,260 +0,0 @@ -