@companix/uikit 0.0.77 → 0.0.79

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 (63) hide show
  1. package/dist/Blank/Blank.scss +66 -0
  2. package/dist/Blank/index.d.ts +12 -0
  3. package/dist/FormGroup/index.d.ts +1 -1
  4. package/dist/ProgressRing/ProgressRing.scss +64 -0
  5. package/dist/ProgressRing/index.d.ts +9 -0
  6. package/dist/bundle.es.js +46 -41
  7. package/dist/bundle.es12.js +4 -4
  8. package/dist/bundle.es13.js +3 -3
  9. package/dist/bundle.es14.js +2 -2
  10. package/dist/bundle.es16.js +1 -1
  11. package/dist/bundle.es2.js +1 -1
  12. package/dist/bundle.es21.js +1 -1
  13. package/dist/bundle.es22.js +1 -1
  14. package/dist/bundle.es23.js +1 -1
  15. package/dist/bundle.es24.js +1 -1
  16. package/dist/bundle.es25.js +1 -1
  17. package/dist/bundle.es27.js +1 -1
  18. package/dist/bundle.es28.js +4 -4
  19. package/dist/bundle.es29.js +2 -2
  20. package/dist/bundle.es31.js +1 -1
  21. package/dist/bundle.es32.js +2 -2
  22. package/dist/bundle.es36.js +12 -35
  23. package/dist/bundle.es37.js +50 -20
  24. package/dist/bundle.es38.js +33 -9
  25. package/dist/bundle.es39.js +21 -11
  26. package/dist/bundle.es40.js +10 -26
  27. package/dist/bundle.es41.js +11 -38
  28. package/dist/bundle.es42.js +24 -48
  29. package/dist/bundle.es43.js +36 -40
  30. package/dist/bundle.es44.js +50 -8
  31. package/dist/bundle.es45.js +42 -19
  32. package/dist/bundle.es46.js +8 -24
  33. package/dist/bundle.es47.js +26 -22
  34. package/dist/bundle.es48.js +24 -23
  35. package/dist/bundle.es49.js +22 -87
  36. package/dist/bundle.es50.js +23 -17
  37. package/dist/bundle.es51.js +87 -92
  38. package/dist/bundle.es52.js +17 -73
  39. package/dist/bundle.es53.js +92 -23
  40. package/dist/bundle.es54.js +73 -38
  41. package/dist/bundle.es55.js +24 -5
  42. package/dist/bundle.es56.js +39 -14
  43. package/dist/bundle.es57.js +5 -14
  44. package/dist/bundle.es58.js +13 -69
  45. package/dist/bundle.es59.js +13 -67
  46. package/dist/bundle.es60.js +68 -9
  47. package/dist/bundle.es61.js +66 -41
  48. package/dist/bundle.es62.js +10 -14
  49. package/dist/bundle.es63.js +43 -32
  50. package/dist/bundle.es64.js +15 -70
  51. package/dist/bundle.es65.js +32 -14
  52. package/dist/bundle.es66.js +70 -75
  53. package/dist/bundle.es67.js +13 -48
  54. package/dist/bundle.es68.js +74 -13
  55. package/dist/bundle.es69.js +51 -0
  56. package/dist/bundle.es70.js +16 -0
  57. package/dist/bundle.es9.js +1 -1
  58. package/dist/css-properties.scss +2 -0
  59. package/dist/index.d.ts +7 -3
  60. package/dist/index.scss +3 -1
  61. package/package.json +1 -1
  62. /package/dist/{Progress/Progress.scss → ProgressBar/ProgressBar.scss} +0 -0
  63. /package/dist/{Progress → ProgressBar}/index.d.ts +0 -0
