@dreamcommerce/aurora 3.1.57 → 3.1.58

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.
@@ -14,7 +14,7 @@ var AccordionItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
14
14
  props = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
15
15
  return /*#__PURE__*/React.createElement(index.Item, _rollupPluginBabelHelpers.objectSpread2({
16
16
  ref: ref,
17
- className: cn.cn('aurora-border-t last:aurora-border-b data-[state=open]:aurora-border-b-0', _rollupPluginBabelHelpers.defineProperty({}, "aurora-border-".concat(borderStyle), !!borderStyle), className)
17
+ className: cn.cn('aurora-border-t last:aurora-border-b data-[state=open]:aurora-border-b-0 aurora-border-subtle', _rollupPluginBabelHelpers.defineProperty({}, "aurora-border-".concat(borderStyle), !!borderStyle), className)
18
18
  }, props));
19
19
  });
20
20
  AccordionItem.displayName = 'AccordionItem';
@@ -24,12 +24,12 @@ var AccordionTrigger = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
24
24
  className: cn.cn('aurora-text-s aurora-font-semibold aurora-tracking', _rollupPluginBabelHelpers.defineProperty({}, "aurora-bg-".concat(backgroundColor), !!backgroundColor))
25
25
  }, /*#__PURE__*/React.createElement(index.Trigger, _rollupPluginBabelHelpers.objectSpread2({
26
26
  ref: ref,
27
- className: cn.cn('aurora-flex aurora-items-center aurora-w-full aurora-gap-2 aurora-py-2 aurora-pl-1.5 aurora-pr-4 aurora-text-subtle aurora-font-semibold aurora-transition-all [&[data-state=open]>svg]:aurora-rotate-90', _rollupPluginBabelHelpers.defineProperty({}, 'aurora-bg', !backgroundColor), className)
28
- }, props), icon ? icon : (/*#__PURE__*/React.createElement(arrow_right.ArrowRightIcon, {
29
- color: css_icon_color_tokens.CSS_ICON_COLOR_TOKENS_VALUES.subtle,
27
+ className: cn.cn('aurora-flex aurora-items-center aurora-justify-between aurora-w-full aurora-gap-2 aurora-py-2 aurora-px-3 aurora-text-base aurora-font-semibold aurora-transition-all [&[data-state=open]>svg]:aurora-rotate-90', _rollupPluginBabelHelpers.defineProperty({}, 'aurora-bg', !backgroundColor), className)
28
+ }, props), children, icon ? icon : (/*#__PURE__*/React.createElement(arrow_right.ArrowRightIcon, {
29
+ color: css_icon_color_tokens.CSS_ICON_COLOR_TOKENS_VALUES.inverseDisabled,
30
30
  size: accordionContext.size === accordion_constants.ACCORDION_SIZES.default ? 24 : 20,
31
- className: cn.cn('aurora-shrink-0 aurora-text-muted-foreground aurora-transition-transform aurora-duration-200')
32
- })), children));
31
+ className: cn.cn('aurora-shrink-0 aurora-text-muted-foreground aurora-transition-transform aurora-duration-200 aurora-cursor-pointer')
32
+ }))));
33
33
  });
34
34
  AccordionTrigger.displayName = index.Trigger.displayName;
35
35
 
@@ -11,7 +11,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
11
11
 
12
12
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
13
13
 
