@companix/uikit 0.0.9 → 0.0.11

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 ADDED
@@ -0,0 +1,16 @@
1
+ # Unset browser styles
2
+
3
+ If you're not using @tailwind with preflighting, you'll need to override the browser's default styles using the `modern-normalize` package.
4
+ Tailwind's preflighting is actually built on top of the `modern-normalize` package.
5
+
6
+ ## Install
7
+
8
+ ```sh
9
+ npm i modern-normalize
10
+ ```
11
+
12
+ ## Usage
13
+
14
+ ```css
15
+ @import 'node_modules/modern-normalize/modern-normalize.css';
16
+ ```
@@ -1,4 +1,4 @@
1
- import { FormProps } from '../Form';
1
+ import { FormProps } from '../Input';
2
2
  import { CalendarProps } from './Calendar';
3
3
  interface DatePickerProps extends Omit<CalendarProps, 'onChange'>, Omit<FormProps, 'value' | 'onChange' | 'rightElement'> {
4
4
  onChange?: (value: Date | null) => void;
@@ -0,0 +1,32 @@
1
+ @use '../mixins.scss';
2
+
3
+ .form-group {
4
+ display: flex;
5
+ flex-direction: column;
6
+
7
+ &[data-fill] {
8
+ width: 100%;
9
+ }
10
+
11
+ &-label {
12
+ @include mixins.truncate-text();
13
+ @include mixins.use-styles(form-group, label);
14
+ }
15
+
16
+ &-caption {
17
+ @include mixins.truncate-text();
18
+ @include mixins.use-styles(form-group, caption);
19
+
20
+ &[data-appearance='neutral'] {
21
+ @include mixins.use-styles(form-group, caption, neutral);
22
+ }
23
+
24
+ &[data-appearance='positive'] {
25
+ @include mixins.use-styles(form-group, caption, positive);
26
+ }
27
+
28
+ &[data-appearance='negative'] {
29
+ @include mixins.use-styles(form-group, caption, negative);
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,10 @@
1
+ interface FormLabelProps {
2
+ label: React.ReactNode;
3
+ children: React.ReactNode;
4
+ caption?: React.ReactNode;
5
+ apperance?: 'neutral' | 'positive' | 'negative';
6
+ fill?: boolean;
7
+ className?: string;
8
+ }
9
+ export declare const FormGroup: (props: FormLabelProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -14,4 +14,4 @@ export interface FormProps extends React.HTMLAttributes<HTMLDivElement> {
14
14
  mask?: string;
15
15
  maskChar?: string;
16
16
  }
17
- export declare const Form: import('react').ForwardRefExoticComponent<FormProps & import('react').RefAttributes<HTMLDivElement>>;
17
+ export declare const Input: import('react').ForwardRefExoticComponent<FormProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,4 @@
1
- import { FormProps } from '../Form';
1
+ import { FormProps } from '../Input';
2
2
  export interface NumberInputProps extends Omit<FormProps, 'value' | 'onChange'> {
3
3
  value: number | null;
4
4
  onChange: (value: number | null) => void;
@@ -1,4 +1,4 @@
1
- import { FormProps } from '../Form';
1
+ import { FormProps } from '../Input';
2
2
  import { Option } from '../types';
3
3
  interface SelectProps<T> extends Omit<FormProps, 'value' | 'onChange' | 'rightElement'> {
4
4
  options: Option<T>[];
package/dist/bundle.es.js CHANGED
@@ -5,15 +5,15 @@ import { ImitateScroll as a } from "./bundle.es5.js";
5
5
  import { Popover as i } from "./bundle.es6.js";
6
6
  import { Tooltip as c } from "./bundle.es7.js";
7
7
  import { Select as S } from "./bundle.es8.js";
8
- import { Form as g } from "./bundle.es9.js";
8
+ import { Input as g } from "./bundle.es9.js";
9
9
  import { OptionItem as b } from "./bundle.es10.js";
10
10
  import { NumberInput as D } from "./bundle.es11.js";
11
- import { OptionsList as w } from "./bundle.es12.js";
12
- import { ButtonGroup as I } from "./bundle.es13.js";
11
+ import { OptionsList as d } from "./bundle.es12.js";
12
+ import { ButtonGroup as B } from "./bundle.es13.js";
13
13
  import { Checkbox as O } from "./bundle.es14.js";
14
14
  import { Switch as k } from "./bundle.es15.js";
15
15
  import { Radio as C } from "./bundle.es16.js";
16
- import { Drawer as P } from "./bundle.es17.js";
16
+ import { Drawer as y } from "./bundle.es17.js";
17
17
  import { Dialog as G } from "./bundle.es18.js";
18
18
  import { AlertDialog as R } from "./bundle.es19.js";
19
19
  import { LoadButton as q } from "./bundle.es20.js";
@@ -29,19 +29,19 @@ import { createToaster as eo } from "./bundle.es29.js";
29
29
  export {
30
30
  R as AlertDialog,
31
31
  e as Button,
32
- I as ButtonGroup,
32
+ B as ButtonGroup,
33
33
  O as Checkbox,
34
34
  J as Countdown,
35
35
  W as DatePicker,
36
36
  G as Dialog,
37
- P as Drawer,
37
+ y as Drawer,
38
38
  Y as FileOverlay,
39
- g as Form,
40
39
  a as ImitateScroll,
40
+ g as Input,
41
41
  q as LoadButton,
42
42
  D as NumberInput,
43
43
  b as OptionItem,
44
- w as OptionsList,
44
+ d as OptionsList,
45
45
  i as Popover,
46
46
  C as Radio,
47
47
  x as Scrollable,
@@ -1,15 +1,15 @@
1
1
  import { jsx as f } from "react/jsx-runtime";
2
- import { useState as m, useRef as p } from "react";
3
- import { Form as l } from "./bundle.es9.js";
2
+ import { useState as p, useRef as m } from "react";
3
+ import { Input as l } from "./bundle.es9.js";
4
4
  const N = ({ value: r, onChange: u, ...e }) => {
5
- const [, t] = m([]), n = p(o(r));
6
- return +n.current !== r && (n.current = o(r)), /* @__PURE__ */ f(
5
+ const [, t] = p([]), n = m(i(r));
6
+ return +n.current !== r && (n.current = i(r)), /* @__PURE__ */ f(
7
7
  l,
8
8
  {
9
9
  ...e,
10
10
  value: n.current,
11
- onChange: (i) => {
12
- const s = i.currentTarget.value.trim();
11
+ onChange: (o) => {
12
+ const s = o.currentTarget.value.trim();
13
13
  if (s === "")
14
14
  return n.current = "", u(null);
15
15
  if (!(s.startsWith(".") || s.replace(".", "").split("").some((c) => isNaN(parseInt(c))))) {
@@ -20,7 +20,7 @@ const N = ({ value: r, onChange: u, ...e }) => {
20
20
  }
21
21
  }
22
22
  );
23
- }, o = (r) => r === null ? "" : r.toString(), a = (r) => {
23
+ }, i = (r) => r === null ? "" : r.toString(), a = (r) => {
24
24
  const u = [...r], e = [...r];
25
25
  if (e.every((t) => t === "0"))
26
26
  return "0";
@@ -1,19 +1,19 @@
1
1
  import { jsx as l, jsxs as O, Fragment as R } from "react/jsx-runtime";
2
2
  import { Popover as z } from "./bundle.es6.js";
3
- import { Form as Y } from "./bundle.es9.js";
3
+ import { Input as Y } from "./bundle.es9.js";
4
4
  import { faClose as E, faChevronDown as S } from "@fortawesome/free-solid-svg-icons";
5
- import { Icon as F } from "./bundle.es34.js";
5
+ import { Icon as k } from "./bundle.es34.js";
6
6
  import { useState as _, useRef as q } from "react";
7
7
  import { Calendar as G } from "./bundle.es38.js";
8
8
  import { useDayDisableCheker as H } from "./bundle.es39.js";
9
- import { formatTime as I, getNum as d } from "@companix/utils-js";
9
+ import { formatTime as y, getNum as d } from "@companix/utils-js";
10
10
  const h = (t, i = "-") => {
11
11
  if (t) {
12
- const n = I(t.getDate()), r = I(t.getMonth() + 1), s = t.getFullYear();
12
+ const n = y(t.getDate()), r = y(t.getMonth() + 1), s = t.getFullYear();
13
13
  return [n, r, s].join(i);
14
14
  }
15
15
  return "";
16
- }, y = (t, i = "-") => {
16
+ }, F = (t, i = "-") => {
17
17
  const n = t.split(i);
18
18
  if (n.length === 3) {
19
19
  const [r, s, a] = [d(n[0]), d(n[1]), d(n[2])];
@@ -45,7 +45,7 @@ const h = (t, i = "-") => {
45
45
  maxDateTime: x,
46
46
  // input props
47
47
  ...T
48
- } = t, [m, c] = _(() => h(o ?? null)), p = q(null), k = H({
48
+ } = t, [m, c] = _(() => h(o ?? null)), p = q(null), I = H({
49
49
  disableFuture: C,
50
50
  disablePast: D,
51
51
  shouldDisableDate: g,
@@ -57,11 +57,11 @@ const h = (t, i = "-") => {
57
57
  e.stopPropagation(), c(""), u?.(null);
58
58
  }, V = (e) => {
59
59
  c(e);
60
- const f = y(e);
61
- f && !k(f) && u?.(f);
60
+ const f = F(e);
61
+ f && !I(f) && u?.(f);
62
62
  }, j = () => {
63
- const e = y(m);
64
- (!e || k(e)) && c(h(o ?? null));
63
+ const e = F(m);
64
+ (!e || I(e)) && c(h(o ?? null));
65
65
  }, M = (e) => {
66
66
  u?.(e), c(h(e));
67
67
  };
@@ -101,8 +101,8 @@ const h = (t, i = "-") => {
101
101
  onBlur: j,
102
102
  mask: "99-99-9999",
103
103
  rightElement: /* @__PURE__ */ O(R, { children: [
104
- n && J(m) && /* @__PURE__ */ l("button", { className: "select-close-button", onClick: B, children: r ?? /* @__PURE__ */ l(F, { className: "select-close-icon", icon: E, size: "xxxs" }) }),
105
- /* @__PURE__ */ l(F, { className: "expand-icon select-expand", icon: S, size: "xxxs" })
104
+ n && J(m) && /* @__PURE__ */ l("button", { className: "select-close-button", onClick: B, children: r ?? /* @__PURE__ */ l(k, { className: "select-close-icon", icon: E, size: "xxxs" }) }),
105
+ /* @__PURE__ */ l(k, { className: "expand-icon select-expand", icon: S, size: "xxxs" })
106
106
  ] })
107
107
  }
108
108
  )
@@ -1,7 +1,7 @@
1
1
  import { jsxs as D, jsx as t } from "react/jsx-runtime";
2
- import { dateToFormat as $, weeks as g, createVoids as p, getDayIndex as b, getFirstDay as u, getMonthMaxDay as k } from "./bundle.es43.js";
3
- import { CalendarHeader as F } from "./bundle.es44.js";
4
- import { useCalendar as j } from "./bundle.es45.js";
2
+ import { dateToFormat as $, weeks as g, createVoids as p, getDayIndex as b, getFirstDay as u, getMonthMaxDay as k } from "./bundle.es42.js";
3
+ import { CalendarHeader as F } from "./bundle.es43.js";
4
+ import { useCalendar as j } from "./bundle.es44.js";
5
5
  import { attr as m } from "@companix/utils-browser";
6
6
  import { isSameDate as f } from "./bundle.es39.js";
7
7
  import { useLayoutEffect as I } from "react";
@@ -2,7 +2,7 @@ import { jsxs as T, jsx as $ } from "react/jsx-runtime";
2
2
  import { forwardRef as b, useState as I, useMemo as P, useImperativeHandle as R, useCallback as j, createElement as k } from "react";
3
3
  import * as c from "@radix-ui/react-toast";
4
4
  import { varToStyle as w } from "@companix/utils-browser";
5
- import { Toast as C } from "./bundle.es42.js";
5
+ import { Toast as C } from "./bundle.es45.js";
6
6
  var g = /* @__PURE__ */ ((e) => (e["top-center"] = "up", e["top-left"] = "left", e["top-right"] = "right", e["bottom-center"] = "down", e["bottom-left"] = "left", e["bottom-right"] = "right", e))(g || {});
7
7
  const M = b((e, h) => {
8
8
  const { side: f = "top", align: i = "center", gap: m = 14, duration: u, swipeThreshold: v, closeIcon: x } = e, [l, p] = I([]), o = P(() => ({}), []);
@@ -1,45 +1,33 @@
1
- import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
- import * as t from "@radix-ui/react-toast";
3
- import { attr as C } from "@companix/utils-browser";
4
- import { useState as h, useRef as v, useEffect as N, useLayoutEffect as x } from "react";
5
- import { RemoveListener as R } from "./bundle.es35.js";
6
- const E = (i) => {
7
- const [c, l] = h(!1), o = v(null), {
8
- appearance: d = "neutral",
9
- icon: r,
10
- title: a,
11
- description: s,
12
- duration: m,
13
- closeIcon: u,
14
- onRemoving: p,
15
- onRemoved: f,
16
- onInitialized: L
17
- } = i;
18
- return N(() => {
19
- l(!0);
20
- }, []), x(() => {
21
- o.current && L(o.current);
22
- }, []), /* @__PURE__ */ n(
23
- t.Root,
24
- {
25
- ref: o,
26
- "data-expanded": !0,
27
- "data-appearance": d,
28
- "data-mounted": C(c),
29
- className: "toaster",
30
- duration: m,
31
- children: [
32
- /* @__PURE__ */ e(R, { callback: f }),
33
- r && /* @__PURE__ */ e("div", { className: "toaster-icon", children: r }),
34
- /* @__PURE__ */ n("div", { className: "toaster-content", children: [
35
- a && /* @__PURE__ */ e(t.Title, { className: "toaster-title", children: a }),
36
- s && /* @__PURE__ */ e(t.Description, { className: "toaster-description", children: s })
37
- ] }),
38
- /* @__PURE__ */ e(t.Close, { className: "toaster-close", onClick: p, children: u ?? /* @__PURE__ */ e("svg", { viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M2.96967 2.96967C3.26256 2.67678 3.73744 2.67678 4.03033 2.96967L8 6.939L11.9697 2.96967C12.2626 2.67678 12.7374 2.67678 13.0303 2.96967C13.3232 3.26256 13.3232 3.73744 13.0303 4.03033L9.061 8L13.0303 11.9697C13.2966 12.2359 13.3208 12.6526 13.1029 12.9462L13.0303 13.0303C12.7374 13.3232 12.2626 13.3232 11.9697 13.0303L8 9.061L4.03033 13.0303C3.73744 13.3232 3.26256 13.3232 2.96967 13.0303C2.67678 12.7374 2.67678 12.2626 2.96967 11.9697L6.939 8L2.96967 4.03033C2.7034 3.76406 2.6792 3.3474 2.89705 3.05379L2.96967 2.96967Z" }) }) })
39
- ]
40
- }
41
- );
1
+ import { clamp as a } from "@companix/utils-browser";
2
+ const D = (t, e) => new Date(e, t, 0).getDate(), g = (t, e) => new Date(e, t - 1, 1).getDay(), i = (t) => t === 0 ? 6 : t - 1, u = (t) => new Array(t).fill(0), h = (t) => ({
3
+ day: t.getDate(),
4
+ month: t.getMonth() + 1,
5
+ year: t.getFullYear()
6
+ }), y = ["Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Вс"], s = 9999, c = 100, f = (t, e) => {
7
+ const o = [], n = a(t - e, c, s), l = a(t + e, c, s);
8
+ for (let r = n; r <= l; r++)
9
+ o.push({ title: String(r).padStart(4, "0"), value: r });
10
+ return o;
11
+ }, p = (t) => {
12
+ const e = [], o = new Intl.DateTimeFormat(t, {
13
+ month: "long"
14
+ });
15
+ for (let n = 0; n < 12; n++)
16
+ e.push({
17
+ title: o.format(new Date(2023, n, 15)),
18
+ value: n
19
+ });
20
+ return e;
42
21
  };
43
22
  export {
44
- E as Toast
23
+ s as DEFAULT_MAX_YEAR,
24
+ c as DEFAULT_MIN_YEAR,
25
+ u as createVoids,
26
+ h as dateToFormat,
27
+ i as getDayIndex,
28
+ g as getFirstDay,
29
+ D as getMonthMaxDay,
30
+ p as getMonths,
31
+ f as getYears,
32
+ y as weeks
45
33
  };
@@ -1,33 +1,77 @@
1
- import { clamp as a } from "@companix/utils-browser";
2
- const D = (t, e) => new Date(e, t, 0).getDate(), g = (t, e) => new Date(e, t - 1, 1).getDay(), i = (t) => t === 0 ? 6 : t - 1, u = (t) => new Array(t).fill(0), h = (t) => ({
3
- day: t.getDate(),
4
- month: t.getMonth() + 1,
5
- year: t.getFullYear()
6
- }), y = ["Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Вс"], s = 9999, c = 100, f = (t, e) => {
7
- const o = [], n = a(t - e, c, s), l = a(t + e, c, s);
8
- for (let r = n; r <= l; r++)
9
- o.push({ title: String(r).padStart(4, "0"), value: r });
10
- return o;
11
- }, p = (t) => {
12
- const e = [], o = new Intl.DateTimeFormat(t, {
13
- month: "long"
14
- });
15
- for (let n = 0; n < 12; n++)
16
- e.push({
17
- title: o.format(new Date(2023, n, 15)),
18
- value: n
19
- });
20
- return e;
1
+ import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
+ import { useCallback as u, useMemo as h } from "react";
3
+ import { Select as p } from "./bundle.es8.js";
4
+ import { getMonths as k, getYears as z, DEFAULT_MAX_YEAR as f, DEFAULT_MIN_YEAR as g } from "./bundle.es42.js";
5
+ import { Icon as C } from "./bundle.es34.js";
6
+ import { faChevronLeft as E, faChevronRight as T } from "@fortawesome/free-solid-svg-icons";
7
+ import { setMonth as _, setYear as F } from "./bundle.es39.js";
8
+ const y = ({
9
+ viewDate: n,
10
+ onChange: c,
11
+ isMonthDisabled: a,
12
+ isYearDisabled: m,
13
+ onNextMonth: N,
14
+ onPrevMonth: v
15
+ }) => {
16
+ const e = n.getFullYear(), r = n.getMonth(), s = "ru", M = u(
17
+ (t) => {
18
+ c(_(n, t));
19
+ },
20
+ [c, n]
21
+ ), x = u(
22
+ (t) => {
23
+ c(F(n, t));
24
+ },
25
+ [c, n]
26
+ ), A = h(() => k(s).map((t) => ({
27
+ ...t,
28
+ className: "capitalize",
29
+ disabled: a && a(t.value)
30
+ })), [s, a]), Y = h(() => z(e, 100).map((t) => ({
31
+ ...t,
32
+ disabled: m && m(t.value)
33
+ })), [e, m]);
34
+ let l = r === 11 && e === f;
35
+ a && !l && (l = a(
36
+ r === 11 ? 0 : r + 1,
37
+ r === 11 ? Math.min(e + 1, f) : e
38
+ ));
39
+ let i = r === 0 && e === g;
40
+ return a && !i && (i = a(
41
+ r === 0 ? 11 : r - 1,
42
+ r === 0 ? Math.max(e - 1, g) : e
43
+ )), /* @__PURE__ */ d("div", { className: "calendar-header", children: [
44
+ !i && /* @__PURE__ */ o("button", { className: "calendar-navigation", "data-side": "left", onClick: v, children: /* @__PURE__ */ o(C, { icon: E }) }),
45
+ /* @__PURE__ */ d("div", { className: "calendar-pickers", children: [
46
+ /* @__PURE__ */ o(
47
+ p,
48
+ {
49
+ fill: !0,
50
+ options: Y,
51
+ size: "sm",
52
+ value: e,
53
+ minimalOptions: !0,
54
+ matchTarget: "min-width",
55
+ onChange: (t) => x(t || 0)
56
+ }
57
+ ),
58
+ /* @__PURE__ */ o(
59
+ p,
60
+ {
61
+ fill: !0,
62
+ options: A,
63
+ size: "sm",
64
+ className: "capitalize",
65
+ value: r,
66
+ minimalOptions: !0,
67
+ matchTarget: "min-width",
68
+ onChange: (t) => M(t || 0)
69
+ }
70
+ )
71
+ ] }),
72
+ !l && /* @__PURE__ */ o("button", { className: "calendar-navigation", "data-side": "right", onClick: N, children: /* @__PURE__ */ o(C, { icon: T }) })
73
+ ] });
21
74
  };
22
75
  export {
23
- s as DEFAULT_MAX_YEAR,
24
- c as DEFAULT_MIN_YEAR,
25
- u as createVoids,
26
- h as dateToFormat,
27
- i as getDayIndex,
28
- g as getFirstDay,
29
- D as getMonthMaxDay,
30
- p as getMonths,
31
- f as getYears,
32
- y as weeks
76
+ y as CalendarHeader
33
77
  };
@@ -1,77 +1,51 @@
1
- import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
- import { useCallback as u, useMemo as h } from "react";
3
- import { Select as p } from "./bundle.es8.js";
4
- import { getMonths as k, getYears as z, DEFAULT_MAX_YEAR as f, DEFAULT_MIN_YEAR as g } from "./bundle.es43.js";
5
- import { Icon as C } from "./bundle.es34.js";
6
- import { faChevronLeft as E, faChevronRight as T } from "@fortawesome/free-solid-svg-icons";
7
- import { setMonth as _, setYear as F } from "./bundle.es39.js";
8
- const y = ({
9
- viewDate: n,
10
- onChange: c,
11
- isMonthDisabled: a,
12
- isYearDisabled: m,
13
- onNextMonth: N,
14
- onPrevMonth: v
1
+ import { subMonths as L, addMonths as N, useDayDisableCheker as R } from "./bundle.es39.js";
2
+ import { DEFAULT_MIN_YEAR as w, DEFAULT_MAX_YEAR as A } from "./bundle.es42.js";
3
+ import { useState as U, useCallback as M } from "react";
4
+ const X = ({
5
+ value: p,
6
+ disablePast: r,
7
+ disableFuture: c,
8
+ shouldDisableDate: E,
9
+ minDateTime: l,
10
+ maxDateTime: s
15
11
  }) => {
16
- const e = n.getFullYear(), r = n.getMonth(), s = "ru", M = u(
17
- (t) => {
18
- c(_(n, t));
12
+ const [e, u] = U(p || /* @__PURE__ */ new Date()), _ = M(() => {
13
+ u(L(e));
14
+ }, [e]), C = M(() => {
15
+ u(N(e, 1));
16
+ }, [e]), D = R({
17
+ disableFuture: c,
18
+ disablePast: r,
19
+ shouldDisableDate: E,
20
+ minDateTime: l,
21
+ maxDateTime: s
22
+ }), k = M(
23
+ (o, t) => {
24
+ const n = /* @__PURE__ */ new Date();
25
+ t = t || e.getFullYear();
26
+ const h = l ? l.getMonth() : 0, Y = s ? s.getMonth() : 11, F = l?.getFullYear() || w, f = s?.getFullYear() || A;
27
+ let g = t >= F && t <= f ? t === F && h > o || t === f && o > Y : !0;
28
+ return c && (g = g || (t === n.getFullYear() ? o > n.getMonth() : t > n.getFullYear())), r && (g = g || (t === n.getFullYear() ? o < n.getMonth() : t < n.getFullYear())), g;
19
29
  },
20
- [c, n]
21
- ), x = u(
22
- (t) => {
23
- c(F(n, t));
30
+ [c, r, e, l, s]
31
+ ), v = M(
32
+ (o) => {
33
+ const t = /* @__PURE__ */ new Date(), n = l?.getFullYear() || w, h = s?.getFullYear() || A;
34
+ let Y = n > o || o > h;
35
+ return c && (Y = Y || o > t.getFullYear()), r && (Y = Y || o < t.getFullYear()), Y;
24
36
  },
25
- [c, n]
26
- ), A = h(() => k(s).map((t) => ({
27
- ...t,
28
- className: "capitalize",
29
- disabled: a && a(t.value)
30
- })), [s, a]), Y = h(() => z(e, 100).map((t) => ({
31
- ...t,
32
- disabled: m && m(t.value)
33
- })), [e, m]);
34
- let l = r === 11 && e === f;
35
- a && !l && (l = a(
36
- r === 11 ? 0 : r + 1,
37
- r === 11 ? Math.min(e + 1, f) : e
38
- ));
39
- let i = r === 0 && e === g;
40
- return a && !i && (i = a(
41
- r === 0 ? 11 : r - 1,
42
- r === 0 ? Math.max(e - 1, g) : e
43
- )), /* @__PURE__ */ d("div", { className: "calendar-header", children: [
44
- !i && /* @__PURE__ */ o("button", { className: "calendar-navigation", "data-side": "left", onClick: v, children: /* @__PURE__ */ o(C, { icon: E }) }),
45
- /* @__PURE__ */ d("div", { className: "calendar-pickers", children: [
46
- /* @__PURE__ */ o(
47
- p,
48
- {
49
- fill: !0,
50
- options: Y,
51
- size: "sm",
52
- value: e,
53
- minimalOptions: !0,
54
- matchTarget: "min-width",
55
- onChange: (t) => x(t || 0)
56
- }
57
- ),
58
- /* @__PURE__ */ o(
59
- p,
60
- {
61
- fill: !0,
62
- options: A,
63
- size: "sm",
64
- className: "capitalize",
65
- value: r,
66
- minimalOptions: !0,
67
- matchTarget: "min-width",
68
- onChange: (t) => M(t || 0)
69
- }
70
- )
71
- ] }),
72
- !l && /* @__PURE__ */ o("button", { className: "calendar-navigation", "data-side": "right", onClick: N, children: /* @__PURE__ */ o(C, { icon: T }) })
73
- ] });
37
+ [c, r, l, s]
38
+ );
39
+ return {
40
+ viewDate: e,
41
+ setViewDate: u,
42
+ setPrevMonth: _,
43
+ setNextMonth: C,
44
+ isDayDisabled: D,
45
+ isMonthDisabled: k,
46
+ isYearDisabled: v
47
+ };
74
48
  };
75
49
  export {
76
- y as CalendarHeader
50
+ X as useCalendar
77
51
  };
@@ -1,51 +1,45 @@
1
- import { subMonths as L, addMonths as N, useDayDisableCheker as R } from "./bundle.es39.js";
2
- import { DEFAULT_MIN_YEAR as w, DEFAULT_MAX_YEAR as A } from "./bundle.es43.js";
3
- import { useState as U, useCallback as M } from "react";
4
- const X = ({
5
- value: p,
6
- disablePast: r,
7
- disableFuture: c,
8
- shouldDisableDate: E,
9
- minDateTime: l,
10
- maxDateTime: s
11
- }) => {
12
- const [e, u] = U(p || /* @__PURE__ */ new Date()), _ = M(() => {
13
- u(L(e));
14
- }, [e]), C = M(() => {
15
- u(N(e, 1));
16
- }, [e]), D = R({
17
- disableFuture: c,
18
- disablePast: r,
19
- shouldDisableDate: E,
20
- minDateTime: l,
21
- maxDateTime: s
22
- }), k = M(
23
- (o, t) => {
24
- const n = /* @__PURE__ */ new Date();
25
- t = t || e.getFullYear();
26
- const h = l ? l.getMonth() : 0, Y = s ? s.getMonth() : 11, F = l?.getFullYear() || w, f = s?.getFullYear() || A;
27
- let g = t >= F && t <= f ? t === F && h > o || t === f && o > Y : !0;
28
- return c && (g = g || (t === n.getFullYear() ? o > n.getMonth() : t > n.getFullYear())), r && (g = g || (t === n.getFullYear() ? o < n.getMonth() : t < n.getFullYear())), g;
29
- },
30
- [c, r, e, l, s]
31
- ), v = M(
32
- (o) => {
33
- const t = /* @__PURE__ */ new Date(), n = l?.getFullYear() || w, h = s?.getFullYear() || A;
34
- let Y = n > o || o > h;
35
- return c && (Y = Y || o > t.getFullYear()), r && (Y = Y || o < t.getFullYear()), Y;
36
- },
37
- [c, r, l, s]
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import * as t from "@radix-ui/react-toast";
3
+ import { attr as C } from "@companix/utils-browser";
4
+ import { useState as h, useRef as v, useEffect as N, useLayoutEffect as x } from "react";
5
+ import { RemoveListener as R } from "./bundle.es35.js";
6
+ const E = (i) => {
7
+ const [c, l] = h(!1), o = v(null), {
8
+ appearance: d = "neutral",
9
+ icon: r,
10
+ title: a,
11
+ description: s,
12
+ duration: m,
13
+ closeIcon: u,
14
+ onRemoving: p,
15
+ onRemoved: f,
16
+ onInitialized: L
17
+ } = i;
18
+ return N(() => {
19
+ l(!0);
20
+ }, []), x(() => {
21
+ o.current && L(o.current);
22
+ }, []), /* @__PURE__ */ n(
23
+ t.Root,
24
+ {
25
+ ref: o,
26
+ "data-expanded": !0,
27
+ "data-appearance": d,
28
+ "data-mounted": C(c),
29
+ className: "toaster",
30
+ duration: m,
31
+ children: [
32
+ /* @__PURE__ */ e(R, { callback: f }),
33
+ r && /* @__PURE__ */ e("div", { className: "toaster-icon", children: r }),
34
+ /* @__PURE__ */ n("div", { className: "toaster-content", children: [
35
+ a && /* @__PURE__ */ e(t.Title, { className: "toaster-title", children: a }),
36
+ s && /* @__PURE__ */ e(t.Description, { className: "toaster-description", children: s })
37
+ ] }),
38
+ /* @__PURE__ */ e(t.Close, { className: "toaster-close", onClick: p, children: u ?? /* @__PURE__ */ e("svg", { viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M2.96967 2.96967C3.26256 2.67678 3.73744 2.67678 4.03033 2.96967L8 6.939L11.9697 2.96967C12.2626 2.67678 12.7374 2.67678 13.0303 2.96967C13.3232 3.26256 13.3232 3.73744 13.0303 4.03033L9.061 8L13.0303 11.9697C13.2966 12.2359 13.3208 12.6526 13.1029 12.9462L13.0303 13.0303C12.7374 13.3232 12.2626 13.3232 11.9697 13.0303L8 9.061L4.03033 13.0303C3.73744 13.3232 3.26256 13.3232 2.96967 13.0303C2.67678 12.7374 2.67678 12.2626 2.96967 11.9697L6.939 8L2.96967 4.03033C2.7034 3.76406 2.6792 3.3474 2.89705 3.05379L2.96967 2.96967Z" }) }) })
39
+ ]
40
+ }
38
41
  );
39
- return {
40
- viewDate: e,
41
- setViewDate: u,
42
- setPrevMonth: _,
43
- setNextMonth: C,
44
- isDayDisabled: D,
45
- isMonthDisabled: k,
46
- isYearDisabled: v
47
- };
48
42
  };
49
43
  export {
50
- X as useCalendar
44
+ E as Toast
51
45
  };
@@ -1,21 +1,21 @@
1
- import { jsxs as z, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as z, jsx as n } from "react/jsx-runtime";
2
2
  import A from "classnames";
3
- import F from "react-input-mask";
4
- import { useLayoutAndUpdate as M } from "./bundle.es33.js";
3
+ import M from "react-input-mask";
4
+ import { useLayoutAndUpdate as U } from "./bundle.es33.js";
5
5
  import { attr as c } from "@companix/utils-browser";
6
- import { forwardRef as R, useRef as m, useCallback as g } from "react";
7
- import { mergeRefs as U } from "react-merge-refs";
6
+ import { forwardRef as R, useRef as l, useCallback as g } from "react";
7
+ import { mergeRefs as v } from "react-merge-refs";
8
8
  const Q = R(
9
9
  ({
10
- required: n,
11
- size: f,
10
+ required: r,
11
+ size: u,
12
12
  fill: a,
13
13
  leftElement: e,
14
- rightElement: u,
14
+ rightElement: f,
15
15
  onChange: x,
16
16
  onValueChange: $,
17
- readOnly: b,
18
- className: I,
17
+ readOnly: I,
18
+ className: b,
19
19
  value: N,
20
20
  placeholder: W,
21
21
  disabled: p,
@@ -24,15 +24,15 @@ const Q = R(
24
24
  inputRef: L,
25
25
  ...j
26
26
  }, k) => {
27
- const s = m(null), l = m(null), d = m(null), q = { Right: l, Left: d }, h = g((t) => {
27
+ const s = l(null), m = l(null), d = l(null), q = { Right: m, Left: d }, h = g((t) => {
28
28
  if (s.current) {
29
29
  const i = s.current.style, o = q[t];
30
30
  o.current && o.current.clientWidth ? i[`padding${t}`] !== `${o.current.clientWidth}px` && (i[`padding${t}`] = `${o.current.clientWidth}px`) : i[`padding${t}`] && (i[`padding${t}`] = "");
31
31
  }
32
32
  }, []);
33
- M(() => {
33
+ U(() => {
34
34
  h("Left"), h("Right");
35
- }, [u, e]);
35
+ }, [f, e]);
36
36
  const w = g((t) => {
37
37
  x?.(t), $?.(t.target.value, t.target);
38
38
  }, []);
@@ -40,36 +40,38 @@ const Q = R(
40
40
  "div",
41
41
  {
42
42
  ref: k,
43
- className: A("form", I),
44
- "data-size": f ?? "md",
43
+ className: A("form", b),
44
+ "data-size": u ?? "md",
45
45
  "data-fill": c(a),
46
- "data-required": c(n),
46
+ "data-required": c(r),
47
47
  "data-disabled": c(p),
48
48
  ...j,
49
49
  children: [
50
- e && /* @__PURE__ */ r("span", { ref: d, className: "form-input-base-left-element", children: e }),
51
- /* @__PURE__ */ r(
52
- v,
50
+ e && /* @__PURE__ */ n("span", { ref: d, className: "form-input-base-left-element", children: e }),
51
+ /* @__PURE__ */ n(
52
+ B,
53
53
  {
54
54
  type: "text",
55
- ref: U([s, L]),
55
+ ref: v([s, L]),
56
56
  className: "form-input form-input-base",
57
57
  "aria-disabled": p,
58
58
  onChange: w,
59
59
  value: N,
60
60
  placeholder: W,
61
61
  disabled: p,
62
- readOnly: b,
62
+ readOnly: I,
63
63
  maskChar: C,
64
64
  mask: y
65
65
  }
66
66
  ),
67
- u && /* @__PURE__ */ r("span", { ref: l, className: "form-input-base-right-element", children: u })
67
+ f && /* @__PURE__ */ n("span", { ref: m, className: "form-input-base-right-element", children: f })
68
68
  ]
69
69
  }
70
70
  );
71
71
  }
72
- ), v = R(({ mask: n, maskChar: f, ...a }, e) => n ? /* @__PURE__ */ r(F, { inputRef: e, mask: n, maskChar: f, ...a }) : /* @__PURE__ */ r("input", { ref: e, ...a }));
72
+ ), B = R(
73
+ ({ mask: r, maskChar: u, ...a }, e) => r ? /* @__PURE__ */ n(M, { inputRef: e, mask: r, maskChar: u, ...a }) : /* @__PURE__ */ n("input", { ref: e, ...a })
74
+ );
73
75
  export {
74
- Q as Form
76
+ Q as Input
75
77
  };
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { ImitateScroll } from './Scrollable/ImitateScroll';
5
5
  export { Popover } from './Popover';
6
6
  export { Tooltip } from './Tooltip';
7
7
  export { Select } from './Select';
8
- export { Form } from './Form';
8
+ export { Input } from './Input';
9
9
  export { OptionItem } from './OptionItem/OptionItem';
10
10
  export { NumberInput } from './NumberInput';
11
11
  export { OptionsList } from './OptionItem/OptionsList';
package/dist/index.scss CHANGED
@@ -10,7 +10,6 @@
10
10
  @use './Dialog/Dialog.scss';
11
11
  @use './DialogAlert/Alert.scss';
12
12
  @use './Drawer/Drawer.scss';
13
- @use './Form/Form.scss';
14
13
  @use './Select/Select.scss';
15
14
  @use './TextArea/TextArea.scss';
16
15
  @use './SelectTags/SelectTags.scss';
@@ -18,8 +17,10 @@
18
17
  @use './DateInput/DateInput.scss';
19
18
  @use './DatePicker/DatePicker.scss';
20
19
  @use './DatePicker/Calendar.scss';
21
- @use './Form/Input.scss';
20
+ @use './Input/Input.scss';
21
+ @use './Input/Form.scss';
22
22
  @use './Switch/Switch.scss';
23
23
  @use './Spinner/Spinner.scss';
24
24
  @use './ButtonGroup/ButtonGroup.scss';
25
25
  @use './Scrollable/Scrollable.scss';
26
+ @use './FormLabel/FormLabel.scss';
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@companix/uikit",
3
- "version": "0.0.09",
3
+ "version": "0.0.11",
4
4
  "module": "./dist/bundle.es.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "type": "module",
7
7
  "files": [
8
- "dist"
8
+ "dist",
9
+ "README.md"
9
10
  ],
10
11
  "author": "Pavel Victorov",
11
12
  "scripts": {
@@ -1,376 +0,0 @@
1
- /*
2
- 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
3
- 2. Remove default margins and padding
4
- 3. Reset all borders.
5
- */
6
-
7
- :root {
8
- --font-sans: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
9
- 'Segoe UI Symbol', 'Noto Color Emoji';
10
- --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
11
- monospace;
12
- }
13
-
14
- *,
15
- ::after,
16
- ::before,
17
- ::backdrop,
18
- ::file-selector-button {
19
- box-sizing: border-box; /* 1 */
20
- margin: 0; /* 2 */
21
- padding: 0; /* 2 */
22
- border: 0 solid; /* 3 */
23
- }
24
-
25
- /*
26
- 1. Use a consistent sensible line-height in all browsers.
27
- 2. Prevent adjustments of font size after orientation changes in iOS.
28
- 3. Use a more readable tab size.
29
- 4. Use the user's configured `sans` font-family by default.
30
- 5. Use the user's configured `sans` font-feature-settings by default.
31
- 6. Use the user's configured `sans` font-variation-settings by default.
32
- 7. Disable tap highlights on iOS.
33
- */
34
-
35
- html,
36
- :host {
37
- line-height: 1.5; /* 1 */
38
- -webkit-text-size-adjust: 100%; /* 2 */
39
- tab-size: 4; /* 3 */
40
- font-family: var(--font-sans);
41
- -webkit-tap-highlight-color: transparent; /* 7 */
42
- }
43
-
44
- /*
45
- 1. Add the correct height in Firefox.
46
- 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
47
- 3. Reset the default border style to a 1px solid border.
48
- */
49
-
50
- hr {
51
- height: 0; /* 1 */
52
- color: inherit; /* 2 */
53
- border-top-width: 1px; /* 3 */
54
- }
55
-
56
- /*
57
- Add the correct text decoration in Chrome, Edge, and Safari.
58
- */
59
-
60
- abbr:where([title]) {
61
- -webkit-text-decoration: underline dotted;
62
- text-decoration: underline dotted;
63
- }
64
-
65
- /*
66
- Remove the default font size and weight for headings.
67
- */
68
-
69
- h1,
70
- h2,
71
- h3,
72
- h4,
73
- h5,
74
- h6 {
75
- font-size: inherit;
76
- font-weight: inherit;
77
- }
78
-
79
- /*
80
- Reset links to optimize for opt-in styling instead of opt-out.
81
- */
82
-
83
- a {
84
- color: inherit;
85
- -webkit-text-decoration: inherit;
86
- text-decoration: inherit;
87
- }
88
-
89
- /*
90
- Add the correct font weight in Edge and Safari.
91
- */
92
-
93
- b,
94
- strong {
95
- font-weight: bolder;
96
- }
97
-
98
- /*
99
- 1. Use the user's configured `mono` font-family by default.
100
- 2. Use the user's configured `mono` font-feature-settings by default.
101
- 3. Use the user's configured `mono` font-variation-settings by default.
102
- 4. Correct the odd `em` font sizing in all browsers.
103
- */
104
-
105
- code,
106
- kbd,
107
- samp,
108
- pre {
109
- font-family: var(--font-mono);
110
- }
111
-
112
- /*
113
- Add the correct font size in all browsers.
114
- */
115
-
116
- small {
117
- font-size: 80%;
118
- }
119
-
120
- /*
121
- Prevent `sub` and `sup` elements from affecting the line height in all browsers.
122
- */
123
-
124
- sub,
125
- sup {
126
- font-size: 75%;
127
- line-height: 0;
128
- position: relative;
129
- vertical-align: baseline;
130
- }
131
-
132
- sub {
133
- bottom: -0.25em;
134
- }
135
-
136
- sup {
137
- top: -0.5em;
138
- }
139
-
140
- /*
141
- 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
142
- 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
143
- 3. Remove gaps between table borders by default.
144
- */
145
-
146
- table {
147
- text-indent: 0; /* 1 */
148
- border-color: inherit; /* 2 */
149
- border-collapse: collapse; /* 3 */
150
- }
151
-
152
- /*
153
- Use the modern Firefox focus style for all focusable elements.
154
- */
155
-
156
- :-moz-focusring {
157
- outline: auto;
158
- }
159
-
160
- /*
161
- Add the correct vertical alignment in Chrome and Firefox.
162
- */
163
-
164
- progress {
165
- vertical-align: baseline;
166
- }
167
-
168
- /*
169
- Add the correct display in Chrome and Safari.
170
- */
171
-
172
- summary {
173
- display: list-item;
174
- }
175
-
176
- /*
177
- Make lists unstyled by default.
178
- */
179
-
180
- ol,
181
- ul,
182
- menu {
183
- list-style: none;
184
- }
185
-
186
- /*
187
- 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
188
- 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
189
- This can trigger a poorly considered lint error in some tools but is included by design.
190
- */
191
-
192
- img,
193
- svg,
194
- video,
195
- canvas,
196
- audio,
197
- iframe,
198
- embed,
199
- object {
200
- display: block; /* 1 */
201
- vertical-align: middle; /* 2 */
202
- }
203
-
204
- /*
205
- Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
206
- */
207
-
208
- img,
209
- video {
210
- max-width: 100%;
211
- height: auto;
212
- }
213
-
214
- /*
215
- 1. Inherit font styles in all browsers.
216
- 2. Remove border radius in all browsers.
217
- 3. Remove background color in all browsers.
218
- 4. Ensure consistent opacity for disabled states in all browsers.
219
- */
220
-
221
- button,
222
- input,
223
- select,
224
- optgroup,
225
- textarea,
226
- ::file-selector-button {
227
- font: inherit; /* 1 */
228
- font-feature-settings: inherit; /* 1 */
229
- font-variation-settings: inherit; /* 1 */
230
- letter-spacing: inherit; /* 1 */
231
- color: inherit; /* 1 */
232
- border-radius: 0; /* 2 */
233
- background-color: transparent; /* 3 */
234
- opacity: 1; /* 4 */
235
- }
236
-
237
- /*
238
- Restore default font weight.
239
- */
240
-
241
- :where(select:is([multiple], [size])) optgroup {
242
- font-weight: bolder;
243
- }
244
-
245
- /*
246
- Restore indentation.
247
- */
248
-
249
- :where(select:is([multiple], [size])) optgroup option {
250
- padding-inline-start: 20px;
251
- }
252
-
253
- /*
254
- Restore space after button.
255
- */
256
-
257
- ::file-selector-button {
258
- margin-inline-end: 4px;
259
- }
260
-
261
- /*
262
- Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
263
- */
264
-
265
- ::placeholder {
266
- opacity: 1;
267
- }
268
-
269
- /*
270
- Set the default placeholder color to a semi-transparent version of the current text color in browsers that do not
271
- crash when using `color-mix(…)` with `currentcolor`. (https://github.com/tailwindlabs/tailwindcss/issues/17194)
272
- */
273
-
274
- @supports (not (-webkit-appearance: -apple-pay-button)) /* Not Safari */ or
275
- (contain-intrinsic-size: 1px) /* Safari 17+ */ {
276
- ::placeholder {
277
- color: color-mix(in oklab, currentcolor 50%, transparent);
278
- }
279
- }
280
-
281
- /*
282
- Prevent resizing textareas horizontally by default.
283
- */
284
-
285
- textarea {
286
- resize: vertical;
287
- }
288
-
289
- /*
290
- Remove the inner padding in Chrome and Safari on macOS.
291
- */
292
-
293
- ::-webkit-search-decoration {
294
- -webkit-appearance: none;
295
- }
296
-
297
- /*
298
- 1. Ensure date/time inputs have the same height when empty in iOS Safari.
299
- 2. Ensure text alignment can be changed on date/time inputs in iOS Safari.
300
- */
301
-
302
- ::-webkit-date-and-time-value {
303
- min-height: 1lh; /* 1 */
304
- text-align: inherit; /* 2 */
305
- }
306
-
307
- /*
308
- Prevent height from changing on date/time inputs in macOS Safari when the input is set to `display: block`.
309
- */
310
-
311
- ::-webkit-datetime-edit {
312
- display: inline-flex;
313
- }
314
-
315
- /*
316
- Remove excess padding from pseudo-elements in date/time inputs to ensure consistent height across browsers.
317
- */
318
-
319
- ::-webkit-datetime-edit-fields-wrapper {
320
- padding: 0;
321
- }
322
-
323
- ::-webkit-datetime-edit,
324
- ::-webkit-datetime-edit-year-field,
325
- ::-webkit-datetime-edit-month-field,
326
- ::-webkit-datetime-edit-day-field,
327
- ::-webkit-datetime-edit-hour-field,
328
- ::-webkit-datetime-edit-minute-field,
329
- ::-webkit-datetime-edit-second-field,
330
- ::-webkit-datetime-edit-millisecond-field,
331
- ::-webkit-datetime-edit-meridiem-field {
332
- padding-block: 0;
333
- }
334
-
335
- /*
336
- Center dropdown marker shown on inputs with paired `<datalist>`s in Chrome. (https://github.com/tailwindlabs/tailwindcss/issues/18499)
337
- */
338
-
339
- ::-webkit-calendar-picker-indicator {
340
- line-height: 1;
341
- }
342
-
343
- /*
344
- Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
345
- */
346
-
347
- :-moz-ui-invalid {
348
- box-shadow: none;
349
- }
350
-
351
- /*
352
- Correct the inability to style the border radius in iOS Safari.
353
- */
354
-
355
- button,
356
- input:where([type='button'], [type='reset'], [type='submit']),
357
- ::file-selector-button {
358
- appearance: button;
359
- }
360
-
361
- /*
362
- Correct the cursor style of increment and decrement buttons in Safari.
363
- */
364
-
365
- ::-webkit-inner-spin-button,
366
- ::-webkit-outer-spin-button {
367
- height: auto;
368
- }
369
-
370
- /*
371
- Make elements with the HTML hidden attribute stay hidden by default.
372
- */
373
-
374
- [hidden]:where(:not([hidden='until-found'])) {
375
- display: none !important;
376
- }
File without changes
File without changes