@onesy/ui-react 1.0.70 → 1.0.71

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.
@@ -144,6 +144,11 @@ const useStyle = (0, style_react_1.style)(theme => ({
144
144
  }
145
145
  }
146
146
  }), { name: 'onesy-Calendar' });
147
+ // [l('millisecond'), l('milliseconds'), l('second'), l('minute'), l('minutes'), l('hour'), l('hours'), l('day'), l('days'), l('dayWeek'), l('dayYear'), l('week'), l('weeks'), l('month'), l('months'), l('year')];
148
+ // [l('January'), l('February'), l('March'), l('April'), l('May'), l('June'), l('July'), l('August'), l('September'), l('October'), l('November'), l('December')];
149
+ // [l('Jan'), l('Feb'), l('Mar'), l('Apr'), l('May'), l('Jun'), l('Jul'), l('Aug'), l('Sep'), l('Oct'), l('Nov'), l('Dec')];
150
+ // [l('Monday'), l('Tuesday'), l('Wednesday'), l('Thursday'), l('Friday'), l('Saturday'), l('Sunday'];
151
+ // ['Mon'), l('Tue'), l('Wed'), l('Thu'), l('Fri'), l('Sat'), l('Sun')];
147
152
  const Calendar = react_1.default.forwardRef((props__, ref) => {
148
153
  const theme = (0, style_react_1.useOnesyTheme)();
149
154
  const l = theme.l;
@@ -317,7 +322,7 @@ const Calendar = react_1.default.forwardRef((props__, ref) => {
317
322
  width: '100%'
318
323
  } }, { children: [calendars > 1 && ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: size === 'large' ? 'l1' : size === 'regular' ? 'l2' : 'l3', style: {
319
324
  paddingInlineStart: '16px'
320
- } }, { children: (0, date_1.format)(calendarOnesyDate, 'MMMM') }))), (0, jsx_runtime_1.jsx)(CalendarMonth, Object.assign({ color: 'default', value: value, calendar: calendarOnesyDate, valid: valid, now: now, size: size, range: range, offset: index, min: min, max: max, validate: validate }, calendarMonthProps, { onChange: onCalendarMonthChange, onChangeCalendar: onCalendarMonthChangeCalendar, TransitionProps: {
325
+ } }, { children: l((0, date_1.format)(calendarOnesyDate, 'MMMM')) }))), (0, jsx_runtime_1.jsx)(CalendarMonth, Object.assign({ color: 'default', value: value, calendar: calendarOnesyDate, valid: valid, now: now, size: size, range: range, offset: index, min: min, max: max, validate: validate }, calendarMonthProps, { onChange: onCalendarMonthChange, onChangeCalendar: onCalendarMonthChangeCalendar, TransitionProps: {
321
326
  onTransition
322
327
  }, className: (0, style_react_1.classNames)([
323
328
  (0, utils_2.staticClassName)('Calendar', theme) && [
@@ -361,14 +366,14 @@ const Calendar = react_1.default.forwardRef((props__, ref) => {
361
366
  ],
362
367
  classes.arrow,
363
368
  open === 'month' && classes.arrow_open
364
- ]) }) }))), "aria-label": `${l('Select month')}, ${l('current')} ${month}` }, optionButtonProps, { className: (0, style_react_1.classNames)([
369
+ ]) }) }))), "aria-label": `${l('Select month')}, ${l('current')} ${l(month)}` }, optionButtonProps, { className: (0, style_react_1.classNames)([
365
370
  (0, utils_2.staticClassName)('Calendar', theme) && [
366
371
  'onesy-Calendar-option'
367
372
  ],
368
373
  optionButtonProps === null || optionButtonProps === void 0 ? void 0 : optionButtonProps.className,
369
374
  classes.option,
370
375
  open === 'year' && classes.option_secondary
371
- ]) }, { children: month })), (0, jsx_runtime_1.jsx)(Fade, Object.assign({ in: !open }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: () => move(), size: size, "aria-label": l('Next month'), disabled: open || (+year === 2099 && month === 'Dec') }, optionButtonProps, { children: (0, jsx_runtime_1.jsx)(IconNext, { size: size }) })) }))] })), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center' }, { children: [(0, jsx_runtime_1.jsx)(Fade, Object.assign({ in: !open }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: () => move(false, 'year'), size: size, "aria-label": l('Previous year'), disabled: open || +year <= 1970 }, optionButtonProps, { children: (0, jsx_runtime_1.jsx)(IconPrevious, { size: size }) })) })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ version: 'text', onClick: () => onOpen('year'), fontSize: utils_2.iconFontSize, size: size, end: ((0, jsx_runtime_1.jsx)(Fade, Object.assign({ in: open !== 'month' }, { children: (0, jsx_runtime_1.jsx)(IconDropDown, { size: size, className: (0, style_react_1.classNames)([
376
+ ]) }, { children: l(month) })), (0, jsx_runtime_1.jsx)(Fade, Object.assign({ in: !open }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: () => move(), size: size, "aria-label": l('Next month'), disabled: open || (+year === 2099 && month === 'Dec') }, optionButtonProps, { children: (0, jsx_runtime_1.jsx)(IconNext, { size: size }) })) }))] })), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center' }, { children: [(0, jsx_runtime_1.jsx)(Fade, Object.assign({ in: !open }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: () => move(false, 'year'), size: size, "aria-label": l('Previous year'), disabled: open || +year <= 1970 }, optionButtonProps, { children: (0, jsx_runtime_1.jsx)(IconPrevious, { size: size }) })) })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ version: 'text', onClick: () => onOpen('year'), fontSize: utils_2.iconFontSize, size: size, end: ((0, jsx_runtime_1.jsx)(Fade, Object.assign({ in: open !== 'month' }, { children: (0, jsx_runtime_1.jsx)(IconDropDown, { size: size, className: (0, style_react_1.classNames)([
372
377
  (0, utils_2.staticClassName)('Calendar', theme) && [
373
378
  'onesy-Calendar-arrow'
374
379
  ],