@@ -0,0 +1,66 @@
1
+ @use '../mixins.scss';
2
+
3
+ @mixin use-appearance($appearance) {
4
+ &[data-appearance='#{$appearance}'] {
5
+ @include mixins.use-styles(blank, $appearance);
6
+
7
+ .blank-icon {
8
+ @include mixins.use-styles(blank, $appearance, icon);
9
+ }
10
+
11
+ .blank-title {
12
+ @include mixins.use-styles(blank, $appearance, title);
13
+ }
14
+
15
+ .blank-description {
16
+ @include mixins.use-styles(blank, $appearance, description);
17
+ }
18
+ }
19
+ }
20
+
21
+ .blank {
22
+ display: flex;
23
+ flex-direction: column;
24
+ align-items: center;
25
+ justify-content: center;
26
+ text-align: center;
27
+ height: 100%;
28
+ width: 100%;
29
+ padding: 20px;
30
+
31
+ @include mixins.use-styles(blank);
32
+
33
+ @include use-appearance(neutral);
34
+ @include use-appearance(negative);
35
+
36
+ &-icon {
37
+ @include mixins.use-styles(blank, icon);
38
+
39
+ &:not(:last-child) {
40
+ margin-bottom: 20px;
41
+ }
42
+ }
43
+
44
+ &-text {
45
+ display: flex;
46
+ flex-direction: column;
47
+ gap: 4px;
48
+
49
+ @include mixins.use-styles(blank, text);
50
+
51
+ &:not(:last-child) {
52
+ margin-bottom: 20px;
53
+ }
54
+ }
55
+
56
+ &-title {
57
+ font-weight: 600;
58
+ font-size: 18px;
59
+
60
+ @include mixins.use-styles(blank, title);
61
+ }
62
+
63
+ &-description {
64
+ @include mixins.use-styles(blank, description);
65
+ }
66
+ }
@@ -0,0 +1,12 @@
1
+ import { IconDefinition, IconProps } from '../Icon';
2
+ export interface BlankProps {
3
+ icon: IconDefinition;
4
+ iconSize?: IconProps['size'];
5
+ title?: React.ReactNode;
6
+ description?: React.ReactNode;
7
+ children?: React.ReactNode;
8
+ className?: string;
9
+ appearance?: 'neutral' | 'negative';
10
+ }
11
+ declare const Blank: ({ appearance, icon, className, iconSize, title, description, children }: BlankProps) => import("react/jsx-runtime").JSX.Element;
12
+ export { Blank };
@@ -2,7 +2,7 @@ export interface FormGroupProps {
2
2
  label: React.ReactNode;
3
3
  children: React.ReactNode;
4
4
  caption?: React.ReactNode;
5
- apperance?: 'neutral' | 'positive' | 'negative';
5
+ appearance?: 'neutral' | 'positive' | 'negative';
6
6
  fill?: boolean;
7
7
  className?: string;
8
8
  }
@@ -0,0 +1,64 @@
1
+ @use '../mixins.scss';
2
+
3
+ @mixin use-appearance($appearance) {
4
+ &[data-appearance='#{$appearance}'] {
5
+ .progress-ring-track {
6
+ @include mixins.use-styles(progress-ring, $appearance, track);
7
+ }
8
+
9
+ .progress-ring-indicator {
10
+ @include mixins.use-styles(progress-ring, $appearance, indicator);
11
+ }
12
+ }
13
+ }
14
+
15
+ .progress-ring {
16
+ position: relative;
17
+ display: flex;
18
+ justify-content: center;
19
+ align-items: center;
20
+
21
+ @include use-appearance(neutral);
22
+ @include use-appearance(negative);
23
+ @include use-appearance(positive);
24
+ @include use-appearance(primary);
25
+
26
+ &-image {
27
+ width: var(--size);
28
+ height: var(--size);
29
+ rotate: -90deg;
30
+ transform-origin: 50% 50%;
31
+ }
32
+
33
+ &-track,
34
+ &-indicator {
35
+ --radius: calc(var(--size) / 2 - var(--track-width) * 0.5);
36
+ --circumference: calc(var(--radius) * 2 * 3.141592654);
37
+ fill: none;
38
+ // svg properties
39
+ r: var(--radius);
40
+ cx: calc(var(--size) / 2);
41
+ cy: calc(var(--size) / 2);
42
+ }
43
+
44
+ &-indicator {
45
+ stroke-width: var(--track-width);
46
+ stroke-linecap: round;
47
+ transition-property: stroke-dashoffset;
48
+ stroke-dasharray: var(--circumference) var(--circumference);
49
+ stroke-dashoffset: calc(var(--circumference) - var(--percentage) * var(--circumference));
50
+
51
+ @include mixins.use-styles(progress-ring, indicator);
52
+ }
53
+
54
+ &-track {
55
+ // stroke: var(--track-color);
56
+ stroke-width: var(--track-width);
57
+
58
+ @include mixins.use-styles(progress-ring, track);
59
+ }
60
+
61
+ &-hint {
62
+ position: absolute;
63
+ }
64
+ }
@@ -0,0 +1,9 @@
1
+ export interface ProgressRingProps {
2
+ appearance?: 'primary' | 'neutral' | 'positive' | 'negative';
3
+ value: number;
4
+ size?: number;
5
+ width?: number;
6
+ hint?: boolean;
7
+ }
8
+ declare const ProgressRing: ({ appearance, hint, size, width, value }: ProgressRingProps) => import("react/jsx-runtime").JSX.Element;
9
+ export { ProgressRing };
package/dist/bundle.es.js CHANGED
@@ -2,16 +2,16 @@ import { Avatar as e } from "./bundle.es2.js";
2
2
  import { avatarSizes as p } from "./bundle.es3.js";
