@dreamcommerce/aurora 3.0.0-211 → 3.0.0-212

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.
Files changed (36) hide show
  1. package/build/cjs/packages/aurora/src/components/action_list/action_list_constants.js +11 -0
  2. package/build/cjs/packages/aurora/src/components/action_list/action_list_constants.js.map +1 -0
  3. package/build/cjs/packages/aurora/src/components/action_list/action_list_variants.js +20 -0
  4. package/build/cjs/packages/aurora/src/components/action_list/action_list_variants.js.map +1 -0
  5. package/build/cjs/packages/aurora/src/components/action_list/components/action_list_trigger.js +10 -5
  6. package/build/cjs/packages/aurora/src/components/action_list/components/action_list_trigger.js.map +1 -1
  7. package/build/cjs/packages/aurora/src/components/stack/stack.js +1 -1
  8. package/build/cjs/packages/aurora/src/components/stack/stack.js.map +1 -1
  9. package/build/esm/packages/aurora/src/assets/icons/add_line_icon.d.ts +1 -0
  10. package/build/esm/packages/aurora/src/assets/icons/add_line_icon.js +3 -0
  11. package/build/esm/packages/aurora/src/assets/icons/add_line_icon.js.map +1 -0
  12. package/build/esm/packages/aurora/src/assets/icons/subtract_line_icon.d.ts +1 -0
  13. package/build/esm/packages/aurora/src/assets/icons/subtract_line_icon.js +3 -0
  14. package/build/esm/packages/aurora/src/assets/icons/subtract_line_icon.js.map +1 -0
  15. package/build/esm/packages/aurora/src/components/action_list/action_list_constants.d.ts +4 -0
  16. package/build/esm/packages/aurora/src/components/action_list/action_list_constants.js +7 -0
  17. package/build/esm/packages/aurora/src/components/action_list/action_list_constants.js.map +1 -0
  18. package/build/esm/packages/aurora/src/components/action_list/action_list_types.d.ts +7 -1
  19. package/build/esm/packages/aurora/src/components/action_list/action_list_types.js +3 -0
  20. package/build/esm/packages/aurora/src/components/action_list/action_list_types.js.map +1 -1
  21. package/build/esm/packages/aurora/src/components/action_list/action_list_variants.d.ts +3 -0
  22. package/build/esm/packages/aurora/src/components/action_list/action_list_variants.js +16 -0
  23. package/build/esm/packages/aurora/src/components/action_list/action_list_variants.js.map +1 -0
  24. package/build/esm/packages/aurora/src/components/action_list/components/action_list_trigger.d.ts +3 -3
  25. package/build/esm/packages/aurora/src/components/action_list/components/action_list_trigger.js +10 -5
  26. package/build/esm/packages/aurora/src/components/action_list/components/action_list_trigger.js.map +1 -1
  27. package/build/esm/packages/aurora/src/components/stack/stack.js +1 -1
  28. package/build/esm/packages/aurora/src/components/stack/stack.js.map +1 -1
  29. package/build/esm/packages/aurora/src/components/zoom_stepper/zoom_stepper.d.ts +3 -0
  30. package/build/esm/packages/aurora/src/components/zoom_stepper/zoom_stepper.js +58 -0
  31. package/build/esm/packages/aurora/src/components/zoom_stepper/zoom_stepper.js.map +1 -0
  32. package/build/esm/packages/aurora/src/components/zoom_stepper/zoom_stepper_types.d.ts +11 -0
  33. package/build/esm/packages/aurora/src/components/zoom_stepper/zoom_stepper_types.js +2 -0
  34. package/build/esm/packages/aurora/src/components/zoom_stepper/zoom_stepper_types.js.map +1 -0
  35. package/build/index.css +1 -1
  36. package/package.json +1 -1
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var ACTION_LIST_VARIANTS = {
6
+ basic: 'basic',
7
+ noDropdownIcon: 'noDropdownIcon'
8
+ };
9
+
10
+ exports.ACTION_LIST_VARIANTS = ACTION_LIST_VARIANTS;
11
+ //# sourceMappingURL=action_list_constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var index = require('../../../../../external/class-variance-authority/dist/index.mjs.js');
6
+
7
+ var actionListTriggerVariants = index.cva('aurora-group aurora-max-h-[32px] aurora-text-s aurora-py-1 aurora-px-3 aurora-rounded-6 aurora-bg aurora-flex aurora-justify-between hover:aurora-bg-hover aurora-select-none focus aurora-cursor-pointer aurora-items-center aurora-gap-2.5 aurora-transition-all data-[state=open]:aurora-bg-active data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-opacity-50', {
8
+ variants: {
9
+ variant: {
10
+ basic: '',
11
+ noDropdownIcon: 'aurora-bg-transparent aurora-px-0 aurora-py-0'
12
+ }
13
+ },
14
+ defaultVariants: {
15
+ variant: 'basic'
16
+ }
17
+ });
18
+
19
+ exports.actionListTriggerVariants = actionListTriggerVariants;
20
+ //# sourceMappingURL=action_list_variants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,oBAAoB,oEAAwE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -5,26 +5,31 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var React = require('react');
6
6
  var _rollupPluginBabelHelpers = require('../../../../../../_virtual/_rollupPluginBabelHelpers.js');
