@rotki/ui-library 3.1.7 → 3.2.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/components/accordions/accordion/RuiAccordion.js.map +1 -1
- package/dist/components/accordions/accordion/RuiAccordion.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/accordions/accordion/RuiAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/accordions/accordion/accordion-styles.d.ts +1 -0
- package/dist/components/accordions/accordion/accordion-styles.js +7 -0
- package/dist/components/accordions/accordion/accordion-styles.js.map +1 -0
- package/dist/components/alerts/RuiAlert.js.map +1 -1
- package/dist/components/alerts/RuiAlert.vue_vue_type_script_setup_true_lang.js +1 -65
- package/dist/components/alerts/RuiAlert.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/alerts/alert-styles.d.ts +145 -0
- package/dist/components/alerts/alert-styles.js +70 -0
- package/dist/components/alerts/alert-styles.js.map +1 -0
- package/dist/components/avatars/RuiAvatar.js.map +1 -1
- package/dist/components/avatars/RuiAvatar.vue_vue_type_script_setup_true_lang.js +1 -38
- package/dist/components/avatars/RuiAvatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/avatars/RuiAvatarGroup.js.map +1 -1
- package/dist/components/avatars/RuiAvatarGroup.vue_vue_type_script_setup_true_lang.js +1 -13
- package/dist/components/avatars/RuiAvatarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/avatars/avatar-group-styles.d.ts +49 -0
- package/dist/components/avatars/avatar-group-styles.js +18 -0
- package/dist/components/avatars/avatar-group-styles.js.map +1 -0
- package/dist/components/avatars/avatar-styles.d.ts +181 -0
- package/dist/components/avatars/avatar-styles.js +43 -0
- package/dist/components/avatars/avatar-styles.js.map +1 -0
- package/dist/components/buttons/button-group/RuiButtonGroup.js.map +1 -1
- package/dist/components/buttons/button-group/RuiButtonGroup.vue_vue_type_script_setup_true_lang.js +2 -138
- package/dist/components/buttons/button-group/RuiButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/buttons/button-group/button-group-styles.d.ts +142 -0
- package/dist/components/buttons/button-group/button-group-styles.js +143 -0
- package/dist/components/buttons/button-group/button-group-styles.js.map +1 -0
- package/dist/components/calendar/RuiCalendar.js.map +1 -1
- package/dist/components/calendar/RuiCalendar.vue_vue_type_script_setup_true_lang.js +1 -8
- package/dist/components/calendar/RuiCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/calendar/RuiCalendarGrid.js.map +1 -1
- package/dist/components/calendar/RuiCalendarGrid.vue_vue_type_script_setup_true_lang.js +2 -22
- package/dist/components/calendar/RuiCalendarGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/calendar/RuiCalendarMenu.js.map +1 -1
- package/dist/components/calendar/RuiCalendarMenu.vue_vue_type_script_setup_true_lang.js +3 -14
- package/dist/components/calendar/RuiCalendarMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/calendar/calendar-grid-styles.d.ts +43 -0
- package/dist/components/calendar/calendar-grid-styles.js +26 -0
- package/dist/components/calendar/calendar-grid-styles.js.map +1 -0
- package/dist/components/calendar/calendar-menu-styles.d.ts +34 -0
- package/dist/components/calendar/calendar-menu-styles.js +17 -0
- package/dist/components/calendar/calendar-menu-styles.js.map +1 -0
- package/dist/components/calendar/calendar-styles.d.ts +16 -0
- package/dist/components/calendar/calendar-styles.js +13 -0
- package/dist/components/calendar/calendar-styles.js.map +1 -0
- package/dist/components/cards/RuiCard.js.map +1 -1
- package/dist/components/cards/RuiCard.vue_vue_type_script_setup_true_lang.js +3 -58
- package/dist/components/cards/RuiCard.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/cards/RuiCardHeader.js.map +1 -1
- package/dist/components/cards/RuiCardHeader.vue_vue_type_script_setup_true_lang.js +2 -20
- package/dist/components/cards/RuiCardHeader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/cards/card-header-styles.d.ts +46 -0
- package/dist/components/cards/card-header-styles.js +24 -0
- package/dist/components/cards/card-header-styles.js.map +1 -0
- package/dist/components/cards/card-styles.d.ts +175 -0
- package/dist/components/cards/card-styles.js +62 -0
- package/dist/components/cards/card-styles.js.map +1 -0
- package/dist/components/chips/RuiChip.js.map +1 -1
- package/dist/components/chips/RuiChip.vue_vue_type_script_setup_true_lang.js +2 -241
- package/dist/components/chips/RuiChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/chips/chip-styles.d.ts +223 -0
- package/dist/components/chips/chip-styles.js +246 -0
- package/dist/components/chips/chip-styles.js.map +1 -0
- package/dist/components/color-picker/RuiColorBoard.js.map +1 -1
- package/dist/components/color-picker/RuiColorBoard.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/color-picker/RuiColorBoard.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/color-picker/RuiColorHue.js.map +1 -1
- package/dist/components/color-picker/RuiColorHue.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/color-picker/RuiColorHue.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/color-picker/RuiColorPicker.js.map +1 -1
- package/dist/components/color-picker/RuiColorPicker.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/color-picker/RuiColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/color-picker/color-board-styles.d.ts +1 -0
- package/dist/components/color-picker/color-board-styles.js +7 -0
- package/dist/components/color-picker/color-board-styles.js.map +1 -0
- package/dist/components/color-picker/color-hue-styles.d.ts +1 -0
- package/dist/components/color-picker/color-hue-styles.js +7 -0
- package/dist/components/color-picker/color-hue-styles.js.map +1 -0
- package/dist/components/color-picker/color-picker-styles.d.ts +1 -0
- package/dist/components/color-picker/color-picker-styles.js +7 -0
- package/dist/components/color-picker/color-picker-styles.js.map +1 -0
- package/dist/components/forms/field-label/RuiFieldLabel.js.map +1 -1
- package/dist/components/forms/field-label/RuiFieldLabel.vue_vue_type_script_setup_true_lang.js +1 -11
- package/dist/components/forms/field-label/RuiFieldLabel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/forms/field-label/field-label-styles.d.ts +43 -0
- package/dist/components/forms/field-label/field-label-styles.js +16 -0
- package/dist/components/forms/field-label/field-label-styles.js.map +1 -0
- package/dist/components/forms/select/RuiSimpleSelect.js.map +1 -1
- package/dist/components/forms/select/RuiSimpleSelect.vue_vue_type_script_setup_true_lang.js +2 -11
- package/dist/components/forms/select/RuiSimpleSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/forms/select/simple-select-styles.d.ts +2 -0
- package/dist/components/forms/select/simple-select-styles.js +15 -0
- package/dist/components/forms/select/simple-select-styles.js.map +1 -0
- package/dist/components/forms/switch/RuiSwitch.js.map +1 -1
- package/dist/components/forms/switch/RuiSwitch.vue_vue_type_script_setup_true_lang.js +1 -126
- package/dist/components/forms/switch/RuiSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/forms/switch/switch-styles.d.ts +151 -0
- package/dist/components/forms/switch/switch-styles.js +131 -0
- package/dist/components/forms/switch/switch-styles.js.map +1 -0
- package/dist/components/icons/RuiIcon.js.map +1 -1
- package/dist/components/icons/RuiIcon.vue_vue_type_script_setup_true_lang.js +2 -28
- package/dist/components/icons/RuiIcon.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/icons/icon-styles.d.ts +44 -0
- package/dist/components/icons/icon-styles.js +33 -0
- package/dist/components/icons/icon-styles.js.map +1 -0
- package/dist/components/loaders/RuiSkeletonBase.js.map +1 -1
- package/dist/components/loaders/RuiSkeletonBase.vue_vue_type_script_setup_true_lang.js +2 -12
- package/dist/components/loaders/RuiSkeletonBase.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/loaders/RuiSkeletonLoader.js.map +1 -1
- package/dist/components/loaders/RuiSkeletonLoader.vue_vue_type_script_setup_true_lang.js +3 -13
- package/dist/components/loaders/RuiSkeletonLoader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/loaders/skeleton-base-styles.d.ts +25 -0
- package/dist/components/loaders/skeleton-base-styles.js +16 -0
- package/dist/components/loaders/skeleton-base-styles.js.map +1 -0
- package/dist/components/loaders/skeleton-loader-styles.d.ts +37 -0
- package/dist/components/loaders/skeleton-loader-styles.js +18 -0
- package/dist/components/loaders/skeleton-loader-styles.js.map +1 -0
- package/dist/components/overlays/badge/RuiBadge.js.map +1 -1
- package/dist/components/overlays/badge/RuiBadge.vue_vue_type_script_setup_true_lang.js +1 -83
- package/dist/components/overlays/badge/RuiBadge.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/overlays/badge/badge-styles.d.ts +193 -0
- package/dist/components/overlays/badge/badge-styles.js +88 -0
- package/dist/components/overlays/badge/badge-styles.js.map +1 -0
- package/dist/components/overlays/dialog/RuiDialog.js.map +1 -1
- package/dist/components/overlays/dialog/RuiDialog.vue_vue_type_script_setup_true_lang.js +3 -14
- package/dist/components/overlays/dialog/RuiDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/overlays/dialog/dialog-styles.d.ts +40 -0
- package/dist/components/overlays/dialog/dialog-styles.js +18 -0
- package/dist/components/overlays/dialog/dialog-styles.js.map +1 -0
- package/dist/components/overlays/menu/RuiMenu.js.map +1 -1
- package/dist/components/overlays/menu/RuiMenu.vue.d.ts +9 -0
- package/dist/components/overlays/menu/RuiMenu.vue_vue_type_script_setup_true_lang.js +113 -58
- package/dist/components/overlays/menu/RuiMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/overlays/menu/menu-styles.d.ts +58 -0
- package/dist/components/overlays/menu/menu-styles.js +25 -0
- package/dist/components/overlays/menu/menu-styles.js.map +1 -0
- package/dist/components/overlays/navigation-drawer/RuiNavigationDrawer.js.map +1 -1
- package/dist/components/overlays/navigation-drawer/RuiNavigationDrawer.vue_vue_type_script_setup_true_lang.js +4 -69
- package/dist/components/overlays/navigation-drawer/RuiNavigationDrawer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/overlays/navigation-drawer/navigation-drawer-styles.d.ts +76 -0
- package/dist/components/overlays/navigation-drawer/navigation-drawer-styles.js +72 -0
- package/dist/components/overlays/navigation-drawer/navigation-drawer-styles.js.map +1 -0
- package/dist/components/overlays/notification/RuiNotification.js.map +1 -1
- package/dist/components/overlays/notification/RuiNotification.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/overlays/notification/RuiNotification.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/overlays/notification/notification-styles.d.ts +1 -0
- package/dist/components/overlays/notification/notification-styles.js +7 -0
- package/dist/components/overlays/notification/notification-styles.js.map +1 -0
- package/dist/components/overlays/tooltip/RuiTooltip.js.map +1 -1
- package/dist/components/overlays/tooltip/RuiTooltip.vue.d.ts +4 -2
- package/dist/components/overlays/tooltip/RuiTooltip.vue_vue_type_script_setup_true_lang.js +42 -25
- package/dist/components/overlays/tooltip/RuiTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/overlays/tooltip/tooltip-styles.d.ts +2 -0
- package/dist/components/overlays/tooltip/tooltip-styles.js +3 -1
- package/dist/components/overlays/tooltip/tooltip-styles.js.map +1 -1
- package/dist/components/progress/RuiProgress.js.map +1 -1
- package/dist/components/progress/RuiProgress.vue_vue_type_script_setup_true_lang.js +1 -133
- package/dist/components/progress/RuiProgress.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/progress/progress-styles.d.ts +181 -0
- package/dist/components/progress/progress-styles.js +139 -0
- package/dist/components/progress/progress-styles.js.map +1 -0
- package/dist/components/steppers/RuiFooterStepper.js.map +1 -1
- package/dist/components/steppers/RuiFooterStepper.vue_vue_type_script_setup_true_lang.js +3 -13
- package/dist/components/steppers/RuiFooterStepper.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/steppers/RuiStepper.js.map +1 -1
- package/dist/components/steppers/RuiStepper.vue_vue_type_script_setup_true_lang.js +4 -94
- package/dist/components/steppers/RuiStepper.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/steppers/RuiStepperIcon.js.map +1 -1
- package/dist/components/steppers/RuiStepperIcon.vue_vue_type_script_setup_true_lang.js +2 -34
- package/dist/components/steppers/RuiStepperIcon.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/steppers/footer-stepper-styles.d.ts +28 -0
- package/dist/components/steppers/footer-stepper-styles.js +16 -0
- package/dist/components/steppers/footer-stepper-styles.js.map +1 -0
- package/dist/components/steppers/stepper-icon-styles.d.ts +60 -0
- package/dist/components/steppers/stepper-icon-styles.js +39 -0
- package/dist/components/steppers/stepper-icon-styles.js.map +1 -0
- package/dist/components/steppers/stepper-styles.d.ts +202 -0
- package/dist/components/steppers/stepper-styles.js +98 -0
- package/dist/components/steppers/stepper-styles.js.map +1 -0
- package/dist/components/tables/RuiTable.js.map +1 -1
- package/dist/components/tables/RuiTable.vue_vue_type_script_setup_true_lang.js +1 -32
- package/dist/components/tables/RuiTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/tables/RuiTableEmptyState.js.map +1 -1
- package/dist/components/tables/RuiTableEmptyState.vue_vue_type_script_setup_true_lang.js +1 -15
- package/dist/components/tables/RuiTableEmptyState.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/tables/RuiTableErrorState.js.map +1 -1
- package/dist/components/tables/RuiTableErrorState.vue_vue_type_script_setup_true_lang.js +2 -5
- package/dist/components/tables/RuiTableErrorState.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/tables/RuiTableHead.js.map +1 -1
- package/dist/components/tables/RuiTableHead.vue_vue_type_script_setup_true_lang.js +1 -34
- package/dist/components/tables/RuiTableHead.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/tables/RuiTableLoadingState.js.map +1 -1
- package/dist/components/tables/RuiTableLoadingState.vue_vue_type_script_setup_true_lang.js +1 -8
- package/dist/components/tables/RuiTableLoadingState.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/tables/RuiTablePagination.js.map +1 -1
- package/dist/components/tables/RuiTablePagination.vue_vue_type_script_setup_true_lang.js +1 -30
- package/dist/components/tables/RuiTablePagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/tables/table-empty-state-styles.d.ts +43 -0
- package/dist/components/tables/table-empty-state-styles.js +20 -0
- package/dist/components/tables/table-empty-state-styles.js.map +1 -0
- package/dist/components/tables/table-error-state-styles.d.ts +36 -0
- package/dist/components/tables/table-error-state-styles.js +15 -0
- package/dist/components/tables/table-error-state-styles.js.map +1 -0
- package/dist/components/tables/table-head-styles.d.ts +91 -0
- package/dist/components/tables/table-head-styles.js +39 -0
- package/dist/components/tables/table-head-styles.js.map +1 -0
- package/dist/components/tables/table-loading-state-styles.d.ts +34 -0
- package/dist/components/tables/table-loading-state-styles.js +13 -0
- package/dist/components/tables/table-loading-state-styles.js.map +1 -0
- package/dist/components/tables/table-pagination-styles.d.ts +82 -0
- package/dist/components/tables/table-pagination-styles.js +35 -0
- package/dist/components/tables/table-pagination-styles.js.map +1 -0
- package/dist/components/tables/table-styles.d.ts +62 -0
- package/dist/components/tables/table-styles.js +37 -0
- package/dist/components/tables/table-styles.js.map +1 -0
- package/dist/components/tabs/tab/RuiTab.js.map +1 -1
- package/dist/components/tabs/tab/RuiTab.vue_vue_type_script_setup_true_lang.js +3 -84
- package/dist/components/tabs/tab/RuiTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/tabs/tab/tab-styles.d.ts +153 -0
- package/dist/components/tabs/tab/tab-styles.js +89 -0
- package/dist/components/tabs/tab/tab-styles.js.map +1 -0
- package/dist/components/tabs/tabs/RuiTabs.js.map +1 -1
- package/dist/components/tabs/tabs/RuiTabs.vue_vue_type_script_setup_true_lang.js +2 -137
- package/dist/components/tabs/tabs/RuiTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/tabs/tabs/tabs-styles.d.ts +168 -0
- package/dist/components/tabs/tabs/tabs-styles.js +142 -0
- package/dist/components/tabs/tabs/tabs-styles.js.map +1 -0
- package/dist/composables/floating.d.ts +3 -1
- package/dist/composables/floating.js +8 -9
- package/dist/composables/floating.js.map +1 -1
- package/dist/icons/icons_1.d.ts +1 -1
- package/dist/icons/icons_1.js +10 -9
- package/dist/icons/icons_1.js.map +1 -1
- package/dist/icons/icons_2.d.ts +1 -1
- package/dist/icons/icons_2.js +9 -11
- package/dist/icons/icons_2.js.map +1 -1
- package/dist/icons/icons_3.d.ts +1 -1
- package/dist/icons/icons_3.js +11 -5
- package/dist/icons/icons_3.js.map +1 -1
- package/dist/icons/icons_4.d.ts +1 -1
- package/dist/icons/icons_4.js +5 -10
- package/dist/icons/icons_4.js.map +1 -1
- package/dist/icons/icons_5.d.ts +1 -0
- package/dist/icons/icons_5.js +10 -1
- package/dist/icons/icons_5.js.map +1 -1
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +7 -6
- package/dist/icons/index.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/utils/form-text-detail.d.ts +2 -0
- package/dist/utils/form-text-detail.js +5 -1
- package/dist/utils/form-text-detail.js.map +1 -1
- package/dist/web-types.json +11 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuiStepper.vue_vue_type_script_setup_true_lang.js","names":["$attrs","_openBlock","_createElementBlock","_mergeProps","_unref","_Fragment","_renderList","_normalizeClass","_createCommentVNode","_createElementVNode","_renderSlot","_createVNode","RuiStepperIcon","_createBlock","RuiProgress","_toDisplayString"],"sources":["../../../src/components/steppers/RuiStepper.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { VueClassValue } from '@/types/class-value';\nimport RuiProgress from '@/components/progress/RuiProgress.vue';\nimport RuiStepperIcon from '@/components/steppers/RuiStepperIcon.vue';\nimport { useKeyboardScroll } from '@/composables/keyboard-scroll';\nimport { StepperOrientation, StepperState, type StepperStep } from '@/types/stepper';\nimport { cn, tv } from '@/utils/tv';\n\nexport interface RuiStepperClassNames {\n root?: VueClassValue;\n title?: VueClassValue;\n subtitle?: VueClassValue;\n}\n\nexport interface Props {\n step?: number;\n steps: StepperStep[];\n iconTop?: boolean;\n custom?: boolean;\n classNames?: RuiStepperClassNames;\n orientation?: StepperOrientation;\n keepActiveVisible?: boolean;\n}\n\ndefineOptions({\n name: 'RuiStepper',\n inheritAttrs: false,\n});\n\nconst {\n step,\n steps,\n iconTop = false,\n custom = false,\n classNames,\n orientation = StepperOrientation.horizontal,\n keepActiveVisible = true,\n} = defineProps<Props>();\n\ndefineSlots<{\n icon?: (props: { state: StepperState | undefined; index: number }) => any;\n}>();\n\nconst wrapperRef = useTemplateRef<HTMLDivElement>('wrapperRef');\nconst scrollTabindex = useKeyboardScroll(wrapperRef);\n\nconst stepper = tv({\n slots: {\n // takes focus only while it overflows (see useKeyboardScroll); the ring sits inside the clip\n root: 'flex no-scrollbar overflow-auto rounded-rui-control outline-hidden focus-visible:focus-ring focus-visible:-outline-offset-2',\n step: 'flex items-center px-6 relative',\n title: '',\n subtitle: '',\n label: 'flex flex-col items-start text-left ml-2',\n // the connector is decoration, so it takes the light divider rather than a control's edge\n divider: 'border-rui-divider',\n },\n variants: {\n orientation: {\n [StepperOrientation.horizontal]: {\n root: 'whitespace-nowrap lg:whitespace-normal',\n step: '',\n divider: 'block max-w-full min-w-4 h-0 max-h-0 self-center -mx-4 my-0 border-t flex-[1_1_0]',\n },\n [StepperOrientation.vertical]: {\n root: 'flex-col inline-flex',\n // 4px in from the edge, so the scrolling root does not clip the active marker's halo\n step: 'px-1 py-3',\n // reaches into both steps' padding, so the line runs from just under one marker to just over the next\n divider: 'block min-h-6 min-w-0 max-h-full h-full self-start -my-3 mx-4 border-l',\n },\n },\n state: {\n // an upcoming step is not disabled, so its text keeps the 4.5:1 of the secondary tone\n [StepperState.inactive]: {\n step: 'text-rui-text-disabled',\n title: 'text-rui-text-secondary',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.active]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.done]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.error]: {\n step: 'text-rui-error',\n title: '',\n subtitle: '',\n },\n [StepperState.warning]: {\n step: 'text-rui-warning',\n title: '',\n subtitle: '',\n },\n [StepperState.info]: {\n step: 'text-rui-info',\n title: '',\n subtitle: '',\n },\n [StepperState.success]: {\n step: 'text-rui-success',\n title: '',\n subtitle: '',\n },\n },\n iconTop: {\n true: {\n step: 'flex-col',\n label: 'ml-0 mt-4 items-center text-center',\n },\n },\n custom: {\n true: {},\n false: {},\n },\n },\n compoundVariants: [\n { custom: true, state: StepperState.inactive, class: { step: 'text-rui-text' } },\n // the line runs through the 32px marker's center\n { orientation: StepperOrientation.vertical, custom: true, class: { divider: 'mx-5' } },\n { orientation: StepperOrientation.vertical, iconTop: true, class: { divider: 'self-center mx-auto' } },\n ],\n defaultVariants: {\n state: StepperState.inactive,\n orientation: StepperOrientation.horizontal,\n custom: false,\n },\n});\n\n// Shared UI for layout props (no per-item state)\nconst ui = computed<ReturnType<typeof stepper>>(() => stepper({ orientation, custom, iconTop }));\n\n/**\n * Resolves the stepper's classes for one step, which vary with the state that\n * step is in, which the shared `ui` above cannot carry because it resolves\n * once for the whole stepper.\n *\n * @param state - the state that step is in\n * @returns the stepper's classes with that state applied\n */\nfunction stepUi(state: StepperState): ReturnType<typeof stepper> {\n return stepper({ orientation, custom, iconTop, state });\n}\n\n// automatically set step state to stepper.\nconst renderedStep = computed<StepperStep[]>(() => {\n if (step === undefined)\n return steps;\n\n return steps.map((item, index) => {\n let stepStatus: StepperState = StepperState.inactive;\n\n if (index + 1 === step)\n stepStatus = StepperState.active;\n\n if (index + 1 < step)\n stepStatus = StepperState.done;\n\n return {\n ...item,\n state: stepStatus,\n };\n });\n});\n\nfunction resolveState(state: StepperState | undefined): StepperState {\n return state ?? StepperState.inactive;\n}\n\nwatch(() => step, () => {\n if (!keepActiveVisible || orientation !== StepperOrientation.horizontal) {\n return;\n }\n\n nextTick(() => {\n const elem = get(wrapperRef);\n if (!elem) {\n return;\n }\n const activeStep = elem.querySelector('[data-active]');\n activeStep?.scrollIntoView?.({\n behavior: 'smooth',\n inline: 'center',\n });\n });\n});\n</script>\n\n<template>\n <div\n ref=\"wrapperRef\"\n :tabindex=\"scrollTabindex\"\n role=\"list\"\n aria-label=\"Progress steps\"\n :class=\"ui.root({ class: cn([classNames?.root, $attrs.class]) })\"\n v-bind=\"{ ...$attrs, class: undefined }\"\n :data-orientation=\"orientation\"\n :data-icon-top=\"iconTop || undefined\"\n :data-custom=\"custom || undefined\"\n >\n <template\n v-for=\"({ title, description, state, loading }, index) in renderedStep\"\n :key=\"index\"\n >\n <!-- a list may hold only its items, so the connector is drawn but kept out of the accessibility tree -->\n <hr\n v-if=\"index > 0\"\n aria-hidden=\"true\"\n :class=\"ui.divider()\"\n />\n <div\n role=\"listitem\"\n :aria-current=\"state === StepperState.active ? 'step' : undefined\"\n :data-state=\"resolveState(state)\"\n :data-active=\"state === StepperState.active || undefined\"\n :class=\"stepUi(resolveState(state)).step()\"\n >\n <slot\n name=\"icon\"\n v-bind=\"{ state, index: index + 1 }\"\n >\n <div class=\"relative flex py-2\">\n <RuiStepperIcon\n :index=\"index + 1\"\n :state=\"state\"\n :size=\"custom ? 'lg' : 'md'\"\n />\n <RuiProgress\n v-if=\"loading\"\n class=\"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2\"\n :size=\"custom ? 40 : 32\"\n variant=\"indeterminate\"\n circular\n thickness=\"2\"\n color=\"primary\"\n />\n </div>\n </slot>\n <div\n v-if=\"title || description\"\n :class=\"ui.label()\"\n data-id=\"stepper-label\"\n >\n <span\n v-if=\"title\"\n :class=\"[stepUi(resolveState(state)).title(), custom && classNames?.title]\"\n class=\"text-subtitle-2\"\n >\n {{ title }}\n </span>\n <span\n v-if=\"description\"\n :class=\"[stepUi(resolveState(state)).subtitle(), custom && classNames?.subtitle]\"\n class=\"text-caption\"\n >\n {{ description }}\n </span>\n </div>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2CA,MAAM,aAAa,eAA+B,YAAY;EAC9D,MAAM,iBAAiB,kBAAkB,UAAU;EAEnD,MAAM,UAAU,GAAG;GACjB,OAAO;IAEL,MAAM;IACN,MAAM;IACN,OAAO;IACP,UAAU;IACV,OAAO;IAEP,SAAS;GACX;GACA,UAAU;IACR,aAAa;MACV,mBAAmB,aAAa;MAC/B,MAAM;MACN,MAAM;MACN,SAAS;KACX;MACC,mBAAmB,WAAW;MAC7B,MAAM;MAEN,MAAM;MAEN,SAAS;KACX;IACF;IACA,OAAO;MAEJ,aAAa,WAAW;MACvB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,SAAS;MACrB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,OAAO;MACnB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,QAAQ;MACpB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,UAAU;MACtB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,OAAO;MACnB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,UAAU;MACtB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;IACF;IACA,SAAS,EACP,MAAM;KACJ,MAAM;KACN,OAAO;IACT,EACF;IACA,QAAQ;KACN,MAAM,CAAC;KACP,OAAO,CAAC;IACV;GACF;GACA,kBAAkB;IAChB;KAAE,QAAQ;KAAM,OAAO,aAAa;KAAU,OAAO,EAAE,MAAM,gBAAgB;IAAE;IAE/E;KAAE,aAAa,mBAAmB;KAAU,QAAQ;KAAM,OAAO,EAA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,CAAA,MAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,CAAA,CAAA,CAAA,GAAA,SAAS,eADjBb,UAAA,GAAAC,mBAmBM,OAAA;;KAjBH,OAAKK,eAAEH,MAAA,EAAA,CAAE,CAAC,MAAK,CAAA;KAChB,WAAQ;IAGA,GAAA,CAAA,SADRH,UAAA,GAAAC,mBAMO,QAAA;;KAJJ,OAAKK,eAAA,CAAA,CAAG,OAAO,aAAa,KAAK,CAAA,CAAA,CAAG,MAAK,GAAI,QAAA,UAAU,QAAA,YAAY,KAAK,GACnE,iBAAiB,CAAA;IAEpB,GAAAQ,gBAAA,KAAK,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,GAGF,eADRd,UAAA,GAAAC,mBAMO,QAAA;;KAJJ,OAAKK,eAAA,CAAA,CAAG,OAAO,aAAa,KAAK,CAAA,CAAA,CAAG,SAAQ,GAAI,QAAA,UAAU,QAAA,YAAY,QAAQ,GACzE,cAAc,CAAA;IAEjB,GAAAQ,gBAAA,WAAW,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,IAAA,UAAA,CAAA,GAAA,EAAA"}
|
|
1
|
+
{"version":3,"file":"RuiStepper.vue_vue_type_script_setup_true_lang.js","names":["$attrs","_openBlock","_createElementBlock","_mergeProps","_unref","_Fragment","_renderList","_normalizeClass","_createCommentVNode","_createElementVNode","_renderSlot","_createVNode","RuiStepperIcon","_createBlock","RuiProgress","_toDisplayString"],"sources":["../../../src/components/steppers/RuiStepper.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { VueClassValue } from '@/types/class-value';\nimport RuiProgress from '@/components/progress/RuiProgress.vue';\nimport RuiStepperIcon from '@/components/steppers/RuiStepperIcon.vue';\nimport { useKeyboardScroll } from '@/composables/keyboard-scroll';\nimport { StepperOrientation, StepperState, type StepperStep } from '@/types/stepper';\nimport { cn } from '@/utils/tv';\nimport { stepperStyles } from './stepper-styles';\n\nexport interface RuiStepperClassNames {\n root?: VueClassValue;\n title?: VueClassValue;\n subtitle?: VueClassValue;\n}\n\nexport interface Props {\n step?: number;\n steps: StepperStep[];\n iconTop?: boolean;\n custom?: boolean;\n classNames?: RuiStepperClassNames;\n orientation?: StepperOrientation;\n keepActiveVisible?: boolean;\n}\n\ndefineOptions({\n name: 'RuiStepper',\n inheritAttrs: false,\n});\n\nconst {\n step,\n steps,\n iconTop = false,\n custom = false,\n classNames,\n orientation = StepperOrientation.horizontal,\n keepActiveVisible = true,\n} = defineProps<Props>();\n\ndefineSlots<{\n icon?: (props: { state: StepperState | undefined; index: number }) => any;\n}>();\n\nconst wrapperRef = useTemplateRef<HTMLDivElement>('wrapperRef');\nconst scrollTabindex = useKeyboardScroll(wrapperRef);\n\n// Shared UI for layout props (no per-item state)\nconst ui = computed<ReturnType<typeof stepperStyles>>(() => stepperStyles({ orientation, custom, iconTop }));\n\n/**\n * Resolves the stepper's classes for one step, which vary with the state that\n * step is in, which the shared `ui` above cannot carry because it resolves\n * once for the whole stepper.\n *\n * @param state - the state that step is in\n * @returns the stepper's classes with that state applied\n */\nfunction stepUi(state: StepperState): ReturnType<typeof stepperStyles> {\n return stepperStyles({ orientation, custom, iconTop, state });\n}\n\n// automatically set step state to stepper.\nconst renderedStep = computed<StepperStep[]>(() => {\n if (step === undefined)\n return steps;\n\n return steps.map((item, index) => {\n let stepStatus: StepperState = StepperState.inactive;\n\n if (index + 1 === step)\n stepStatus = StepperState.active;\n\n if (index + 1 < step)\n stepStatus = StepperState.done;\n\n return {\n ...item,\n state: stepStatus,\n };\n });\n});\n\nfunction resolveState(state: StepperState | undefined): StepperState {\n return state ?? StepperState.inactive;\n}\n\nwatch(() => step, () => {\n if (!keepActiveVisible || orientation !== StepperOrientation.horizontal) {\n return;\n }\n\n nextTick(() => {\n const elem = get(wrapperRef);\n if (!elem) {\n return;\n }\n const activeStep = elem.querySelector('[data-active]');\n activeStep?.scrollIntoView?.({\n behavior: 'smooth',\n inline: 'center',\n });\n });\n});\n</script>\n\n<template>\n <div\n ref=\"wrapperRef\"\n :tabindex=\"scrollTabindex\"\n role=\"list\"\n aria-label=\"Progress steps\"\n :class=\"ui.root({ class: cn([classNames?.root, $attrs.class]) })\"\n v-bind=\"{ ...$attrs, class: undefined }\"\n :data-orientation=\"orientation\"\n :data-icon-top=\"iconTop || undefined\"\n :data-custom=\"custom || undefined\"\n >\n <template\n v-for=\"({ title, description, state, loading }, index) in renderedStep\"\n :key=\"index\"\n >\n <!-- a list may hold only its items, so the connector is drawn but kept out of the accessibility tree -->\n <hr\n v-if=\"index > 0\"\n aria-hidden=\"true\"\n :class=\"ui.divider()\"\n />\n <div\n role=\"listitem\"\n :aria-current=\"state === StepperState.active ? 'step' : undefined\"\n :data-state=\"resolveState(state)\"\n :data-active=\"state === StepperState.active || undefined\"\n :class=\"stepUi(resolveState(state)).step()\"\n >\n <slot\n name=\"icon\"\n v-bind=\"{ state, index: index + 1 }\"\n >\n <div class=\"relative flex py-2\">\n <RuiStepperIcon\n :index=\"index + 1\"\n :state=\"state\"\n :size=\"custom ? 'lg' : 'md'\"\n />\n <RuiProgress\n v-if=\"loading\"\n class=\"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2\"\n :size=\"custom ? 40 : 32\"\n variant=\"indeterminate\"\n circular\n thickness=\"2\"\n color=\"primary\"\n />\n </div>\n </slot>\n <div\n v-if=\"title || description\"\n :class=\"ui.label()\"\n data-id=\"stepper-label\"\n >\n <span\n v-if=\"title\"\n :class=\"[stepUi(resolveState(state)).title(), custom && classNames?.title]\"\n class=\"text-subtitle-2\"\n >\n {{ title }}\n </span>\n <span\n v-if=\"description\"\n :class=\"[stepUi(resolveState(state)).subtitle(), custom && classNames?.subtitle]\"\n class=\"text-caption\"\n >\n {{ description }}\n </span>\n </div>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;KAjBH,OAAKK,eAAEH,MAAA,EAAA,CAAE,CAAC,MAAK,CAAA;KAChB,WAAQ;IAGA,GAAA,CAAA,SADRH,UAAA,GAAAC,mBAMO,QAAA;;KAJJ,OAAKK,eAAA,CAAA,CAAG,OAAO,aAAa,KAAK,CAAA,CAAA,CAAG,MAAK,GAAI,QAAA,UAAU,QAAA,YAAY,KAAK,GACnE,iBAAiB,CAAA;IAEpB,GAAAQ,gBAAA,KAAK,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,GAGF,eADRd,UAAA,GAAAC,mBAMO,QAAA;;KAJJ,OAAKK,eAAA,CAAA,CAAG,OAAO,aAAa,KAAK,CAAA,CAAA,CAAG,SAAQ,GAAI,QAAA,UAAU,QAAA,YAAY,QAAQ,GACzE,cAAc,CAAA;IAEjB,GAAAQ,gBAAA,WAAW,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,IAAA,UAAA,CAAA,GAAA,EAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuiStepperIcon.js","names":["_sfc_main"],"sources":["../../../src/components/steppers/RuiStepperIcon.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RuiIcons } from '@/icons';\nimport RuiIcon from '@/components/icons/RuiIcon.vue';\nimport { StepperState } from '@/types/stepper';\nimport {
|
|
1
|
+
{"version":3,"file":"RuiStepperIcon.js","names":["_sfc_main"],"sources":["../../../src/components/steppers/RuiStepperIcon.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RuiIcons } from '@/icons';\nimport RuiIcon from '@/components/icons/RuiIcon.vue';\nimport { StepperState } from '@/types/stepper';\nimport { stepperIconStyles } from './stepper-icon-styles';\n\nconst { state = StepperState.inactive, index, size = 'md' } = defineProps<{\n state?: StepperState;\n index: number;\n /** md is 24px, the default stepper; lg is 32px, the `custom` one */\n size?: 'md' | 'lg';\n}>();\n\nconst statusIcons: Partial<Record<StepperState, RuiIcons>> = {\n [StepperState.success]: 'lu-circle-check',\n [StepperState.error]: 'lu-circle-alert',\n [StepperState.warning]: 'lu-triangle-alert',\n [StepperState.info]: 'lu-info',\n};\n\nconst statusIcon = computed<RuiIcons | undefined>(() => statusIcons[state]);\n</script>\n\n<template>\n <span :class=\"stepperIconStyles({ size, state, status: !!statusIcon })\">\n <RuiIcon\n v-if=\"state === StepperState.done\"\n name=\"lu-check\"\n />\n <RuiIcon\n v-else-if=\"statusIcon\"\n :name=\"statusIcon\"\n />\n <span v-else>{{ index }}</span>\n </span>\n</template>\n"],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StepperState } from "../../types/stepper.js";
|
|
2
|
-
import { tv } from "../../utils/tv.js";
|
|
3
2
|
import RuiIcon_default from "../icons/RuiIcon.js";
|
|
3
|
+
import { stepperIconStyles } from "./stepper-icon-styles.js";
|
|
4
4
|
import { computed, createBlock, createElementBlock, defineComponent, normalizeClass, openBlock, toDisplayString, unref } from "vue";
|
|
5
5
|
//#region src/components/steppers/RuiStepperIcon.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var _hoisted_1 = { key: 2 };
|
|
@@ -18,41 +18,9 @@ var RuiStepperIcon_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
18
18
|
[StepperState.warning]: "lu-triangle-alert",
|
|
19
19
|
[StepperState.info]: "lu-info"
|
|
20
20
|
};
|
|
21
|
-
/**
|
|
22
|
-
* The step marker: an outlined number ahead, a filled number with a soft halo
|
|
23
|
-
* for the current step, and a tinted, primary-outlined check behind. A status state shows its
|
|
24
|
-
* icon at full size in the step's own color.
|
|
25
|
-
*/
|
|
26
|
-
const stepperIcon = tv({
|
|
27
|
-
base: "inline-flex shrink-0 items-center justify-center rounded-full font-semibold tabular-nums transition-colors",
|
|
28
|
-
variants: {
|
|
29
|
-
size: {
|
|
30
|
-
md: "size-6 text-xs [--rui-icon-size:0.875rem]",
|
|
31
|
-
lg: "size-8 text-sm [--rui-icon-size:1rem]"
|
|
32
|
-
},
|
|
33
|
-
state: {
|
|
34
|
-
[StepperState.inactive]: "border border-rui-outline bg-rui-surface text-rui-text-secondary",
|
|
35
|
-
[StepperState.active]: "bg-rui-primary-fill text-rui-primary-foreground ring-4 ring-rui-primary-soft dark:ring-rui-primary/30",
|
|
36
|
-
[StepperState.done]: "border border-rui-primary bg-rui-primary-soft text-rui-primary dark:border-rui-primary-lighter dark:bg-rui-primary/20 dark:text-rui-primary-lighter",
|
|
37
|
-
[StepperState.error]: "",
|
|
38
|
-
[StepperState.warning]: "",
|
|
39
|
-
[StepperState.info]: "",
|
|
40
|
-
[StepperState.success]: ""
|
|
41
|
-
},
|
|
42
|
-
status: {
|
|
43
|
-
true: "![--rui-icon-size:100%]",
|
|
44
|
-
false: ""
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
defaultVariants: {
|
|
48
|
-
size: "md",
|
|
49
|
-
state: StepperState.inactive,
|
|
50
|
-
status: false
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
21
|
const statusIcon = computed(() => statusIcons[__props.state]);
|
|
54
22
|
return (_ctx, _cache) => {
|
|
55
|
-
return openBlock(), createElementBlock("span", { class: normalizeClass(unref(
|
|
23
|
+
return openBlock(), createElementBlock("span", { class: normalizeClass(unref(stepperIconStyles)({
|
|
56
24
|
size: __props.size,
|
|
57
25
|
state: __props.state,
|
|
58
26
|
status: !!unref(statusIcon)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuiStepperIcon.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_normalizeClass","_unref","_createBlock","RuiIcon","_toDisplayString"],"sources":["../../../src/components/steppers/RuiStepperIcon.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RuiIcons } from '@/icons';\nimport RuiIcon from '@/components/icons/RuiIcon.vue';\nimport { StepperState } from '@/types/stepper';\nimport {
|
|
1
|
+
{"version":3,"file":"RuiStepperIcon.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_normalizeClass","_unref","_createBlock","RuiIcon","_toDisplayString"],"sources":["../../../src/components/steppers/RuiStepperIcon.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RuiIcons } from '@/icons';\nimport RuiIcon from '@/components/icons/RuiIcon.vue';\nimport { StepperState } from '@/types/stepper';\nimport { stepperIconStyles } from './stepper-icon-styles';\n\nconst { state = StepperState.inactive, index, size = 'md' } = defineProps<{\n state?: StepperState;\n index: number;\n /** md is 24px, the default stepper; lg is 32px, the `custom` one */\n size?: 'md' | 'lg';\n}>();\n\nconst statusIcons: Partial<Record<StepperState, RuiIcons>> = {\n [StepperState.success]: 'lu-circle-check',\n [StepperState.error]: 'lu-circle-alert',\n [StepperState.warning]: 'lu-triangle-alert',\n [StepperState.info]: 'lu-info',\n};\n\nconst statusIcon = computed<RuiIcons | undefined>(() => statusIcons[state]);\n</script>\n\n<template>\n <span :class=\"stepperIconStyles({ size, state, status: !!statusIcon })\">\n <RuiIcon\n v-if=\"state === StepperState.done\"\n name=\"lu-check\"\n />\n <RuiIcon\n v-else-if=\"statusIcon\"\n :name=\"statusIcon\"\n />\n <span v-else>{{ index }}</span>\n </span>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAaA,MAAM,cAAuD;IAC1D,aAAa,UAAU;IACvB,aAAa,QAAQ;IACrB,aAAa,UAAU;IACvB,aAAa,OAAO;EACvB;EAEA,MAAM,aAAa,eAAqC,YAAY,QAAA,MAAM;;GAIxE,OAAAA,UAAA,GAAAC,mBAUO,QAAA,EAVA,OAAKC,eAAEC,MAAA,iBAAA,CAAiB,CAAA;IAAA,MAAG,QAAA;IAAI,OAAE,QAAA;IAAK,QAAA,CAAA,CAAYA,MAAA,UAAA;GAAU,CAAA,CAAA,EAAA,GAAA,CAEzD,QAAA,UAAUA,MAAA,YAAA,CAAY,CAAC,QAD/BH,UAAA,GAAAI,YAGEC,iBAAA;;IADA,MAAK;GAGMF,CAAAA,KAAAA,MAAA,UAAA,KADbH,UAAA,GAAAI,YAGEC,iBAAA;;IADC,MAAMF,MAAA,UAAA;GAETH,GAAAA,MAAAA,GAAAA,CAAAA,MAAAA,CAAAA,MAAAA,UAAA,GAAAC,mBAA+B,QAAA,YAAAK,gBAAf,QAAA,KAAK,GAAA,CAAA,EAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const footerStepperStyles: {
|
|
2
|
+
bullet: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
active: {
|
|
4
|
+
true: "w-5 bg-rui-primary hover:bg-rui-primary dark:bg-rui-primary dark:hover:bg-rui-primary";
|
|
5
|
+
};
|
|
6
|
+
}, undefined, string, {
|
|
7
|
+
active: {
|
|
8
|
+
true: "w-5 bg-rui-primary hover:bg-rui-primary dark:bg-rui-primary dark:hover:bg-rui-primary";
|
|
9
|
+
};
|
|
10
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
11
|
+
active: {
|
|
12
|
+
true: "w-5 bg-rui-primary hover:bg-rui-primary dark:bg-rui-primary dark:hover:bg-rui-primary";
|
|
13
|
+
};
|
|
14
|
+
}, undefined>>;
|
|
15
|
+
pill: import("tailwind-variants").TVReturnType<{
|
|
16
|
+
active: {
|
|
17
|
+
true: "bg-rui-primary dark:bg-rui-primary";
|
|
18
|
+
};
|
|
19
|
+
}, undefined, "rounded-full h-1.5 w-full bg-rui-neutral-200 dark:bg-rui-neutral-700 transition-colors", {
|
|
20
|
+
active: {
|
|
21
|
+
true: "bg-rui-primary dark:bg-rui-primary";
|
|
22
|
+
};
|
|
23
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
24
|
+
active: {
|
|
25
|
+
true: "bg-rui-primary dark:bg-rui-primary";
|
|
26
|
+
};
|
|
27
|
+
}, undefined>>;
|
|
28
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { tv } from "../../utils/tv.js";
|
|
2
|
+
//#region src/components/steppers/footer-stepper-styles.ts
|
|
3
|
+
var footerStepperStyles = {
|
|
4
|
+
bullet: tv({
|
|
5
|
+
base: ["h-2 w-2 rounded-full bg-rui-neutral-300 transition-[width,background-color] duration-200 ease-out dark:bg-rui-neutral-600", "hover:bg-rui-neutral-400 dark:hover:bg-rui-neutral-500 focus-visible:focus-ring outline-hidden"].join(" "),
|
|
6
|
+
variants: { active: { true: "w-5 bg-rui-primary hover:bg-rui-primary dark:bg-rui-primary dark:hover:bg-rui-primary" } }
|
|
7
|
+
}),
|
|
8
|
+
pill: tv({
|
|
9
|
+
base: "rounded-full h-1.5 w-full bg-rui-neutral-200 dark:bg-rui-neutral-700 transition-colors",
|
|
10
|
+
variants: { active: { true: "bg-rui-primary dark:bg-rui-primary" } }
|
|
11
|
+
})
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { footerStepperStyles };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=footer-stepper-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer-stepper-styles.js","names":[],"sources":["../../../src/components/steppers/footer-stepper-styles.ts"],"sourcesContent":["import { tv } from '@/utils/tv';\n\nexport const footerStepperStyles = {\n // the current bullet stretches into a short bar, so position reads without relying on color\n bullet: tv({\n base: [\n 'h-2 w-2 rounded-full bg-rui-neutral-300 transition-[width,background-color] duration-200 ease-out dark:bg-rui-neutral-600',\n 'hover:bg-rui-neutral-400 dark:hover:bg-rui-neutral-500 focus-visible:focus-ring outline-hidden',\n ].join(' '),\n variants: {\n active: {\n true: 'w-5 bg-rui-primary hover:bg-rui-primary dark:bg-rui-primary dark:hover:bg-rui-primary',\n },\n },\n }),\n pill: tv({\n base: 'rounded-full h-1.5 w-full bg-rui-neutral-200 dark:bg-rui-neutral-700 transition-colors',\n variants: {\n active: {\n true: 'bg-rui-primary dark:bg-rui-primary',\n },\n },\n }),\n};\n"],"mappings":";;AAEA,IAAa,sBAAsB;CAEjC,QAAQ,GAAG;EACT,MAAM,CACJ,6HACA,gGACF,CAAC,CAAC,KAAK,GAAG;EACV,UAAU,EACR,QAAQ,EACN,MAAM,wFACR,EACF;CACF,CAAC;CACD,MAAM,GAAG;EACP,MAAM;EACN,UAAU,EACR,QAAQ,EACN,MAAM,qCACR,EACF;CACF,CAAC;AACH"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The step marker: an outlined number ahead, a filled number with a soft halo
|
|
3
|
+
* for the current step, and a tinted, primary-outlined check behind. A status state shows its
|
|
4
|
+
* icon at full size in the step's own color.
|
|
5
|
+
*/
|
|
6
|
+
export declare const stepperIconStyles: import("tailwind-variants").TVReturnType<{
|
|
7
|
+
size: {
|
|
8
|
+
md: "size-6 text-xs [--rui-icon-size:0.875rem]";
|
|
9
|
+
lg: "size-8 text-sm [--rui-icon-size:1rem]";
|
|
10
|
+
};
|
|
11
|
+
state: {
|
|
12
|
+
inactive: "border border-rui-outline bg-rui-surface text-rui-text-secondary";
|
|
13
|
+
active: "bg-rui-primary-fill text-rui-primary-foreground ring-4 ring-rui-primary-soft dark:ring-rui-primary/30";
|
|
14
|
+
done: "border border-rui-primary bg-rui-primary-soft text-rui-primary dark:border-rui-primary-lighter dark:bg-rui-primary/20 dark:text-rui-primary-lighter";
|
|
15
|
+
error: "";
|
|
16
|
+
warning: "";
|
|
17
|
+
info: "";
|
|
18
|
+
success: "";
|
|
19
|
+
};
|
|
20
|
+
status: {
|
|
21
|
+
true: "![--rui-icon-size:100%]";
|
|
22
|
+
false: "";
|
|
23
|
+
};
|
|
24
|
+
}, undefined, "inline-flex shrink-0 items-center justify-center rounded-full font-semibold tabular-nums transition-colors", {
|
|
25
|
+
size: {
|
|
26
|
+
md: "size-6 text-xs [--rui-icon-size:0.875rem]";
|
|
27
|
+
lg: "size-8 text-sm [--rui-icon-size:1rem]";
|
|
28
|
+
};
|
|
29
|
+
state: {
|
|
30
|
+
inactive: "border border-rui-outline bg-rui-surface text-rui-text-secondary";
|
|
31
|
+
active: "bg-rui-primary-fill text-rui-primary-foreground ring-4 ring-rui-primary-soft dark:ring-rui-primary/30";
|
|
32
|
+
done: "border border-rui-primary bg-rui-primary-soft text-rui-primary dark:border-rui-primary-lighter dark:bg-rui-primary/20 dark:text-rui-primary-lighter";
|
|
33
|
+
error: "";
|
|
34
|
+
warning: "";
|
|
35
|
+
info: "";
|
|
36
|
+
success: "";
|
|
37
|
+
};
|
|
38
|
+
status: {
|
|
39
|
+
true: "![--rui-icon-size:100%]";
|
|
40
|
+
false: "";
|
|
41
|
+
};
|
|
42
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
43
|
+
size: {
|
|
44
|
+
md: "size-6 text-xs [--rui-icon-size:0.875rem]";
|
|
45
|
+
lg: "size-8 text-sm [--rui-icon-size:1rem]";
|
|
46
|
+
};
|
|
47
|
+
state: {
|
|
48
|
+
inactive: "border border-rui-outline bg-rui-surface text-rui-text-secondary";
|
|
49
|
+
active: "bg-rui-primary-fill text-rui-primary-foreground ring-4 ring-rui-primary-soft dark:ring-rui-primary/30";
|
|
50
|
+
done: "border border-rui-primary bg-rui-primary-soft text-rui-primary dark:border-rui-primary-lighter dark:bg-rui-primary/20 dark:text-rui-primary-lighter";
|
|
51
|
+
error: "";
|
|
52
|
+
warning: "";
|
|
53
|
+
info: "";
|
|
54
|
+
success: "";
|
|
55
|
+
};
|
|
56
|
+
status: {
|
|
57
|
+
true: "![--rui-icon-size:100%]";
|
|
58
|
+
false: "";
|
|
59
|
+
};
|
|
60
|
+
}, undefined>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { StepperState } from "../../types/stepper.js";
|
|
2
|
+
import { tv } from "../../utils/tv.js";
|
|
3
|
+
//#region src/components/steppers/stepper-icon-styles.ts
|
|
4
|
+
/**
|
|
5
|
+
* The step marker: an outlined number ahead, a filled number with a soft halo
|
|
6
|
+
* for the current step, and a tinted, primary-outlined check behind. A status state shows its
|
|
7
|
+
* icon at full size in the step's own color.
|
|
8
|
+
*/
|
|
9
|
+
var stepperIconStyles = tv({
|
|
10
|
+
base: "inline-flex shrink-0 items-center justify-center rounded-full font-semibold tabular-nums transition-colors",
|
|
11
|
+
variants: {
|
|
12
|
+
size: {
|
|
13
|
+
md: "size-6 text-xs [--rui-icon-size:0.875rem]",
|
|
14
|
+
lg: "size-8 text-sm [--rui-icon-size:1rem]"
|
|
15
|
+
},
|
|
16
|
+
state: {
|
|
17
|
+
[StepperState.inactive]: "border border-rui-outline bg-rui-surface text-rui-text-secondary",
|
|
18
|
+
[StepperState.active]: "bg-rui-primary-fill text-rui-primary-foreground ring-4 ring-rui-primary-soft dark:ring-rui-primary/30",
|
|
19
|
+
[StepperState.done]: "border border-rui-primary bg-rui-primary-soft text-rui-primary dark:border-rui-primary-lighter dark:bg-rui-primary/20 dark:text-rui-primary-lighter",
|
|
20
|
+
[StepperState.error]: "",
|
|
21
|
+
[StepperState.warning]: "",
|
|
22
|
+
[StepperState.info]: "",
|
|
23
|
+
[StepperState.success]: ""
|
|
24
|
+
},
|
|
25
|
+
status: {
|
|
26
|
+
true: "![--rui-icon-size:100%]",
|
|
27
|
+
false: ""
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
size: "md",
|
|
32
|
+
state: StepperState.inactive,
|
|
33
|
+
status: false
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
//#endregion
|
|
37
|
+
export { stepperIconStyles };
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=stepper-icon-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepper-icon-styles.js","names":[],"sources":["../../../src/components/steppers/stepper-icon-styles.ts"],"sourcesContent":["import { StepperState } from '@/types/stepper';\nimport { tv } from '@/utils/tv';\n\n/**\n * The step marker: an outlined number ahead, a filled number with a soft halo\n * for the current step, and a tinted, primary-outlined check behind. A status state shows its\n * icon at full size in the step's own color.\n */\nexport const stepperIconStyles = tv({\n base: 'inline-flex shrink-0 items-center justify-center rounded-full font-semibold tabular-nums transition-colors',\n variants: {\n size: {\n md: 'size-6 text-xs [--rui-icon-size:0.875rem]',\n lg: 'size-8 text-sm [--rui-icon-size:1rem]',\n },\n state: {\n [StepperState.inactive]: 'border border-rui-outline bg-rui-surface text-rui-text-secondary',\n // the 10% tint vanishes on a dark page, so dark raises the halo and the done well\n [StepperState.active]: 'bg-rui-primary-fill text-rui-primary-foreground ring-4 ring-rui-primary-soft dark:ring-rui-primary/30',\n // a primary outline over the tint, so done sits between the filled current step and a neutral upcoming one\n [StepperState.done]: 'border border-rui-primary bg-rui-primary-soft text-rui-primary dark:border-rui-primary-lighter dark:bg-rui-primary/20 dark:text-rui-primary-lighter',\n [StepperState.error]: '',\n [StepperState.warning]: '',\n [StepperState.info]: '',\n [StepperState.success]: '',\n },\n status: {\n true: '![--rui-icon-size:100%]',\n false: '',\n },\n },\n defaultVariants: { size: 'md', state: StepperState.inactive, status: false },\n});\n"],"mappings":";;;;;;;;AAQA,IAAa,oBAAoB,GAAG;CAClC,MAAM;CACN,UAAU;EACR,MAAM;GACJ,IAAI;GACJ,IAAI;EACN;EACA,OAAO;IACJ,aAAa,WAAW;IAExB,aAAa,SAAS;IAEtB,aAAa,OAAO;IACpB,aAAa,QAAQ;IACrB,aAAa,UAAU;IACvB,aAAa,OAAO;IACpB,aAAa,UAAU;EAC1B;EACA,QAAQ;GACN,MAAM;GACN,OAAO;EACT;CACF;CACA,iBAAiB;EAAE,MAAM;EAAM,OAAO,aAAa;EAAU,QAAQ;CAAM;AAC7E,CAAC"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
export declare const stepperStyles: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
orientation: {
|
|
3
|
+
horizontal: {
|
|
4
|
+
root: string;
|
|
5
|
+
step: string;
|
|
6
|
+
divider: string;
|
|
7
|
+
};
|
|
8
|
+
vertical: {
|
|
9
|
+
root: string;
|
|
10
|
+
step: string;
|
|
11
|
+
divider: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
state: {
|
|
15
|
+
inactive: {
|
|
16
|
+
step: string;
|
|
17
|
+
title: string;
|
|
18
|
+
subtitle: string;
|
|
19
|
+
};
|
|
20
|
+
active: {
|
|
21
|
+
step: string;
|
|
22
|
+
title: string;
|
|
23
|
+
subtitle: string;
|
|
24
|
+
};
|
|
25
|
+
done: {
|
|
26
|
+
step: string;
|
|
27
|
+
title: string;
|
|
28
|
+
subtitle: string;
|
|
29
|
+
};
|
|
30
|
+
error: {
|
|
31
|
+
step: string;
|
|
32
|
+
title: string;
|
|
33
|
+
subtitle: string;
|
|
34
|
+
};
|
|
35
|
+
warning: {
|
|
36
|
+
step: string;
|
|
37
|
+
title: string;
|
|
38
|
+
subtitle: string;
|
|
39
|
+
};
|
|
40
|
+
info: {
|
|
41
|
+
step: string;
|
|
42
|
+
title: string;
|
|
43
|
+
subtitle: string;
|
|
44
|
+
};
|
|
45
|
+
success: {
|
|
46
|
+
step: string;
|
|
47
|
+
title: string;
|
|
48
|
+
subtitle: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
iconTop: {
|
|
52
|
+
true: {
|
|
53
|
+
step: string;
|
|
54
|
+
label: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
custom: {
|
|
58
|
+
true: {};
|
|
59
|
+
false: {};
|
|
60
|
+
};
|
|
61
|
+
}, {
|
|
62
|
+
root: string;
|
|
63
|
+
step: string;
|
|
64
|
+
title: string;
|
|
65
|
+
subtitle: string;
|
|
66
|
+
label: string;
|
|
67
|
+
divider: string;
|
|
68
|
+
}, undefined, {
|
|
69
|
+
orientation: {
|
|
70
|
+
horizontal: {
|
|
71
|
+
root: string;
|
|
72
|
+
step: string;
|
|
73
|
+
divider: string;
|
|
74
|
+
};
|
|
75
|
+
vertical: {
|
|
76
|
+
root: string;
|
|
77
|
+
step: string;
|
|
78
|
+
divider: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
state: {
|
|
82
|
+
inactive: {
|
|
83
|
+
step: string;
|
|
84
|
+
title: string;
|
|
85
|
+
subtitle: string;
|
|
86
|
+
};
|
|
87
|
+
active: {
|
|
88
|
+
step: string;
|
|
89
|
+
title: string;
|
|
90
|
+
subtitle: string;
|
|
91
|
+
};
|
|
92
|
+
done: {
|
|
93
|
+
step: string;
|
|
94
|
+
title: string;
|
|
95
|
+
subtitle: string;
|
|
96
|
+
};
|
|
97
|
+
error: {
|
|
98
|
+
step: string;
|
|
99
|
+
title: string;
|
|
100
|
+
subtitle: string;
|
|
101
|
+
};
|
|
102
|
+
warning: {
|
|
103
|
+
step: string;
|
|
104
|
+
title: string;
|
|
105
|
+
subtitle: string;
|
|
106
|
+
};
|
|
107
|
+
info: {
|
|
108
|
+
step: string;
|
|
109
|
+
title: string;
|
|
110
|
+
subtitle: string;
|
|
111
|
+
};
|
|
112
|
+
success: {
|
|
113
|
+
step: string;
|
|
114
|
+
title: string;
|
|
115
|
+
subtitle: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
iconTop: {
|
|
119
|
+
true: {
|
|
120
|
+
step: string;
|
|
121
|
+
label: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
custom: {
|
|
125
|
+
true: {};
|
|
126
|
+
false: {};
|
|
127
|
+
};
|
|
128
|
+
}, {
|
|
129
|
+
root: string;
|
|
130
|
+
step: string;
|
|
131
|
+
title: string;
|
|
132
|
+
subtitle: string;
|
|
133
|
+
label: string;
|
|
134
|
+
divider: string;
|
|
135
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
136
|
+
orientation: {
|
|
137
|
+
horizontal: {
|
|
138
|
+
root: string;
|
|
139
|
+
step: string;
|
|
140
|
+
divider: string;
|
|
141
|
+
};
|
|
142
|
+
vertical: {
|
|
143
|
+
root: string;
|
|
144
|
+
step: string;
|
|
145
|
+
divider: string;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
state: {
|
|
149
|
+
inactive: {
|
|
150
|
+
step: string;
|
|
151
|
+
title: string;
|
|
152
|
+
subtitle: string;
|
|
153
|
+
};
|
|
154
|
+
active: {
|
|
155
|
+
step: string;
|
|
156
|
+
title: string;
|
|
157
|
+
subtitle: string;
|
|
158
|
+
};
|
|
159
|
+
done: {
|
|
160
|
+
step: string;
|
|
161
|
+
title: string;
|
|
162
|
+
subtitle: string;
|
|
163
|
+
};
|
|
164
|
+
error: {
|
|
165
|
+
step: string;
|
|
166
|
+
title: string;
|
|
167
|
+
subtitle: string;
|
|
168
|
+
};
|
|
169
|
+
warning: {
|
|
170
|
+
step: string;
|
|
171
|
+
title: string;
|
|
172
|
+
subtitle: string;
|
|
173
|
+
};
|
|
174
|
+
info: {
|
|
175
|
+
step: string;
|
|
176
|
+
title: string;
|
|
177
|
+
subtitle: string;
|
|
178
|
+
};
|
|
179
|
+
success: {
|
|
180
|
+
step: string;
|
|
181
|
+
title: string;
|
|
182
|
+
subtitle: string;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
iconTop: {
|
|
186
|
+
true: {
|
|
187
|
+
step: string;
|
|
188
|
+
label: string;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
custom: {
|
|
192
|
+
true: {};
|
|
193
|
+
false: {};
|
|
194
|
+
};
|
|
195
|
+
}, {
|
|
196
|
+
root: string;
|
|
197
|
+
step: string;
|
|
198
|
+
title: string;
|
|
199
|
+
subtitle: string;
|
|
200
|
+
label: string;
|
|
201
|
+
divider: string;
|
|
202
|
+
}>>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { StepperOrientation, StepperState } from "../../types/stepper.js";
|
|
2
|
+
import { tv } from "../../utils/tv.js";
|
|
3
|
+
//#region src/components/steppers/stepper-styles.ts
|
|
4
|
+
var stepperStyles = tv({
|
|
5
|
+
slots: {
|
|
6
|
+
root: "flex no-scrollbar overflow-auto rounded-rui-control outline-hidden focus-visible:focus-ring focus-visible:-outline-offset-2",
|
|
7
|
+
step: "flex items-center px-6 relative",
|
|
8
|
+
title: "",
|
|
9
|
+
subtitle: "",
|
|
10
|
+
label: "flex flex-col items-start text-left ml-2",
|
|
11
|
+
divider: "border-rui-divider"
|
|
12
|
+
},
|
|
13
|
+
variants: {
|
|
14
|
+
orientation: {
|
|
15
|
+
[StepperOrientation.horizontal]: {
|
|
16
|
+
root: "whitespace-nowrap lg:whitespace-normal",
|
|
17
|
+
step: "",
|
|
18
|
+
divider: "block max-w-full min-w-4 h-0 max-h-0 self-center -mx-4 my-0 border-t flex-[1_1_0]"
|
|
19
|
+
},
|
|
20
|
+
[StepperOrientation.vertical]: {
|
|
21
|
+
root: "flex-col inline-flex",
|
|
22
|
+
step: "px-1 py-3",
|
|
23
|
+
divider: "block min-h-6 min-w-0 max-h-full h-full self-start -my-3 mx-4 border-l"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
state: {
|
|
27
|
+
[StepperState.inactive]: {
|
|
28
|
+
step: "text-rui-text-disabled",
|
|
29
|
+
title: "text-rui-text-secondary",
|
|
30
|
+
subtitle: "text-rui-text-secondary"
|
|
31
|
+
},
|
|
32
|
+
[StepperState.active]: {
|
|
33
|
+
step: "text-rui-text",
|
|
34
|
+
title: "",
|
|
35
|
+
subtitle: "text-rui-text-secondary"
|
|
36
|
+
},
|
|
37
|
+
[StepperState.done]: {
|
|
38
|
+
step: "text-rui-text",
|
|
39
|
+
title: "",
|
|
40
|
+
subtitle: "text-rui-text-secondary"
|
|
41
|
+
},
|
|
42
|
+
[StepperState.error]: {
|
|
43
|
+
step: "text-rui-error",
|
|
44
|
+
title: "",
|
|
45
|
+
subtitle: ""
|
|
46
|
+
},
|
|
47
|
+
[StepperState.warning]: {
|
|
48
|
+
step: "text-rui-warning",
|
|
49
|
+
title: "",
|
|
50
|
+
subtitle: ""
|
|
51
|
+
},
|
|
52
|
+
[StepperState.info]: {
|
|
53
|
+
step: "text-rui-info",
|
|
54
|
+
title: "",
|
|
55
|
+
subtitle: ""
|
|
56
|
+
},
|
|
57
|
+
[StepperState.success]: {
|
|
58
|
+
step: "text-rui-success",
|
|
59
|
+
title: "",
|
|
60
|
+
subtitle: ""
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
iconTop: { true: {
|
|
64
|
+
step: "flex-col",
|
|
65
|
+
label: "ml-0 mt-4 items-center text-center"
|
|
66
|
+
} },
|
|
67
|
+
custom: {
|
|
68
|
+
true: {},
|
|
69
|
+
false: {}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
compoundVariants: [
|
|
73
|
+
{
|
|
74
|
+
custom: true,
|
|
75
|
+
state: StepperState.inactive,
|
|
76
|
+
class: { step: "text-rui-text" }
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
orientation: StepperOrientation.vertical,
|
|
80
|
+
custom: true,
|
|
81
|
+
class: { divider: "mx-5" }
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
orientation: StepperOrientation.vertical,
|
|
85
|
+
iconTop: true,
|
|
86
|
+
class: { divider: "self-center mx-auto" }
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
defaultVariants: {
|
|
90
|
+
state: StepperState.inactive,
|
|
91
|
+
orientation: StepperOrientation.horizontal,
|
|
92
|
+
custom: false
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
//#endregion
|
|
96
|
+
export { stepperStyles };
|
|
97
|
+
|
|
98
|
+
//# sourceMappingURL=stepper-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepper-styles.js","names":[],"sources":["../../../src/components/steppers/stepper-styles.ts"],"sourcesContent":["import { StepperOrientation, StepperState } from '@/types/stepper';\nimport { tv } from '@/utils/tv';\n\nexport const stepperStyles = tv({\n slots: {\n // takes focus only while it overflows (see useKeyboardScroll); the ring sits inside the clip\n root: 'flex no-scrollbar overflow-auto rounded-rui-control outline-hidden focus-visible:focus-ring focus-visible:-outline-offset-2',\n step: 'flex items-center px-6 relative',\n title: '',\n subtitle: '',\n label: 'flex flex-col items-start text-left ml-2',\n // the connector is decoration, so it takes the light divider rather than a control's edge\n divider: 'border-rui-divider',\n },\n variants: {\n orientation: {\n [StepperOrientation.horizontal]: {\n root: 'whitespace-nowrap lg:whitespace-normal',\n step: '',\n divider: 'block max-w-full min-w-4 h-0 max-h-0 self-center -mx-4 my-0 border-t flex-[1_1_0]',\n },\n [StepperOrientation.vertical]: {\n root: 'flex-col inline-flex',\n // 4px in from the edge, so the scrolling root does not clip the active marker's halo\n step: 'px-1 py-3',\n // reaches into both steps' padding, so the line runs from just under one marker to just over the next\n divider: 'block min-h-6 min-w-0 max-h-full h-full self-start -my-3 mx-4 border-l',\n },\n },\n state: {\n // an upcoming step is not disabled, so its text keeps the 4.5:1 of the secondary tone\n [StepperState.inactive]: {\n step: 'text-rui-text-disabled',\n title: 'text-rui-text-secondary',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.active]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.done]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.error]: {\n step: 'text-rui-error',\n title: '',\n subtitle: '',\n },\n [StepperState.warning]: {\n step: 'text-rui-warning',\n title: '',\n subtitle: '',\n },\n [StepperState.info]: {\n step: 'text-rui-info',\n title: '',\n subtitle: '',\n },\n [StepperState.success]: {\n step: 'text-rui-success',\n title: '',\n subtitle: '',\n },\n },\n iconTop: {\n true: {\n step: 'flex-col',\n label: 'ml-0 mt-4 items-center text-center',\n },\n },\n custom: {\n true: {},\n false: {},\n },\n },\n compoundVariants: [\n { custom: true, state: StepperState.inactive, class: { step: 'text-rui-text' } },\n // the line runs through the 32px marker's center\n { orientation: StepperOrientation.vertical, custom: true, class: { divider: 'mx-5' } },\n { orientation: StepperOrientation.vertical, iconTop: true, class: { divider: 'self-center mx-auto' } },\n ],\n defaultVariants: {\n state: StepperState.inactive,\n orientation: StepperOrientation.horizontal,\n custom: false,\n },\n});\n"],"mappings":";;;AAGA,IAAa,gBAAgB,GAAG;CAC9B,OAAO;EAEL,MAAM;EACN,MAAM;EACN,OAAO;EACP,UAAU;EACV,OAAO;EAEP,SAAS;CACX;CACA,UAAU;EACR,aAAa;IACV,mBAAmB,aAAa;IAC/B,MAAM;IACN,MAAM;IACN,SAAS;GACX;IACC,mBAAmB,WAAW;IAC7B,MAAM;IAEN,MAAM;IAEN,SAAS;GACX;EACF;EACA,OAAO;IAEJ,aAAa,WAAW;IACvB,MAAM;IACN,OAAO;IACP,UAAU;GACZ;IACC,aAAa,SAAS;IACrB,MAAM;IACN,OAAO;IACP,UAAU;GACZ;IACC,aAAa,OAAO;IACnB,MAAM;IACN,OAAO;IACP,UAAU;GACZ;IACC,aAAa,QAAQ;IACpB,MAAM;IACN,OAAO;IACP,UAAU;GACZ;IACC,aAAa,UAAU;IACtB,MAAM;IACN,OAAO;IACP,UAAU;GACZ;IACC,aAAa,OAAO;IACnB,MAAM;IACN,OAAO;IACP,UAAU;GACZ;IACC,aAAa,UAAU;IACtB,MAAM;IACN,OAAO;IACP,UAAU;GACZ;EACF;EACA,SAAS,EACP,MAAM;GACJ,MAAM;GACN,OAAO;EACT,EACF;EACA,QAAQ;GACN,MAAM,CAAC;GACP,OAAO,CAAC;EACV;CACF;CACA,kBAAkB;EAChB;GAAE,QAAQ;GAAM,OAAO,aAAa;GAAU,OAAO,EAAE,MAAM,gBAAgB;EAAE;EAE/E;GAAE,aAAa,mBAAmB;GAAU,QAAQ;GAAM,OAAO,EAAE,SAAS,OAAO;EAAE;EACrF;GAAE,aAAa,mBAAmB;GAAU,SAAS;GAAM,OAAO,EAAE,SAAS,sBAAsB;EAAE;CACvG;CACA,iBAAiB;EACf,OAAO,aAAa;EACpB,aAAa,mBAAmB;EAChC,QAAQ;CACV;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuiTable.js","names":["_sfc_main"],"sources":["../../../src/components/tables/RuiTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from 'vue';\nimport RuiTableEmptyState from '@/components/tables/RuiTableEmptyState.vue';\nimport RuiTableErrorState from '@/components/tables/RuiTableErrorState.vue';\nimport RuiTableLoadingState from '@/components/tables/RuiTableLoadingState.vue';\nimport {
|
|
1
|
+
{"version":3,"file":"RuiTable.js","names":["_sfc_main"],"sources":["../../../src/components/tables/RuiTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from 'vue';\nimport RuiTableEmptyState from '@/components/tables/RuiTableEmptyState.vue';\nimport RuiTableErrorState from '@/components/tables/RuiTableErrorState.vue';\nimport RuiTableLoadingState from '@/components/tables/RuiTableLoadingState.vue';\nimport { tableStyles } from './table-styles';\n\nexport interface TableEmpty {\n label?: string;\n description?: string;\n}\n\nexport interface Props {\n variant?: 'default' | 'outlined';\n dense?: boolean;\n /** Shows a spinner under the header while a read is in flight. */\n loading?: boolean;\n /** Why the last read failed, which takes precedence over `empty`. */\n error?: string;\n /** Heading for that failure. */\n errorTitle?: string;\n /** Label for the retry control; without one, no control is offered. */\n retryText?: string;\n /**\n * Says the table is knowingly empty. A table whose rows simply have not\n * arrived should stay `loading` instead, so the two never read alike.\n */\n empty?: TableEmpty | boolean;\n}\n\ndefineOptions({\n name: 'RuiTable',\n inheritAttrs: false,\n});\n\nconst {\n variant = 'outlined',\n dense = false,\n loading = false,\n error = '',\n errorTitle = '',\n retryText = '',\n empty = false,\n} = defineProps<Props>();\n\nconst emit = defineEmits<{\n retry: [];\n}>();\n\ndefineSlots<{\n default: () => any;\n loading?: () => any;\n error?: () => any;\n empty?: () => any;\n}>();\n\n/**\n * The three states are mutually exclusive, and a failed read outranks an empty\n * one: rows that did not arrive are not rows that are not there.\n */\nconst state = computed<'loading' | 'error' | 'empty' | undefined>(() => {\n if (loading)\n return 'loading';\n\n if (error)\n return 'error';\n\n if (empty)\n return 'empty';\n\n return undefined;\n});\n\nconst emptyProps = computed<TableEmpty>(() => (typeof empty === 'object' ? empty : {}));\n\nconst ui = computed<ReturnType<typeof tableStyles>>(() => tableStyles({ dense, variant }));\n</script>\n\n<template>\n <div\n :class=\"ui.root()\"\n v-bind=\"$attrs\"\n >\n <table :class=\"ui.table()\">\n <slot />\n </table>\n\n <slot\n v-if=\"state === 'loading'\"\n name=\"loading\"\n >\n <RuiTableLoadingState compact />\n </slot>\n\n <slot\n v-else-if=\"state === 'error'\"\n name=\"error\"\n >\n <RuiTableErrorState\n :action-text=\"retryText\"\n :message=\"error\"\n :title=\"errorTitle\"\n @action=\"emit('retry')\"\n />\n </slot>\n\n <slot\n v-else-if=\"state === 'empty'\"\n name=\"empty\"\n >\n <RuiTableEmptyState\n compact\n :description=\"emptyProps.description\"\n :label=\"emptyProps.label\"\n />\n </slot>\n </div>\n</template>\n"],"mappings":""}
|