3
3
  import { Button as x } from "./bundle.es4.js";
4
4
  import { ButtonGroup as a } from "./bundle.es5.js";
5
- import { Spinner as l } from "./bundle.es6.js";
5
+ import { Spinner as c } from "./bundle.es6.js";
6
6
  import { Scrollable as n } from "./bundle.es7.js";
7
7
  import { ImitateScroll as S } from "./bundle.es8.js";
8
- import { Segments as g } from "./bundle.es9.js";
8
+ import { Segments as u } from "./bundle.es9.js";
9
9
  import { Popover as h } from "./bundle.es10.js";
10
- import { Tooltip as v } from "./bundle.es11.js";
11
- import { Select as P } from "./bundle.es12.js";
12
- import { SelectTags as A } from "./bundle.es13.js";
13
- import { Input as b } from "./bundle.es14.js";
14
- import { OptionItem as R } from "./bundle.es15.js";
10
+ import { Tooltip as P } from "./bundle.es11.js";
11
+ import { Select as B } from "./bundle.es12.js";
12
+ import { SelectTags as d } from "./bundle.es13.js";
13
+ import { Input as A } from "./bundle.es14.js";
14
+ import { OptionItem as b } from "./bundle.es15.js";
15
15
  import { NumberInput as y } from "./bundle.es16.js";
16
16
  import { OptionsList as G } from "./bundle.es17.js";
17
17
  import { Checkbox as O } from "./bundle.es18.js";
@@ -29,66 +29,71 @@ import { DateInput as to } from "./bundle.es29.js";
29
29
  import { FileOverlay as mo } from "./bundle.es30.js";
30
30
  import { FormGroup as fo } from "./bundle.es31.js";
31
31
  import { TimePicker as io } from "./bundle.es32.js";
32
- import { Icon as co } from "./bundle.es33.js";
32
+ import { Icon as lo } from "./bundle.es33.js";
33
33
  import { ProgressBar as so } from "./bundle.es34.js";