7
7
  var cn = require('../../../utilities/cn.js');
8
- require('@radix-ui/react-dropdown-menu');
9
8
  var action_list_generic_trigger = require('./action_list_generic_trigger.js');
9
+ var action_list_variants = require('../action_list_variants.js');
10
10
  var arrow_down_s_line_icon = require('../../../assets/icons/arrow_down_s_line_icon.js');
11
+ var action_list_constants = require('../action_list_constants.js');
11
12
 
12
13
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
14
 
14
15
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
15
16
 
16
- var _excluded = ["children", "className"];
17
+ var _excluded = ["children", "className", "variant"];
17
18
  var ActionListTrigger = function ActionListTrigger(_ref) {
18
19
  var children = _ref.children,
19
20
  className = _ref.className,
21
+ _ref$variant = _ref.variant,
22
+ variant = _ref$variant === void 0 ? 'basic' : _ref$variant,
20
23
  props = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
21
24
  return /*#__PURE__*/React__default['default'].createElement(action_list_generic_trigger.ActionListGenericTrigger, _rollupPluginBabelHelpers.objectSpread2({
22
- className: cn.cn('aurora-group aurora-max-h-[32px] aurora-text-s aurora-py-1 aurora-px-3 aurora-rounded-6 aurora-bg aurora-flex aurora-justify-between hover:aurora-bg-hover aurora-select-none focus aurora-cursor-pointer aurora-items-center aurora-gap-2.5 aurora-py aurora-transition-all data-[state=open]:aurora-bg-active data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-opacity-50', className),
25
+ className: cn.cn(action_list_variants.actionListTriggerVariants({
26
+ variant: variant
27
+ }), className),
23
28
  "data-test-el": "action-list-trigger"
24
- }, props), /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, children, /*#__PURE__*/React__default['default'].createElement(arrow_down_s_line_icon.ArrowDownSLineIcon, {
29
+ }, props), /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, children, variant !== action_list_constants.ACTION_LIST_VARIANTS.noDropdownIcon && (/*#__PURE__*/React__default['default'].createElement(arrow_down_s_line_icon.ArrowDownSLineIcon, {
25
30
  className: "group-hover:aurora-fill group-data-[state=open]:aurora-fill group-data-[state=closed]:aurora-fill-subtle",
26
31
  size: 20
27
- })));
32
+ }))));
28
33
  };
29
34
 
30
35
  exports.ActionListTrigger = ActionListTrigger;
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var React = require('react');
6
6
  var _rollupPluginBabelHelpers = require('../../../../../_virtual/_rollupPluginBabelHelpers.js');
