@yamatozhen/design_system 1.3.1 → 1.3.5
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/README.md +31 -95
- package/dist/components/(buttons)/button/Button.js +1 -0
- package/dist/components/(buttons)/button/Button.styles.css +1 -0
- package/dist/components/(buttons)/button/Button.styles.js +2 -0
- package/dist/components/(buttons)/button/index.js +1 -0
- package/dist/components/(buttons)/buttonGroup/ButtonGroup.js +1 -0
- package/dist/components/(buttons)/buttonGroup/ButtonGroup.styles.css +1 -0
- package/dist/components/(buttons)/buttonGroup/ButtonGroup.styles.js +2 -0
- package/dist/components/(buttons)/buttonGroup/index.js +1 -0
- package/dist/components/(buttons)/buttonSplit/ButtonSplit.js +1 -0
- package/dist/components/(buttons)/buttonSplit/ButtonSplit.styles.css +1 -0
- package/dist/components/(buttons)/buttonSplit/ButtonSplit.styles.js +2 -0
- package/dist/components/(buttons)/buttonSplit/index.js +1 -0
- package/dist/components/(buttons)/fab/Fab.js +1 -0
- package/dist/components/(buttons)/fab/Fab.styles.css +1 -0
- package/dist/components/(buttons)/fab/Fab.styles.js +2 -0
- package/dist/components/(buttons)/fab/index.js +1 -0
- package/dist/components/(buttons)/shared/warnOnce.js +1 -0
- package/dist/components/(buttons)/toggleButton/ButtonToggle.js +1 -0
- package/dist/components/(buttons)/toggleButton/ButtonToggle.styles.css +1 -0
- package/dist/components/(buttons)/toggleButton/ButtonToggle.styles.js +2 -0
- package/dist/components/(buttons)/toggleButton/index.js +1 -0
- package/dist/components/(color)/colorArea/ColorArea.js +1 -0
- package/dist/components/(color)/colorArea/ColorArea.styles.css +1 -0
- package/dist/components/(color)/colorArea/ColorArea.styles.js +2 -0
- package/dist/components/(color)/colorArea/index.js +1 -0
- package/dist/components/(color)/colorField/ColorField.js +1 -0
- package/dist/components/(color)/colorField/ColorField.styles.css +1 -0
- package/dist/components/(color)/colorField/ColorField.styles.js +2 -0
- package/dist/components/(color)/colorField/index.js +1 -0
- package/dist/components/(color)/colorPicker/ColorPicker.js +1 -0
- package/dist/components/(color)/colorPicker/ColorPicker.styles.css +1 -0
- package/dist/components/(color)/colorPicker/ColorPicker.styles.js +2 -0
- package/dist/components/(color)/colorPicker/index.js +1 -0
- package/dist/components/(color)/colorSlider/ColorSlider.js +1 -0
- package/dist/components/(color)/colorSlider/ColorSlider.styles.css +1 -0
- package/dist/components/(color)/colorSlider/ColorSlider.styles.js +2 -0
- package/dist/components/(color)/colorSlider/index.js +1 -0
- package/dist/components/(color)/colorSwatch/ColorSwatch.js +1 -0
- package/dist/components/(color)/colorSwatch/ColorSwatch.styles.css +1 -0
- package/dist/components/(color)/colorSwatch/ColorSwatch.styles.js +2 -0
- package/dist/components/(color)/colorSwatch/index.js +1 -0
- package/dist/components/(color)/colorSwatchPicker/ColorSwatchPicker.js +1 -0
- package/dist/components/(color)/colorSwatchPicker/ColorSwatchPicker.styles.css +1 -0
- package/dist/components/(color)/colorSwatchPicker/ColorSwatchPicker.styles.js +2 -0
- package/dist/components/(color)/colorSwatchPicker/index.js +1 -0
- package/dist/components/(color)/shared/colorUtils.js +1 -0
- package/dist/components/(color)/shared/thumb.styles.css +1 -0
- package/dist/components/(color)/shared/thumb.styles.js +2 -0
- package/dist/components/(color)/shared/useColor.js +1 -0
- package/dist/components/(color)/shared/useDrag2D.js +1 -0
- package/dist/components/(datetime)/calendar/Calendar.js +1 -0
- package/dist/components/(datetime)/calendar/Calendar.styles.css +1 -0
- package/dist/components/(datetime)/calendar/Calendar.styles.js +2 -0
- package/dist/components/(datetime)/dateField/DateField.js +1 -0
- package/dist/components/(datetime)/dateField/DateField.styles.css +1 -0
- package/dist/components/(datetime)/dateField/DateField.styles.js +2 -0
- package/dist/components/(datetime)/datePicker/DatePicker.js +1 -0
- package/dist/components/(datetime)/dateRangePicker/DateRangePicker.js +1 -0
- package/dist/components/(datetime)/rangeCalendar/RangeCalendar.js +1 -0
- package/dist/components/(datetime)/rangeCalendar/RangeCalendar.styles.css +1 -0
- package/dist/components/(datetime)/rangeCalendar/RangeCalendar.styles.js +2 -0
- package/dist/components/(datetime)/shared/CalendarFrame.js +1 -0
- package/dist/components/(datetime)/shared/PickerShell.js +1 -0
- package/dist/components/(datetime)/shared/PickerShell.styles.css +1 -0
- package/dist/components/(datetime)/shared/PickerShell.styles.js +2 -0
- package/dist/components/(datetime)/shared/dateUtils.js +1 -0
- package/dist/components/(datetime)/shared/useCalendarGrid.js +1 -0
- package/dist/components/(datetime)/timeField/TimeField.js +1 -0
- package/dist/components/(datetime)/timeField/TimeField.styles.css +1 -0
- package/dist/components/(datetime)/timeField/TimeField.styles.js +2 -0
- package/dist/components/(effects)/customScrollbar/CustomScrollbar.js +1 -0
- package/dist/components/(effects)/progressiveBlur/ProgressiveBlur.js +5 -0
- package/dist/components/(effects)/ripple/Ripple.js +1 -0
- package/dist/components/(effects)/ripple/Ripple.styles.css +1 -0
- package/dist/components/(effects)/ripple/Ripple.styles.js +2 -0
- package/dist/components/(effects)/scrollShadow/ScrollShadow.js +1 -0
- package/dist/components/(effects)/scrollShadow/ScrollShadow.styles.css +1 -0
- package/dist/components/(effects)/scrollShadow/ScrollShadow.styles.js +2 -0
- package/dist/components/(effects)/scrollShadow/useScrollShadow.js +1 -0
- package/dist/components/(effects)/shape/Shape.js +1 -0
- package/dist/components/(effects)/shape/Shape.styles.css +1 -0
- package/dist/components/(effects)/shape/Shape.styles.js +2 -0
- package/dist/components/(effects)/shape/ShapePaths.js +1 -0
- package/dist/components/(effects)/shape/shapeGeometry.js +1 -0
- package/dist/components/(effects)/shape/shapeTicker.js +1 -0
- package/dist/components/(effects)/shape/springCurves.js +1 -0
- package/dist/components/(effects)/sinewave/Sinewave.js +1 -0
- package/dist/components/(feedback)/circularProgress/CircularProgress.js +1 -0
- package/dist/components/(feedback)/linearProgress/LinearProgress.js +1 -0
- package/dist/components/(feedback)/meter/Meter.js +1 -0
- package/dist/components/(feedback)/shared/progress.js +1 -0
- package/dist/components/(feedback)/sinewaveProgress/SinewaveProgress.js +1 -0
- package/dist/components/(feedback)/skeleton/Skeleton.js +1 -0
- package/dist/components/(feedback)/skeleton/Skeleton.styles.css +1 -0
- package/dist/components/(feedback)/skeleton/Skeleton.styles.js +2 -0
- package/dist/components/(feedback)/skeleton/index.js +1 -0
- package/dist/components/(feedback)/spinner/Spinner.js +1 -0
- package/dist/components/(feedback)/spinner/Spinner.styles.css +1 -0
- package/dist/components/(feedback)/spinner/Spinner.styles.js +2 -0
- package/dist/components/(forms)/checkbox/Checkbox.js +1 -0
- package/dist/components/(forms)/checkbox/Checkbox.styles.css +1 -0
- package/dist/components/(forms)/checkbox/Checkbox.styles.js +2 -0
- package/dist/components/(forms)/checkboxGroup/CheckboxGroup.js +1 -0
- package/dist/components/(forms)/checkboxGroup/CheckboxGroup.styles.css +1 -0
- package/dist/components/(forms)/checkboxGroup/CheckboxGroup.styles.js +2 -0
- package/dist/components/(forms)/fieldset/Fieldset.js +1 -0
- package/dist/components/(forms)/fieldset/Fieldset.styles.css +1 -0
- package/dist/components/(forms)/fieldset/Fieldset.styles.js +2 -0
- package/dist/components/(forms)/fieldset/index.js +1 -0
- package/dist/components/(forms)/fileUpload/FileUpload.js +1 -0
- package/dist/components/(forms)/fileUpload/FileUpload.styles.css +1 -0
- package/dist/components/(forms)/fileUpload/FileUpload.styles.js +2 -0
- package/dist/components/(forms)/fileUpload/index.js +1 -0
- package/dist/components/(forms)/fileUpload/validate.js +1 -0
- package/dist/components/(forms)/form/Form.js +1 -0
- package/dist/components/(forms)/form/Form.styles.css +1 -0
- package/dist/components/(forms)/form/Form.styles.js +2 -0
- package/dist/components/(forms)/form/index.js +1 -0
- package/dist/components/(forms)/input/Input.js +1 -0
- package/dist/components/(forms)/input/Input.styles.css +1 -0
- package/dist/components/(forms)/input/Input.styles.js +2 -0
- package/dist/components/(forms)/inputOtp/InputOtp.js +1 -0
- package/dist/components/(forms)/inputOtp/InputOtp.styles.css +1 -0
- package/dist/components/(forms)/inputOtp/InputOtp.styles.js +2 -0
- package/dist/components/(forms)/numberField/NumberField.js +1 -0
- package/dist/components/(forms)/numberField/NumberField.styles.css +1 -0
- package/dist/components/(forms)/numberField/NumberField.styles.js +2 -0
- package/dist/components/(forms)/numberField/index.js +1 -0
- package/dist/components/(forms)/radio/Radio.js +1 -0
- package/dist/components/(forms)/radio/Radio.styles.css +1 -0
- package/dist/components/(forms)/radio/Radio.styles.js +2 -0
- package/dist/components/(forms)/radioGroup/RadioGroup.js +1 -0
- package/dist/components/(forms)/radioGroup/RadioGroup.styles.css +1 -0
- package/dist/components/(forms)/radioGroup/RadioGroup.styles.js +2 -0
- package/dist/components/(forms)/search/Search.js +1 -0
- package/dist/components/(forms)/search/Search.styles.css +1 -0
- package/dist/components/(forms)/search/Search.styles.js +2 -0
- package/dist/components/(forms)/search/index.js +1 -0
- package/dist/components/(forms)/shared/FieldAdornment.js +1 -0
- package/dist/components/(forms)/shared/FieldAdornment.styles.css +1 -0
- package/dist/components/(forms)/shared/FieldAdornment.styles.js +2 -0
- package/dist/components/(forms)/shared/FieldShell.js +1 -0
- package/dist/components/(forms)/shared/FieldShell.styles.css +1 -0
- package/dist/components/(forms)/shared/FieldShell.styles.js +2 -0
- package/dist/components/(forms)/shared/field.styles.css +1 -0
- package/dist/components/(forms)/shared/field.styles.js +2 -0
- package/dist/components/(forms)/shared/fieldContext.js +1 -0
- package/dist/components/(forms)/shared/icons.js +1 -0
- package/dist/components/(forms)/slider/Slider.js +1 -0
- package/dist/components/(forms)/slider/Slider.styles.css +1 -0
- package/dist/components/(forms)/slider/Slider.styles.js +2 -0
- package/dist/components/(forms)/switch/Switch.js +1 -0
- package/dist/components/(forms)/switch/Switch.styles.css +1 -0
- package/dist/components/(forms)/switch/Switch.styles.js +2 -0
- package/dist/components/(forms)/textArea/TextArea.js +1 -0
- package/dist/components/(layout)/accordion/Accordion.js +1 -0
- package/dist/components/(layout)/accordion/Accordion.styles.css +1 -0
- package/dist/components/(layout)/accordion/Accordion.styles.js +2 -0
- package/dist/components/(layout)/card/Card.js +1 -0
- package/dist/components/(layout)/card/Card.styles.css +1 -0
- package/dist/components/(layout)/card/Card.styles.js +2 -0
- package/dist/components/(layout)/codeSnippet/CodeSnippet.js +2 -0
- package/dist/components/(layout)/codeSnippet/CodeSnippet.styles.css +1 -0
- package/dist/components/(layout)/codeSnippet/CodeSnippet.styles.js +2 -0
- package/dist/components/(layout)/codeSnippet/CodeTheme.styles.css +1 -0
- package/dist/components/(layout)/codeSnippet/CodeTheme.styles.js +2 -0
- package/dist/components/(layout)/codeSnippet/index.js +1 -0
- package/dist/components/(layout)/grid/Grid.js +1 -0
- package/dist/components/(layout)/grid/Grid.styles.css +1 -0
- package/dist/components/(layout)/grid/Grid.styles.js +2 -0
- package/dist/components/(layout)/grid/index.js +1 -0
- package/dist/components/(layout)/list/List.js +1 -0
- package/dist/components/(layout)/list/List.styles.css +1 -0
- package/dist/components/(layout)/list/List.styles.js +2 -0
- package/dist/components/(layout)/list/index.js +1 -0
- package/dist/components/(layout)/section/Section.js +1 -0
- package/dist/components/(layout)/section/Section.styles.css +1 -0
- package/dist/components/(layout)/section/Section.styles.js +2 -0
- package/dist/components/(layout)/section/index.js +1 -0
- package/dist/components/(layout)/table/Table.js +1 -0
- package/dist/components/(layout)/table/Table.styles.css +1 -0
- package/dist/components/(layout)/table/Table.styles.js +2 -0
- package/dist/components/(layout)/table/index.js +1 -0
- package/dist/components/(navigation)/breadcrumbs/Breadcrumbs.js +1 -0
- package/dist/components/(navigation)/breadcrumbs/Breadcrumbs.styles.css +1 -0
- package/dist/components/(navigation)/breadcrumbs/Breadcrumbs.styles.js +2 -0
- package/dist/components/(navigation)/breadcrumbs/index.js +1 -0
- package/dist/components/(navigation)/nav/Nav.js +1 -0
- package/dist/components/(navigation)/nav/Nav.styles.css +1 -0
- package/dist/components/(navigation)/nav/Nav.styles.js +2 -0
- package/dist/components/(navigation)/nav/NavContext.js +1 -0
- package/dist/components/(navigation)/nav/navAppBar/NavAppBar.js +1 -0
- package/dist/components/(navigation)/nav/navAppBar/NavAppBar.styles.css +1 -0
- package/dist/components/(navigation)/nav/navAppBar/NavAppBar.styles.js +2 -0
- package/dist/components/(navigation)/nav/navBar/NavBar.js +1 -0
- package/dist/components/(navigation)/nav/navBar/NavBar.styles.css +1 -0
- package/dist/components/(navigation)/nav/navBar/NavBar.styles.js +2 -0
- package/dist/components/(navigation)/nav/navDrawer/NavDrawer.js +1 -0
- package/dist/components/(navigation)/nav/navDrawer/NavDrawer.styles.css +1 -0
- package/dist/components/(navigation)/nav/navDrawer/NavDrawer.styles.js +2 -0
- package/dist/components/(navigation)/nav/navHooks.js +1 -0
- package/dist/components/(navigation)/nav/navMenu/NavMenu.js +1 -0
- package/dist/components/(navigation)/nav/navRail/NavRail.js +1 -0
- package/dist/components/(navigation)/nav/navRail/NavRail.styles.css +1 -0
- package/dist/components/(navigation)/nav/navRail/NavRail.styles.js +2 -0
- package/dist/components/(navigation)/pagination/Pagination.js +1 -0
- package/dist/components/(navigation)/pagination/Pagination.styles.css +1 -0
- package/dist/components/(navigation)/pagination/Pagination.styles.js +2 -0
- package/dist/components/(navigation)/pagination/index.js +1 -0
- package/dist/components/(overlays)/drawer/Drawer.js +1 -0
- package/dist/components/(overlays)/drawer/Drawer.styles.css +1 -0
- package/dist/components/(overlays)/drawer/Drawer.styles.js +2 -0
- package/dist/components/(overlays)/drawer/index.js +1 -0
- package/dist/components/(overlays)/drop/Drop.js +1 -0
- package/dist/components/(overlays)/drop/Drop.styles.css +1 -0
- package/dist/components/(overlays)/drop/Drop.styles.js +2 -0
- package/dist/components/(overlays)/drop/index.js +1 -0
- package/dist/components/(overlays)/modal/Modal.js +1 -0
- package/dist/components/(overlays)/modal/Modal.styles.css +1 -0
- package/dist/components/(overlays)/modal/Modal.styles.js +2 -0
- package/dist/components/(overlays)/modal/index.js +1 -0
- package/dist/components/(overlays)/popover/Popover.js +1 -0
- package/dist/components/(overlays)/popover/Popover.styles.css +1 -0
- package/dist/components/(overlays)/popover/Popover.styles.js +2 -0
- package/dist/components/(overlays)/popover/index.js +1 -0
- package/dist/components/(overlays)/toast/Toast.js +1 -0
- package/dist/components/(overlays)/toast/Toast.styles.css +1 -0
- package/dist/components/(overlays)/toast/Toast.styles.js +2 -0
- package/dist/components/(overlays)/toast/index.js +1 -0
- package/dist/components/(pickers)/comboBox/ComboBox.js +1 -0
- package/dist/components/(pickers)/comboBox/index.js +1 -0
- package/dist/components/(pickers)/select/Select.js +1 -0
- package/dist/components/(pickers)/select/index.js +1 -0
- package/dist/components/(pickers)/shared/Picker.styles.css +1 -0
- package/dist/components/(pickers)/shared/Picker.styles.js +2 -0
- package/dist/components/(primitives)/avatar/Avatar.js +1 -0
- package/dist/components/(primitives)/avatar/Avatar.styles.css +1 -0
- package/dist/components/(primitives)/avatar/Avatar.styles.js +2 -0
- package/dist/components/(primitives)/avatar/index.js +1 -0
- package/dist/components/(primitives)/badge/Badge.js +1 -0
- package/dist/components/(primitives)/badge/Badge.styles.css +1 -0
- package/dist/components/(primitives)/badge/Badge.styles.js +2 -0
- package/dist/components/(primitives)/badge/index.js +1 -0
- package/dist/components/(primitives)/code/Code.js +1 -0
- package/dist/components/(primitives)/code/Code.styles.css +1 -0
- package/dist/components/(primitives)/code/Code.styles.js +2 -0
- package/dist/components/(primitives)/code/index.js +1 -0
- package/dist/components/(primitives)/comment/Comment.js +1 -0
- package/dist/components/(primitives)/comment/Comment.styles.css +1 -0
- package/dist/components/(primitives)/comment/Comment.styles.js +2 -0
- package/dist/components/(primitives)/icon/Icon.js +1 -0
- package/dist/components/(primitives)/kbd/Kbd.js +1 -0
- package/dist/components/(primitives)/kbd/Kbd.styles.css +1 -0
- package/dist/components/(primitives)/kbd/Kbd.styles.js +2 -0
- package/dist/components/(primitives)/kbd/index.js +1 -0
- package/dist/components/(primitives)/label/Label.js +1 -0
- package/dist/components/(primitives)/separator/Separator.js +1 -0
- package/dist/components/(primitives)/separator/Separator.styles.css +1 -0
- package/dist/components/(primitives)/separator/Separator.styles.js +2 -0
- package/dist/components/(primitives)/separator/index.js +1 -0
- package/dist/hooks/useBodyScrollLock.js +1 -0
- package/dist/hooks/useImageColor.js +1 -0
- package/dist/hooks/useNavSheetDrag.js +1 -0
- package/dist/lib/colorRoles.js +1 -0
- package/dist/lib/cx.js +1 -0
- package/dist/lib/easing.js +1 -0
- package/dist/lib/overlay.js +1 -0
- package/dist/lib/refs.js +1 -0
- package/dist/lib/types.js +0 -0
- package/dist/package.exports.json +398 -0
- package/dist/providers/MobileViewProvider.js +1 -0
- package/dist/providers/ReduceMotionProvider.js +1 -0
- package/dist/themes/fonts/outfit-300.woff2 +0 -0
- package/dist/themes/fonts/outfit-400.woff2 +0 -0
- package/dist/themes/fonts/outfit-500.woff2 +0 -0
- package/dist/themes/fonts/outfit-600.woff2 +0 -0
- package/dist/themes/fonts/outfit-700.woff2 +0 -0
- package/dist/themes/fonts/outfit-800.woff2 +0 -0
- package/dist/themes/theme.css +506 -0
- package/dist/themes/yz-palette-dark-hc.css +41 -0
- package/dist/themes/yz-palette-dark-mc.css +41 -0
- package/dist/themes/yz-palette-dark.css +41 -0
- package/dist/themes/yz-palette-light-hc.css +41 -0
- package/dist/themes/yz-palette-light-mc.css +41 -0
- package/dist/themes/yz-palette-light.css +41 -0
- package/dist/types/components/(buttons)/button/Button.d.ts +105 -0
- package/dist/types/components/(buttons)/button/index.d.ts +31 -0
- package/dist/types/components/(buttons)/buttonGroup/ButtonGroup.d.ts +36 -0
- package/dist/types/components/(buttons)/buttonGroup/index.d.ts +2 -0
- package/dist/types/components/(buttons)/buttonSplit/ButtonSplit.d.ts +17 -0
- package/dist/types/components/(buttons)/buttonSplit/index.d.ts +2 -0
- package/dist/types/components/(buttons)/fab/Fab.d.ts +60 -0
- package/dist/types/components/(buttons)/fab/index.d.ts +2 -0
- package/dist/types/components/(buttons)/shared/warnOnce.d.ts +1 -0
- package/dist/types/components/(buttons)/toggleButton/ButtonToggle.d.ts +19 -0
- package/dist/types/components/(buttons)/toggleButton/index.d.ts +2 -0
- package/dist/types/components/(color)/colorArea/ColorArea.d.ts +15 -0
- package/dist/types/components/(color)/colorArea/index.d.ts +2 -0
- package/dist/types/components/(color)/colorField/ColorField.d.ts +29 -0
- package/dist/types/components/(color)/colorField/index.d.ts +2 -0
- package/dist/types/components/(color)/colorPicker/ColorPicker.d.ts +34 -0
- package/dist/types/components/(color)/colorPicker/index.d.ts +2 -0
- package/dist/types/components/(color)/colorSlider/ColorSlider.d.ts +17 -0
- package/dist/types/components/(color)/colorSlider/index.d.ts +2 -0
- package/dist/types/components/(color)/colorSwatch/ColorSwatch.d.ts +21 -0
- package/dist/types/components/(color)/colorSwatch/index.d.ts +2 -0
- package/dist/types/components/(color)/colorSwatchPicker/ColorSwatchPicker.d.ts +25 -0
- package/dist/types/components/(color)/colorSwatchPicker/index.d.ts +2 -0
- package/dist/types/components/(color)/shared/colorUtils.d.ts +51 -0
- package/dist/types/components/(color)/shared/useColor.d.ts +16 -0
- package/dist/types/components/(color)/shared/useDrag2D.d.ts +14 -0
- package/dist/types/components/(datetime)/calendar/Calendar.d.ts +19 -0
- package/dist/types/components/(datetime)/dateField/DateField.d.ts +18 -0
- package/dist/types/components/(datetime)/datePicker/DatePicker.d.ts +17 -0
- package/dist/types/components/(datetime)/dateRangePicker/DateRangePicker.d.ts +18 -0
- package/dist/types/components/(datetime)/rangeCalendar/RangeCalendar.d.ts +21 -0
- package/dist/types/components/(datetime)/shared/CalendarFrame.d.ts +15 -0
- package/dist/types/components/(datetime)/shared/PickerShell.d.ts +16 -0
- package/dist/types/components/(datetime)/shared/dateUtils.d.ts +13 -0
- package/dist/types/components/(datetime)/shared/useCalendarGrid.d.ts +24 -0
- package/dist/types/components/(datetime)/timeField/TimeField.d.ts +20 -0
- package/dist/types/components/(effects)/customScrollbar/CustomScrollbar.d.ts +5 -0
- package/dist/types/components/(effects)/progressiveBlur/ProgressiveBlur.d.ts +11 -0
- package/dist/types/components/(effects)/ripple/Ripple.d.ts +13 -0
- package/dist/types/components/(effects)/scrollShadow/ScrollShadow.d.ts +19 -0
- package/dist/types/components/(effects)/scrollShadow/useScrollShadow.d.ts +11 -0
- package/dist/types/components/(effects)/shape/Shape.d.ts +55 -0
- package/dist/types/components/(effects)/shape/ShapeLoader.d.ts +7 -0
- package/dist/types/components/(effects)/shape/ShapePaths.d.ts +4 -0
- package/dist/types/components/(effects)/shape/shapeGeometry.d.ts +8 -0
- package/dist/types/components/(effects)/shape/shapeTicker.d.ts +3 -0
- package/dist/types/components/(effects)/shape/springCurves.d.ts +10 -0
- package/dist/types/components/(effects)/sinewave/Sinewave.d.ts +28 -0
- package/dist/types/components/(feedback)/circularProgress/CircularProgress.d.ts +22 -0
- package/dist/types/components/(feedback)/linearProgress/LinearProgress.d.ts +21 -0
- package/dist/types/components/(feedback)/meter/Meter.d.ts +19 -0
- package/dist/types/components/(feedback)/shared/progress.d.ts +10 -0
- package/dist/types/components/(feedback)/sinewaveProgress/SinewaveProgress.d.ts +22 -0
- package/dist/types/components/(feedback)/skeleton/Skeleton.d.ts +16 -0
- package/dist/types/components/(feedback)/skeleton/index.d.ts +2 -0
- package/dist/types/components/(feedback)/spinner/Spinner.d.ts +10 -0
- package/dist/types/components/(forms)/checkbox/Checkbox.d.ts +17 -0
- package/dist/types/components/(forms)/checkboxGroup/CheckboxGroup.d.ts +34 -0
- package/dist/types/components/(forms)/fieldset/Fieldset.d.ts +12 -0
- package/dist/types/components/(forms)/fieldset/index.d.ts +2 -0
- package/dist/types/components/(forms)/fileUpload/FileUpload.d.ts +21 -0
- package/dist/types/components/(forms)/fileUpload/index.d.ts +3 -0
- package/dist/types/components/(forms)/fileUpload/validate.d.ts +17 -0
- package/dist/types/components/(forms)/form/Form.d.ts +19 -0
- package/dist/types/components/(forms)/form/index.d.ts +2 -0
- package/dist/types/components/(forms)/input/Input.d.ts +32 -0
- package/dist/types/components/(forms)/inputOtp/InputOtp.d.ts +18 -0
- package/dist/types/components/(forms)/numberField/NumberField.d.ts +26 -0
- package/dist/types/components/(forms)/numberField/index.d.ts +2 -0
- package/dist/types/components/(forms)/radio/Radio.d.ts +16 -0
- package/dist/types/components/(forms)/radioGroup/RadioGroup.d.ts +31 -0
- package/dist/types/components/(forms)/search/Search.d.ts +21 -0
- package/dist/types/components/(forms)/search/index.d.ts +2 -0
- package/dist/types/components/(forms)/shared/FieldAdornment.d.ts +11 -0
- package/dist/types/components/(forms)/shared/FieldShell.d.ts +20 -0
- package/dist/types/components/(forms)/shared/fieldContext.d.ts +13 -0
- package/dist/types/components/(forms)/shared/icons.d.ts +1 -0
- package/dist/types/components/(forms)/slider/Slider.d.ts +27 -0
- package/dist/types/components/(forms)/switch/Switch.d.ts +16 -0
- package/dist/types/components/(forms)/textArea/TextArea.d.ts +8 -0
- package/dist/types/components/(layout)/accordion/Accordion.d.ts +39 -0
- package/dist/types/components/(layout)/card/Card.d.ts +37 -0
- package/dist/types/components/(layout)/codeSnippet/CodeSnippet.d.ts +20 -0
- package/dist/types/components/(layout)/codeSnippet/index.d.ts +2 -0
- package/dist/types/components/(layout)/grid/Grid.d.ts +33 -0
- package/dist/types/components/(layout)/grid/index.d.ts +2 -0
- package/dist/types/components/(layout)/list/List.d.ts +44 -0
- package/dist/types/components/(layout)/list/index.d.ts +2 -0
- package/dist/types/components/(layout)/section/Section.d.ts +16 -0
- package/dist/types/components/(layout)/section/index.d.ts +2 -0
- package/dist/types/components/(layout)/table/Table.d.ts +116 -0
- package/dist/types/components/(layout)/table/index.d.ts +2 -0
- package/dist/types/components/(navigation)/breadcrumbs/Breadcrumbs.d.ts +23 -0
- package/dist/types/components/(navigation)/breadcrumbs/index.d.ts +2 -0
- package/dist/types/components/(navigation)/nav/Nav.d.ts +48 -0
- package/dist/types/components/(navigation)/nav/NavContext.d.ts +69 -0
- package/dist/types/components/(navigation)/nav/navAppBar/NavAppBar.d.ts +41 -0
- package/dist/types/components/(navigation)/nav/navBar/NavBar.d.ts +12 -0
- package/dist/types/components/(navigation)/nav/navDrawer/NavDrawer.d.ts +19 -0
- package/dist/types/components/(navigation)/nav/navHooks.d.ts +9 -0
- package/dist/types/components/(navigation)/nav/navMenu/NavMenu.d.ts +14 -0
- package/dist/types/components/(navigation)/nav/navRail/NavRail.d.ts +10 -0
- package/dist/types/components/(navigation)/pagination/Pagination.d.ts +22 -0
- package/dist/types/components/(navigation)/pagination/index.d.ts +2 -0
- package/dist/types/components/(overlays)/drawer/Drawer.d.ts +77 -0
- package/dist/types/components/(overlays)/drawer/index.d.ts +2 -0
- package/dist/types/components/(overlays)/drop/Drop.d.ts +86 -0
- package/dist/types/components/(overlays)/drop/index.d.ts +2 -0
- package/dist/types/components/(overlays)/modal/Modal.d.ts +72 -0
- package/dist/types/components/(overlays)/modal/index.d.ts +2 -0
- package/dist/types/components/(overlays)/popover/Popover.d.ts +57 -0
- package/dist/types/components/(overlays)/popover/index.d.ts +2 -0
- package/dist/types/components/(overlays)/toast/Toast.d.ts +67 -0
- package/dist/types/components/(overlays)/toast/index.d.ts +2 -0
- package/dist/types/components/(pickers)/comboBox/ComboBox.d.ts +28 -0
- package/dist/types/components/(pickers)/comboBox/index.d.ts +2 -0
- package/dist/types/components/(pickers)/select/Select.d.ts +27 -0
- package/dist/types/components/(pickers)/select/index.d.ts +2 -0
- package/dist/types/components/(pickers)/shared/PickerItem.d.ts +6 -0
- package/dist/types/components/(pickers)/shared/index.d.ts +1 -0
- package/dist/types/components/(primitives)/avatar/Avatar.d.ts +49 -0
- package/dist/types/components/(primitives)/avatar/index.d.ts +2 -0
- package/dist/types/components/(primitives)/badge/Badge.d.ts +23 -0
- package/dist/types/components/(primitives)/badge/index.d.ts +2 -0
- package/dist/types/components/(primitives)/code/Code.d.ts +10 -0
- package/dist/types/components/(primitives)/code/index.d.ts +2 -0
- package/dist/types/components/(primitives)/comment/Comment.d.ts +8 -0
- package/dist/types/components/(primitives)/icon/Icon.d.ts +8 -0
- package/dist/types/components/(primitives)/kbd/Kbd.d.ts +12 -0
- package/dist/types/components/(primitives)/kbd/index.d.ts +2 -0
- package/dist/types/components/(primitives)/label/Label.d.ts +9 -0
- package/dist/types/components/(primitives)/separator/Separator.d.ts +16 -0
- package/dist/types/components/(primitives)/separator/index.d.ts +2 -0
- package/dist/types/hooks/useBodyScrollLock.d.ts +1 -0
- package/dist/types/hooks/useImageColor.d.ts +13 -0
- package/dist/types/hooks/useNavSheetDrag.d.ts +24 -0
- package/dist/types/lib/colorRoles.d.ts +10 -0
- package/dist/types/lib/cx.d.ts +1 -0
- package/dist/types/lib/easing.d.ts +17 -0
- package/dist/types/lib/overlay.d.ts +10 -0
- package/dist/types/lib/refs.d.ts +1 -0
- package/dist/types/lib/types.d.ts +12 -0
- package/dist/types/providers/MobileViewProvider.d.ts +12 -0
- package/dist/types/providers/ReduceMotionProvider.d.ts +2 -0
- package/package.json +406 -11
- package/scripts/postinstall.js +0 -91
- package/template/app/ClientNav.tsx +0 -258
- package/template/app/globals.css +0 -2
- package/template/app/layout.tsx +0 -94
- package/template/app/themes/dark-mc.css +0 -51
- package/template/app/themes/dark.css +0 -51
- package/template/app/themes/light-mc.css +0 -51
- package/template/app/themes/light.css +0 -51
- package/template/app/themes/theme.css +0 -272
- package/template/components/(buttons)/Button.module.css +0 -351
- package/template/components/(buttons)/ButtonGroup.tsx +0 -414
- package/template/components/(buttons)/FAB.tsx +0 -119
- package/template/components/(buttons)/button.tsx +0 -164
- package/template/components/(controls)/slider/Slider.module.css +0 -250
- package/template/components/(controls)/slider/Slider.tsx +0 -386
- package/template/components/(controls)/switch/Switch.module.css +0 -108
- package/template/components/(controls)/switch/Switch.tsx +0 -69
- package/template/components/(date & time)/calendar/Calendar.module.css +0 -125
- package/template/components/(date & time)/calendar/Calendar.tsx +0 -206
- package/template/components/(date & time)/dateField/DateField.module.css +0 -25
- package/template/components/(date & time)/dateField/DateField.tsx +0 -193
- package/template/components/(date & time)/datePicker/DatePicker.tsx +0 -118
- package/template/components/(date & time)/dateRangePicker/DateRangePicker.tsx +0 -144
- package/template/components/(date & time)/rangeCalendar/RangeCalendar.module.css +0 -203
- package/template/components/(date & time)/rangeCalendar/RangeCalendar.tsx +0 -263
- package/template/components/(date & time)/shared/dateUtils.ts +0 -107
- package/template/components/(date & time)/timeField/TimeField.module.css +0 -39
- package/template/components/(date & time)/timeField/TimeField.tsx +0 -158
- package/template/components/(feedback)/circularProgress/CircularProgress.tsx +0 -646
- package/template/components/(feedback)/linearProgress/LinearProgress.tsx +0 -337
- package/template/components/(feedback)/meter/Meter.tsx +0 -111
- package/template/components/(feedback)/skeleton/Skeleton.module.css +0 -49
- package/template/components/(feedback)/skeleton/Skeleton.tsx +0 -32
- package/template/components/(feedback)/spinner/Spinner.module.css +0 -27
- package/template/components/(feedback)/spinner/Spinner.tsx +0 -60
- package/template/components/(forms)/checkbox/Checkbox.tsx +0 -121
- package/template/components/(forms)/checkboxGroup/CheckboxGroup.tsx +0 -83
- package/template/components/(forms)/description/Description.tsx +0 -34
- package/template/components/(forms)/errorMessage/ErrorMessage.tsx +0 -31
- package/template/components/(forms)/fieldError/FieldError.tsx +0 -39
- package/template/components/(forms)/fieldset/Fieldset.tsx +0 -51
- package/template/components/(forms)/form/Form.tsx +0 -54
- package/template/components/(forms)/input/Input.tsx +0 -50
- package/template/components/(forms)/inputGroup/InputGroup.tsx +0 -65
- package/template/components/(forms)/inputOtp/InputOtp.tsx +0 -139
- package/template/components/(forms)/label/Label.tsx +0 -46
- package/template/components/(forms)/numberField/NumberField.tsx +0 -292
- package/template/components/(forms)/radioGroup/RadioGroup.tsx +0 -175
- package/template/components/(forms)/searchField/SearchField.tsx +0 -139
- package/template/components/(forms)/shared/field.module.css +0 -75
- package/template/components/(forms)/shared/fieldContext.ts +0 -28
- package/template/components/(forms)/textArea/TextArea.tsx +0 -55
- package/template/components/(forms)/textField/TextField.tsx +0 -91
- package/template/components/(layout)/Lightbox/LightboxCard.tsx +0 -100
- package/template/components/(layout)/Lightbox/LightboxGallery.module.css +0 -249
- package/template/components/(layout)/Lightbox/LightboxGallery.tsx +0 -72
- package/template/components/(layout)/Lightbox/LightboxGrid.tsx +0 -185
- package/template/components/(layout)/Lightbox/LightboxModal.module.css +0 -395
- package/template/components/(layout)/Lightbox/LightboxModal.tsx +0 -498
- package/template/components/(layout)/Lightbox/demo.tsx +0 -396
- package/template/components/(layout)/Lightbox/index.ts +0 -30
- package/template/components/(layout)/Lightbox/types.ts +0 -101
- package/template/components/(layout)/Lightbox/useLightboxFilters.ts +0 -140
- package/template/components/(layout)/accordion/Accordion.module.css +0 -108
- package/template/components/(layout)/accordion/Accordion.tsx +0 -251
- package/template/components/(layout)/card/Card.module.css +0 -136
- package/template/components/(layout)/card/Card.tsx +0 -371
- package/template/components/(layout)/list/List.module.css +0 -83
- package/template/components/(layout)/list/List.tsx +0 -332
- package/template/components/(layout)/navigation/Wrap.tsx +0 -41
- package/template/components/(layout)/navigation/breadcrumbs/Breadcrumbs.tsx +0 -145
- package/template/components/(layout)/navigation/nav/Nav.module.css.old +0 -474
- package/template/components/(layout)/navigation/nav/Nav.tsx +0 -186
- package/template/components/(layout)/navigation/nav/NavBar.tsx +0 -396
- package/template/components/(layout)/navigation/nav/NavContext.tsx +0 -259
- package/template/components/(layout)/navigation/nav/NavItem.tsx +0 -195
- package/template/components/(layout)/navigation/nav/NavNew.module.css +0 -406
- package/template/components/(layout)/navigation/nav/NavRail.tsx +0 -317
- package/template/components/(layout)/navigation/nav/NavSection.tsx +0 -101
- package/template/components/(layout)/navigation/nav/NavTab.tsx +0 -25
- package/template/components/(layout)/navigation/nav/navftb/NavFTB.module.css +0 -253
- package/template/components/(layout)/navigation/nav/navftb/NavFTB.tsx +0 -448
- package/template/components/(layout)/navigation/nav/navftb/useTabIndicator.ts +0 -498
- package/template/components/(layout)/navigation/nav/navheader/NavHeader.module.css +0 -59
- package/template/components/(layout)/navigation/nav/navheader/NavHeader.tsx +0 -465
- package/template/components/(layout)/navigation/pagination/Pagination.tsx +0 -261
- package/template/components/(layout)/pages/loadingScreen.tsx +0 -117
- package/template/components/(layout)/pages/maintenance/Maintenance.tsx +0 -53
- package/template/components/(layout)/pages/maintenance/maintenance.module.css +0 -163
- package/template/components/(layout)/scrollShadow/ScrollShadow.module.css +0 -81
- package/template/components/(layout)/scrollShadow/ScrollShadow.tsx +0 -161
- package/template/components/(layout)/scrollShadow/useScrollShadow.ts +0 -130
- package/template/components/(layout)/separator/Separator.tsx +0 -112
- package/template/components/(overlays)/accessibilityModal/AccessibilityModal.tsx +0 -307
- package/template/components/(overlays)/drawer/Drawer.tsx +0 -953
- package/template/components/(overlays)/modal/Modal.tsx +0 -654
- package/template/components/(overlays)/popover/Popover.tsx +0 -420
- package/template/components/(overlays)/toast/Toast.tsx +0 -692
- package/template/components/(pickers)/autocomplete/Autocomplete.tsx +0 -24
- package/template/components/(pickers)/comboBox/ComboBox.tsx +0 -21
- package/template/components/(pickers)/select/Select.tsx +0 -188
- package/template/components/(pickers)/shared/FilterableField.tsx +0 -223
- package/template/components/(pickers)/shared/PickerItem.ts +0 -13
- package/template/components/tools/CustomScrollbar.tsx +0 -107
- package/template/components/tools/Divider.tsx +0 -11
- package/template/components/tools/ReduceMotionContext.tsx +0 -5
- package/template/components/tools/Sinewave.tsx +0 -396
- package/template/components/tools/SinewaveProgress.tsx +0 -140
- package/template/components/tools/badge/Badge.tsx +0 -28
- package/template/components/tools/dropdown/drop.module.css +0 -196
- package/template/components/tools/dropdown/drop.tsx +0 -568
- package/template/components/tools/easing.ts +0 -118
- package/template/components/tools/flubber.d.ts +0 -7
- package/template/components/tools/footer/Footer.tsx +0 -20
- package/template/components/tools/input/Input.module.css +0 -45
- package/template/components/tools/input/Input.tsx +0 -99
- package/template/components/tools/label/Icon.tsx +0 -39
- package/template/components/tools/label/Label.tsx +0 -156
- package/template/components/tools/mobileViewProvider.tsx +0 -53
- package/template/components/tools/ripple/ripple.css +0 -38
- package/template/components/tools/ripple/ripple.tsx +0 -78
- package/template/components/tools/shape/Shape.module.css +0 -25
- package/template/components/tools/shape/Shape.tsx +0 -316
- package/template/components/tools/shape/ShapeLoader.tsx +0 -104
- package/template/components/tools/shape/ShapePaths.ts +0 -116
- package/template/components/tools/switch/Switch.module.css +0 -102
- package/template/components/tools/switch/Switch.tsx +0 -48
- package/template/components/tools/useBodyScrollLock.tsx +0 -27
- package/template/components/tools/useImageColor.ts +0 -47
- package/template/components/tools/useNavSheetDrag.tsx +0 -196
- /package/{template/public/fonts/material-symbols/MaterialSymbolsRounded-VariableFont_FILL,GRAD,opsz,wght.woff2 → dist/themes/fonts/MaterialSymbolsRounded.woff2} +0 -0
|
@@ -1,396 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import {
|
|
4
|
-
LightboxGrid,
|
|
5
|
-
LightboxModal,
|
|
6
|
-
orientationFromRatio,
|
|
7
|
-
useLightboxFilters,
|
|
8
|
-
type LightboxItem,
|
|
9
|
-
type LightboxSlide,
|
|
10
|
-
} from "./index";
|
|
11
|
-
import Button from "../../(buttons)/button";
|
|
12
|
-
import Drop from "../../tools/dropdown/drop";
|
|
13
|
-
import Divider from "@/components/tools/Divider";
|
|
14
|
-
|
|
15
|
-
/* -----------------------------------------------------------
|
|
16
|
-
Sample data — 24 items mirroring the HTML prototype
|
|
17
|
-
----------------------------------------------------------- */
|
|
18
|
-
|
|
19
|
-
const item = (
|
|
20
|
-
id: string,
|
|
21
|
-
span: LightboxItem["span"],
|
|
22
|
-
ratio: string,
|
|
23
|
-
tags: string[],
|
|
24
|
-
date: string,
|
|
25
|
-
views: number,
|
|
26
|
-
relevance: number,
|
|
27
|
-
favorite: boolean,
|
|
28
|
-
title: string,
|
|
29
|
-
description: string,
|
|
30
|
-
author: string,
|
|
31
|
-
slides: LightboxSlide[],
|
|
32
|
-
): LightboxItem => ({
|
|
33
|
-
id,
|
|
34
|
-
span,
|
|
35
|
-
ratio,
|
|
36
|
-
orient: orientationFromRatio(ratio),
|
|
37
|
-
tags,
|
|
38
|
-
date,
|
|
39
|
-
views,
|
|
40
|
-
relevance,
|
|
41
|
-
favorite,
|
|
42
|
-
title,
|
|
43
|
-
description,
|
|
44
|
-
author,
|
|
45
|
-
slides,
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
export const sampleItems: LightboxItem[] = [
|
|
49
|
-
// 01: Multi-slide Frog Project Test
|
|
50
|
-
item(
|
|
51
|
-
"01",
|
|
52
|
-
"2x2",
|
|
53
|
-
"1/1",
|
|
54
|
-
["Animation", "Concept"],
|
|
55
|
-
"2026-06-23",
|
|
56
|
-
5400,
|
|
57
|
-
120,
|
|
58
|
-
true,
|
|
59
|
-
"The Frog Project",
|
|
60
|
-
"Multi-slide workflow test documenting style, composition changes, and animation cycles.",
|
|
61
|
-
"Yamato Zhen",
|
|
62
|
-
[
|
|
63
|
-
{
|
|
64
|
-
src: "/frog_final.jpg",
|
|
65
|
-
alt: "Final Render Illustration",
|
|
66
|
-
title: "Final Rendering",
|
|
67
|
-
comment: "Polished final piece with full material shading.",
|
|
68
|
-
default: true,
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
src: "/frog_sketch.jpg",
|
|
72
|
-
alt: "Initial Sketch Pass",
|
|
73
|
-
title: "Rough Concept Sketch",
|
|
74
|
-
comment: "Exploring basic silhouette weight and anatomy.",
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
src: "/frog.gif",
|
|
78
|
-
alt: "Motion Test GIF",
|
|
79
|
-
title: "Animation Loop Pass",
|
|
80
|
-
comment: "Checking bounce timing and secondary motion frames.",
|
|
81
|
-
},
|
|
82
|
-
],
|
|
83
|
-
),
|
|
84
|
-
|
|
85
|
-
// 02: Foreseen Yasuo
|
|
86
|
-
item(
|
|
87
|
-
"02",
|
|
88
|
-
"2x1",
|
|
89
|
-
"16/9",
|
|
90
|
-
["Splash Art", "Digital"],
|
|
91
|
-
"2026-01-15",
|
|
92
|
-
15000,
|
|
93
|
-
340,
|
|
94
|
-
false,
|
|
95
|
-
"Foreseen Yasuo",
|
|
96
|
-
"Official promotional artwork exploration highlighting cinematic depth perspective.",
|
|
97
|
-
"Kudos Productions",
|
|
98
|
-
[
|
|
99
|
-
{
|
|
100
|
-
src: "/kudos-productions-foreseen-yasuo-02-susu.jpg",
|
|
101
|
-
alt: "Foreseen Yasuo Splash Cut",
|
|
102
|
-
title: "Official Cut",
|
|
103
|
-
default: true,
|
|
104
|
-
},
|
|
105
|
-
],
|
|
106
|
-
),
|
|
107
|
-
|
|
108
|
-
// 03: Prestige Pandemonium Shaco
|
|
109
|
-
item(
|
|
110
|
-
"03",
|
|
111
|
-
"1x2",
|
|
112
|
-
"9/16",
|
|
113
|
-
["Splash Art", "Digital"],
|
|
114
|
-
"2026-04-12",
|
|
115
|
-
12400,
|
|
116
|
-
94,
|
|
117
|
-
true,
|
|
118
|
-
"Prestige Pandemonium Shaco",
|
|
119
|
-
"Character splash color exploration showcasing lighting rendering.",
|
|
120
|
-
"Kudos Productions",
|
|
121
|
-
[
|
|
122
|
-
{
|
|
123
|
-
src: "/kudos-productions-prestige-pandemonium-shaco-02-yuyu.jpg",
|
|
124
|
-
alt: "Prestige Shaco Cut",
|
|
125
|
-
title: "Published Cut",
|
|
126
|
-
default: true,
|
|
127
|
-
},
|
|
128
|
-
],
|
|
129
|
-
),
|
|
130
|
-
|
|
131
|
-
// 04: Terence Cantal Study 3
|
|
132
|
-
item(
|
|
133
|
-
"04",
|
|
134
|
-
"1x1",
|
|
135
|
-
"1/1",
|
|
136
|
-
["Study", "Texture"],
|
|
137
|
-
"2026-03-22",
|
|
138
|
-
3200,
|
|
139
|
-
45,
|
|
140
|
-
false,
|
|
141
|
-
"Terence Cantal Study 3",
|
|
142
|
-
"Material rendering values and texture mapping research overlay.",
|
|
143
|
-
"Terence Cantal",
|
|
144
|
-
[
|
|
145
|
-
{
|
|
146
|
-
src: "/terence-cantal-3.jpg",
|
|
147
|
-
alt: "Material Surface Study",
|
|
148
|
-
title: "Surface Pass",
|
|
149
|
-
default: true,
|
|
150
|
-
},
|
|
151
|
-
],
|
|
152
|
-
),
|
|
153
|
-
|
|
154
|
-
// 05: Diana Composition
|
|
155
|
-
item(
|
|
156
|
-
"05",
|
|
157
|
-
"2x1",
|
|
158
|
-
"16/9",
|
|
159
|
-
["Illustration", "Value Study"],
|
|
160
|
-
"2026-05-02",
|
|
161
|
-
8900,
|
|
162
|
-
112,
|
|
163
|
-
false,
|
|
164
|
-
"Diana Composition",
|
|
165
|
-
"Keyframe structural focus painting, manipulating ambient light conditions.",
|
|
166
|
-
"Terence Cantal",
|
|
167
|
-
[
|
|
168
|
-
{
|
|
169
|
-
src: "/terence-cantal-diana-final.jpg",
|
|
170
|
-
alt: "Diana Final Illustration",
|
|
171
|
-
title: "Master Production Render",
|
|
172
|
-
default: true,
|
|
173
|
-
},
|
|
174
|
-
],
|
|
175
|
-
),
|
|
176
|
-
|
|
177
|
-
// 06: Terence Cantal Final Composition
|
|
178
|
-
item(
|
|
179
|
-
"06",
|
|
180
|
-
"1x1",
|
|
181
|
-
"1/1",
|
|
182
|
-
["Illustration", "Final"],
|
|
183
|
-
"2026-05-10",
|
|
184
|
-
4100,
|
|
185
|
-
78,
|
|
186
|
-
false,
|
|
187
|
-
"Terence Cantal Final Composition",
|
|
188
|
-
"WebP format asset delivery verification pipeline test.",
|
|
189
|
-
"Terence Cantal",
|
|
190
|
-
[
|
|
191
|
-
{
|
|
192
|
-
src: "/terence-cantal-final-copy.webp",
|
|
193
|
-
alt: "Optimized Final Presentation WebP",
|
|
194
|
-
title: "Compressed WebP Presentation",
|
|
195
|
-
default: true,
|
|
196
|
-
},
|
|
197
|
-
],
|
|
198
|
-
),
|
|
199
|
-
];
|
|
200
|
-
/* -----------------------------------------------------------
|
|
201
|
-
Demo page — quick & dirty controls, throw away when done
|
|
202
|
-
----------------------------------------------------------- */
|
|
203
|
-
|
|
204
|
-
export default function LightboxGalleryDemo() {
|
|
205
|
-
const [items, setItems] = useState<LightboxItem[]>(sampleItems);
|
|
206
|
-
const [openItem, setOpenItem] = useState<LightboxItem | null>(null);
|
|
207
|
-
|
|
208
|
-
const { state, actions, filteredItems } = useLightboxFilters(items);
|
|
209
|
-
|
|
210
|
-
const toggleFavorite = (target: LightboxItem) => {
|
|
211
|
-
setItems((prev) =>
|
|
212
|
-
prev.map((it) =>
|
|
213
|
-
it.id === target.id ? { ...it, favorite: !it.favorite } : it,
|
|
214
|
-
),
|
|
215
|
-
);
|
|
216
|
-
setOpenItem((current) =>
|
|
217
|
-
current && current.id === target.id
|
|
218
|
-
? { ...current, favorite: !current.favorite }
|
|
219
|
-
: current,
|
|
220
|
-
);
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
return (
|
|
224
|
-
<>
|
|
225
|
-
{/*<div style={controlsStyle}>
|
|
226
|
-
<span style={labelStyle}>Mode</span>
|
|
227
|
-
<button style={btn(state.mode === "bento")}>Bento</button>
|
|
228
|
-
<button style={btn(state.mode === "square")}>Square</button>
|
|
229
|
-
<button style={btn(state.mode === "aspect")}>Aspect</button>
|
|
230
|
-
|
|
231
|
-
<span style={{ ...labelStyle, marginLeft: 12 }}>Sort</span>
|
|
232
|
-
<select
|
|
233
|
-
value={state.sort}
|
|
234
|
-
onChange={(e) => actions.setSort(e.target.value as SortOption)}
|
|
235
|
-
style={selectStyle}
|
|
236
|
-
>
|
|
237
|
-
<option value="relevant">Most relevant</option>
|
|
238
|
-
<option value="recent">Most recent</option>
|
|
239
|
-
<option value="oldest">Oldest</option>
|
|
240
|
-
<option value="views">Most viewed</option>
|
|
241
|
-
</select>
|
|
242
|
-
|
|
243
|
-
<span style={{ ...labelStyle, marginLeft: 12 }}>Tags</span>
|
|
244
|
-
{ALL_TAGS.map((tag) => (
|
|
245
|
-
<button
|
|
246
|
-
key={tag}
|
|
247
|
-
onClick={() => actions.toggleTag(tag)}
|
|
248
|
-
style={btn(state.tags.has(tag))}
|
|
249
|
-
>
|
|
250
|
-
{tag}
|
|
251
|
-
</button>
|
|
252
|
-
))}
|
|
253
|
-
|
|
254
|
-
<div style={{ flex: 1 }} />
|
|
255
|
-
|
|
256
|
-
<button onClick={actions.zoomOut} style={btn(false)} title="Zoom out">
|
|
257
|
-
−
|
|
258
|
-
</button>
|
|
259
|
-
<button onClick={actions.zoomIn} style={btn(false)} title="Zoom in">
|
|
260
|
-
+
|
|
261
|
-
</button>
|
|
262
|
-
<button style={btn(state.favoritesOnly)} title="Favorites only">
|
|
263
|
-
♥
|
|
264
|
-
</button>
|
|
265
|
-
<button onClick={actions.resetFilters} style={btn(false)}>
|
|
266
|
-
Reset
|
|
267
|
-
</button>
|
|
268
|
-
<Button primary>
|
|
269
|
-
<Icon systemName="browse" label="Bento" />
|
|
270
|
-
</Button>
|
|
271
|
-
</div>*/}
|
|
272
|
-
<div
|
|
273
|
-
style={{
|
|
274
|
-
width: "100%",
|
|
275
|
-
maxWidth: 1080,
|
|
276
|
-
marginInline: "auto",
|
|
277
|
-
display: "flex",
|
|
278
|
-
flexWrap: "wrap",
|
|
279
|
-
justifyContent: "space-between",
|
|
280
|
-
alignItems: "center",
|
|
281
|
-
gap: 6,
|
|
282
|
-
}}
|
|
283
|
-
>
|
|
284
|
-
<div style={{ display: "flex", gap: 8 }}>
|
|
285
|
-
<Button.group exclusive secondary width={210}>
|
|
286
|
-
<Button.group.Tab
|
|
287
|
-
systemName="browse"
|
|
288
|
-
label={{ text: "Bento", hideWhenInactive: true }}
|
|
289
|
-
onClick={() => actions.setMode("bento")}
|
|
290
|
-
toggle
|
|
291
|
-
default
|
|
292
|
-
/>
|
|
293
|
-
<Button.group.Tab
|
|
294
|
-
systemName="grid_view"
|
|
295
|
-
label={{ text: "Grid", hideWhenInactive: true }}
|
|
296
|
-
onClick={() => actions.setMode("square")}
|
|
297
|
-
toggle
|
|
298
|
-
/>
|
|
299
|
-
<Button.group.Tab
|
|
300
|
-
systemName="fit_screen"
|
|
301
|
-
label={{ text: "Ratio", hideWhenInactive: true }}
|
|
302
|
-
onClick={() => actions.setMode("aspect")}
|
|
303
|
-
toggle
|
|
304
|
-
/>
|
|
305
|
-
</Button.group>
|
|
306
|
-
<Drop.Menu
|
|
307
|
-
multiSelect
|
|
308
|
-
primary
|
|
309
|
-
systemName="filter_alt"
|
|
310
|
-
label="Filter by"
|
|
311
|
-
>
|
|
312
|
-
<Drop.Item
|
|
313
|
-
systemName="owl"
|
|
314
|
-
label="Study"
|
|
315
|
-
toggle
|
|
316
|
-
onClick={() => actions.toggleTag("Study")}
|
|
317
|
-
/>
|
|
318
|
-
<Drop.Item
|
|
319
|
-
systemName="draw_abstract"
|
|
320
|
-
label="Concept"
|
|
321
|
-
onClick={() => actions.toggleTag("Concept")}
|
|
322
|
-
toggle
|
|
323
|
-
/>
|
|
324
|
-
<Drop.Item
|
|
325
|
-
systemName="draw_collage"
|
|
326
|
-
label="Fan art"
|
|
327
|
-
onClick={() => actions.toggleTag("Fan Art")}
|
|
328
|
-
toggle
|
|
329
|
-
/>
|
|
330
|
-
<Divider />
|
|
331
|
-
<Drop.Item systemName="style" label="Artwork Style">
|
|
332
|
-
<Divider />
|
|
333
|
-
<Drop.Item
|
|
334
|
-
label="Splash Art"
|
|
335
|
-
onClick={() => actions.toggleTag("Splash Art")}
|
|
336
|
-
toggle
|
|
337
|
-
/>
|
|
338
|
-
<Drop.Item
|
|
339
|
-
label="Sketch"
|
|
340
|
-
onClick={() => actions.toggleTag("Sketch")}
|
|
341
|
-
toggle
|
|
342
|
-
/>
|
|
343
|
-
<Drop.Item
|
|
344
|
-
label="Traditional"
|
|
345
|
-
onClick={() => actions.toggleTag("Traditonal")}
|
|
346
|
-
toggle
|
|
347
|
-
/>
|
|
348
|
-
<Drop.Item
|
|
349
|
-
label="Digital"
|
|
350
|
-
onClick={() => actions.toggleTag("Digital")}
|
|
351
|
-
toggle
|
|
352
|
-
/>
|
|
353
|
-
</Drop.Item>
|
|
354
|
-
<Divider />
|
|
355
|
-
<Drop.Item
|
|
356
|
-
label="Favorites"
|
|
357
|
-
systemName="favorite"
|
|
358
|
-
onClick={actions.toggleFavoritesOnly}
|
|
359
|
-
toggle
|
|
360
|
-
/>
|
|
361
|
-
</Drop.Menu>
|
|
362
|
-
</div>
|
|
363
|
-
<Button.group
|
|
364
|
-
multiSelect
|
|
365
|
-
outlined
|
|
366
|
-
width={178}
|
|
367
|
-
cta={{
|
|
368
|
-
label: "Reset",
|
|
369
|
-
onClick: actions.resetFilters,
|
|
370
|
-
outlined: true,
|
|
371
|
-
circle: true,
|
|
372
|
-
}}
|
|
373
|
-
>
|
|
374
|
-
<Button.group.Tab
|
|
375
|
-
onClick={actions.zoomOut}
|
|
376
|
-
systemName="remove"
|
|
377
|
-
circle
|
|
378
|
-
/>
|
|
379
|
-
<Button.group.Tab onClick={actions.zoomIn} systemName="add" circle />
|
|
380
|
-
</Button.group>
|
|
381
|
-
</div>
|
|
382
|
-
|
|
383
|
-
<LightboxGrid
|
|
384
|
-
items={filteredItems}
|
|
385
|
-
mode={state.mode}
|
|
386
|
-
zoom={state.zoom}
|
|
387
|
-
onCardClick={(it) => setOpenItem(it)}
|
|
388
|
-
/>
|
|
389
|
-
<LightboxModal
|
|
390
|
-
item={openItem}
|
|
391
|
-
onClose={() => setOpenItem(null)}
|
|
392
|
-
onToggleFavorite={toggleFavorite}
|
|
393
|
-
/>
|
|
394
|
-
</>
|
|
395
|
-
);
|
|
396
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export { LightboxGallery } from "./LightboxGallery";
|
|
2
|
-
export type { LightboxGalleryProps } from "./LightboxGallery";
|
|
3
|
-
|
|
4
|
-
export { LightboxGrid } from "./LightboxGrid";
|
|
5
|
-
export type { LightboxGridProps } from "./LightboxGrid";
|
|
6
|
-
|
|
7
|
-
export { LightboxCard } from "./LightboxCard";
|
|
8
|
-
export type { LightboxCardProps } from "./LightboxCard";
|
|
9
|
-
|
|
10
|
-
export { LightboxModal } from "./LightboxModal";
|
|
11
|
-
export type { LightboxModalProps } from "./LightboxModal";
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
useLightboxFilters,
|
|
15
|
-
type UseLightboxFiltersOptions,
|
|
16
|
-
} from "./useLightboxFilters";
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
orientationFromRatio,
|
|
20
|
-
getDefaultSlide,
|
|
21
|
-
type ViewMode,
|
|
22
|
-
type SortOption,
|
|
23
|
-
type GridSpan,
|
|
24
|
-
type Orientation,
|
|
25
|
-
type LightboxSlide,
|
|
26
|
-
type LightboxItem,
|
|
27
|
-
type LightboxFilters,
|
|
28
|
-
type LightboxFiltersState,
|
|
29
|
-
type LightboxFiltersActions,
|
|
30
|
-
} from "./types";
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
export type ViewMode = "bento" | "square" | "aspect";
|
|
2
|
-
|
|
3
|
-
export type SortOption = "relevant" | "recent" | "oldest" | "views";
|
|
4
|
-
|
|
5
|
-
export type GridSpan = "1x1" | "2x1" | "1x2" | "2x2";
|
|
6
|
-
|
|
7
|
-
export type Orientation = "landscape" | "portrait" | "square";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* A single image (or slide) inside a multi-image artwork. Shown stacked
|
|
11
|
-
* vertically in the LightboxModal.
|
|
12
|
-
*/
|
|
13
|
-
export interface LightboxSlide {
|
|
14
|
-
/** Image source. Optional — when missing, a gray placeholder is rendered. */
|
|
15
|
-
src?: string;
|
|
16
|
-
alt?: string;
|
|
17
|
-
/** Per-slide title shown inline below the image and in the side panel. */
|
|
18
|
-
title?: string;
|
|
19
|
-
/** Per-slide comment shown inline below the image and in the side panel. */
|
|
20
|
-
comment?: string;
|
|
21
|
-
/** Marks this slide as the gallery thumbnail. The first match wins. */
|
|
22
|
-
default?: boolean;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface LightboxItem {
|
|
26
|
-
/** Stable unique id — used as React key and for FLIP rect tracking. */
|
|
27
|
-
id: string;
|
|
28
|
-
/** Grid span used in `bento` mode. */
|
|
29
|
-
span: GridSpan;
|
|
30
|
-
/** CSS aspect-ratio string used in `aspect` mode, e.g. `"16/9"`. */
|
|
31
|
-
ratio: string;
|
|
32
|
-
/** Derived from `ratio`. Drives layout in `aspect` mode. */
|
|
33
|
-
orient: Orientation;
|
|
34
|
-
tags: string[];
|
|
35
|
-
/** ISO date string. */
|
|
36
|
-
date: string;
|
|
37
|
-
views: number;
|
|
38
|
-
/** Optional sort weight (0–100). Used by the `"relevant"` sort. */
|
|
39
|
-
relevance: number;
|
|
40
|
-
favorite: boolean;
|
|
41
|
-
/** Optional image source; if omitted, the card renders as a gray placeholder. */
|
|
42
|
-
src?: string;
|
|
43
|
-
alt?: string;
|
|
44
|
-
title?: string;
|
|
45
|
-
/** Item-level description shown in the modal's side panel. */
|
|
46
|
-
description?: string;
|
|
47
|
-
/** Optional author / artist name shown in the modal. */
|
|
48
|
-
author?: string;
|
|
49
|
-
/** All images for this artwork. Gallery thumbnail uses the `default` slide. */
|
|
50
|
-
slides?: LightboxSlide[];
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface LightboxFiltersState {
|
|
54
|
-
mode: ViewMode;
|
|
55
|
-
sort: SortOption;
|
|
56
|
-
tags: Set<string>;
|
|
57
|
-
favoritesOnly: boolean;
|
|
58
|
-
zoom: number;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface LightboxFiltersActions {
|
|
62
|
-
setMode: (mode: ViewMode) => void;
|
|
63
|
-
setSort: (sort: SortOption) => void;
|
|
64
|
-
toggleTag: (tag: string) => void;
|
|
65
|
-
setTags: (tags: Iterable<string>) => void;
|
|
66
|
-
toggleFavoritesOnly: () => void;
|
|
67
|
-
setFavoritesOnly: (v: boolean) => void;
|
|
68
|
-
zoomIn: () => void;
|
|
69
|
-
zoomOut: () => void;
|
|
70
|
-
setZoom: (z: number) => void;
|
|
71
|
-
resetFilters: () => void;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface LightboxFilters {
|
|
75
|
-
state: LightboxFiltersState;
|
|
76
|
-
actions: LightboxFiltersActions;
|
|
77
|
-
filteredItems: LightboxItem[];
|
|
78
|
-
/** Increments on every `resetFilters()` call. Use as a React `key` on
|
|
79
|
-
* controlled UI (e.g. a toggle group) to force it to remount and clear
|
|
80
|
-
* its internal state when filters are reset. */
|
|
81
|
-
resetKey: number;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Pick the slide that should represent the item in the gallery.
|
|
86
|
-
* Returns the first slide flagged `default: true`, falling back to the
|
|
87
|
-
* first slide, or `undefined` when there are no slides.
|
|
88
|
-
*/
|
|
89
|
-
export function getDefaultSlide(item: LightboxItem): LightboxSlide | undefined {
|
|
90
|
-
if (!item.slides?.length) return undefined;
|
|
91
|
-
return item.slides.find((s) => s.default) ?? item.slides[0];
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/** Derive orientation from an aspect-ratio string like `"16/9"`. */
|
|
95
|
-
export function orientationFromRatio(ratio: string): Orientation {
|
|
96
|
-
const [a, b] = ratio.split("/").map(Number);
|
|
97
|
-
if (!a || !b) return "square";
|
|
98
|
-
if (a > b) return "landscape";
|
|
99
|
-
if (a < b) return "portrait";
|
|
100
|
-
return "square";
|
|
101
|
-
}
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useCallback, useMemo, useState } from "react";
|
|
4
|
-
import type {
|
|
5
|
-
LightboxFilters,
|
|
6
|
-
LightboxFiltersActions,
|
|
7
|
-
LightboxFiltersState,
|
|
8
|
-
LightboxItem,
|
|
9
|
-
SortOption,
|
|
10
|
-
ViewMode,
|
|
11
|
-
} from "./types";
|
|
12
|
-
|
|
13
|
-
export interface UseLightboxFiltersOptions {
|
|
14
|
-
initialMode?: ViewMode;
|
|
15
|
-
initialSort?: SortOption;
|
|
16
|
-
initialTags?: Iterable<string>;
|
|
17
|
-
initialFavoritesOnly?: boolean;
|
|
18
|
-
initialZoom?: number;
|
|
19
|
-
zoomStep?: number;
|
|
20
|
-
zoomMin?: number;
|
|
21
|
-
zoomMax?: number;
|
|
22
|
-
/**
|
|
23
|
-
* Tag matching mode. `"any"` (default) shows items matching at least one
|
|
24
|
-
* selected tag. `"all"` requires items to match every selected tag.
|
|
25
|
-
*/
|
|
26
|
-
tagMatch?: "any" | "all";
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Filter/sort logic for the Lightbox gallery. Returns state, actions, and
|
|
31
|
-
* the items derived from applying the filters & sort.
|
|
32
|
-
*
|
|
33
|
-
* Wire the returned `actions` to your own buttons/tabs. Pass `filteredItems`
|
|
34
|
-
* + the relevant pieces of `state` to <LightboxGrid />.
|
|
35
|
-
*/
|
|
36
|
-
export function useLightboxFilters(
|
|
37
|
-
items: LightboxItem[],
|
|
38
|
-
options: UseLightboxFiltersOptions = {},
|
|
39
|
-
): LightboxFilters {
|
|
40
|
-
const {
|
|
41
|
-
initialMode = "bento",
|
|
42
|
-
initialSort = "relevant",
|
|
43
|
-
initialTags,
|
|
44
|
-
initialFavoritesOnly = false,
|
|
45
|
-
initialZoom = 160,
|
|
46
|
-
zoomStep = 30,
|
|
47
|
-
zoomMin = 100,
|
|
48
|
-
zoomMax = 320,
|
|
49
|
-
tagMatch = "any",
|
|
50
|
-
} = options;
|
|
51
|
-
|
|
52
|
-
const [mode, setMode] = useState<ViewMode>(initialMode);
|
|
53
|
-
const [sort, setSort] = useState<SortOption>(initialSort);
|
|
54
|
-
const [tags, setTagsInternal] = useState<Set<string>>(
|
|
55
|
-
() => new Set(initialTags ?? []),
|
|
56
|
-
);
|
|
57
|
-
const [favoritesOnly, setFavoritesOnly] = useState(initialFavoritesOnly);
|
|
58
|
-
const [zoom, setZoom] = useState(initialZoom);
|
|
59
|
-
const [resetKey, setResetKey] = useState(0);
|
|
60
|
-
|
|
61
|
-
const toggleTag = useCallback((tag: string) => {
|
|
62
|
-
setTagsInternal((prev) => {
|
|
63
|
-
const next = new Set(prev);
|
|
64
|
-
if (next.has(tag)) next.delete(tag);
|
|
65
|
-
else next.add(tag);
|
|
66
|
-
return next;
|
|
67
|
-
});
|
|
68
|
-
}, []);
|
|
69
|
-
|
|
70
|
-
const setTags = useCallback((next: Iterable<string>) => {
|
|
71
|
-
setTagsInternal(new Set(next));
|
|
72
|
-
}, []);
|
|
73
|
-
|
|
74
|
-
const toggleFavoritesOnly = useCallback(() => {
|
|
75
|
-
setFavoritesOnly((prev) => !prev);
|
|
76
|
-
}, []);
|
|
77
|
-
|
|
78
|
-
const zoomIn = useCallback(() => {
|
|
79
|
-
setZoom((z) => Math.min(z + zoomStep, zoomMax));
|
|
80
|
-
}, [zoomStep, zoomMax]);
|
|
81
|
-
|
|
82
|
-
const zoomOut = useCallback(() => {
|
|
83
|
-
setZoom((z) => Math.max(z - zoomStep, zoomMin));
|
|
84
|
-
}, [zoomStep, zoomMin]);
|
|
85
|
-
|
|
86
|
-
const resetFilters = useCallback(() => {
|
|
87
|
-
setTagsInternal(new Set());
|
|
88
|
-
setFavoritesOnly(false);
|
|
89
|
-
setResetKey((k) => k + 1);
|
|
90
|
-
}, []);
|
|
91
|
-
|
|
92
|
-
const filteredItems = useMemo(() => {
|
|
93
|
-
const filtered = items.filter((item) => {
|
|
94
|
-
const tagMatchOk =
|
|
95
|
-
tags.size === 0 ||
|
|
96
|
-
(tagMatch === "all"
|
|
97
|
-
? Array.from(tags).every((t) => item.tags.includes(t))
|
|
98
|
-
: item.tags.some((t) => tags.has(t)));
|
|
99
|
-
const favOk = !favoritesOnly || item.favorite;
|
|
100
|
-
return tagMatchOk && favOk;
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
return filtered.sort((a, b) => {
|
|
104
|
-
switch (sort) {
|
|
105
|
-
case "recent":
|
|
106
|
-
return new Date(b.date).getTime() - new Date(a.date).getTime();
|
|
107
|
-
case "oldest":
|
|
108
|
-
return new Date(a.date).getTime() - new Date(b.date).getTime();
|
|
109
|
-
case "views":
|
|
110
|
-
return b.views - a.views;
|
|
111
|
-
case "relevant":
|
|
112
|
-
default:
|
|
113
|
-
return b.relevance - a.relevance;
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
}, [items, tags, favoritesOnly, sort, tagMatch]);
|
|
117
|
-
|
|
118
|
-
const state: LightboxFiltersState = {
|
|
119
|
-
mode,
|
|
120
|
-
sort,
|
|
121
|
-
tags,
|
|
122
|
-
favoritesOnly,
|
|
123
|
-
zoom,
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
const actions: LightboxFiltersActions = {
|
|
127
|
-
setMode,
|
|
128
|
-
setSort,
|
|
129
|
-
toggleTag,
|
|
130
|
-
setTags,
|
|
131
|
-
toggleFavoritesOnly,
|
|
132
|
-
setFavoritesOnly,
|
|
133
|
-
zoomIn,
|
|
134
|
-
zoomOut,
|
|
135
|
-
setZoom,
|
|
136
|
-
resetFilters,
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
return { state, actions, filteredItems, resetKey };
|
|
140
|
-
}
|