34
- import { Skeleton as uo } from "./bundle.es35.js";
35
- import { ThemeProvider as To, useTheme as ho } from "./bundle.es36.js";
36
- import { ColorSchemeScript as vo, colorSchemeScript as Io } from "./bundle.es37.js";
37
- import { useLocalStorage as Ao } from "./bundle.es38.js";
38
- import { useBooleanState as bo } from "./bundle.es39.js";
39
- import { createAlertAgent as Ro } from "./bundle.es40.js";
40
- import { createToaster as yo } from "./bundle.es41.js";
41
- import { Toast as Go } from "./bundle.es42.js";
42
- import { DialogShell as Oo, createDialogsRegistry as Fo } from "./bundle.es43.js";
43
- import { createPopoversRegistry as No } from "./bundle.es44.js";
44
- import { createScope as qo } from "./bundle.es45.js";
34
+ import { Skeleton as go } from "./bundle.es35.js";
35
+ import { Blank as To } from "./bundle.es36.js";
36
+ import { ProgressRing as Do } from "./bundle.es37.js";
37
+ import { ThemeProvider as vo, useTheme as Bo } from "./bundle.es38.js";
38
+ import { ColorSchemeScript as ko, colorSchemeScript as Ao } from "./bundle.es39.js";
39
+ import { useLocalStorage as bo } from "./bundle.es40.js";
40
+ import { useBooleanState as yo } from "./bundle.es41.js";
41
+ import { createAlertAgent as Go } from "./bundle.es42.js";
42
+ import { createToaster as Oo } from "./bundle.es43.js";
43
+ import { Toast as zo } from "./bundle.es44.js";
44
+ import { DialogShell as jo, createDialogsRegistry as qo } from "./bundle.es45.js";
45
+ import { createPopoversRegistry as Ho } from "./bundle.es46.js";
46
+ import { createScope as Ko, createStaticScope as Mo } from "./bundle.es47.js";
45
47
  export {
46
48
  Q as AlertDialog,
47
49
  e as Avatar,
50
+ To as Blank,
48
51
  x as Button,
49
52
  a as ButtonGroup,
50
53
  O as Checkbox,
51
- vo as ColorSchemeScript,
54
+ ko as ColorSchemeScript,
52
55
  Z as Countdown,
53
56
  to as DateInput,
54
57
  ro as DatePicker,
55
58
  K as Dialog,
56
- Oo as DialogShell,
59
+ jo as DialogShell,
57
60
  H as Drawer,
58
61
  mo as FileOverlay,
59
62
  fo as FormGroup,
60
- co as Icon,
63
+ lo as Icon,
61
64
  S as ImitateScroll,
62
- b as Input,
65
+ A as Input,
63
66
  V as LoadingButton,
64
67
  y as NumberInput,
65
- R as OptionItem,
68
+ b as OptionItem,
66
69
  G as OptionsList,
67
70
  h as Popover,
68
71
  so as ProgressBar,
72
+ Do as ProgressRing,
69
73
  j as Radio,
70
74
  q as RadioGroup,
71
75
  n as Scrollable,
72
- g as Segments,
73
- P as Select,
74
- A as SelectTags,
75
- uo as Skeleton,
76
- l as Spinner,
76
+ u as Segments,
77
+ B as Select,
78
+ d as SelectTags,
79
+ go as Skeleton,
80
+ c as Spinner,
77
81
  z as Switch,
78
82
  X as Tabs,
79
83
  $ as TextArea,
80
- To as ThemeProvider,
84
+ vo as ThemeProvider,
81
85
  io as TimePicker,
82
- Go as Toast,
83
- v as Tooltip,
86
+ zo as Toast,
87
+ P as Tooltip,
84
88
  p as avatarSizes,
85
- Io as colorSchemeScript,
86
- Ro as createAlertAgent,
87
- Fo as createDialogsRegistry,
88
- No as createPopoversRegistry,
89
- qo as createScope,
90
- yo as createToaster,
91
- bo as useBooleanState,
92
- Ao as useLocalStorage,
93
- ho as useTheme
89
+ Ao as colorSchemeScript,
90
+ Go as createAlertAgent,
91
+ qo as createDialogsRegistry,
92
+ Ho as createPopoversRegistry,
93
+ Ko as createScope,
94
+ Mo as createStaticScope,
95
+ Oo as createToaster,
96
+ yo as useBooleanState,
97
+ bo as useLocalStorage,
98
+ Bo as useTheme
94
99
  };
@@ -1,10 +1,10 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import { useRef as L, useMemo as j, useImperativeHandle as k } from "react";
3
3
  import { Popover as q } from "./bundle.es10.js";