7
7
  var cn = require('../../utilities/cn.js');
8
- var stack_constants = require('./stack_constants.js');
9
8
  var index = require('../../../../../external/class-variance-authority/dist/index.mjs.js');
9
+ var stack_constants = require('./stack_constants.js');
10
10
 
11
11
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
12
 
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oEAAwE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oEAAwE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -0,0 +1 @@
1
+ export declare const AddLineIcon: import("@remixicon/react").RemixiconComponentType;
@@ -0,0 +1,3 @@
1
+ import { RiAddLine } from '@remixicon/react';
2
+ export const AddLineIcon = RiAddLine;
3
+ //# sourceMappingURL=add_line_icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add_line_icon.js","sourceRoot":"","sources":["../../../../../../../src/assets/icons/add_line_icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const SubtractLineIcon: import("@remixicon/react").RemixiconComponentType;
@@ -0,0 +1,3 @@
1
+ import { RiSubtractLine } from '@remixicon/react';
2
+ export const SubtractLineIcon = RiSubtractLine;
3
+ //# sourceMappingURL=subtract_line_icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subtract_line_icon.js","sourceRoot":"","sources":["../../../../../../../src/assets/icons/subtract_line_icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const ACTION_LIST_VARIANTS: {
2
+ readonly basic: "basic";
3
+ readonly noDropdownIcon: "noDropdownIcon";
4
+ };
@@ -0,0 +1,7 @@
1
+ var ACTION_LIST_VARIANTS = {
2
+ basic: 'basic',
3
+ noDropdownIcon: 'noDropdownIcon'
4
+ };
5
+
6
+ export { ACTION_LIST_VARIANTS };
7
+ //# sourceMappingURL=action_list_constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;"}
@@ -1,4 +1,7 @@
1
- import { DropdownMenuPortalProps, DropdownMenuProps } from '@radix-ui/react-dropdown-menu';
1
+ import { DropdownMenuPortalProps, DropdownMenuProps, DropdownMenuTriggerProps } from '@radix-ui/react-dropdown-menu';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { PropsWithChildren } from 'react';
4
+ import { actionListTriggerVariants } from './action_list_variants';
2
5
  export declare type TActionListProps = DropdownMenuProps & DropdownMenuPortalProps & {
3
6
  portal?: boolean;
4
7
  $container?: HTMLElement;
@@ -8,3 +11,6 @@ export declare type TActionListContext = {
8
11
  $container?: HTMLElement;
9
12
  initialPointerEventsOnContainer?: string;
10
13
  };
14
+ export declare type TActionListTriggerProps = PropsWithChildren<DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>> & VariantProps<typeof actionListTriggerVariants> & {
15
+ className?: string;
16
+ };
@@ -1,2 +1,5 @@
1
1
  import '@radix-ui/react-dropdown-menu';
2
+ import 'class-variance-authority';
3
+ import 'react';
4
+ import './action_list_variants';
2
5
  //# sourceMappingURL=action_list_types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"action_list_types.js","sourceRoot":"","sources":["../../../../../../../src/components/action_list/action_list_types.ts"],"names":[],"mappings":"AAAA,OAA2D,+BAA+B,CAAC"}
1
+ {"version":3,"file":"action_list_types.js","sourceRoot":"","sources":["../../../../../../../src/components/action_list/action_list_types.ts"],"names":[],"mappings":"AAAA,OAAqF,+BAA+B,CAAC;AACrH,OAA6B,0BAA0B,CAAC;AACxD,OAAkC,OAAO,CAAC;AAC1C,OAA0C,wBAAwB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const actionListTriggerVariants: (props?: ({
2
+ variant?: "basic" | "noDropdownIcon" | null | undefined;
3
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -0,0 +1,16 @@
1
+ import { cva } from '../../../../../external/class-variance-authority/dist/index.mjs.js';
2
+
3
+ var actionListTriggerVariants = cva('aurora-group aurora-max-h-[32px] aurora-text-s aurora-py-1 aurora-px-3 aurora-rounded-6 aurora-bg aurora-flex aurora-justify-between hover:aurora-bg-hover aurora-select-none focus aurora-cursor-pointer aurora-items-center aurora-gap-2.5 aurora-transition-all data-[state=open]:aurora-bg-active data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-opacity-50', {
4
+ variants: {
5
+ variant: {
6
+ basic: '',
7
+ noDropdownIcon: 'aurora-bg-transparent aurora-px-0 aurora-py-0'
8
+ }
9
+ },
10
+ defaultVariants: {
11
+ variant: 'basic'
12
+ }
13
+ });
14
+
15
+ export { actionListTriggerVariants };
16
+ //# sourceMappingURL=action_list_variants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,oBAAoB,oEAAwE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -1,3 +1,3 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import { DropdownMenuTriggerProps } from '@radix-ui/react-dropdown-menu';
3
- export declare const ActionListTrigger: ({ children, className, ...props }: PropsWithChildren<DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>) => React.JSX.Element;
1
+ import React from 'react';
2
+ import { TActionListTriggerProps } from '../action_list_types';
3
+ export declare const ActionListTrigger: ({ children, className, variant, ...props }: TActionListTriggerProps) => React.JSX.Element;
@@ -1,22 +1,27 @@
1
1
  import React from 'react';
2
2
  import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
3
3
  import { cn } from '../../../utilities/cn.js';
4
- import '@radix-ui/react-dropdown-menu';
5
4
  import { ActionListGenericTrigger } from './action_list_generic_trigger.js';
5
+ import { actionListTriggerVariants } from '../action_list_variants.js';
6
6
  import { ArrowDownSLineIcon } from '../../../assets/icons/arrow_down_s_line_icon.js';
7
+ import { ACTION_LIST_VARIANTS } from '../action_list_constants.js';
7
8
 
8
- var _excluded = ["children", "className"];
9
+ var _excluded = ["children", "className", "variant"];
9
10
  var ActionListTrigger = function ActionListTrigger(_ref) {
10
11
  var children = _ref.children,
11
12
  className = _ref.className,
13
+ _ref$variant = _ref.variant,
14
+ variant = _ref$variant === void 0 ? 'basic' : _ref$variant,
12
15
  props = _objectWithoutProperties(_ref, _excluded);
13
16
  return /*#__PURE__*/React.createElement(ActionListGenericTrigger, _objectSpread2({
14
- className: cn('aurora-group aurora-max-h-[32px] aurora-text-s aurora-py-1 aurora-px-3 aurora-rounded-6 aurora-bg aurora-flex aurora-justify-between hover:aurora-bg-hover aurora-select-none focus aurora-cursor-pointer aurora-items-center aurora-gap-2.5 aurora-py aurora-transition-all data-[state=open]:aurora-bg-active data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-opacity-50', className),
17
+ className: cn(actionListTriggerVariants({
18
+ variant: variant
19
+ }), className),
15
20
  "data-test-el": "action-list-trigger"
16
- }, props), /*#__PURE__*/React.createElement(React.Fragment, null, children, /*#__PURE__*/React.createElement(ArrowDownSLineIcon, {
21
+ }, props), /*#__PURE__*/React.createElement(React.Fragment, null, children, variant !== ACTION_LIST_VARIANTS.noDropdownIcon && (/*#__PURE__*/React.createElement(ArrowDownSLineIcon, {
17
22
  className: "group-hover:aurora-fill group-data-[state=open]:aurora-fill group-data-[state=closed]:aurora-fill-subtle",
18
23
  size: 20
19
- })));
24
+ }))));
20
25
  };
