@code0-tech/pictor 0.6.1 → 0.6.3

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 (102) hide show
  1. package/LICENSE +1 -1
  2. package/dist/assets/components/command/Command.style.css +1 -1
  3. package/dist/assets/components/gantt/Gantt.style.css +1 -0
  4. package/dist/assets/components/layout/Layout.style.css +1 -1
  5. package/dist/components/alert/Alert.d.ts +2 -2
  6. package/dist/components/alert/Alert.js +8 -7
  7. package/dist/components/avatar/Avatar.d.ts +2 -2
  8. package/dist/components/avatar/Avatar.js +30 -27
  9. package/dist/components/badge/Badge.d.ts +2 -2
  10. package/dist/components/badge/Badge.js +26 -23
  11. package/dist/components/breadcrumb/Breadcrumb.d.ts +2 -2
  12. package/dist/components/breadcrumb/Breadcrumb.js +16 -14
  13. package/dist/components/button/Button.d.ts +3 -3
  14. package/dist/components/button/Button.js +13 -12
  15. package/dist/components/button-group/ButtonGroup.d.ts +2 -2
  16. package/dist/components/button-group/ButtonGroup.js +23 -20
  17. package/dist/components/card/Card.d.ts +3 -3
  18. package/dist/components/card/Card.js +19 -16
  19. package/dist/components/card/CardSection.d.ts +2 -2
  20. package/dist/components/card/CardSection.js +16 -13
  21. package/dist/components/col/Col.d.ts +2 -2
  22. package/dist/components/col/Col.js +22 -19
  23. package/dist/components/command/Command.d.ts +12 -12
  24. package/dist/components/command/Command.js +91 -78
  25. package/dist/components/container/Container.d.ts +2 -2
  26. package/dist/components/container/Container.js +13 -10
  27. package/dist/components/context-menu/ContextMenu.d.ts +13 -13
  28. package/dist/components/context-menu/ContextMenu.js +26 -25
  29. package/dist/components/data-table/DataTable.d.ts +2 -2
  30. package/dist/components/data-table/DataTable.js +18 -17
  31. package/dist/components/data-table/DataTableColumn.d.ts +2 -2
  32. package/dist/components/data-table/DataTableColumn.js +12 -11
  33. package/dist/components/data-table/DataTableFilterInput.js +4 -3
  34. package/dist/components/dialog/Dialog.d.ts +12 -12
  35. package/dist/components/dialog/Dialog.js +24 -23
  36. package/dist/components/editor/Editor.d.ts +2 -2
  37. package/dist/components/editor/Editor.js +4 -3
  38. package/dist/components/file-tabs/FileTabs.d.ts +5 -5
  39. package/dist/components/file-tabs/FileTabs.js +38 -35
  40. package/dist/components/flex/Flex.d.ts +2 -2
  41. package/dist/components/flex/Flex.js +16 -13
  42. package/dist/components/form/CheckboxInput.js +17 -15
  43. package/dist/components/form/Input.d.ts +3 -3
  44. package/dist/components/form/Input.js +4 -3
  45. package/dist/components/form/PinInput.d.ts +3 -3
  46. package/dist/components/form/PinInput.js +33 -30
  47. package/dist/components/form/RadioGroup.js +22 -19
  48. package/dist/components/form/RadioInput.d.ts +2 -2
  49. package/dist/components/form/RadioInput.js +19 -16
  50. package/dist/components/fullscreen/FullScreen.d.ts +2 -2
  51. package/dist/components/fullscreen/FullScreen.js +8 -6
  52. package/dist/components/gantt/Gantt.d.ts +12 -0
  53. package/dist/components/gantt/Gantt.js +92 -0
  54. package/dist/components/gantt/GanttFooter.d.ts +2 -0
  55. package/dist/components/gantt/GanttFooter.js +38 -0
  56. package/dist/components/gantt/GanttGroup.d.ts +8 -0
  57. package/dist/components/gantt/GanttGroup.js +134 -0
  58. package/dist/components/gantt/GanttHeader.d.ts +10 -0
  59. package/dist/components/gantt/GanttHeader.js +55 -0
  60. package/dist/components/gantt/GanttItem.d.ts +16 -0
  61. package/dist/components/gantt/GanttItem.js +23 -0
  62. package/dist/components/layout/Layout.d.ts +3 -3
  63. package/dist/components/layout/Layout.js +37 -33
  64. package/dist/components/menu/Menu.d.ts +15 -15
  65. package/dist/components/menu/Menu.js +35 -32
  66. package/dist/components/resizable/Resizable.d.ts +4 -4
  67. package/dist/components/resizable/Resizable.js +18 -17
  68. package/dist/components/row/Row.d.ts +2 -2
  69. package/dist/components/row/Row.js +15 -12
  70. package/dist/components/scroll-area/ScrollArea.d.ts +6 -6
  71. package/dist/components/scroll-area/ScrollArea.js +35 -32
  72. package/dist/components/segmented-control/SegmentedControl.d.ts +3 -3
  73. package/dist/components/segmented-control/SegmentedControl.js +12 -11
  74. package/dist/components/spacing/Spacing.d.ts +3 -3
  75. package/dist/components/spacing/Spacing.js +12 -11
  76. package/dist/components/tab/Tab.d.ts +5 -5
  77. package/dist/components/tab/Tab.js +22 -21
  78. package/dist/components/text/Text.d.ts +3 -3
  79. package/dist/components/text/Text.js +14 -11
  80. package/dist/components/toast/Toast.d.ts +2 -2
  81. package/dist/components/toast/Toast.js +32 -31
  82. package/dist/components/tooltip/Tooltip.d.ts +6 -6
  83. package/dist/components/tooltip/Tooltip.js +34 -31
  84. package/dist/index.d.ts +1 -0
  85. package/dist/index.js +151 -152
  86. package/dist/utils/color.d.ts +4 -0
  87. package/dist/utils/color.js +43 -0
  88. package/dist/utils/component.d.ts +105 -0
  89. package/dist/utils/component.js +130 -0
  90. package/dist/utils/index.d.ts +3 -4
  91. package/dist/utils/index.js +14 -18
  92. package/dist/utils/size.d.ts +4 -0
  93. package/dist/utils/size.js +21 -0
  94. package/dist/utils/utils.d.ts +0 -55
  95. package/dist/utils/utils.js +1 -159
  96. package/package.json +3 -3
  97. package/dist/utils/nonReactiveArrayService.d.ts +0 -19
  98. package/dist/utils/nonReactiveArrayService.js +0 -54
  99. package/dist/utils/objectStore.d.ts +0 -12
  100. package/dist/utils/objectStore.js +0 -34
  101. package/dist/utils/types.d.ts +0 -57
  102. package/dist/utils/types.js +0 -4