4
- import { useFroozeClosing as w } from "./bundle.es48.js";
5
- import { SelectInput as H } from "./bundle.es49.js";
6
- import { useScrollListController as M } from "./bundle.es50.js";
7
- import { OptionsPopover as N } from "./bundle.es51.js";
4
+ import { useFroozeClosing as w } from "./bundle.es50.js";
5
+ import { SelectInput as H } from "./bundle.es51.js";
6
+ import { useScrollListController as M } from "./bundle.es52.js";
7
+ import { OptionsPopover as N } from "./bundle.es53.js";
8
8
  import { mergeRefs as W } from "react-merge-refs";
9
9
  const Z = (t) => {
10
10
  const {
@@ -3,12 +3,12 @@ import { mergeRefs as T } from "react-merge-refs";
3
3
  import { useState as M, useRef as h, useMemo as j } from "react";
4
4
  import { matchPattern as q } from "@companix/utils-js";
5
5
  import { faXmark as V, faChevronDown as $ } from "@companix/icons-solid";
6
- import { useFroozeClosing as B } from "./bundle.es48.js";
6
+ import { useFroozeClosing as B } from "./bundle.es50.js";
7
7
  import { Popover as L } from "./bundle.es10.js";
8
8
  import { Icon as g } from "./bundle.es33.js";
9
9
  import { attr as l, getActiveElementByAnotherElement as X, contains as G } from "@companix/utils-browser";
10
- import { OptionsPopover as H } from "./bundle.es51.js";
11
- import { arrays as v } from "./bundle.es52.js";
10
+ import { OptionsPopover as H } from "./bundle.es53.js";
11
+ import { arrays as v } from "./bundle.es54.js";
12
12
  const ne = (r) => {
13
13
  const {
14
14
  closeAfterSelect: C,
@@ -1,8 +1,8 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { forwardRef as b, useRef as R } from "react";
3
3
  import { mergeRefs as c } from "react-merge-refs";
4
- import { InputElement as x } from "./bundle.es53.js";
5
- import { InputContainer as I } from "./bundle.es54.js";
4
+ import { InputElement as x } from "./bundle.es55.js";
5
+ import { InputContainer as I } from "./bundle.es56.js";
6
6
  import g from "classnames";
7
7
  const N = b(
8
8
  ({
@@ -2,7 +2,7 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  import C from "classnames";
3
3
  import { forwardRef as j, useRef as w } from "react";
4
4
  import { mergeRefs as y } from "react-merge-refs";
5
- import { InputContainer as F } from "./bundle.es54.js";
5
+ import { InputContainer as F } from "./bundle.es56.js";
6
6
  import { NumericFormat as V } from "react-number-format";
7
7
  const D = j(
8
8
  ({
@@ -1,6 +1,6 @@
1
1
  import { jsxs as I, jsx as a } from "react/jsx-runtime";
2
2
  import { box as g } from "@companix/utils-browser";
3
- import { getInitialsFontSize as h } from "./bundle.es46.js";
3
+ import { getInitialsFontSize as h } from "./bundle.es48.js";
4
4
  const k = 24, y = ({
5
5
  alt: n,
6
6
  crossOrigin: i,
@@ -3,7 +3,7 @@ import d from "classnames";
3
3
  import * as e from "@radix-ui/react-dialog";
4
4
  import { VisuallyHidden as i } from "@radix-ui/react-visually-hidden";
5
5
  import { customCSS as p } from "@companix/utils-browser";
6
- import { RemoveListener as f } from "./bundle.es55.js";
6
+ import { RemoveListener as f } from "./bundle.es57.js";
7
7
  const h = ({
8
8
  open: t,
9
9
  onClosed: l,
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
2
  import f from "classnames";
3
3
  import * as o from "@radix-ui/react-dialog";
4
4
  import { VisuallyHidden as a } from "@radix-ui/react-visually-hidden";
5
- import { RemoveListener as v } from "./bundle.es55.js";
5
+ import { RemoveListener as v } from "./bundle.es57.js";
6
6
  const g = (l) => {
7
7
  const { size: n = "s", open: r, onOpenChange: s, children: c, onClosed: t, disableEsc: p, className: d } = l, m = (h) => {
8
8
  p && h.preventDefault();
@@ -1,7 +1,7 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import * as r from "@radix-ui/react-alert-dialog";
3
3
  import { Button as c } from "./bundle.es4.js";
4
- import { RemoveListener as N } from "./bundle.es55.js";
4
+ import { RemoveListener as N } from "./bundle.es57.js";
5
5
  import { VisuallyHidden as u } from "@radix-ui/react-visually-hidden";
6
6
  const C = ({
7
7
  open: d,
@@ -1,6 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { Button as m } from "./bundle.es4.js";
3
- import { useLoading as p } from "./bundle.es56.js";
3
+ import { useLoading as p } from "./bundle.es58.js";
4
4
  const g = ({ onClick: o, appearance: r = "primary", ...i }) => {
5
5
  const { isLoading: n, isError: t, handleClick: a } = p({ onClick: o });
6
6
  return /* @__PURE__ */ e(
@@ -1,5 +1,5 @@
1
1
  import { jsx as a, jsxs as d } from "react/jsx-runtime";
2
- import { useTabSlider as b, makeTabId as l } from "./bundle.es47.js";
2
+ import { useTabSlider as b, makeTabId as l } from "./bundle.es49.js";
3
3
  import * as n from "@radix-ui/react-tabs";
4
4
  import { useRef as m, useId as f, createContext as T, useContext as c } from "react";
5
5
  const o = T({ baseId: "", containerRef: {} }), u = ({ children: s, value: e, onChange: r }) => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as f } from "react/jsx-runtime";
2
- import { useResizeTextarea as x } from "./bundle.es57.js";
2
+ import { useResizeTextarea as x } from "./bundle.es59.js";
3
3
  import { attr as e, callMultiple as u } from "@companix/utils-browser";
4
4
  import { useEffect as z } from "react";
5
5
  import { mergeRefs as R } from "react-merge-refs";
@@ -2,11 +2,11 @@ import { jsx as u } from "react/jsx-runtime";
2
2
  import { Popover as T } from "./bundle.es10.js";
3
3
  import { Input as w } from "./bundle.es14.js";
4
4
  import { useState as A, useRef as j } from "react";
5
- import { Calendar as E } from "./bundle.es58.js";
6
- import { useDayDisableCheker as N } from "./bundle.es59.js";
5
+ import { Calendar as E } from "./bundle.es60.js";
6
+ import { useDayDisableCheker as N } from "./bundle.es61.js";
7
7
  import { getNum as h, formatTime as v } from "@companix/utils-js";
8
- import { removeDigits as O } from "./bundle.es52.js";
9
- import { SelectRightElements as Y } from "./bundle.es60.js";
8
+ import { removeDigits as O } from "./bundle.es54.js";
9
+ import { SelectRightElements as Y } from "./bundle.es62.js";
10
10
  const i = {
11
11
  char: "-",
12
12
  toString: (e) => {
@@ -1,8 +1,8 @@
1
1
  import { jsxs as D, jsx as h } from "react/jsx-runtime";
2
2
  import { useMemo as M, useEffect as C } from "react";
3
3
  import { Select as c } from "./bundle.es12.js";
4
- import { createDateValidation as O, getMonthMaxDay as T } from "./bundle.es52.js";
5
- import { defaultMin as j, defaultMax as N, useCalendarOptions as V } from "./bundle.es61.js";
4
+ import { createDateValidation as O, getMonthMaxDay as T } from "./bundle.es54.js";
5
+ import { defaultMin as j, defaultMax as N, useCalendarOptions as V } from "./bundle.es63.js";
6
6
  const B = ({
7
7
  min: o = j,
8
8
  max: e = N,
@@ -2,7 +2,7 @@ import { jsxs as p, jsx as a } from "react/jsx-runtime";
2
2
  import t from "classnames";
3
3
  import { attr as n } from "@companix/utils-browser";
4
4
  const u = (o) => {
5
- const { fill: e, className: l, label: c, children: i, caption: r, apperance: m = "neutral" } = o;
5
+ const { fill: e, className: l, label: c, children: i, caption: r, appearance: m = "neutral" } = o;
6
6
  return /* @__PURE__ */ p("div", { className: t("form-group", l), "data-fill": n(e), children: [
7
7
  /* @__PURE__ */ a("div", { className: "form-group-label", children: c }),
8
8
  i,
@@ -1,8 +1,8 @@
1
1
  import { jsx as g } from "react/jsx-runtime";
2
2
  import { useRef as b, useMemo as I, useState as E, useCallback as A } from "react";
3
3
  import { getNum as S } from "@companix/utils-js";
4
- import { getTimesOptions as W, getTimeValue as q, removeDigits as w, convertTimeToOption as y } from "./bundle.es52.js";
5
- import { SelectRightElements as z } from "./bundle.es60.js";
4
+ import { getTimesOptions as W, getTimeValue as q, removeDigits as w, convertTimeToOption as y } from "./bundle.es54.js";
5
+ import { SelectRightElements as z } from "./bundle.es62.js";
6
6
  import { Select as F } from "./bundle.es12.js";
7
7
  import { Input as G } from "./bundle.es14.js";
8
8
  const o = {
@@ -1,37 +1,14 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import { useState as h, useEffect as c, createContext as f, useContext as w } from "react";
3
- import { getColorScheme as v, updateDOM as m } from "./bundle.es62.js";
4
- const i = f({
5
- setColorScheme: () => {
6
- }
7
- }), y = () => w(i), p = (d) => {
8
- const { defaultColorScheme: o = "system", storageKey: n = "theme", children: l } = d, [r, a] = h(() => v(n, o)), s = (e) => {
9
- a(e), localStorage.setItem(n, e);
10
- };
11
- return c(() => {
12
- const e = window ? window.matchMedia("(prefers-color-scheme: dark)") : void 0;
13
- if (!e)
14
- return;
15
- const t = () => {
16
- r === "system" && m("system");
17
- };
18
- return e.addEventListener?.("change", t), t(), () => {
19
- e.removeEventListener?.("change", t);
20
- };
21
- }, [r]), c(() => {
22
- if (!window)
23
- return;
24
- const e = (t) => {
25
- t.key === n && (t.newValue ? a(t.newValue) : s(o));
26
- };
27
- return window.addEventListener("storage", e), () => {
28
- window.removeEventListener("storage", e);
29
- };
30
- }, [s, o]), c(() => {
31
- m(r);
32
- }, [r]), /* @__PURE__ */ u(i.Provider, { value: { colorScheme: r, setColorScheme: s }, children: l });
33
- };
1
+ import { jsxs as e, jsx as a } from "react/jsx-runtime";
2
+ import d from "classnames";
3
+ import { Icon as o } from "./bundle.es33.js";
4
+ const b = ({ appearance: r, icon: c, className: s, iconSize: i, title: n, description: l, children: m }) => /* @__PURE__ */ e("div", { className: d("blank", s), "data-appearance": r ?? "neutral", children: [
5
+ /* @__PURE__ */ a("div", { className: "blank-icon", children: /* @__PURE__ */ a(o, { icon: c, size: i }) }),
6
+ (n || l) && /* @__PURE__ */ e("div", { className: "blank-text", children: [
7
+ n && /* @__PURE__ */ a("h4", { className: "blank-title", children: n }),
8
+ l && /* @__PURE__ */ a("div", { className: "blank-description", children: l })
9
+ ] }),
10
+ m
11
+ ] });
34
12
  export {
35
- p as ThemeProvider,
36
- y as useTheme
13
+ b as Blank
37
14
  };
@@ -1,24 +1,54 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { memo as n } from "react";
3
- const i = n(({ storageKey: t, defaultColorScheme: o }) => /* @__PURE__ */ l(
4
- "script",
5
- {
6
- suppressHydrationWarning: !0,
7
- dangerouslySetInnerHTML: {
8
- __html: `(${a.toString()})("${t}", "${o}")`
1
+ import { jsxs as e, jsx as s } from "react/jsx-runtime";
2
+ import { getInitialsFontSize as l } from "./bundle.es48.js";
3
+ import { clamp as i, customCSS as m, px as n } from "@companix/utils-browser";
4
+ const u = ({
5
+ appearance: o = "primary",
6
+ hint: t,
7
+ size: a = 80,
8
+ width: c = 6,
9
+ value: g
10
+ }) => {
11
+ const r = 100 * i(g, 0, 1);
12
+ return /* @__PURE__ */ e(
13
+ "div",
14
+ {
15
+ "aria-valuemax": 100,
16
+ "aria-valuemin": 0,
17
+ "aria-valuenow": r,
18
+ role: "progressbar",
19
+ className: "progress-ring",
20
+ "data-appearance": o,
21
+ children: [
22
+ /* @__PURE__ */ e(
23
+ "svg",
24
+ {
25
+ className: "progress-ring-image",
26
+ style: m({
27
+ "--percentage": r / 100,
28
+ "--size": n(a),
29
+ "--track-width": n(c)
30
+ }),
31
+ children: [
32
+ /* @__PURE__ */ s("circle", { className: "progress-ring-track" }),
33
+ /* @__PURE__ */ s("circle", { className: "progress-ring-indicator" })
34
+ ]
35
+ }
36
+ ),
37
+ t && /* @__PURE__ */ e(
38
+ "div",
39
+ {
40
+ className: "progress-ring-hint",
41
+ style: { fontSize: i(l(a) - 4, 0, 18) },
42
+ children: [
43
+ Math.round(r),
44
+ "%"
45
+ ]
46
+ }
47
+ )
48
+ ]
9
49
  }
10
- }
11
- )), a = (t, o) => {
12
- const [r, c] = ["theme-light", "theme-dark"];
13
- try {
14
- let e = localStorage.getItem(t) || o;
15
- e === "system" && (e = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
16
- const s = e === "dark" ? c : r;
17
- document.documentElement.classList.remove(r, c), document.documentElement.classList.add(s), document.documentElement.style.colorScheme = e;
18
- } catch {
19
- }
50
+ );
20
51
  };
21
52
  export {
22
- i as ColorSchemeScript,
23
- a as colorSchemeScript
53
+ u as ProgressRing
24
54
  };
@@ -1,13 +1,37 @@
1
- import { useState as s, useEffect as c } from "react";
2
- const l = (e, a) => {
3
- const [t, o] = s(() => {
4
- const r = localStorage.getItem(e);
5
- return r ? JSON.parse(r) : a;
6
- });
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { useState as h, useEffect as c, createContext as f, useContext as w } from "react";
3
+ import { getColorScheme as v, updateDOM as m } from "./bundle.es64.js";
4
+ const i = f({
5
+ setColorScheme: () => {
6
+ }
7
+ }), y = () => w(i), p = (d) => {
8
+ const { defaultColorScheme: o = "system", storageKey: n = "theme", children: l } = d, [r, a] = h(() => v(n, o)), s = (e) => {
9
+ a(e), localStorage.setItem(n, e);
10
+ };
7
11
  return c(() => {
8
- localStorage.setItem(e, JSON.stringify(t));
9
- }, [t]), [t, o];
12
+ const e = window ? window.matchMedia("(prefers-color-scheme: dark)") : void 0;
13
+ if (!e)
14
+ return;
15
+ const t = () => {
16
+ r === "system" && m("system");
17
+ };
18
+ return e.addEventListener?.("change", t), t(), () => {
19
+ e.removeEventListener?.("change", t);
20
+ };
21
+ }, [r]), c(() => {
22
+ if (!window)
23
+ return;
24
+ const e = (t) => {
25
+ t.key === n && (t.newValue ? a(t.newValue) : s(o));
26
+ };
27
+ return window.addEventListener("storage", e), () => {
28
+ window.removeEventListener("storage", e);
29
+ };
30
+ }, [s, o]), c(() => {
31
+ m(r);
32
+ }, [r]), /* @__PURE__ */ u(i.Provider, { value: { colorScheme: r, setColorScheme: s }, children: l });
10
33
  };
11
34
  export {
12
- l as useLocalStorage
35
+ p as ThemeProvider,
36
+ y as useTheme
13
37
  };