21
26
 
22
27
  export { ActionListTrigger };
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -1,8 +1,8 @@
1
1
  import React, { useRef, useImperativeHandle } from 'react';
2
2
  import { defineProperty as _defineProperty, objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
3
3
  import { cn } from '../../utilities/cn.js';
4
- import { STACK_DIRECTION_TYPES, STACK_WRAP_TYPES, STACK_ALIGN_ITEMS_TYPES, STACK_JUSTIFY_CONTENT_TYPES } from './stack_constants.js';
5
4
  import { cva } from '../../../../../external/class-variance-authority/dist/index.mjs.js';
5
+ import { STACK_DIRECTION_TYPES, STACK_WRAP_TYPES, STACK_ALIGN_ITEMS_TYPES, STACK_JUSTIFY_CONTENT_TYPES } from './stack_constants.js';
6
6
 
7
7
  var _excluded = ["children", "spacing", "className", "direction", "justify", "align", "wrap", "as", "inline", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "style"];
8
8
  var stackVariants = cva('aurora-flex', {
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,oBAAoB,oEAAwE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA,oBAAoB,oEAAwE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { TZoomStepperProps } from './zoom_stepper_types';
3
+ export declare const ZoomStepper: React.FC<TZoomStepperProps>;
@@ -0,0 +1,58 @@
1
+ import React from 'react';
2
+ import './zoom_stepper_types';
3
+ import { SubtractLineIcon } from '@auroraAssets/icons/subtract_line_icon';
4
+ import { AddLineIcon } from '@auroraAssets/icons/add_line_icon';
5
+ import { TooltipProvider } from '@auroraComponents/tooltip/context/tooltip_provider';
6
+ import { Tooltip } from '@auroraComponents/tooltip/tooltip';
7
+ import { TooltipTrigger } from '@auroraComponents/tooltip/components/tooltip_trigger';
8
+ import { TooltipContent } from '@auroraComponents/tooltip/components/tooltip_content';
9
+ import { useTranslation } from 'react-i18next';
10
+ import { ActionList } from '@auroraComponents/action_list/action_list';
11
+ import { ActionListTrigger } from '@auroraComponents/action_list/components/action_list_trigger';
12
+ import { ActionListContent } from '@auroraComponents/action_list/components/action_list_content';
13
+ import { ActionListRadioGroup } from '@auroraComponents/action_list/components/action_list_radio_group';
14
+ import { ActionListRadioItem } from '@auroraComponents/action_list/components/action_list_radio_item';
15
+ export const ZoomStepper = ({ value, onChange, onIncreaseClick, onDecreaseClick, step = 10, min = 10, max = 200, options }) => {
16
+ const { t } = useTranslation();
17
+ if (!value)
18
+ return null;
19
+ const roundToNextStep = (val, step) => Math.ceil(val / step) * step;
20
+ const roundToPrevStep = (val, step) => Math.floor(val / step) * step;
21
+ const handleIncrease = () => {
22
+ const next = roundToNextStep((value ?? min) + 1, step);
23
+ const newVal = Math.min(max, next);
24
+ onChange?.(newVal);
25
+ onIncreaseClick?.(newVal);
26
+ };
27
+ const handleDecrease = () => {
28
+ const prev = roundToPrevStep((value ?? min) - 1, step);
29
+ const newVal = Math.max(min, prev);
30
+ onChange?.(newVal);
31
+ onDecreaseClick?.(newVal);
32
+ };
33
+ const handleSelect = (val) => {
34
+ const parsed = parseInt(val, 10);
35
+ if (!isNaN(parsed)) {
36
+ onChange?.(parsed);
37
+ }
38
+ };
39
+ return (React.createElement("div", { className: "aurora-flex aurora-items-center aurora-gap-1" },
40
+ React.createElement(TooltipProvider, null,
41
+ React.createElement(Tooltip, null,
42
+ React.createElement(TooltipTrigger, { asChild: true, className: "aurora-h-5" },
43
+ React.createElement("button", { className: "aurora-p-0.5 aurora-border-0 aurora-bg-none aurora-cursor-pointer aurora-rounded-4 aurora-bg-transparent hover:aurora-bg-hover", onClick: handleDecrease },
44
+ React.createElement(SubtractLineIcon, { size: 16 }))),
45
+ React.createElement(TooltipContent, { variant: "dark" }, `${t('Zoom out ⌘ -')}`))),
46
+ React.createElement(ActionList, null,
47
+ React.createElement(ActionListTrigger, { variant: "noDropdownIcon", className: "aurora-text-xs aurora-px-[6px] !aurora-py-0" }, `${value}%`),
48
+ React.createElement(ActionListContent, null,
49
+ React.createElement(ActionListRadioGroup, { value: value.toString(), onValueChange: handleSelect }, options.map((opt) => (React.createElement(ActionListRadioItem, { key: opt.value, value: opt.value }, opt.text)))))),
50
+ React.createElement(TooltipProvider, null,
51
+ React.createElement(Tooltip, null,
52
+ React.createElement(TooltipTrigger, { asChild: true, className: "aurora-h-5" },
53
+ React.createElement("button", { className: "aurora-p-0.5 aurora-border-0 aurora-bg-none aurora-cursor-pointer aurora-rounded-4 aurora-bg-transparent hover:aurora-bg-hover", onClick: handleIncrease },
54
+ React.createElement(AddLineIcon, { size: 16 }))),
55
+ React.createElement(TooltipContent, { variant: "dark" }, `${t('Zoom in ⌘ +')}`)))));
56
+ };
57
+ ZoomStepper.displayName = 'ZoomStepper';
58
+ //# sourceMappingURL=zoom_stepper.js.map
@@ -0,0 +1 @@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zB,CACI;gBACjB,oBAAC,cAAc,IAAC,OAAO,EAAC,MAAM,IAAE,GAAG,CAAC,CAAC,cAAc,CAAC,EAAE,CAAkB,CAClE,CACI;QAElB,oBAAC,UAAU;YACP,oBAAC,iBAAiB,IACd,OAAO,EAAC,gBAAgB,EACxB,SAAS,EAAC,6CAA6C,IACzD,GAAG,KAAK,GAAG,CAAqB;YAClC,oBAAC,iBAAiB;gBACd,oBAAC,oBAAoB,IAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,aAAa,EAAE,YAAY,IACrE,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAClB,oBAAC,mBAAmB,IAAC,GAAG,EAAE,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,IAChD,GAAG,CAAC,IAAI,CACS,CACzB,CAAC,CACiB,CACP,CACX;QAEb,oBAAC,eAAe;YACZ,oBAAC,OAAO;gBACJ,oBAAC,cAAc,IAAC,OAAO,QAAC,SAAS,EAAC,YAAY;oBAC1C,gCACI,SAAS,EAAC,gIAAgI,EAC1I,OAAO,EAAE,cAAc;wBAEvB,oBAAC,WAAW,IAAC,IAAI,EAAE,EAAE,GAAI,CACpB,CACI;gBACjB,oBAAC,cAAc,IAAC,OAAO,EAAC,MAAM,IAAE,GAAG,CAAC,CAAC,aAAa,CAAC,EAAE,CAAkB,CACjE,CACI,CAChB,CACT,CAAC;AACN,CAAC,CAAC;AAEF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { TSelectOption } from "../select/select_types";
2
+ export interface TZoomStepperProps {
3
+ value?: number;
4
+ onChange?: (newValue: number) => void;
5
+ onIncreaseClick?: (newValue: number) => void;
6
+ onDecreaseClick?: (newValue: number) => void;
7
+ min?: number;
8
+ max?: number;
9
+ step?: number;
10
+ options: TSelectOption[];
11
+ }
@@ -0,0 +1,2 @@
1
+ import '@auroraComponents/select/select_types';
2
+ //# sourceMappingURL=zoom_stepper_types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zoom_stepper_types.js","sourceRoot":"","sources":["../../../../../../../src/components/zoom_stepper/zoom_stepper_types.ts"],"names":[],"mappings":"AAAA,OAA8B,uCAAuC,CAAC"}