package/dist/index.js CHANGED
@@ -5,56 +5,56 @@ import { Badge as u } from "./components/badge/Badge.js";
5
5
  import { Breadcrumb as x } from "./components/breadcrumb/Breadcrumb.js";
6
6
  import { Button as f } from "./components/button/Button.js";
7
7
  import { ButtonGroup as g } from "./components/button-group/ButtonGroup.js";
8
- import { Card as b } from "./components/card/Card.js";
9
- import { Col as d } from "./components/col/Col.js";
10
- import { Command as T, CommandDialog as M, CommandEmpty as I, CommandGroup as D, CommandInput as A, CommandItem as v, CommandList as F, CommandSeparator as P, CommandShortcut as R } from "./components/command/Command.js";
11
- import { Container as w } from "./components/container/Container.js";
12
- import { ContextMenu as h, ContextMenuArrow as G, ContextMenuContent as z, ContextMenuGroup as B, ContextMenuItem as O, ContextMenuLabel as k, ContextMenuPortal as E, ContextMenuSeparator as H, ContextMenuSub as N, ContextMenuSubContent as V, ContextMenuSubTrigger as j, ContextMenuTrigger as Q } from "./components/context-menu/ContextMenu.js";
8
+ import { Card as s } from "./components/card/Card.js";
9
+ import { Col as b } from "./components/col/Col.js";
10
+ import { Command as M, CommandDialog as I, CommandEmpty as c, CommandGroup as D, CommandInput as A, CommandItem as F, CommandList as P, CommandSeparator as v, CommandShortcut as h } from "./components/command/Command.js";
11
+ import { Container as R } from "./components/container/Container.js";
12
+ import { ContextMenu as y, ContextMenuArrow as G, ContextMenuContent as z, ContextMenuGroup as B, ContextMenuItem as V, ContextMenuLabel as k, ContextMenuPortal as E, ContextMenuSeparator as H, ContextMenuSub as O, ContextMenuSubContent as Q, ContextMenuSubTrigger as N, ContextMenuTrigger as Z } from "./components/context-menu/ContextMenu.js";
13
13
  import { DataTable as q } from "./components/data-table/DataTable.js";
14
14
  import { DataTableColumn as K } from "./components/data-table/DataTableColumn.js";
15
15
  import { DataTableFilterInput as W, createFilterQueryLanguage as X } from "./components/data-table/DataTableFilterInput.js";
16
16
  import { DataTableFilterSuggestionMenu as _ } from "./components/data-table/DataTableFilterSuggestionMenu.js";