@@ -406,7 +411,7 @@ const Calendar = react_1.default.forwardRef((props__, ref) => {
406
411
  ]) }, { children: getMonths(value, calendar, props).map((item, index) => {
407
412
  const onesyDate = item.value;
408
413
  const selected = calendar.month === onesyDate.month;
409
- return ((0, jsx_runtime_1.jsx)(ListItem, { onClick: () => onUpdateCalendarOption(onesyDate), primary: (0, date_1.format)(onesyDate, 'MMMM'), inset: !selected, startAlign: 'center', size: size, start: selected ? ((0, jsx_runtime_1.jsx)(Buttons_1.IconDoneAnimated, { in: true, add: true, simple: true, size: size })) : undefined, disabled: (!valid(onesyDate, 'month')), selected: selected, button: true, PrimaryProps: {
414
+ return ((0, jsx_runtime_1.jsx)(ListItem, { onClick: () => onUpdateCalendarOption(onesyDate), primary: l((0, date_1.format)(onesyDate, 'MMMM')), inset: !selected, startAlign: 'center', size: size, start: selected ? ((0, jsx_runtime_1.jsx)(Buttons_1.IconDoneAnimated, { in: true, add: true, simple: true, size: size })) : undefined, disabled: (!valid(onesyDate, 'month')), selected: selected, button: true, PrimaryProps: {
410
415
  version: size === 'regular' ? 'b2' : size === 'small' ? 'b3' : 'b1'
411
416
  }, "data-value": index, className: (0, style_react_1.classNames)([
412
417
  (0, utils_2.staticClassName)('Calendar', theme) && [
@@ -135,6 +135,14 @@ const useStyle = style(theme => ({
135
135
  }), {
136
136
  name: 'onesy-Calendar'
137
137
  });
138
+ // [l('millisecond'), l('milliseconds'), l('second'), l('minute'), l('minutes'), l('hour'), l('hours'), l('day'), l('days'), l('dayWeek'), l('dayYear'), l('week'), l('weeks'), l('month'), l('months'), l('year')];
139
+
140
+ // [l('January'), l('February'), l('March'), l('April'), l('May'), l('June'), l('July'), l('August'), l('September'), l('October'), l('November'), l('December')];
141
+ // [l('Jan'), l('Feb'), l('Mar'), l('Apr'), l('May'), l('Jun'), l('Jul'), l('Aug'), l('Sep'), l('Oct'), l('Nov'), l('Dec')];
142
+
143
+ // [l('Monday'), l('Tuesday'), l('Wednesday'), l('Thursday'), l('Friday'), l('Saturday'), l('Sunday'];
144
+ // ['Mon'), l('Tue'), l('Wed'), l('Thu'), l('Fri'), l('Sat'), l('Sun')];
145
+
138
146
  const Calendar = /*#__PURE__*/React.forwardRef((props__, ref) => {
139
147
  const theme = useOnesyTheme();
140
148
  const l = theme.l;
@@ -395,7 +403,7 @@ const Calendar = /*#__PURE__*/React.forwardRef((props__, ref) => {
395
403
  style: {
396
404
  paddingInlineStart: '16px'
397
405
  }
398
- }, format(calendarOnesyDate, 'MMMM')), /*#__PURE__*/React.createElement(CalendarMonth, _extends({
406
+ }, l(format(calendarOnesyDate, 'MMMM'))), /*#__PURE__*/React.createElement(CalendarMonth, _extends({
399
407
  color: "default",
400
408
  value: value,
401
409
  calendar: calendarOnesyDate,
@@ -462,10 +470,10 @@ const Calendar = /*#__PURE__*/React.forwardRef((props__, ref) => {
462
470
  size: size,
463
471
  className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-arrow'], classes.arrow, open === 'month' && classes.arrow_open])
464
472
  })),
465
- "aria-label": `${l('Select month')}, ${l('current')} ${month}`
473
+ "aria-label": `${l('Select month')}, ${l('current')} ${l(month)}`
466
474
  }, optionButtonProps, {
467
475
  className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-option'], optionButtonProps?.className, classes.option, open === 'year' && classes.option_secondary])
468
- }), month), /*#__PURE__*/React.createElement(Fade, {
476
+ }), l(month)), /*#__PURE__*/React.createElement(Fade, {
469
477
  in: !open
470
478
  }, /*#__PURE__*/React.createElement(IconButton, _extends({
471
479
  onClick: () => move(),
@@ -568,7 +576,7 @@ const Calendar = /*#__PURE__*/React.forwardRef((props__, ref) => {
568
576
  return /*#__PURE__*/React.createElement(ListItem, {
569
577
  key: index,
570
578
  onClick: () => onUpdateCalendarOption(onesyDate),
571
- primary: format(onesyDate, 'MMMM'),
579
+ primary: l(format(onesyDate, 'MMMM')),
572
580
  inset: !selected,
573
581
  startAlign: "center",
574
582
  size: size,
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license UiReact v1.0.70
1
+ /** @license UiReact v1.0.71
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.70",
3
+ "version": "1.0.71",
4
4
  "description": "UI for React",
5
5
  "repository": "https://github.com/onesy-me/onesy.git",
6
6
  "author": "Lazar <lazareric2@gmail.com>",