14
- var _excluded = ["preElement", "postElement", "errors", "className", "id", "name", "value", "defaultValue", "placeholder", "disabled", "readOnly", "type", "hasCursorPointer", "onChange", "onKeyDown", "onKeyUp"];
14
+ var _excluded = ["preElement", "postElement", "errors", "className", "id", "name", "value", "defaultValue", "placeholder", "disabled", "readOnly", "type", "hasCursorPointer", "inputSize", "onChange", "onKeyDown", "onKeyUp"];
15
15
  var Input = /*#__PURE__*/React__default['default'].forwardRef(function (_ref, ref) {
16
16
  var preElement = _ref.preElement,
17
17
  postElement = _ref.postElement,
@@ -27,6 +27,8 @@ var Input = /*#__PURE__*/React__default['default'].forwardRef(function (_ref, re
27
27
  readOnly = _ref.readOnly,
28
28
  type = _ref.type,
29
29
  hasCursorPointer = _ref.hasCursorPointer,
30
+ _ref$inputSize = _ref.inputSize,
31
+ inputSize = _ref$inputSize === void 0 ? 'md' : _ref$inputSize,
30
32
  onChange = _ref.onChange,
31
33
  onKeyDown = _ref.onKeyDown,
32
34
  onKeyUp = _ref.onKeyUp,
@@ -37,9 +39,9 @@ var Input = /*#__PURE__*/React__default['default'].forwardRef(function (_ref, re
37
39
  'aurora-bg-subtle aurora-text-subtle-light aurora-pointer-events-none aurora-cursor-not-allowed': disabled,
38
40
  'aurora-appearance-none': type === 'number'
39
41
  }, className)
40
- }, preElement && (/*#__PURE__*/React__default['default'].createElement("div", {
41
- className: 'aurora-flex aurora-h-full aurora-items-center aurora-pointer-events-none aurora-pl-2'
42
- }, preElement)), /*#__PURE__*/React__default['default'].createElement("input", _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, props), {}, {
42
+ }, preElement && /*#__PURE__*/React__default['default'].createElement("div", {
43
+ className: "aurora-flex aurora-h-full aurora-items-center aurora-pointer-events-none aurora-pl-2"
44
+ }, preElement), /*#__PURE__*/React__default['default'].createElement("input", _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, props), {}, {
43
45
  ref: ref,
44
46
  id: id,
45
47
  name: name,
@@ -52,7 +54,9 @@ var Input = /*#__PURE__*/React__default['default'].forwardRef(function (_ref, re
52
54
  onKeyDown: onKeyDown,
53
55
  onKeyUp: onKeyUp,
54
56
  type: type,
55
- className: cn.cn('aurora-h-[40px] aurora-w-full focus:aurora-outline-none focus:aurora-shadow-none aurora-px-2 aurora-rounded-6', {
57
+ className: cn.cn(input_variants.inputElementVariants({
58
+ inputSize: inputSize
59
+ }), {
56
60
  'aurora-cursor-pointer': hasCursorPointer
57
61
  })
58
62
  })), postElement && /*#__PURE__*/React__default['default'].createElement("div", {
@@ -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;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;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;"}
@@ -5,6 +5,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var index = require('../../../../../external/class-variance-authority/dist/index.mjs.js');
6
6
 
7
7
  var inputVariants = index.cva('aurora-relative aurora-flex aurora-items-center aurora-rounded-6 focus aurora-border aurora-bg aurora-text-s aurora-placeholder-neutral-500 aurora-text aurora-border-strong hover:aurora-border-extraStrong active:aurora-border-active disabled:aurora-opacity-50 aurora-w-full');
8
+ var inputElementVariants = index.cva('aurora-w-full focus:aurora-outline-none focus:aurora-shadow-none aurora-px-2 aurora-rounded-6', {
9
+ variants: {
10
+ inputSize: {
11
+ sm: 'aurora-h-6',
12
+ md: 'aurora-h-10'
13
+ }
14
+ },
15
+ defaultVariants: {
16
+ inputSize: 'md'
17
+ }
18
+ });
8
19
 
20
+ exports.inputElementVariants = inputElementVariants;
9
21
  exports.inputVariants = inputVariants;
10
22
  //# sourceMappingURL=input_variants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,oBAAoB,oEAAwE;AAC5F;AACA;AACA;AACA;"}
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;"}
@@ -10,7 +10,7 @@ var AccordionItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
10
10
  props = _objectWithoutProperties(_ref, _excluded);
11
11
  return /*#__PURE__*/createElement(Item, _objectSpread2({
12
12
  ref: ref,
13
- className: cn('aurora-border-t last:aurora-border-b data-[state=open]:aurora-border-b-0', _defineProperty({}, "aurora-border-".concat(borderStyle), !!borderStyle), className)
13
+ className: cn('aurora-border-t last:aurora-border-b data-[state=open]:aurora-border-b-0 aurora-border-subtle', _defineProperty({}, "aurora-border-".concat(borderStyle), !!borderStyle), className)
14
14
  }, props));
15
15
  });
16
16
  AccordionItem.displayName = 'AccordionItem';
@@ -20,12 +20,12 @@ var AccordionTrigger = /*#__PURE__*/forwardRef(function (_ref, ref) {
20
20
  className: cn('aurora-text-s aurora-font-semibold aurora-tracking', _defineProperty({}, "aurora-bg-".concat(backgroundColor), !!backgroundColor))
21
21
  }, /*#__PURE__*/createElement(Trigger2, _objectSpread2({
22
22
  ref: ref,
23
- className: cn('aurora-flex aurora-items-center aurora-w-full aurora-gap-2 aurora-py-2 aurora-pl-1.5 aurora-pr-4 aurora-text-subtle aurora-font-semibold aurora-transition-all [&[data-state=open]>svg]:aurora-rotate-90', _defineProperty({}, 'aurora-bg', !backgroundColor), className)
24
- }, props), icon ? icon : (/*#__PURE__*/createElement(ArrowRightIcon, {
25
- color: CSS_ICON_COLOR_TOKENS_VALUES.subtle,
23
+ className: cn('aurora-flex aurora-items-center aurora-justify-between aurora-w-full aurora-gap-2 aurora-py-2 aurora-px-3 aurora-text-base aurora-font-semibold aurora-transition-all [&[data-state=open]>svg]:aurora-rotate-90', _defineProperty({}, 'aurora-bg', !backgroundColor), className)
24
+ }, props), children, icon ? icon : (/*#__PURE__*/createElement(ArrowRightIcon, {
25
+ color: CSS_ICON_COLOR_TOKENS_VALUES.inverseDisabled,
26
26
  size: accordionContext.size === ACCORDION_SIZES.default ? 24 : 20,
27
- className: cn('aurora-shrink-0 aurora-text-muted-foreground aurora-transition-transform aurora-duration-200')
28
- })), children));
27
+ className: cn('aurora-shrink-0 aurora-text-muted-foreground aurora-transition-transform aurora-duration-200 aurora-cursor-pointer')
28
+ }))));
29
29
  });