17
- import { Dialog as ee, DialogClose as oe, DialogContent as re, DialogDescription as te, DialogFooter as ne, DialogHeader as ae, DialogOverlay as pe, DialogPortal as me, DialogTitle as ue, DialogTrigger as ie } from "./components/dialog/Dialog.js";
18
- import { Editor as le } from "./components/editor/Editor.js";
19
- import { FileTabsService as Ce } from "./components/file-tabs/FileTabs.service.js";
20
- import { FileTabs as Se, FileTabsContent as be, FileTabsList as ce, FileTabsTrigger as de } from "./components/file-tabs/FileTabs.js";
21
- import { Flex as Te } from "./components/flex/Flex.js";
22
- import { CheckboxInput as Ie } from "./components/form/CheckboxInput.js";
23
- import { EmailInput as Ae, emailValidation as ve } from "./components/form/EmailInput.js";
24
- import { Input as Pe } from "./components/form/Input.js";
25
- import { InputDescription as ye } from "./components/form/InputDescription.js";
26
- import { InputLabel as Le } from "./components/form/InputLabel.js";
27
- import { InputMessage as Ge } from "./components/form/InputMessage.js";
28
- import { InputSuggestionMenuContent as Be, InputSuggestionMenuContentItems as Oe } from "./components/form/InputSuggestion.js";
29
- import { NumberInput as Ee } from "./components/form/NumberInput.js";
30
- import { PasswordInput as Ne, passwordValidation as Ve } from "./components/form/PasswordInput.js";
31
- import { PinInput as Qe, PinInputField as Ze, PinInputHiddenField as qe } from "./components/form/PinInput.js";
32
- import { RadioGroup as Ke } from "./components/form/RadioGroup.js";
33
- import { RadioInput as We } from "./components/form/RadioInput.js";
34
- import { SwitchInput as Ye } from "./components/form/SwitchInput.js";
35
- import { TextAreaInput as $e } from "./components/form/TextAreaInput.js";
36
- import { TextInput as oo } from "./components/form/TextInput.js";
37
- import { useForm as to } from "./components/form/useForm.js";
38
- import { buildDefaultSyntax as ao } from "./components/form/Input.syntax.hook.js";
39
- import { FullScreen as mo } from "./components/fullscreen/FullScreen.js";
40
- import { Layout as io } from "./components/layout/Layout.js";
41
- import { Menu as lo, MenuArrow as fo, MenuCheckboxItem as Co, MenuContent as go, MenuGroup as So, MenuItem as bo, MenuItemIndicator as co, MenuLabel as so, MenuPortal as To, MenuSeparator as Mo, MenuSub as Io, MenuSubContent as Do, MenuSubTrigger as Ao, MenuTrigger as vo } from "./components/menu/Menu.js";
42
- import { Quote as Po } from "./components/quote/Quote.js";
43
- import { ResizableHandle as yo, ResizablePanel as wo, ResizablePanelGroup as Lo } from "./components/resizable/Resizable.js";
44
- import { Row as Go } from "./components/row/Row.js";
45
- import { ScrollArea as Bo, ScrollAreaCorner as Oo, ScrollAreaScrollbar as ko, ScrollAreaThumb as Eo, ScrollAreaViewport as Ho } from "./components/scroll-area/ScrollArea.js";
46
- import { SegmentedControl as Vo, SegmentedControlItem as jo } from "./components/segmented-control/SegmentedControl.js";
47
- import { Spacing as Zo } from "./components/spacing/Spacing.js";
48
- import { Tab as Jo, TabContent as Ko, TabList as Uo, TabTrigger as Wo } from "./components/tab/Tab.js";
49
- import { Text as Yo } from "./components/text/Text.js";
50
- import { Toast as $o, toast as er } from "./components/toast/Toast.js";
51
- import { Tooltip as rr, TooltipArrow as tr, TooltipContent as nr, TooltipPortal as ar, TooltipTrigger as pr } from "./components/tooltip/Tooltip.js";
52
- import { ContextStore as ur, ContextStoreProvider as ir, useService as xr, useStore as lr } from "./utils/contextStore.js";
53
- import { NonReactiveArrayService as Cr, createNonReactiveArrayService as gr } from "./utils/nonReactiveArrayService.js";
54
- import { ObjectService as br, createObjectService as cr } from "./utils/objectStore.js";
17
+ import { Dialog as oo, DialogClose as eo, DialogContent as ro, DialogDescription as to, DialogFooter as no, DialogHeader as ao, DialogOverlay as po, DialogPortal as mo, DialogTitle as uo, DialogTrigger as io } from "./components/dialog/Dialog.js";
18
+ import { Editor as lo } from "./components/editor/Editor.js";
19
+ import { FileTabsService as Co } from "./components/file-tabs/FileTabs.service.js";
20
+ import { FileTabs as So, FileTabsContent as so, FileTabsList as To, FileTabsTrigger as bo } from "./components/file-tabs/FileTabs.js";
21
+ import { Flex as Io } from "./components/flex/Flex.js";
22
+ import { CheckboxInput as Do } from "./components/form/CheckboxInput.js";
23
+ import { EmailInput as Fo, emailValidation as Po } from "./components/form/EmailInput.js";
24
+ import { Input as ho } from "./components/form/Input.js";
25
+ import { InputDescription as Ro } from "./components/form/InputDescription.js";
26
+ import { InputLabel as yo } from "./components/form/InputLabel.js";
27
+ import { InputMessage as zo } from "./components/form/InputMessage.js";
28
+ import { InputSuggestionMenuContent as Vo, InputSuggestionMenuContentItems as ko } from "./components/form/InputSuggestion.js";
29
+ import { NumberInput as Ho } from "./components/form/NumberInput.js";
30
+ import { PasswordInput as Qo, passwordValidation as No } from "./components/form/PasswordInput.js";
31
+ import { PinInput as jo, PinInputField as qo, PinInputHiddenField as Jo } from "./components/form/PinInput.js";
32
+ import { RadioGroup as Uo } from "./components/form/RadioGroup.js";
33
+ import { RadioInput as Xo } from "./components/form/RadioInput.js";
34
+ import { SwitchInput as _o } from "./components/form/SwitchInput.js";
35
+ import { TextAreaInput as oe } from "./components/form/TextAreaInput.js";
36
+ import { TextInput as re } from "./components/form/TextInput.js";
37
+ import { useForm as ne } from "./components/form/useForm.js";
38
+ import { buildDefaultSyntax as pe } from "./components/form/Input.syntax.hook.js";
39
+ import { FullScreen as ue } from "./components/fullscreen/FullScreen.js";
40
+ import { Gantt as xe, getRelativeValue as le } from "./components/gantt/Gantt.js";
41
+ import { Layout as Ce } from "./components/layout/Layout.js";
42
+ import { Menu as Se, MenuArrow as se, MenuCheckboxItem as Te, MenuContent as be, MenuGroup as de, MenuItem as Me, MenuItemIndicator as Ie, MenuLabel as ce, MenuPortal as De, MenuSeparator as Ae, MenuSub as Fe, MenuSubContent as Pe, MenuSubTrigger as ve, MenuTrigger as he } from "./components/menu/Menu.js";
43
+ import { Quote as Re } from "./components/quote/Quote.js";
44
+ import { ResizableHandle as ye, ResizablePanel as Ge, ResizablePanelGroup as ze } from "./components/resizable/Resizable.js";
45
+ import { Row as Ve } from "./components/row/Row.js";
46
+ import { ScrollArea as Ee, ScrollAreaCorner as He, ScrollAreaScrollbar as Oe, ScrollAreaThumb as Qe, ScrollAreaViewport as Ne } from "./components/scroll-area/ScrollArea.js";
47
+ import { SegmentedControl as je, SegmentedControlItem as qe } from "./components/segmented-control/SegmentedControl.js";
48
+ import { Spacing as Ke } from "./components/spacing/Spacing.js";
49
+ import { Tab as We, TabContent as Xe, TabList as Ye, TabTrigger as _e } from "./components/tab/Tab.js";
50
+ import { Text as or } from "./components/text/Text.js";
51
+ import { Toast as rr, toast as tr } from "./components/toast/Toast.js";
52
+ import { Tooltip as ar, TooltipArrow as pr, TooltipContent as mr, TooltipPortal as ur, TooltipTrigger as ir } from "./components/tooltip/Tooltip.js";
53
+ import { ContextStore as lr, ContextStoreProvider as fr, useService as Cr, useStore as gr } from "./utils/contextStore.js";
55
54
  import { ReactiveArrayService as sr, useReactiveArrayService as Tr } from "./utils/reactiveArrayService.js";
