@onesy/ui-react 1.0.91 → 1.0.93

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.
@@ -89,6 +89,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
89
89
  },
90
90
  input_size_small: {
91
91
  maxWidth: '72px',
92
+ width: '100%',
92
93
  '& .onesy-TextField-input-wrapper': {
93
94
  paddingInline: '0px',
94
95
  paddingBlock: `${theme.methods.space.value(1, 'px')} ${theme.methods.space.value(0.5, 'px')}`,
@@ -102,6 +103,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
102
103
  },
103
104
  input_size_regular: {
104
105
  maxWidth: '96px',
106
+ width: '100%',
105
107
  '& .onesy-TextField-input-wrapper': {
106
108
  paddingInline: '0px',
107
109
  paddingBlock: `${theme.methods.space.value(1.5, 'px')} ${theme.methods.space.value(1, 'px')}`,
@@ -115,6 +117,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
115
117
  },
116
118
  input_size_large: {
117
119
  maxWidth: '120px',
120
+ width: '100%',
118
121
  '& .onesy-TextField-input-wrapper': {
119
122
  paddingInline: '0px',
120
123
  paddingBlock: `${theme.methods.space.value(2, 'px')} ${theme.methods.space.value(1.5, 'px')}`,
@@ -571,7 +574,7 @@ const TimePicker = react_1.default.forwardRef((props__, ref) => {
571
574
  }
572
575
  const makeInputs = (index = 0) => {
573
576
  const inputProps = Object.assign({ tonal,
574
- color, version: 'outlined', size, className: (0, style_react_1.classNames)([
577
+ color, version: 'outlined', size, fullWidth: true, className: (0, style_react_1.classNames)([
575
578
  (0, utils_2.staticClassName)('TimePicker', theme) && [
576
579
  'onesy-TimePicker-input'
577
580
  ],
@@ -661,7 +664,7 @@ const TimePicker = react_1.default.forwardRef((props__, ref) => {
661
664
  'onesy-TimePicker-inputs'
662
665
  ],
663
666
  classes.inputs
664
- ]) }, { children: [(0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center', justify: 'center' }, { children: makeInputs(index) })), format === '12' && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({ version: 'outlined', size: size, orientation: orientationValue, value: dayTime[index] || (0, date_1.format)(new date_1.OnesyDate(), 'a'), onChange: valueNew => updateDayTime(valueNew, index), select: 'single', unselect: false }, ToggleButtonsProps, { className: (0, style_react_1.classNames)([
667
+ ]) }, { children: [(0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center', justify: 'center', fullWidth: true }, { children: makeInputs(index) })), format === '12' && ((0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({ version: 'outlined', size: size, orientation: orientationValue, value: dayTime[index] || (0, date_1.format)(new date_1.OnesyDate(), 'a'), onChange: valueNew => updateDayTime(valueNew, index), select: 'single', unselect: false }, ToggleButtonsProps, { className: (0, style_react_1.classNames)([
665
668
  (0, utils_2.staticClassName)('TimePicker', theme) && [
666
669
  'onesy-TimePicker-toggle-buttons'
667
670
  ],
@@ -8,6 +8,7 @@ export declare type ITopAppBar = Omit<ISurface, 'version'> & {
8
8
  title?: IElement;
9
9
  start?: IElement;
10
10
  end?: IElement;
11
+ WrapperProps?: any;
11
12
  };
12
13
  declare const TopAppBar: React.FC<ITopAppBar>;
13
14
  export default TopAppBar;
@@ -111,7 +111,7 @@ const TopAppBar = react_1.default.forwardRef((props_, ref) => {
111
111
  const Line = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Line) || Line_1.default; }, [theme]);
112
112
  const Surface = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Surface) || Surface_1.default; }, [theme]);
113
113
  const Type = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Type) || Type_1.default; }, [theme]);
114
- const { tonal = true, color = 'primary', version = 'small', size = 'regular', center = true, title: title_, start: start_, end: end_, position, Component = 'div', className, children: children_ } = props, other = __rest(props, ["tonal", "color", "version", "size", "center", "title", "start", "end", "position", "Component", "className", "children"]);
114
+ const { tonal = true, color = 'primary', version = 'small', size = 'regular', center = true, title: title_, start: start_, end: end_, position, WrapperProps, Component = 'div', className, children: children_ } = props, other = __rest(props, ["tonal", "color", "version", "size", "center", "title", "start", "end", "position", "WrapperProps", "Component", "className", "children"]);
115
115
  const { classes } = useStyle();
116
116
  const start = react_1.default.Children
117
117
  .toArray(start_)
@@ -176,10 +176,11 @@ const TopAppBar = react_1.default.forwardRef((props_, ref) => {
176
176
  classes.root,
177
177
  position && classes[`position_${position}`],
178
178
  center && classes[`center${['absolute', 'fixed'].includes(position) ? '_absolute' : ''}`]
179
- ]) }, other, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ direction: 'row', align: 'center', justify: 'space-between', gap: 0, className: (0, style_react_1.classNames)([
179
+ ]) }, other, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ direction: 'row', align: 'center', justify: 'space-between', gap: 0 }, WrapperProps, { className: (0, style_react_1.classNames)([
180
180
  (0, utils_2.staticClassName)('TopAppBar', theme) && [
181
181
  'onesy-TopAppBar-wrapper'
182
182
  ],
183
+ WrapperProps === null || WrapperProps === void 0 ? void 0 : WrapperProps.className,
183
184
  classes.wrapper,
184
185
  classes[`version_small_size_${size}`]
185
186
  ]) }, { children: [!!start.length && ((0, jsx_runtime_1.jsx)(Line, Object.assign({ direction: 'row', align: 'center', justify: 'flex-start', gap: 0, className: (0, style_react_1.classNames)([
@@ -78,6 +78,7 @@ const useStyle = styleMethod(theme => ({
78
78
  },
79
79
  input_size_small: {
80
80
  maxWidth: '72px',
81
+ width: '100%',
81
82
  '& .onesy-TextField-input-wrapper': {
82
83
  paddingInline: '0px',
83
84
  paddingBlock: `${theme.methods.space.value(1, 'px')} ${theme.methods.space.value(0.5, 'px')}`,
@@ -94,6 +95,7 @@ const useStyle = styleMethod(theme => ({
94
95
  },
95
96
  input_size_regular: {
96
97
  maxWidth: '96px',
98
+ width: '100%',
97
99
  '& .onesy-TextField-input-wrapper': {
98
100
  paddingInline: '0px',
99
101
  paddingBlock: `${theme.methods.space.value(1.5, 'px')} ${theme.methods.space.value(1, 'px')}`,
@@ -110,6 +112,7 @@ const useStyle = styleMethod(theme => ({
110
112
  },
111
113
  input_size_large: {
112
114
  maxWidth: '120px',
115
+ width: '100%',
113
116
  '& .onesy-TextField-input-wrapper': {
114
117
  paddingInline: '0px',
115
118
  paddingBlock: `${theme.methods.space.value(2, 'px')} ${theme.methods.space.value(1.5, 'px')}`,
@@ -699,6 +702,7 @@ const TimePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
699
702
  color,
700
703
  version: 'outlined',
701
704
  size,
705
+ fullWidth: true,
702
706
  className: classNames([staticClassName('TimePicker', theme) && ['onesy-TimePicker-input'], classes.input, classes[`input_version_${version}`], classes[`input_size_${size}`]]),
703
707
  HelperTextProps: {
704
708
  version: size === 'large' ? 'b2' : size === 'regular' ? 'b3' : 'b3'
@@ -813,7 +817,8 @@ const TimePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
813
817
  gap: 0,
814
818
  direction: "row",
815
819
  align: "center",
816
- justify: "center"
820
+ justify: "center",
821
+ fullWidth: true
817
822
  }, makeInputs(index)), format === '12' && /*#__PURE__*/React.createElement(ToggleButtons, _extends({
818
823
  version: "outlined",
819
824
  size: size,
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
- const _excluded = ["tonal", "color", "version", "size", "center", "title", "start", "end", "position", "Component", "className", "children"];
4
+ const _excluded = ["tonal", "color", "version", "size", "center", "title", "start", "end", "position", "WrapperProps", "Component", "className", "children"];
5
5
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
6
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
7
  import React from 'react';
@@ -136,6 +136,7 @@ const TopAppBar = /*#__PURE__*/React.forwardRef((props_, ref) => {
136
136
  start: start_,
137
137
  end: end_,
138
138
  position,
139
+ WrapperProps,
139
140
  Component = 'div',
140
141
  className,
141
142
  children: children_
@@ -193,13 +194,14 @@ const TopAppBar = /*#__PURE__*/React.forwardRef((props_, ref) => {
193
194
  Component
194
195
  },
195
196
  className: classNames([staticClassName('TopAppBar', theme) && ['onesy-TopAppBar-root', `onesy-TopAppBar-version-${version}`, `onesy-TopAppBar-size-${size}`], className, classes.root, position && classes[`position_${position}`], center && classes[`center${['absolute', 'fixed'].includes(position) ? '_absolute' : ''}`]])
196
- }, other), /*#__PURE__*/React.createElement(Line, {
197
+ }, other), /*#__PURE__*/React.createElement(Line, _extends({
197
198
  direction: "row",
198
199
  align: "center",
199
200
  justify: "space-between",
200
- gap: 0,
201
- className: classNames([staticClassName('TopAppBar', theme) && ['onesy-TopAppBar-wrapper'], classes.wrapper, classes[`version_small_size_${size}`]])
202
- }, !!start.length && /*#__PURE__*/React.createElement(Line, {
201
+ gap: 0
202
+ }, WrapperProps, {
203
+ className: classNames([staticClassName('TopAppBar', theme) && ['onesy-TopAppBar-wrapper'], WrapperProps?.className, classes.wrapper, classes[`version_small_size_${size}`]])
204
+ }), !!start.length && /*#__PURE__*/React.createElement(Line, {
203
205
  direction: "row",
204
206
  align: "center",
205
207
  justify: "flex-start",
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license UiReact v1.0.91
1
+ /** @license UiReact v1.0.93
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onesy/ui-react",
3
- "version": "1.0.91",
3
+ "version": "1.0.93",
4
4
  "description": "UI for React",
5
5
  "repository": "https://github.com/onesy-me/onesy.git",
6
6
  "author": "Lazar <lazareric2@gmail.com>",