30
30
  AccordionTrigger.displayName = Trigger2.displayName;
31
31
 
@@ -1,9 +1,9 @@
1
1
  import React__default 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 { inputVariants } from './input_variants.js';
4
+ import { inputVariants, inputElementVariants } from './input_variants.js';
5
5
 
6
- var _excluded = ["preElement", "postElement", "errors", "className", "id", "name", "value", "defaultValue", "placeholder", "disabled", "readOnly", "type", "hasCursorPointer", "onChange", "onKeyDown", "onKeyUp"];
6
+ var _excluded = ["preElement", "postElement", "errors", "className", "id", "name", "value", "defaultValue", "placeholder", "disabled", "readOnly", "type", "hasCursorPointer", "inputSize", "onChange", "onKeyDown", "onKeyUp"];
7
7
  var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
8
8
  var preElement = _ref.preElement,
9
9
  postElement = _ref.postElement,
@@ -19,6 +19,8 @@ var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
19
19
  readOnly = _ref.readOnly,
20
20
  type = _ref.type,
21
21
  hasCursorPointer = _ref.hasCursorPointer,
22
+ _ref$inputSize = _ref.inputSize,
23
+ inputSize = _ref$inputSize === void 0 ? 'md' : _ref$inputSize,
22
24
  onChange = _ref.onChange,
23
25
  onKeyDown = _ref.onKeyDown,
24
26
  onKeyUp = _ref.onKeyUp,
@@ -29,9 +31,9 @@ var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
29
31
  'aurora-bg-subtle aurora-text-subtle-light aurora-pointer-events-none aurora-cursor-not-allowed': disabled,
30
32
  'aurora-appearance-none': type === 'number'
31
33
  }, className)