56
- import { Colors as Ir } from "./utils/types.js";
57
- import { getDOMSizeFromCodeZeroSize as Ar, hashToColor as vr, mergeCode0Props as Fr } from "./utils/utils.js";
55
+ import { mergeComponentProps as dr } from "./utils/component.js";
56
+ import { Colors as Ir, hashToColor as cr, withAlpha as Dr } from "./utils/color.js";
57
+ import { getDOMSizeFromCodeZeroSize as Fr } from "./utils/size.js";
58
58
  export {
59
59
  r as Alert,
60
60
  n as AuroraBackground,
@@ -63,127 +63,126 @@ export {
63
63
  x as Breadcrumb,
64
64
  f as Button,
65
65
  g as ButtonGroup,
66
- b as Card,
67
- Ie as CheckboxInput,
68
- d as Col,
66
+ s as Card,
67
+ Do as CheckboxInput,
68
+ b as Col,
69
69
  Ir as Colors,
70
- T as Command,
71
- M as CommandDialog,
72
- I as CommandEmpty,
70
+ M as Command,
71
+ I as CommandDialog,
72
+ c as CommandEmpty,
73
73
  D as CommandGroup,
74
74
  A as CommandInput,
75
- v as CommandItem,
76
- F as CommandList,
77
- P as CommandSeparator,
78
- R as CommandShortcut,
79
- w as Container,
80
- h as ContextMenu,
75
+ F as CommandItem,
76
+ P as CommandList,
77
+ v as CommandSeparator,
78
+ h as CommandShortcut,
79
+ R as Container,
80
+ y as ContextMenu,
81
81
  G as ContextMenuArrow,
82
82
  z as ContextMenuContent,
83
83
  B as ContextMenuGroup,
84
- O as ContextMenuItem,
84
+ V as ContextMenuItem,
85
85
  k as ContextMenuLabel,
86
86
  E as ContextMenuPortal,
87
87
  H as ContextMenuSeparator,
88
- N as ContextMenuSub,
89
- V as ContextMenuSubContent,
90
- j as ContextMenuSubTrigger,
91
- Q as ContextMenuTrigger,
92
- ur as ContextStore,
93
- ir as ContextStoreProvider,
88
+ O as ContextMenuSub,
89
+ Q as ContextMenuSubContent,
90
+ N as ContextMenuSubTrigger,
91
+ Z as ContextMenuTrigger,
92
+ lr as ContextStore,
93
+ fr as ContextStoreProvider,
94
94
  q as DataTable,
95
95
  K as DataTableColumn,
96
96
  W as DataTableFilterInput,
97
97
  _ as DataTableFilterSuggestionMenu,
98
- ee as Dialog,
99
- oe as DialogClose,
100
- re as DialogContent,
101
- te as DialogDescription,
102
- ne as DialogFooter,
103
- ae as DialogHeader,
104
- pe as DialogOverlay,
105
- me as DialogPortal,
106
- ue as DialogTitle,
107
- ie as DialogTrigger,
108
- le as Editor,
109
- Ae as EmailInput,
110
- Se as FileTabs,
111
- be as FileTabsContent,
112
- ce as FileTabsList,
113
- Ce as FileTabsService,
114
- de as FileTabsTrigger,
115
- Te as Flex,
116
- mo as FullScreen,
117
- Pe as Input,
118
- ye as InputDescription,
119
- Le as InputLabel,
120
- Ge as InputMessage,
121
- Be as InputSuggestionMenuContent,
122
- Oe as InputSuggestionMenuContentItems,
123
- io as Layout,
124
- lo as Menu,
125
- fo as MenuArrow,
126
- Co as MenuCheckboxItem,
127
- go as MenuContent,
128
- So as MenuGroup,
129
- bo as MenuItem,
130
- co as MenuItemIndicator,
131
- so as MenuLabel,
132
- To as MenuPortal,
133
- Mo as MenuSeparator,
134
- Io as MenuSub,
135
- Do as MenuSubContent,
136
- Ao as MenuSubTrigger,
137
- vo as MenuTrigger,
138
- Cr as NonReactiveArrayService,
139
- Ee as NumberInput,
140
- br as ObjectService,
141
- Ne as PasswordInput,
142
- Qe as PinInput,
143
- Ze as PinInputField,
144
- qe as PinInputHiddenField,
145
- Po as Quote,
146
- Ke as RadioGroup,
147
- We as RadioInput,
98
+ oo as Dialog,
99
+ eo as DialogClose,
100
+ ro as DialogContent,
101
+ to as DialogDescription,
102
+ no as DialogFooter,
103
+ ao as DialogHeader,
104
+ po as DialogOverlay,
105
+ mo as DialogPortal,
106
+ uo as DialogTitle,
107
+ io as DialogTrigger,
108
+ lo as Editor,
109
+ Fo as EmailInput,
110
+ So as FileTabs,
111
+ so as FileTabsContent,
112
+ To as FileTabsList,
113
+ Co as FileTabsService,
114
+ bo as FileTabsTrigger,
115
+ Io as Flex,
116
+ ue as FullScreen,
117
+ xe as Gantt,
118
+ ho as Input,
119
+ Ro as InputDescription,
120
+ yo as InputLabel,
121
+ zo as InputMessage,
122
+ Vo as InputSuggestionMenuContent,
123
+ ko as InputSuggestionMenuContentItems,
124
+ Ce as Layout,
125
+ Se as Menu,
126
+ se as MenuArrow,
127
+ Te as MenuCheckboxItem,
128
+ be as MenuContent,
129
+ de as MenuGroup,
130
+ Me as MenuItem,
131
+ Ie as MenuItemIndicator,
132
+ ce as MenuLabel,
133
+ De as MenuPortal,
134
+ Ae as MenuSeparator,
135
+ Fe as MenuSub,
136
+ Pe as MenuSubContent,
137
+ ve as MenuSubTrigger,
138
+ he as MenuTrigger,
139
+ Ho as NumberInput,
140
+ Qo as PasswordInput,
141
+ jo as PinInput,
142
+ qo as PinInputField,
143
+ Jo as PinInputHiddenField,
144
+ Re as Quote,
145
+ Uo as RadioGroup,
146
+ Xo as RadioInput,
148
147
  sr as ReactiveArrayService,
149
- yo as ResizableHandle,
150
- wo as ResizablePanel,
151
- Lo as ResizablePanelGroup,
152
- Go as Row,
153
- Bo as ScrollArea,
154
- Oo as ScrollAreaCorner,
155
- ko as ScrollAreaScrollbar,
156
- Eo as ScrollAreaThumb,
157
- Ho as ScrollAreaViewport,
158
- Vo as SegmentedControl,
159
- jo as SegmentedControlItem,
160
- Zo as Spacing,
161
- Ye as SwitchInput,
162
- Jo as Tab,
163
- Ko as TabContent,
164
- Uo as TabList,
165
- Wo as TabTrigger,
166
- Yo as Text,
167
- $e as TextAreaInput,
168
- oo as TextInput,
169
- $o as Toast,
170
- rr as Tooltip,
171
- tr as TooltipArrow,
172
- nr as TooltipContent,
173
- ar as TooltipPortal,
174
- pr as TooltipTrigger,
175
- ao as buildDefaultSyntax,
148
+ ye as ResizableHandle,
149
+ Ge as ResizablePanel,
150
+ ze as ResizablePanelGroup,
151
+ Ve as Row,
152
+ Ee as ScrollArea,
153
+ He as ScrollAreaCorner,
154
+ Oe as ScrollAreaScrollbar,
155
+ Qe as ScrollAreaThumb,
156
+ Ne as ScrollAreaViewport,
157
+ je as SegmentedControl,
158
+ qe as SegmentedControlItem,
159
+ Ke as Spacing,
160
+ _o as SwitchInput,
161
+ We as Tab,
162
+ Xe as TabContent,
163
+ Ye as TabList,
164
+ _e as TabTrigger,
165
+ or as Text,
166
+ oe as TextAreaInput,
167
+ re as TextInput,
168
+ rr as Toast,
169
+ ar as Tooltip,
170
+ pr as TooltipArrow,
171
+ mr as TooltipContent,
172
+ ur as TooltipPortal,
173
+ ir as TooltipTrigger,
174
+ pe as buildDefaultSyntax,
176
175
  X as createFilterQueryLanguage,
177
- gr as createNonReactiveArrayService,
178
- cr as createObjectService,
179
- ve as emailValidation,
180
- Ar as getDOMSizeFromCodeZeroSize,
181
- vr as hashToColor,
182
- Fr as mergeCode0Props,
183
- Ve as passwordValidation,
184
- er as toast,
185
- to as useForm,
176
+ Po as emailValidation,
177
+ Fr as getDOMSizeFromCodeZeroSize,
178
+ le as getRelativeValue,
179
+ cr as hashToColor,
180
+ dr as mergeComponentProps,
181
+ No as passwordValidation,
182
+ tr as toast,
183
+ ne as useForm,
186
184
  Tr as useReactiveArrayService,
187
- xr as useService,
188
- lr as useStore
185
+ Cr as useService,
186
+ gr as useStore,
187
+ Dr as withAlpha
189
188
  };
@@ -0,0 +1,4 @@
1
+ export type Color = "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "error";
2
+ export declare const Colors: Color[];
3
+ export declare const hashToColor: (s: string, from?: number, to?: number) => string;
4
+ export declare const withAlpha: (color: string, alpha: number) => string;
@@ -0,0 +1,43 @@
1
+ import { md5 as s } from "js-md5";
2
+ const i = ["primary", "secondary", "info", "success", "warning", "error"], u = 137.50776405003785, d = (r) => {
3
+ const t = r.match(/\/(\d+)\s*$/);
4
+ return t ? Number(t[1]) : null;
5
+ }, p = (r, t = 25, n = 320) => {
6
+ const o = n - t, e = d(r);
7
+ if (e != null)
8
+ return `hsl(${t + e * u % o}, 100%, 72%)`;
9
+ const c = s(s(r)), a = parseInt(c.slice(0, 8), 16);
10
+ return `hsl(${t + a % o}, 100%, 72%)`;
11
+ }, m = (r) => {
12
+ if (typeof document > "u")
13
+ return {
14
+ r: 0,
15
+ g: 0,
16
+ b: 0,
17
+ a: 1
18
+ };
19
+ const t = document.createElement("span");
20
+ t.style.color = r, document.body.appendChild(t);
21
+ const n = getComputedStyle(t).color;
22
+ document.body.removeChild(t);
23
+ const o = n.match(/rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)(?:\s*,\s*([\d.]+))?\s*\)/);
24
+ return o ? {
25
+ r: Math.round(Number(o[1])),
26
+ g: Math.round(Number(o[2])),
27
+ b: Math.round(Number(o[3])),
28
+ a: o[4] !== void 0 ? Number(o[4]) : 1
29
+ } : {
30
+ r: 0,
31
+ g: 0,
32
+ b: 0,
33
+ a: 1
34
+ };
35
+ }, l = (r) => Math.min(Math.max(r, 0), 1), g = (r, t) => {
36
+ const n = m(r);
37
+ return `rgba(${n.r}, ${n.g}, ${n.b}, ${l(t)})`;
38
+ };
39
+ export {
40
+ i as Colors,
41
+ p as hashToColor,
42
+ g as withAlpha
43
+ };
@@ -0,0 +1,105 @@
1
+ import { default as React, HTMLProps } from 'react';
2
+ import { FontSizes } from './size';
3
+ type StyleProp<Value> = Value;
4
+ export interface ComponentProps {
5
+ m?: StyleProp<number | `${number}`>;
6
+ my?: StyleProp<number | `${number}`>;
7
+ mx?: StyleProp<number | `${number}`>;
8
+ mt?: StyleProp<number | `${number}`>;
9
+ mb?: StyleProp<number | `${number}`>;
10
+ ml?: StyleProp<number | `${number}`>;
11
+ mr?: StyleProp<number | `${number}`>;
12
+ p?: StyleProp<number | `${number}`>;
13
+ py?: StyleProp<number | `${number}`>;
14
+ px?: StyleProp<number | `${number}`>;
15
+ pt?: StyleProp<number | `${number}`>;
16
+ pb?: StyleProp<number | `${number}`>;
17
+ pl?: StyleProp<number | `${number}`>;
18
+ pr?: StyleProp<number | `${number}`>;
19
+ bg?: React.CSSProperties['backgroundColor'];
20
+ c?: React.CSSProperties['color'];
21
+ opacity?: React.CSSProperties['opacity'];
22
+ ff?: StyleProp<'mono' | 'text' | 'heading' | (string & {})>;
23
+ fz?: StyleProp<FontSizes | number | `${number}`>;
24
+ fw?: StyleProp<React.CSSProperties['fontWeight']>;
25
+ lts?: StyleProp<React.CSSProperties['letterSpacing']>;
26
+ ta?: StyleProp<React.CSSProperties['textAlign']>;
27
+ lh?: StyleProp<number | (string & {})>;
28
+ fs?: StyleProp<React.CSSProperties['fontStyle']>;
29
+ tt?: StyleProp<React.CSSProperties['textTransform']>;
30
+ td?: StyleProp<React.CSSProperties['textDecoration']>;
31
+ w?: StyleProp<React.CSSProperties['width']>;
32
+ miw?: StyleProp<React.CSSProperties['minWidth']>;
33
+ maw?: StyleProp<React.CSSProperties['maxWidth']>;
34
+ h?: StyleProp<React.CSSProperties['height']>;
35
+ mih?: StyleProp<React.CSSProperties['minHeight']>;
36
+ mah?: StyleProp<React.CSSProperties['maxHeight']>;
37
+ bgsz?: StyleProp<React.CSSProperties['backgroundSize']>;
38
+ bgp?: StyleProp<React.CSSProperties['backgroundPosition']>;
39
+ bgr?: StyleProp<React.CSSProperties['backgroundRepeat']>;
40
+ bga?: StyleProp<React.CSSProperties['backgroundAttachment']>;
41
+ pos?: StyleProp<React.CSSProperties['position']>;
42
+ top?: StyleProp<React.CSSProperties['top']>;
43
+ left?: StyleProp<React.CSSProperties['left']>;
44
+ bottom?: StyleProp<React.CSSProperties['bottom']>;
45
+ right?: StyleProp<React.CSSProperties['right']>;
46
+ inset?: StyleProp<React.CSSProperties['inset']>;
47
+ display?: StyleProp<React.CSSProperties['display']>;
48
+ flex?: StyleProp<React.CSSProperties['flex']>;
49
+ align?: StyleProp<React.CSSProperties['alignItems']>;
50
+ justify?: StyleProp<React.CSSProperties['justifyContent']>;
51
+ tf?: StyleProp<React.CSSProperties['transform']>;
52
+ }
53
+ export type Component<T> = ComponentProps & HTMLProps<T>;
54
+ export declare const mergeComponentProps: (cn: string, rest: object) => {
55
+ m?: StyleProp<number | `${number}`> | undefined;
56
+ my?: StyleProp<number | `${number}`> | undefined;
57
+ mx?: StyleProp<number | `${number}`> | undefined;
58
+ mt?: StyleProp<number | `${number}`> | undefined;
59
+ mb?: StyleProp<number | `${number}`> | undefined;
60
+ ml?: StyleProp<number | `${number}`> | undefined;
61
+ mr?: StyleProp<number | `${number}`> | undefined;
62
+ p?: StyleProp<number | `${number}`> | undefined;
63
+ py?: StyleProp<number | `${number}`> | undefined;
64
+ px?: StyleProp<number | `${number}`> | undefined;
65
+ pt?: StyleProp<number | `${number}`> | undefined;
66
+ pb?: StyleProp<number | `${number}`> | undefined;
67
+ pl?: StyleProp<number | `${number}`> | undefined;
68
+ pr?: StyleProp<number | `${number}`> | undefined;
69
+ bg?: import("csstype").Property.BackgroundColor | undefined;
70
+ c?: import("csstype").Property.Color | undefined;
71
+ opacity?: import("csstype").Property.Opacity | undefined;
72
+ ff?: StyleProp<"mono" | "text" | "heading" | (string & {})> | undefined;
73
+ fz?: StyleProp<FontSizes | number | `${number}`> | undefined;
74
+ fw?: import("csstype").Property.FontWeight | undefined;
75
+ lts?: import("csstype").Property.LetterSpacing<string | number> | undefined;
76
+ ta?: import("csstype").Property.TextAlign | undefined;
77
+ lh?: StyleProp<number | (string & {})> | undefined;
78
+ fs?: import("csstype").Property.FontStyle | undefined;
79
+ tt?: import("csstype").Property.TextTransform | undefined;
80
+ td?: import("csstype").Property.TextDecoration<string | number> | undefined;
81
+ w?: import("csstype").Property.Width<string | number> | undefined;
82
+ miw?: import("csstype").Property.MinWidth<string | number> | undefined;
83
+ maw?: import("csstype").Property.MaxWidth<string | number> | undefined;
84
+ h?: import("csstype").Property.Height<string | number> | undefined;
85
+ mih?: import("csstype").Property.MinHeight<string | number> | undefined;
86
+ mah?: import("csstype").Property.MaxHeight<string | number> | undefined;
87
+ bgsz?: import("csstype").Property.BackgroundSize<string | number> | undefined;
88
+ bgp?: import("csstype").Property.BackgroundPosition<string | number> | undefined;
89
+ bgr?: import("csstype").Property.BackgroundRepeat | undefined;
90
+ bga?: import("csstype").Property.BackgroundAttachment | undefined;
91
+ pos?: import("csstype").Property.Position | undefined;
92
+ top?: import("csstype").Property.Top<string | number> | undefined;
93
+ left?: import("csstype").Property.Left<string | number> | undefined;
94
+ bottom?: import("csstype").Property.Bottom<string | number> | undefined;
95
+ right?: import("csstype").Property.Right<string | number> | undefined;
96
+ inset?: import("csstype").Property.Inset<string | number> | undefined;
97
+ display?: import("csstype").Property.Display | undefined;
98
+ flex?: import("csstype").Property.Flex<string | number> | undefined;
99
+ align?: import("csstype").Property.AlignItems | undefined;
100
+ justify?: import("csstype").Property.JustifyContent | undefined;
101
+ tf?: import("csstype").Property.Transform | undefined;
102
+ style?: React.CSSProperties | undefined;
103
+ className: string;
104
+ };
105
+ export {};
@@ -0,0 +1,130 @@
1
+ import a from "merge-props";
2
+ const g = (m) => ({
3
+ ...m.m ? {
4
+ margin: `${m.m}rem`
5
+ } : {},
6
+ ...m.my ? {
7
+ marginTop: `${m.my}rem`,
8
+ marginBottom: `${m.my}rem`
9
+ } : {},
10
+ ...m.mx ? {
11
+ marginLeft: `${m.mx}rem`,
12
+ marginRight: `${m.mx}rem`
13
+ } : {},
14
+ ...m.mt ? {
15
+ marginTop: `${m.mt}rem`
16
+ } : {},
17
+ ...m.mb ? {
18
+ marginBottom: `${m.mb}rem`
19
+ } : {},
20
+ ...m.ml ? {
21
+ marginLeft: `${m.ml}rem`
22
+ } : {},
23
+ ...m.mr ? {
24
+ marginRight: `${m.mr}rem`
25
+ } : {},
26
+ ...m.p ? {
27
+ padding: `${m.p}rem`
28
+ } : {},
29
+ ...m.py ? {
30
+ paddingTop: `${m.py}rem`,
31
+ paddingBottom: `${m.py}rem`
32
+ } : {},
33
+ ...m.px ? {
34
+ paddingLeft: `${m.px}rem`,
35
+ paddingRight: `${m.px}rem`
36
+ } : {},
37
+ ...m.pt ? {
38
+ paddingTop: `${m.pt}rem`
39
+ } : {},
40
+ ...m.pb ? {
41
+ paddingBottom: `${m.pb}rem`
42
+ } : {},
43
+ ...m.pl ? {
44
+ paddingLeft: `${m.pl}rem`
45
+ } : {},
46
+ ...m.pr ? {
47
+ paddingRight: `${m.pr}rem`
48
+ } : {},
49
+ ...m.bg ? {
50
+ backgroundColor: m.bg
51
+ } : {},
52
+ ...m.c ? {
53
+ color: m.c
54
+ } : {},
55
+ ...m.opacity ? {
56
+ opacity: m.opacity
57
+ } : {},
58
+ ...m.ff ? {
59
+ fontFamily: m.ff
60
+ } : {},
61
+ ...m.fz ? {
62
+ fontSize: `${m.fz}rem`
63
+ } : {},
64
+ ...m.ta ? {
65
+ textAlign: m.ta
66
+ } : {},
67
+ ...m.w ? {
68
+ width: m.w
69
+ } : {},
70
+ ...m.miw ? {
71
+ minWidth: m.miw
72
+ } : {},
73
+ ...m.maw ? {
74
+ maxWidth: m.maw
75
+ } : {},
76
+ ...m.h ? {
77
+ height: m.h
78
+ } : {},
79
+ ...m.mih ? {
80
+ minHeight: m.mih
81
+ } : {},
82
+ ...m.mah ? {
83
+ maxHeight: m.mah
84
+ } : {},
85
+ ...m.pos ? {
86
+ position: m.pos
87
+ } : {},
88
+ ...m.top ? {
89
+ top: m.top
90
+ } : {},
91
+ ...m.left ? {
92
+ left: m.left
93
+ } : {},
94
+ ...m.bottom ? {
95
+ bottom: m.bottom
96
+ } : {},
97
+ ...m.right ? {
98
+ right: m.right
99
+ } : {},
100
+ ...m.display ? {
101
+ display: m.display
102
+ } : {},
103
+ ...m.flex ? {
104
+ flex: m.flex
105
+ } : {},
106
+ ...m.align ? {
107
+ alignItems: m.align
108
+ } : {},
109
+ ...m.justify ? {
110
+ justifyContent: m.justify
111
+ } : {},
112
+ ...m.tf ? {
113
+ transform: m.tf
114
+ } : {}
115
+ }), d = (m, i) => {
116
+ const p = g(i), o = {
117
+ ...i
118
+ };
119
+ return ["m", "my", "mx", "mt", "mb", "ml", "mr", "p", "py", "px", "pt", "pb", "pl", "pr", "bg", "c", "opacity", "ff", "fz", "fw", "lts", "ta", "lh", "fs", "tt", "td", "w", "miw", "maw", "h", "mih", "mah", "bgsz", "bgp", "bgr", "bga", "pos", "top", "left", "bottom", "right", "inset", "display", "flex", "align", "justify", "tf"].forEach((r) => {
120
+ delete o[r];
121
+ }), a(o, {
122
+ className: m,
123
+ ...Object.keys(p).length !== 0 ? {
124
+ style: p
125
+ } : {}
126
+ });
127
+ };
128
+ export {
129
+ d as mergeComponentProps
130
+ };
@@ -1,7 +1,6 @@
1
1
  export * from './arrayService';
2
2
  export * from './contextStore';
3
- export * from './nonReactiveArrayService';
4
- export * from './objectStore';
5
3
  export * from './reactiveArrayService';
6
- export * from './types';
7
- export * from './utils';
4
+ export * from './component';
5
+ export * from './color';
6
+ export * from './size';