@kuina-ui/vue 0.6.0 → 0.7.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/dist/blocks/pagination/Pagination.js +4 -0
- package/dist/blocks/pagination/Pagination.vue.d.ts +39 -0
- package/dist/blocks/pagination/Pagination.vue_vue_type_script_setup_true_lang.js +151 -0
- package/dist/blocks/pagination/index.d.ts +2 -0
- package/dist/blocks/pagination/pagination.theme.d.ts +12 -0
- package/dist/blocks/pagination/pagination.theme.js +12 -0
- package/dist/blocks/table/Table.js +4 -0
- package/dist/blocks/table/Table.vue.d.ts +149 -0
- package/dist/blocks/table/Table.vue_vue_type_script_setup_true_lang.js +933 -0
- package/dist/blocks/table/TableCellText.js +4 -0
- package/dist/blocks/table/TableCellText.vue.d.ts +8 -0
- package/dist/blocks/table/TableCellText.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/blocks/table/index.d.ts +2 -0
- package/dist/blocks/table/table.theme.d.ts +286 -0
- package/dist/blocks/table/table.theme.js +391 -0
- package/dist/blocks/table/useLoadMoreTrigger.d.ts +11 -0
- package/dist/blocks/table/useLoadMoreTrigger.js +31 -0
- package/dist/blocks/table/usePinnedColumnOffsets.d.ts +10 -0
- package/dist/blocks/table/usePinnedColumnOffsets.js +63 -0
- package/dist/blocks/table/useRowReorder.d.ts +18 -0
- package/dist/blocks/table/useRowReorder.js +92 -0
- package/dist/blocks/table/useRowVirtualizer.d.ts +17 -0
- package/dist/blocks/table/useRowVirtualizer.js +45 -0
- package/dist/blocks/table/useTableSections.d.ts +46 -0
- package/dist/blocks/table/useTableSections.js +86 -0
- package/dist/components/alert/Alert.js +4 -0
- package/dist/components/alert/Alert.vue.d.ts +2 -2
- package/dist/components/alert/Alert.vue_vue_type_script_setup_true_lang.js +87 -0
- package/dist/components/alert/alert.theme.js +93 -0
- package/dist/components/avatar-group/AvatarGroup.js +4 -0
- package/dist/components/avatar-group/AvatarGroup.vue.d.ts +1 -1
- package/dist/components/avatar-group/AvatarGroup.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/components/avatar-group/avatar-group.theme.js +22 -0
- package/dist/components/date-picker/DateCalendar.js +4 -0
- package/dist/components/date-picker/DateCalendar.vue_vue_type_script_setup_true_lang.js +194 -0
- package/dist/components/date-picker/DateCalendarMonth.js +4 -0
- package/dist/components/date-picker/DateCalendarMonth.vue_vue_type_script_setup_true_lang.js +106 -0
- package/dist/components/date-picker/DateCalendarPopover.js +4 -0
- package/dist/components/date-picker/DateCalendarPopover.vue_vue_type_script_setup_true_lang.js +161 -0
- package/dist/components/date-picker/DatePicker.js +4 -0
- package/dist/components/date-picker/DatePicker.vue.d.ts +6 -6
- package/dist/components/date-picker/DatePicker.vue_vue_type_script_setup_true_lang.js +224 -0
- package/dist/components/date-picker/DatePickerField.js +4 -0
- package/dist/components/date-picker/DatePickerField.vue.d.ts +6 -6
- package/dist/components/date-picker/DatePickerField.vue_vue_type_script_setup_true_lang.js +241 -0
- package/dist/components/date-picker/DatePickerPanel.js +4 -0
- package/dist/components/date-picker/DatePickerPanel.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/components/date-picker/DateRangePicker.js +4 -0
- package/dist/components/date-picker/DateRangePicker.vue.d.ts +6 -6
- package/dist/components/date-picker/DateRangePicker.vue_vue_type_script_setup_true_lang.js +212 -0
- package/dist/components/date-picker/DateRangePickerField.js +4 -0
- package/dist/components/date-picker/DateRangePickerField.vue.d.ts +7 -7
- package/dist/components/date-picker/DateRangePickerField.vue_vue_type_script_setup_true_lang.js +228 -0
- package/dist/components/date-picker/date-calendar.theme.js +46 -0
- package/dist/components/date-picker/date-picker.theme.js +16 -0
- package/dist/components/date-picker/useDatePickerControl.js +47 -0
- package/dist/components/date-picker/useDatePickerPopover.js +39 -0
- package/dist/components/date-picker/useDateRangeSelection.js +50 -0
- package/dist/components/date-picker/useDateRangeTyping.js +59 -0
- package/dist/components/date-picker/useDateTypingFocus.js +37 -0
- package/dist/components/date-picker/useSingleDateSelection.js +11 -0
- package/dist/components/date-picker/useSingleDateTyping.js +31 -0
- package/dist/components/date-picker/useTypedDateInput.js +39 -0
- package/dist/components/menu/Menu.js +4 -0
- package/dist/components/menu/Menu.vue.d.ts +3 -2
- package/dist/components/menu/Menu.vue_vue_type_script_setup_true_lang.js +137 -0
- package/dist/components/menu/MenuItemRow.js +4 -0
- package/dist/components/menu/MenuItemRow.vue_vue_type_script_setup_true_lang.js +117 -0
- package/dist/components/menu/MenuPanel.js +4 -0
- package/dist/components/menu/MenuPanel.vue.d.ts +2 -1
- package/dist/components/menu/MenuPanel.vue_vue_type_script_setup_true_lang.js +249 -0
- package/dist/components/menu/menu.theme.d.ts +5 -0
- package/dist/components/menu/menu.theme.js +174 -0
- package/dist/components/menu/menuContext.js +9 -0
- package/dist/components/menu/menuEntries.js +25 -0
- package/dist/components/select/Select.js +4 -0
- package/dist/components/select/Select.vue.d.ts +2 -2
- package/dist/components/select/Select.vue_vue_type_script_setup_true_lang.js +262 -0
- package/dist/components/select/SelectField.js +4 -0
- package/dist/components/select/SelectField.vue.d.ts +2 -2
- package/dist/components/select/SelectField.vue_vue_type_script_setup_true_lang.js +271 -0
- package/dist/components/select/SelectOptionRow.js +4 -0
- package/dist/components/select/SelectOptionRow.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/components/select/SelectPanel.js +4 -0
- package/dist/components/select/SelectPanel.vue_vue_type_script_setup_true_lang.js +169 -0
- package/dist/components/select/select-panel.theme.js +44 -0
- package/dist/components/select/selectOptions.d.ts +0 -2
- package/dist/components/select/selectOptions.js +66 -0
- package/dist/components/select/useSelectControl.d.ts +3 -3
- package/dist/components/select/useSelectControl.js +62 -0
- package/dist/components/select/useSelectListbox.js +169 -0
- package/dist/components/slider/RangeSlider.js +4 -0
- package/dist/components/slider/RangeSlider.vue_vue_type_script_setup_true_lang.js +214 -0
- package/dist/components/slider/Slider.js +4 -0
- package/dist/components/slider/Slider.vue_vue_type_script_setup_true_lang.js +151 -0
- package/dist/components/slider/SliderHeader.js +4 -0
- package/dist/components/slider/SliderHeader.vue_vue_type_script_setup_true_lang.js +61 -0
- package/dist/components/slider/slider.theme.js +34 -0
- package/dist/components/text-field/TextField.js +4 -0
- package/dist/components/text-field/TextField.vue.d.ts +2 -2
- package/dist/components/text-field/TextField.vue_vue_type_script_setup_true_lang.js +122 -0
- package/dist/components/text-field/text-field.theme.js +379 -0
- package/dist/components/textarea/Textarea.js +4 -0
- package/dist/components/textarea/Textarea.vue.d.ts +1 -1
- package/dist/components/textarea/Textarea.vue_vue_type_script_setup_true_lang.js +93 -0
- package/dist/components/textarea/textarea.theme.js +222 -0
- package/dist/elements/avatar/Avatar.js +4 -0
- package/dist/elements/avatar/Avatar.vue.d.ts +3 -3
- package/dist/elements/avatar/Avatar.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/elements/avatar/avatar.theme.js +141 -0
- package/dist/elements/badge/Badge.js +4 -0
- package/dist/elements/badge/Badge.vue.d.ts +2 -2
- package/dist/elements/badge/Badge.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/elements/badge/badge.theme.js +111 -0
- package/dist/elements/button/Button.js +4 -0
- package/dist/elements/button/Button.vue.d.ts +3 -3
- package/dist/elements/button/Button.vue_vue_type_script_setup_true_lang.js +83 -0
- package/dist/elements/button/button.theme.js +424 -0
- package/dist/elements/checkbox/Checkbox.js +4 -0
- package/dist/elements/checkbox/Checkbox.vue.d.ts +3 -1
- package/dist/elements/checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/elements/checkbox/checkbox.theme.d.ts +1 -0
- package/dist/elements/checkbox/checkbox.theme.js +22 -0
- package/dist/elements/circular-progress/CircularProgress.js +4 -0
- package/dist/elements/circular-progress/CircularProgress.vue_vue_type_script_setup_true_lang.js +44 -0
- package/dist/elements/circular-progress/circular-progress.theme.js +8 -0
- package/dist/elements/input/Input.js +4 -0
- package/dist/elements/input/Input.vue.d.ts +62 -0
- package/dist/elements/input/Input.vue_vue_type_script_setup_true_lang.js +138 -0
- package/dist/elements/input/focusInputFromContainer.d.ts +2 -0
- package/dist/elements/input/focusInputFromContainer.js +28 -0
- package/dist/elements/input/index.d.ts +2 -0
- package/dist/elements/input/input.theme.d.ts +81 -0
- package/dist/elements/input/input.theme.js +391 -0
- package/dist/elements/loading-dots/LoadingDots.js +4 -0
- package/dist/elements/loading-dots/LoadingDots.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/elements/loading-dots/loading-dots.theme.js +4 -0
- package/dist/elements/loading-indicator/LoadingIndicator.js +4 -0
- package/dist/elements/loading-indicator/LoadingIndicator.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/elements/loading-indicator/loading-indicator.theme.js +4 -0
- package/dist/elements/popover/Popover.js +4 -0
- package/dist/elements/popover/Popover.vue.d.ts +60 -0
- package/dist/elements/popover/Popover.vue_vue_type_script_setup_true_lang.js +218 -0
- package/dist/elements/popover/index.d.ts +2 -0
- package/dist/elements/popover/popover.theme.d.ts +20 -0
- package/dist/elements/popover/popover.theme.js +17 -0
- package/dist/elements/popover/popoverLayers.d.ts +5 -0
- package/dist/elements/popover/popoverLayers.js +22 -0
- package/dist/elements/radio-group/RadioGroup.js +4 -0
- package/dist/elements/radio-group/RadioGroup.vue.d.ts +1 -1
- package/dist/elements/radio-group/RadioGroup.vue_vue_type_script_setup_true_lang.js +105 -0
- package/dist/elements/radio-group/radio-group.theme.js +126 -0
- package/dist/elements/segmented-control/SegmentedControl.js +4 -0
- package/dist/elements/segmented-control/SegmentedControl.vue.d.ts +1 -1
- package/dist/elements/segmented-control/SegmentedControl.vue_vue_type_script_setup_true_lang.js +98 -0
- package/dist/elements/segmented-control/segmented-control.theme.js +201 -0
- package/dist/elements/select-control/SelectControl.js +4 -0
- package/dist/elements/select-control/SelectControl.vue.d.ts +1 -1
- package/dist/elements/select-control/SelectControl.vue_vue_type_script_setup_true_lang.js +105 -0
- package/dist/elements/select-control/select-control.theme.js +360 -0
- package/dist/elements/select-field-control/SelectFieldControl.js +4 -0
- package/dist/elements/select-field-control/SelectFieldControl.vue.d.ts +1 -1
- package/dist/elements/select-field-control/SelectFieldControl.vue_vue_type_script_setup_true_lang.js +123 -0
- package/dist/elements/select-field-control/select-field-control.theme.js +299 -0
- package/dist/elements/slider-control/SliderControl.js +4 -0
- package/dist/elements/slider-control/SliderControl.vue_vue_type_script_setup_true_lang.js +228 -0
- package/dist/elements/slider-control/slider-control.theme.js +35 -0
- package/dist/elements/slider-control/useSliderMarksLayout.js +25 -0
- package/dist/elements/switch/Switch.js +4 -0
- package/dist/elements/switch/Switch.vue.d.ts +1 -1
- package/dist/elements/switch/Switch.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/elements/switch/switch.theme.js +37 -0
- package/dist/elements/text-link/TextLink.js +4 -0
- package/dist/elements/text-link/TextLink.vue_vue_type_script_setup_true_lang.js +64 -0
- package/dist/elements/text-link/text-link.theme.js +25 -0
- package/dist/elements/tooltip/Tooltip.js +4 -0
- package/dist/elements/tooltip/Tooltip.vue_vue_type_script_setup_true_lang.js +161 -0
- package/dist/elements/tooltip/tooltip.theme.js +46 -0
- package/dist/elements/tooltip/useTooltipOpenState.js +57 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +38 -1
- package/dist/nuxt.js +12 -13
- package/dist/shared/composables/useApplePlatform.js +10 -0
- package/dist/shared/composables/useCalendarLabels.js +13 -0
- package/dist/shared/composables/useCustomColor.js +10 -0
- package/dist/shared/composables/useDismissOnOutsidePointerDown.d.ts +1 -1
- package/dist/shared/composables/useDismissOnOutsidePointerDown.js +14 -0
- package/dist/shared/composables/useFieldDescription.js +16 -0
- package/dist/shared/composables/useFloatingPosition.d.ts +3 -2
- package/dist/shared/composables/useFloatingPosition.js +113 -0
- package/dist/shared/composables/useMask.js +32 -0
- package/dist/shared/composables/useMaskedFieldModel.d.ts +7 -0
- package/dist/shared/composables/useMaskedFieldModel.js +19 -0
- package/dist/shared/composables/useNumberFieldTyping.js +70 -0
- package/dist/shared/composables/usePointerGraceArea.js +40 -0
- package/dist/shared/composables/useRowSelection.d.ts +17 -0
- package/dist/shared/composables/useRowSelection.js +40 -0
- package/dist/shared/composables/useShortcuts.js +21 -0
- package/dist/shared/composables/useSlidingThumb.js +65 -0
- package/dist/shared/composables/useTableRows.d.ts +26 -0
- package/dist/shared/composables/useTableRows.js +41 -0
- package/dist/shared/types/floating-position.d.ts +9 -0
- package/dist/shared/types/table.d.ts +59 -0
- package/dist/shared/types/value-path.d.ts +6 -0
- package/dist/shared/utils/calendarMonth.js +23 -0
- package/dist/shared/utils/computeFloatingPosition.js +32 -0
- package/dist/shared/utils/createDateFormatters.js +31 -0
- package/dist/shared/utils/createDateInputMask.js +103 -0
- package/dist/shared/utils/createDebouncedCallback.js +17 -0
- package/dist/shared/utils/createMask.js +65 -0
- package/dist/shared/utils/createShortcutHandler.js +60 -0
- package/dist/shared/utils/createTypeaheadSearch.js +16 -0
- package/dist/shared/utils/editableFieldGuard.js +11 -0
- package/dist/shared/utils/findFirstRenderedVNode.js +14 -0
- package/dist/shared/utils/flipFloatingPosition.js +28 -0
- package/dist/shared/utils/floatingPanelTransition.js +25 -0
- package/dist/shared/utils/formatShortcut.js +86 -0
- package/dist/shared/utils/isApplePlatform.js +5 -0
- package/dist/shared/utils/isExternalUrl.js +5 -0
- package/dist/shared/utils/isoDate.js +50 -0
- package/dist/shared/utils/normalizeSearchText.d.ts +2 -0
- package/dist/shared/utils/normalizeSearchText.js +6 -0
- package/dist/shared/utils/parseShortcut.js +48 -0
- package/dist/shared/utils/pointerGraceArea.js +92 -0
- package/dist/shared/utils/readValueAtPath.d.ts +2 -0
- package/dist/shared/utils/readValueAtPath.js +7 -0
- package/dist/shared/utils/resolveFloatingAnchor.d.ts +4 -0
- package/dist/shared/utils/resolveFloatingAnchor.js +15 -0
- package/dist/shared/utils/resolvePressScale.js +5 -0
- package/dist/shared/utils/shiftFloatingPosition.js +21 -0
- package/dist/shared/utils/sliderPosition.js +27 -0
- package/dist/shared/utils/sliderThumbs.js +16 -0
- package/dist/shared/utils/steppedValue.js +21 -0
- package/dist/shared/utils/tableColumnTypes.d.ts +21 -0
- package/dist/shared/utils/tableColumnTypes.js +77 -0
- package/dist/shared/utils/tableColumns.d.ts +20 -0
- package/dist/shared/utils/tableColumns.js +77 -0
- package/dist/shared/utils/tableGroups.d.ts +10 -0
- package/dist/shared/utils/tableGroups.js +34 -0
- package/dist/shared/utils/tableRows.d.ts +25 -0
- package/dist/shared/utils/tableRows.js +80 -0
- package/dist/shared/utils/tableTree.d.ts +15 -0
- package/dist/shared/utils/tableTree.js +22 -0
- package/dist/shared/utils/toggleColumnSort.d.ts +5 -0
- package/dist/shared/utils/toggleColumnSort.js +27 -0
- package/dist/shared/utils/tv.js +1 -0
- package/dist/shared/utils/warnInDevelopment.d.ts +3 -0
- package/dist/shared/utils/warnInDevelopment.js +13 -0
- package/package.json +1 -1
- package/src/index.css +1 -0
- package/src/shared/styles/utilities/shake.css +21 -0
- package/dist/src-Rouj5r7z.js +0 -9111
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { tv as e } from "../../shared/utils/tv.js";
|
|
2
|
+
// src/components/textarea/textarea.theme.ts
|
|
3
|
+
var t = {
|
|
4
|
+
md: {
|
|
5
|
+
fontSize: "text-sm",
|
|
6
|
+
verticalPadding: "py-1.25",
|
|
7
|
+
labelFontSize: "text-[11px] peer-placeholder-shown:text-sm peer-focus:text-[11px]",
|
|
8
|
+
floatingLabelFontSize: "text-[11px]",
|
|
9
|
+
labelRestingTop: "peer-placeholder-shown:top-4",
|
|
10
|
+
autoResizeHeights: "min-h-[calc(var(--textarea-min-rows)*1lh+12px)] max-h-[calc(var(--textarea-max-rows)*1lh+12px)]",
|
|
11
|
+
pillShape: {
|
|
12
|
+
corners: "rounded-2xl",
|
|
13
|
+
horizontalPadding: "px-4",
|
|
14
|
+
labelOffset: "left-3"
|
|
15
|
+
},
|
|
16
|
+
roundedShape: {
|
|
17
|
+
corners: "rounded-lg",
|
|
18
|
+
horizontalPadding: "px-3",
|
|
19
|
+
labelOffset: "left-2"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
lg: {
|
|
23
|
+
fontSize: "text-sm",
|
|
24
|
+
verticalPadding: "py-1.75",
|
|
25
|
+
labelFontSize: "text-[11px] peer-placeholder-shown:text-sm peer-focus:text-[11px]",
|
|
26
|
+
floatingLabelFontSize: "text-[11px]",
|
|
27
|
+
labelRestingTop: "peer-placeholder-shown:top-4.5",
|
|
28
|
+
autoResizeHeights: "min-h-[calc(var(--textarea-min-rows)*1lh+16px)] max-h-[calc(var(--textarea-max-rows)*1lh+16px)]",
|
|
29
|
+
pillShape: {
|
|
30
|
+
corners: "rounded-[18px]",
|
|
31
|
+
horizontalPadding: "px-4",
|
|
32
|
+
labelOffset: "left-3"
|
|
33
|
+
},
|
|
34
|
+
roundedShape: {
|
|
35
|
+
corners: "rounded-lg",
|
|
36
|
+
horizontalPadding: "px-3",
|
|
37
|
+
labelOffset: "left-2"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
xl: {
|
|
41
|
+
fontSize: "text-base",
|
|
42
|
+
verticalPadding: "py-1.75",
|
|
43
|
+
labelFontSize: "text-[11px] peer-placeholder-shown:text-base peer-focus:text-[11px]",
|
|
44
|
+
floatingLabelFontSize: "text-[11px]",
|
|
45
|
+
labelRestingTop: "peer-placeholder-shown:top-5",
|
|
46
|
+
autoResizeHeights: "min-h-[calc(var(--textarea-min-rows)*1lh+16px)] max-h-[calc(var(--textarea-max-rows)*1lh+16px)]",
|
|
47
|
+
pillShape: {
|
|
48
|
+
corners: "rounded-[20px]",
|
|
49
|
+
horizontalPadding: "px-4.75",
|
|
50
|
+
labelOffset: "left-3.75"
|
|
51
|
+
},
|
|
52
|
+
roundedShape: {
|
|
53
|
+
corners: "rounded-[10px]",
|
|
54
|
+
horizontalPadding: "px-3.5",
|
|
55
|
+
labelOffset: "left-2.5"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"2xl": {
|
|
59
|
+
fontSize: "text-base",
|
|
60
|
+
verticalPadding: "py-2.25",
|
|
61
|
+
labelFontSize: "text-xs peer-placeholder-shown:text-base peer-focus:text-xs",
|
|
62
|
+
floatingLabelFontSize: "text-xs",
|
|
63
|
+
labelRestingTop: "peer-placeholder-shown:top-5.5",
|
|
64
|
+
autoResizeHeights: "min-h-[calc(var(--textarea-min-rows)*1lh+20px)] max-h-[calc(var(--textarea-max-rows)*1lh+20px)]",
|
|
65
|
+
pillShape: {
|
|
66
|
+
corners: "rounded-[22px]",
|
|
67
|
+
horizontalPadding: "px-5.25",
|
|
68
|
+
labelOffset: "left-4.25"
|
|
69
|
+
},
|
|
70
|
+
roundedShape: {
|
|
71
|
+
corners: "rounded-xl",
|
|
72
|
+
horizontalPadding: "px-4",
|
|
73
|
+
labelOffset: "left-3"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"3xl": {
|
|
77
|
+
fontSize: "text-base",
|
|
78
|
+
verticalPadding: "py-2.75",
|
|
79
|
+
labelFontSize: "text-xs peer-placeholder-shown:text-base peer-focus:text-xs",
|
|
80
|
+
floatingLabelFontSize: "text-xs",
|
|
81
|
+
labelRestingTop: "peer-placeholder-shown:top-6",
|
|
82
|
+
autoResizeHeights: "min-h-[calc(var(--textarea-min-rows)*1lh+24px)] max-h-[calc(var(--textarea-max-rows)*1lh+24px)]",
|
|
83
|
+
pillShape: {
|
|
84
|
+
corners: "rounded-3xl",
|
|
85
|
+
horizontalPadding: "px-5.25",
|
|
86
|
+
labelOffset: "left-4.25"
|
|
87
|
+
},
|
|
88
|
+
roundedShape: {
|
|
89
|
+
corners: "rounded-xl",
|
|
90
|
+
horizontalPadding: "px-4",
|
|
91
|
+
labelOffset: "left-3"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"4xl": {
|
|
95
|
+
fontSize: "text-base",
|
|
96
|
+
verticalPadding: "py-3.75",
|
|
97
|
+
labelFontSize: "text-xs peer-placeholder-shown:text-base peer-focus:text-xs",
|
|
98
|
+
floatingLabelFontSize: "text-xs",
|
|
99
|
+
labelRestingTop: "peer-placeholder-shown:top-7",
|
|
100
|
+
autoResizeHeights: "min-h-[calc(var(--textarea-min-rows)*1lh+32px)] max-h-[calc(var(--textarea-max-rows)*1lh+32px)]",
|
|
101
|
+
pillShape: {
|
|
102
|
+
corners: "rounded-[28px]",
|
|
103
|
+
horizontalPadding: "px-6",
|
|
104
|
+
labelOffset: "left-5"
|
|
105
|
+
},
|
|
106
|
+
roundedShape: {
|
|
107
|
+
corners: "rounded-2xl",
|
|
108
|
+
horizontalPadding: "px-4.5",
|
|
109
|
+
labelOffset: "left-3.5"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}, n = Object.keys(t);
|
|
113
|
+
function r(e) {
|
|
114
|
+
return { base: [e.fontSize, e.verticalPadding] };
|
|
115
|
+
}
|
|
116
|
+
function i(e) {
|
|
117
|
+
let n = t[e];
|
|
118
|
+
return [
|
|
119
|
+
{
|
|
120
|
+
size: e,
|
|
121
|
+
pill: !0,
|
|
122
|
+
class: {
|
|
123
|
+
base: [n.pillShape.corners, n.pillShape.horizontalPadding],
|
|
124
|
+
label: n.pillShape.labelOffset
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
size: e,
|
|
129
|
+
pill: !1,
|
|
130
|
+
class: {
|
|
131
|
+
base: [n.roundedShape.corners, n.roundedShape.horizontalPadding],
|
|
132
|
+
label: n.roundedShape.labelOffset
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
size: e,
|
|
137
|
+
autoResize: !0,
|
|
138
|
+
class: { base: n.autoResizeHeights }
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
size: e,
|
|
142
|
+
floatLabel: "auto",
|
|
143
|
+
class: { label: [n.labelFontSize, n.labelRestingTop] }
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
size: e,
|
|
147
|
+
floatLabel: "always",
|
|
148
|
+
class: { label: n.floatingLabelFontSize }
|
|
149
|
+
}
|
|
150
|
+
];
|
|
151
|
+
}
|
|
152
|
+
var a = Object.fromEntries(n.map((e) => [e, r(t[e])])), o = n.flatMap(i), s = e({
|
|
153
|
+
slots: {
|
|
154
|
+
root: "",
|
|
155
|
+
container: "relative",
|
|
156
|
+
base: "peer block w-full resize-none border bg-field outline-hidden transition-colors placeholder:text-muted",
|
|
157
|
+
label: "pointer-events-none absolute top-0 -translate-y-1/2 bg-linear-to-b from-canvas from-50% to-field to-50% px-1 transition-colors",
|
|
158
|
+
footer: "mt-2 flex items-start gap-x-4 text-xs",
|
|
159
|
+
hint: "text-muted",
|
|
160
|
+
errorMessage: "flex items-start gap-x-1.5 light:text-red-600 dark:text-red-400",
|
|
161
|
+
errorIcon: "mt-px size-3.5 shrink-0",
|
|
162
|
+
characterCount: "ml-auto shrink-0 text-muted tabular-nums"
|
|
163
|
+
},
|
|
164
|
+
variants: {
|
|
165
|
+
variant: {
|
|
166
|
+
outline: "",
|
|
167
|
+
soft: ""
|
|
168
|
+
},
|
|
169
|
+
size: a,
|
|
170
|
+
pill: { true: "" },
|
|
171
|
+
floatLabel: {
|
|
172
|
+
auto: { label: "peer-placeholder-shown:bg-none peer-placeholder-shown:transition-all peer-focus:top-0 peer-focus:bg-linear-to-b peer-focus:transition-all" },
|
|
173
|
+
always: ""
|
|
174
|
+
},
|
|
175
|
+
autoResize: { true: { base: "field-sizing-content" } },
|
|
176
|
+
invalid: { true: {
|
|
177
|
+
base: "light:border-red-600 dark:border-red-500 light:selection:bg-red-500/16 dark:selection:bg-red-400/16",
|
|
178
|
+
label: "light:text-red-600 dark:text-red-400"
|
|
179
|
+
} },
|
|
180
|
+
disabled: { true: { container: "opacity-50" } }
|
|
181
|
+
},
|
|
182
|
+
compoundVariants: [
|
|
183
|
+
...o,
|
|
184
|
+
{
|
|
185
|
+
invalid: !1,
|
|
186
|
+
disabled: !1,
|
|
187
|
+
variant: "outline",
|
|
188
|
+
class: {
|
|
189
|
+
base: "border-line light:not-focus:hover:border-stone-950/20 dark:not-focus:hover:border-white/20 focus:border-primary",
|
|
190
|
+
label: "text-muted peer-focus:text-primary"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
invalid: !1,
|
|
195
|
+
disabled: !1,
|
|
196
|
+
variant: "soft",
|
|
197
|
+
class: {
|
|
198
|
+
base: "border-transparent focus:border-primary",
|
|
199
|
+
label: "text-muted peer-focus:text-primary"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
invalid: !1,
|
|
204
|
+
disabled: !0,
|
|
205
|
+
variant: "outline",
|
|
206
|
+
class: {
|
|
207
|
+
base: "cursor-not-allowed border-line",
|
|
208
|
+
label: "text-muted"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
invalid: !1,
|
|
213
|
+
disabled: !0,
|
|
214
|
+
variant: "soft",
|
|
215
|
+
class: {
|
|
216
|
+
base: "cursor-not-allowed border-transparent",
|
|
217
|
+
label: "text-muted"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
});
|
|
222
|
+
export { s as textareaTheme };
|
|
@@ -18,10 +18,10 @@ export interface AvatarProps {
|
|
|
18
18
|
declare const _default: typeof __VLS_export;
|
|
19
19
|
export default _default;
|
|
20
20
|
declare const __VLS_export: import("vue").DefineComponent<AvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarProps> & Readonly<{}>, {
|
|
21
|
-
pill: boolean;
|
|
22
21
|
size: "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl";
|
|
23
|
-
variant: "
|
|
24
|
-
color: "primary" | "secondary" | "gray" | "
|
|
22
|
+
variant: "soft" | "solid";
|
|
23
|
+
color: "primary" | "secondary" | "gray" | "success" | "info" | "discovery" | "danger";
|
|
24
|
+
pill: boolean;
|
|
25
25
|
name: string;
|
|
26
26
|
overflowCount: number;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { avatarTheme as e } from "./avatar.theme.js";
|
|
2
|
+
import { computed as t, createBlock as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, mergeProps as s, normalizeClass as c, openBlock as l, resolveDynamicComponent as u, toDisplayString as d, withCtx as f } from "vue";
|
|
3
|
+
// src/elements/avatar/Avatar.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var p = ["src"], m = /*@__PURE__*/ o({
|
|
5
|
+
__name: "Avatar",
|
|
6
|
+
props: {
|
|
7
|
+
name: { default: "" },
|
|
8
|
+
imageUrl: {},
|
|
9
|
+
icon: {},
|
|
10
|
+
initials: {},
|
|
11
|
+
overflowCount: { default: 0 },
|
|
12
|
+
variant: { default: "soft" },
|
|
13
|
+
color: { default: "gray" },
|
|
14
|
+
size: { default: "md" },
|
|
15
|
+
pill: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: !0
|
|
18
|
+
},
|
|
19
|
+
href: {},
|
|
20
|
+
ui: {},
|
|
21
|
+
class: { type: [
|
|
22
|
+
Array,
|
|
23
|
+
String,
|
|
24
|
+
null,
|
|
25
|
+
Number,
|
|
26
|
+
Boolean
|
|
27
|
+
] }
|
|
28
|
+
},
|
|
29
|
+
setup(o) {
|
|
30
|
+
let m = o, h = t(() => m.overflowCount > 0), g = t(() => m.overflowCount >= 1e6 ? `${Math.round(m.overflowCount / 1e6)}m` : m.overflowCount >= 1e3 ? `${Math.round(m.overflowCount / 1e3)}k` : String(m.overflowCount)), _ = t(() => m.initials || m.name.charAt(0).toUpperCase()), v = t(() => m.name || (h.value ? `${m.overflowCount} more` : "")), y = t(() => {
|
|
31
|
+
let e = h.value ? g.value.length : _.value.length;
|
|
32
|
+
return e <= 1 ? "one" : e === 2 ? "two" : "many";
|
|
33
|
+
}), b = t(() => e({
|
|
34
|
+
variant: m.variant,
|
|
35
|
+
color: m.color,
|
|
36
|
+
size: m.size,
|
|
37
|
+
pill: m.pill,
|
|
38
|
+
hasImage: !!m.imageUrl,
|
|
39
|
+
isLink: !!m.href,
|
|
40
|
+
isOverflow: h.value,
|
|
41
|
+
labelCharacterCount: y.value
|
|
42
|
+
})), x = t(() => m.href ? "a" : "span"), S = t(() => m.href ? {
|
|
43
|
+
href: m.href,
|
|
44
|
+
"aria-label": v.value || void 0
|
|
45
|
+
} : v.value ? {
|
|
46
|
+
role: "img",
|
|
47
|
+
"aria-label": v.value
|
|
48
|
+
} : { "aria-hidden": "true" });
|
|
49
|
+
return (e, t) => (l(), n(u(x.value), s(S.value, { class: b.value.base({ class: [o.ui?.base, m.class] }) }), {
|
|
50
|
+
default: f(() => [o.imageUrl ? (l(), r("img", {
|
|
51
|
+
key: 0,
|
|
52
|
+
src: o.imageUrl,
|
|
53
|
+
alt: "",
|
|
54
|
+
class: c(b.value.image({ class: o.ui?.image }))
|
|
55
|
+
}, null, 10, p)) : o.icon ? (l(), n(u(o.icon), {
|
|
56
|
+
key: 1,
|
|
57
|
+
class: c(b.value.icon({ class: o.ui?.icon }))
|
|
58
|
+
}, null, 8, ["class"])) : h.value ? (l(), r("span", {
|
|
59
|
+
key: 2,
|
|
60
|
+
"aria-hidden": "true",
|
|
61
|
+
class: c(b.value.label({ class: o.ui?.label }))
|
|
62
|
+
}, [i("span", { class: c(b.value.overflowSign({ class: o.ui?.overflowSign })) }, "+", 2), a(" " + d(g.value), 1)], 2)) : (l(), r("span", {
|
|
63
|
+
key: 3,
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
class: c(b.value.label({ class: o.ui?.label }))
|
|
66
|
+
}, d(_.value), 3))]),
|
|
67
|
+
_: 1
|
|
68
|
+
}, 16, ["class"]));
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
export { m as default };
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { tv as e } from "../../shared/utils/tv.js";
|
|
2
|
+
// src/elements/avatar/avatar.theme.ts
|
|
3
|
+
var t = {
|
|
4
|
+
"3xs": {
|
|
5
|
+
sizeVariable: "[--avatar-size:22px]",
|
|
6
|
+
radius: "rounded-md"
|
|
7
|
+
},
|
|
8
|
+
"2xs": {
|
|
9
|
+
sizeVariable: "[--avatar-size:24px]",
|
|
10
|
+
radius: "rounded-md"
|
|
11
|
+
},
|
|
12
|
+
xs: {
|
|
13
|
+
sizeVariable: "[--avatar-size:26px]",
|
|
14
|
+
radius: "rounded-md"
|
|
15
|
+
},
|
|
16
|
+
sm: {
|
|
17
|
+
sizeVariable: "[--avatar-size:28px]",
|
|
18
|
+
radius: "rounded-md"
|
|
19
|
+
},
|
|
20
|
+
md: {
|
|
21
|
+
sizeVariable: "[--avatar-size:32px]",
|
|
22
|
+
radius: "rounded-lg"
|
|
23
|
+
},
|
|
24
|
+
lg: {
|
|
25
|
+
sizeVariable: "[--avatar-size:36px]",
|
|
26
|
+
radius: "rounded-lg"
|
|
27
|
+
},
|
|
28
|
+
xl: {
|
|
29
|
+
sizeVariable: "[--avatar-size:40px]",
|
|
30
|
+
radius: "rounded-[10px]"
|
|
31
|
+
},
|
|
32
|
+
"2xl": {
|
|
33
|
+
sizeVariable: "[--avatar-size:44px]",
|
|
34
|
+
radius: "rounded-xl"
|
|
35
|
+
},
|
|
36
|
+
"3xl": {
|
|
37
|
+
sizeVariable: "[--avatar-size:48px]",
|
|
38
|
+
radius: "rounded-xl"
|
|
39
|
+
},
|
|
40
|
+
"4xl": {
|
|
41
|
+
sizeVariable: "[--avatar-size:56px]",
|
|
42
|
+
radius: "rounded-2xl"
|
|
43
|
+
},
|
|
44
|
+
"5xl": {
|
|
45
|
+
sizeVariable: "[--avatar-size:64px]",
|
|
46
|
+
radius: "rounded-2xl"
|
|
47
|
+
},
|
|
48
|
+
"6xl": {
|
|
49
|
+
sizeVariable: "[--avatar-size:80px]",
|
|
50
|
+
radius: "rounded-3xl"
|
|
51
|
+
}
|
|
52
|
+
}, n = Object.keys(t), r = {
|
|
53
|
+
soft: {
|
|
54
|
+
primary: "light:bg-stone-200 dark:bg-stone-700",
|
|
55
|
+
secondary: "bg-secondary/16 text-secondary",
|
|
56
|
+
gray: "light:bg-stone-200 dark:bg-stone-700",
|
|
57
|
+
success: "light:bg-green-100 light:text-green-700 dark:bg-green-950 dark:text-green-400",
|
|
58
|
+
info: "light:bg-blue-100 light:text-blue-700 dark:bg-blue-950 dark:text-blue-300",
|
|
59
|
+
discovery: "light:bg-purple-100 light:text-purple-700 dark:bg-purple-950 dark:text-purple-300",
|
|
60
|
+
danger: "light:bg-red-100 light:text-red-700 dark:bg-red-950 dark:text-red-400"
|
|
61
|
+
},
|
|
62
|
+
solid: {
|
|
63
|
+
primary: "light:bg-neutral-900 light:text-white dark:bg-stone-200 dark:text-stone-950",
|
|
64
|
+
secondary: "bg-secondary light:text-white dark:text-stone-950",
|
|
65
|
+
gray: "light:bg-stone-600 light:text-white dark:bg-stone-600 dark:text-white",
|
|
66
|
+
success: "light:bg-green-600 light:text-white dark:bg-green-600 dark:text-white",
|
|
67
|
+
info: "light:bg-blue-600 light:text-white dark:bg-blue-500 dark:text-white",
|
|
68
|
+
discovery: "light:bg-purple-600 light:text-white dark:bg-purple-500 dark:text-white",
|
|
69
|
+
danger: "light:bg-red-600 light:text-white dark:bg-red-600 dark:text-white"
|
|
70
|
+
}
|
|
71
|
+
}, i = Object.keys(r), a = Object.keys(r.soft), o = Object.fromEntries(n.map((e) => [e, { base: t[e].sizeVariable }])), s = n.flatMap((e) => [{
|
|
72
|
+
size: e,
|
|
73
|
+
pill: !0,
|
|
74
|
+
class: { base: "rounded-full" }
|
|
75
|
+
}, {
|
|
76
|
+
size: e,
|
|
77
|
+
pill: !1,
|
|
78
|
+
class: { base: t[e].radius }
|
|
79
|
+
}]), c = i.flatMap((e) => a.map((t) => ({
|
|
80
|
+
variant: e,
|
|
81
|
+
color: t,
|
|
82
|
+
class: { base: r[e][t] }
|
|
83
|
+
}))), l = e({
|
|
84
|
+
slots: {
|
|
85
|
+
base: "relative inline-flex size-(--avatar-size) shrink-0 items-center justify-center overflow-hidden select-none",
|
|
86
|
+
image: "absolute inset-0 size-full rounded-[inherit] object-cover",
|
|
87
|
+
icon: "size-[calc(var(--avatar-size)*0.55)] shrink-0",
|
|
88
|
+
label: "font-semibold",
|
|
89
|
+
overflowSign: "relative -top-[calc(var(--avatar-size)/24)] -ml-px"
|
|
90
|
+
},
|
|
91
|
+
variants: {
|
|
92
|
+
variant: {
|
|
93
|
+
soft: "",
|
|
94
|
+
solid: ""
|
|
95
|
+
},
|
|
96
|
+
color: {
|
|
97
|
+
primary: "",
|
|
98
|
+
secondary: "",
|
|
99
|
+
gray: "",
|
|
100
|
+
success: "",
|
|
101
|
+
info: "",
|
|
102
|
+
discovery: "",
|
|
103
|
+
danger: ""
|
|
104
|
+
},
|
|
105
|
+
size: o,
|
|
106
|
+
pill: { true: "" },
|
|
107
|
+
hasImage: { true: { base: "after:absolute after:inset-0 after:rounded-[inherit] after:border light:after:border-black/4 dark:after:border-white/15" } },
|
|
108
|
+
isLink: { true: { base: "outline-primary focus-visible:outline-2 focus-visible:outline-offset-2" } },
|
|
109
|
+
isOverflow: { true: { label: "flex" } },
|
|
110
|
+
labelCharacterCount: {
|
|
111
|
+
one: "",
|
|
112
|
+
two: "",
|
|
113
|
+
many: { label: "text-[length:calc(var(--avatar-size)*0.3)]/none" }
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
compoundVariants: [
|
|
117
|
+
...s,
|
|
118
|
+
...c,
|
|
119
|
+
{
|
|
120
|
+
isOverflow: !1,
|
|
121
|
+
labelCharacterCount: "one",
|
|
122
|
+
class: { label: "text-[length:calc(var(--avatar-size)*0.5)]/none" }
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
isOverflow: !1,
|
|
126
|
+
labelCharacterCount: "two",
|
|
127
|
+
class: { label: "text-[length:calc(var(--avatar-size)*0.4)]/none" }
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
isOverflow: !0,
|
|
131
|
+
labelCharacterCount: "one",
|
|
132
|
+
class: { label: "text-[length:calc(var(--avatar-size)*0.45)]/none" }
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
isOverflow: !0,
|
|
136
|
+
labelCharacterCount: "two",
|
|
137
|
+
class: { label: "text-[length:calc(var(--avatar-size)*0.37)]/none" }
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
});
|
|
141
|
+
export { l as avatarTheme };
|
|
@@ -17,8 +17,8 @@ declare const _default: typeof __VLS_export;
|
|
|
17
17
|
export default _default;
|
|
18
18
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<BadgeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
|
|
19
19
|
size: "sm" | "md" | "lg";
|
|
20
|
-
variant: "
|
|
21
|
-
color: "secondary" | "gray" | "
|
|
20
|
+
variant: "soft" | "solid" | "outline";
|
|
21
|
+
color: "secondary" | "gray" | "success" | "info" | "discovery" | "danger" | "warning";
|
|
22
22
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
23
23
|
default?: (props: {}) => any;
|
|
24
24
|
}>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { badgeTheme as e } from "./badge.theme.js";
|
|
2
|
+
import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createTextVNode as a, defineComponent as o, normalizeClass as s, openBlock as c, renderSlot as l, resolveDynamicComponent as u, toDisplayString as d } from "vue";
|
|
3
|
+
// src/elements/badge/Badge.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var f = /*@__PURE__*/ o({
|
|
5
|
+
__name: "Badge",
|
|
6
|
+
props: {
|
|
7
|
+
label: {},
|
|
8
|
+
variant: { default: "soft" },
|
|
9
|
+
color: { default: "gray" },
|
|
10
|
+
size: { default: "sm" },
|
|
11
|
+
leadingIcon: {},
|
|
12
|
+
trailingIcon: {},
|
|
13
|
+
dot: { type: Boolean },
|
|
14
|
+
pill: { type: Boolean },
|
|
15
|
+
ui: {},
|
|
16
|
+
class: { type: [
|
|
17
|
+
Array,
|
|
18
|
+
String,
|
|
19
|
+
null,
|
|
20
|
+
Number,
|
|
21
|
+
Boolean
|
|
22
|
+
] }
|
|
23
|
+
},
|
|
24
|
+
setup(o) {
|
|
25
|
+
let f = o, p = t(() => e({
|
|
26
|
+
variant: f.variant,
|
|
27
|
+
color: f.color,
|
|
28
|
+
size: f.size,
|
|
29
|
+
pill: f.pill
|
|
30
|
+
}));
|
|
31
|
+
return (e, t) => (c(), i("span", { class: s(p.value.base({ class: [o.ui?.base, f.class] })) }, [
|
|
32
|
+
o.dot ? (c(), i("span", {
|
|
33
|
+
key: 0,
|
|
34
|
+
"aria-hidden": "true",
|
|
35
|
+
class: s(p.value.dot({ class: o.ui?.dot }))
|
|
36
|
+
}, null, 2)) : r("", !0),
|
|
37
|
+
o.leadingIcon ? (c(), n(u(o.leadingIcon), {
|
|
38
|
+
key: 1,
|
|
39
|
+
class: s(p.value.leadingIcon({ class: o.ui?.leadingIcon }))
|
|
40
|
+
}, null, 8, ["class"])) : r("", !0),
|
|
41
|
+
l(e.$slots, "default", {}, () => [a(d(o.label), 1)]),
|
|
42
|
+
o.trailingIcon ? (c(), n(u(o.trailingIcon), {
|
|
43
|
+
key: 2,
|
|
44
|
+
class: s(p.value.trailingIcon({ class: o.ui?.trailingIcon }))
|
|
45
|
+
}, null, 8, ["class"])) : r("", !0)
|
|
46
|
+
], 2));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export { f as default };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { tv as e } from "../../shared/utils/tv.js";
|
|
2
|
+
// src/elements/badge/badge.theme.ts
|
|
3
|
+
var t = {
|
|
4
|
+
sm: {
|
|
5
|
+
height: "h-5",
|
|
6
|
+
fontSize: "text-xs/none tracking-wide",
|
|
7
|
+
gutter: "px-1.25",
|
|
8
|
+
pillGutter: "px-1.75",
|
|
9
|
+
radius: "rounded-sm",
|
|
10
|
+
iconSize: "size-3",
|
|
11
|
+
dotSize: "size-1.5"
|
|
12
|
+
},
|
|
13
|
+
md: {
|
|
14
|
+
height: "h-5.5",
|
|
15
|
+
fontSize: "text-sm/none",
|
|
16
|
+
gutter: "px-1.5",
|
|
17
|
+
pillGutter: "px-2",
|
|
18
|
+
radius: "rounded-sm",
|
|
19
|
+
iconSize: "size-4",
|
|
20
|
+
dotSize: "size-1.5"
|
|
21
|
+
},
|
|
22
|
+
lg: {
|
|
23
|
+
height: "h-6",
|
|
24
|
+
fontSize: "text-sm/none",
|
|
25
|
+
gutter: "px-2",
|
|
26
|
+
pillGutter: "px-2.75",
|
|
27
|
+
radius: "rounded-md",
|
|
28
|
+
iconSize: "size-4",
|
|
29
|
+
dotSize: "size-2"
|
|
30
|
+
}
|
|
31
|
+
}, n = Object.keys(t), r = {
|
|
32
|
+
soft: {
|
|
33
|
+
secondary: "bg-secondary/16 text-secondary",
|
|
34
|
+
gray: "light:bg-stone-950/8 dark:bg-stone-200/12",
|
|
35
|
+
success: "light:bg-green-500/16 light:text-green-700 dark:bg-green-400/16 dark:text-green-400",
|
|
36
|
+
warning: "light:bg-orange-500/16 light:text-orange-700 dark:bg-orange-400/16 dark:text-orange-400",
|
|
37
|
+
danger: "light:bg-red-500/16 light:text-red-600 dark:bg-red-400/16 dark:text-red-400",
|
|
38
|
+
info: "light:bg-blue-500/16 light:text-blue-600 dark:bg-blue-400/16 dark:text-blue-300",
|
|
39
|
+
discovery: "light:bg-purple-500/16 light:text-purple-600 dark:bg-purple-400/16 dark:text-purple-300"
|
|
40
|
+
},
|
|
41
|
+
solid: {
|
|
42
|
+
secondary: "bg-secondary light:text-white dark:text-stone-950",
|
|
43
|
+
gray: "light:bg-stone-600 light:text-white dark:bg-stone-600 dark:text-white",
|
|
44
|
+
success: "light:bg-green-600 light:text-white dark:bg-green-600 dark:text-white",
|
|
45
|
+
warning: "light:bg-orange-600 light:text-white dark:bg-orange-600 dark:text-white",
|
|
46
|
+
danger: "light:bg-red-600 light:text-white dark:bg-red-600 dark:text-white",
|
|
47
|
+
info: "light:bg-blue-600 light:text-white dark:bg-blue-500 dark:text-white",
|
|
48
|
+
discovery: "light:bg-purple-600 light:text-white dark:bg-purple-500 dark:text-white"
|
|
49
|
+
},
|
|
50
|
+
outline: {
|
|
51
|
+
secondary: "inset-ring inset-ring-secondary text-secondary",
|
|
52
|
+
gray: "inset-ring text-muted light:inset-ring-stone-950/16 dark:inset-ring-stone-200/25",
|
|
53
|
+
success: "inset-ring light:inset-ring-green-600 light:text-green-700 dark:inset-ring-green-500 dark:text-green-400",
|
|
54
|
+
warning: "inset-ring light:inset-ring-orange-600 light:text-orange-700 dark:inset-ring-orange-500 dark:text-orange-400",
|
|
55
|
+
danger: "inset-ring light:inset-ring-red-600 light:text-red-600 dark:inset-ring-red-500 dark:text-red-400",
|
|
56
|
+
info: "inset-ring light:inset-ring-blue-600 light:text-blue-600 dark:inset-ring-blue-400 dark:text-blue-300",
|
|
57
|
+
discovery: "inset-ring light:inset-ring-purple-600 light:text-purple-600 dark:inset-ring-purple-400 dark:text-purple-300"
|
|
58
|
+
}
|
|
59
|
+
}, i = Object.keys(r), a = Object.keys(r.soft);
|
|
60
|
+
function o(e) {
|
|
61
|
+
return {
|
|
62
|
+
base: [e.height, e.fontSize],
|
|
63
|
+
dot: e.dotSize,
|
|
64
|
+
leadingIcon: e.iconSize,
|
|
65
|
+
trailingIcon: e.iconSize
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function s(e) {
|
|
69
|
+
let n = t[e];
|
|
70
|
+
return [{
|
|
71
|
+
size: e,
|
|
72
|
+
pill: !0,
|
|
73
|
+
class: { base: ["rounded-full", n.pillGutter] }
|
|
74
|
+
}, {
|
|
75
|
+
size: e,
|
|
76
|
+
pill: !1,
|
|
77
|
+
class: { base: [n.radius, n.gutter] }
|
|
78
|
+
}];
|
|
79
|
+
}
|
|
80
|
+
var c = Object.fromEntries(n.map((e) => [e, o(t[e])])), l = n.flatMap(s), u = i.flatMap((e) => a.map((t) => ({
|
|
81
|
+
variant: e,
|
|
82
|
+
color: t,
|
|
83
|
+
class: { base: r[e][t] }
|
|
84
|
+
}))), d = e({
|
|
85
|
+
slots: {
|
|
86
|
+
base: "inline-flex shrink-0 items-center gap-1 font-semibold whitespace-nowrap",
|
|
87
|
+
dot: "shrink-0 rounded-full bg-current",
|
|
88
|
+
leadingIcon: "-ml-px shrink-0",
|
|
89
|
+
trailingIcon: "-mr-px shrink-0"
|
|
90
|
+
},
|
|
91
|
+
variants: {
|
|
92
|
+
variant: {
|
|
93
|
+
soft: "",
|
|
94
|
+
solid: "",
|
|
95
|
+
outline: ""
|
|
96
|
+
},
|
|
97
|
+
color: {
|
|
98
|
+
secondary: "",
|
|
99
|
+
gray: "",
|
|
100
|
+
success: "",
|
|
101
|
+
warning: "",
|
|
102
|
+
danger: "",
|
|
103
|
+
info: "",
|
|
104
|
+
discovery: ""
|
|
105
|
+
},
|
|
106
|
+
size: c,
|
|
107
|
+
pill: { true: "" }
|
|
108
|
+
},
|
|
109
|
+
compoundVariants: [...l, ...u]
|
|
110
|
+
});
|
|
111
|
+
export { d as badgeTheme };
|
|
@@ -22,10 +22,10 @@ export interface ButtonProps {
|
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
23
23
|
export default _default;
|
|
24
24
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
|
|
25
|
-
pill: boolean;
|
|
26
25
|
size: "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl";
|
|
27
|
-
variant: "
|
|
28
|
-
color: "primary" | "secondary" | "
|
|
26
|
+
variant: "soft" | "solid" | "outline" | "ghost";
|
|
27
|
+
color: "primary" | "secondary" | "gray" | "danger" | "neutral";
|
|
28
|
+
pill: boolean;
|
|
29
29
|
type: "button" | "submit" | "reset";
|
|
30
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
31
31
|
default?: (props: {}) => any;
|