32
- }, preElement && (/*#__PURE__*/React__default.createElement("div", {
33
- className: 'aurora-flex aurora-h-full aurora-items-center aurora-pointer-events-none aurora-pl-2'
34
- }, preElement)), /*#__PURE__*/React__default.createElement("input", _objectSpread2(_objectSpread2({}, props), {}, {
34
+ }, preElement && /*#__PURE__*/React__default.createElement("div", {
35
+ className: "aurora-flex aurora-h-full aurora-items-center aurora-pointer-events-none aurora-pl-2"
36
+ }, preElement), /*#__PURE__*/React__default.createElement("input", _objectSpread2(_objectSpread2({}, props), {}, {
35
37
  ref: ref,
36
38
  id: id,
37
39
  name: name,
@@ -44,7 +46,9 @@ var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
44
46
  onKeyDown: onKeyDown,
45
47
  onKeyUp: onKeyUp,
46
48
  type: type,
47
- className: cn('aurora-h-[40px] aurora-w-full focus:aurora-outline-none focus:aurora-shadow-none aurora-px-2 aurora-rounded-6', {
49
+ className: cn(inputElementVariants({
50
+ inputSize: inputSize
51
+ }), {
48
52
  'aurora-cursor-pointer': hasCursorPointer
49
53
  })
50
54
  })), postElement && /*#__PURE__*/React__default.createElement("div", {
@@ -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;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;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,11 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { VariantProps } from 'class-variance-authority';
3
- import { inputVariants } from './input_variants';
4
- export interface TInputProps extends React.InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputVariants> {
2
+ export interface TInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
5
3
  preElement?: React.ReactNode;
6
4
  postElement?: React.ReactNode;
7
5
  errors?: string | string[];
8
6
  hasCursorPointer?: boolean;
9
7
  colorName?: string;
10
8
  primary?: boolean;
9
+ inputSize?: 'sm' | 'md';
11
10
  }
@@ -1,3 +1,2 @@
1
- import 'class-variance-authority';
2
- import './input_variants';
1
+ export {};
3
2
  //# sourceMappingURL=input_types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input_types.js","sourceRoot":"","sources":["../../../../../../../src/components/input/input_types.ts"],"names":[],"mappings":"AAAA,OAA6B,0BAA0B,CAAC;AACxD,OAA8B,kBAAkB,CAAC"}
1
+ {"version":3,"file":"input_types.js","sourceRoot":"","sources":["../../../../../../../src/components/input/input_types.ts"],"names":[],"mappings":""}
@@ -1 +1,4 @@
1
1
  export declare const inputVariants: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
2
+ export declare const inputElementVariants: (props?: ({
3
+ inputSize?: "sm" | "md" | null | undefined;
4
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -1,6 +1,17 @@
1
1
  import { cva } from '../../../../../external/class-variance-authority/dist/index.mjs.js';
2
2
 
3
3
  var inputVariants = cva('aurora-relative aurora-flex aurora-items-center aurora-rounded-6 focus aurora-border aurora-bg aurora-text-s aurora-placeholder-neutral-500 aurora-text aurora-border-strong hover:aurora-border-extraStrong active:aurora-border-active disabled:aurora-opacity-50 aurora-w-full');
4
+ var inputElementVariants = cva('aurora-w-full focus:aurora-outline-none focus:aurora-shadow-none aurora-px-2 aurora-rounded-6', {
5
+ variants: {
6
+ inputSize: {
7
+ sm: 'aurora-h-6',
8
+ md: 'aurora-h-10'
9
+ }
10
+ },
11
+ defaultVariants: {
12
+ inputSize: 'md'
13
+ }
14
+ });
4
15
 
5
- export { inputVariants };
16
+ export { inputElementVariants, inputVariants };
6
17
  //# sourceMappingURL=input_variants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,oBAAoB,oEAAwE;AAC5F;AACA;AACA;AACA;"}
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;AACA;"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@dreamcommerce/aurora",
3
3
  "packageManager": "yarn@3.2.0",
4
4
  "sideEffects": false,
5
- "version": "3.1.57",
5
+ "version": "3.1.58",
6
6
  "description": "aurora",
7
7
  "author": "zefirek",
8
8
  "license": "MIT",