@ruckc/truss-ui 0.0.0-stage → 1.0.0

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 (155) hide show
  1. package/LICENSE +24 -0
  2. package/README.md +91 -2
  3. package/dist/color.d.ts +21 -0
  4. package/dist/color.js +32 -0
  5. package/dist/components/Accordion.svelte +70 -0
  6. package/dist/components/Accordion.svelte.d.ts +15 -0
  7. package/dist/components/Alert.svelte +46 -0
  8. package/dist/components/Alert.svelte.d.ts +15 -0
  9. package/dist/components/Avatar.svelte +32 -0
  10. package/dist/components/Avatar.svelte.d.ts +9 -0
  11. package/dist/components/AvatarGroup.svelte +20 -0
  12. package/dist/components/AvatarGroup.svelte.d.ts +11 -0
  13. package/dist/components/Badge.svelte +27 -0
  14. package/dist/components/Badge.svelte.d.ts +9 -0
  15. package/dist/components/Breadcrumbs.svelte +38 -0
  16. package/dist/components/Breadcrumbs.svelte.d.ts +12 -0
  17. package/dist/components/Button.svelte +119 -0
  18. package/dist/components/Button.svelte.d.ts +16 -0
  19. package/dist/components/ButtonGroup.svelte +23 -0
  20. package/dist/components/ButtonGroup.svelte.d.ts +9 -0
  21. package/dist/components/Calendar.svelte +166 -0
  22. package/dist/components/Calendar.svelte.d.ts +19 -0
  23. package/dist/components/Callout.svelte +50 -0
  24. package/dist/components/Callout.svelte.d.ts +14 -0
  25. package/dist/components/Card.svelte +50 -0
  26. package/dist/components/Card.svelte.d.ts +15 -0
  27. package/dist/components/Checkbox.svelte +37 -0
  28. package/dist/components/Checkbox.svelte.d.ts +16 -0
  29. package/dist/components/ColorPicker.svelte +164 -0
  30. package/dist/components/ColorPicker.svelte.d.ts +14 -0
  31. package/dist/components/Combobox.svelte +131 -0
  32. package/dist/components/Combobox.svelte.d.ts +19 -0
  33. package/dist/components/ContextMenu.svelte +51 -0
  34. package/dist/components/ContextMenu.svelte.d.ts +10 -0
  35. package/dist/components/DataTable.svelte +657 -0
  36. package/dist/components/DataTable.svelte.d.ts +76 -0
  37. package/dist/components/DatePicker.svelte +70 -0
  38. package/dist/components/DatePicker.svelte.d.ts +15 -0
  39. package/dist/components/DateRangePicker.svelte +92 -0
  40. package/dist/components/DateRangePicker.svelte.d.ts +15 -0
  41. package/dist/components/DateTimePicker.svelte +62 -0
  42. package/dist/components/DateTimePicker.svelte.d.ts +19 -0
  43. package/dist/components/DateTimeRangePicker.svelte +167 -0
  44. package/dist/components/DateTimeRangePicker.svelte.d.ts +22 -0
  45. package/dist/components/Dialog.svelte +70 -0
  46. package/dist/components/Dialog.svelte.d.ts +14 -0
  47. package/dist/components/Divider.svelte +16 -0
  48. package/dist/components/Divider.svelte.d.ts +8 -0
  49. package/dist/components/Drawer.svelte +64 -0
  50. package/dist/components/Drawer.svelte.d.ts +13 -0
  51. package/dist/components/DurationInput.svelte +112 -0
  52. package/dist/components/DurationInput.svelte.d.ts +19 -0
  53. package/dist/components/EditableText.svelte +73 -0
  54. package/dist/components/EditableText.svelte.d.ts +14 -0
  55. package/dist/components/EmptyState.svelte +30 -0
  56. package/dist/components/EmptyState.svelte.d.ts +12 -0
  57. package/dist/components/FileUpload.svelte +143 -0
  58. package/dist/components/FileUpload.svelte.d.ts +18 -0
  59. package/dist/components/FormGroup.svelte +27 -0
  60. package/dist/components/FormGroup.svelte.d.ts +13 -0
  61. package/dist/components/Input.svelte +62 -0
  62. package/dist/components/Input.svelte.d.ts +15 -0
  63. package/dist/components/InputAddon.svelte +21 -0
  64. package/dist/components/InputAddon.svelte.d.ts +9 -0
  65. package/dist/components/InputGroup.svelte +70 -0
  66. package/dist/components/InputGroup.svelte.d.ts +16 -0
  67. package/dist/components/Menu.svelte +95 -0
  68. package/dist/components/Menu.svelte.d.ts +15 -0
  69. package/dist/components/MenuButton.svelte +45 -0
  70. package/dist/components/MenuButton.svelte.d.ts +16 -0
  71. package/dist/components/MultiSelect.svelte +129 -0
  72. package/dist/components/MultiSelect.svelte.d.ts +18 -0
  73. package/dist/components/Navbar.svelte +17 -0
  74. package/dist/components/Navbar.svelte.d.ts +10 -0
  75. package/dist/components/NumberInput.svelte +66 -0
  76. package/dist/components/NumberInput.svelte.d.ts +16 -0
  77. package/dist/components/OptionList.svelte +74 -0
  78. package/dist/components/OptionList.svelte.d.ts +15 -0
  79. package/dist/components/Popover.svelte +87 -0
  80. package/dist/components/Popover.svelte.d.ts +14 -0
  81. package/dist/components/ProgressBar.svelte +35 -0
  82. package/dist/components/ProgressBar.svelte.d.ts +10 -0
  83. package/dist/components/RadioGroup.svelte +39 -0
  84. package/dist/components/RadioGroup.svelte.d.ts +14 -0
  85. package/dist/components/Section.svelte +56 -0
  86. package/dist/components/Section.svelte.d.ts +15 -0
  87. package/dist/components/SegmentedControl.svelte +56 -0
  88. package/dist/components/SegmentedControl.svelte.d.ts +17 -0
  89. package/dist/components/Select.svelte +204 -0
  90. package/dist/components/Select.svelte.d.ts +41 -0
  91. package/dist/components/Shell.svelte +143 -0
  92. package/dist/components/Shell.svelte.d.ts +36 -0
  93. package/dist/components/Sidebar.svelte +84 -0
  94. package/dist/components/Sidebar.svelte.d.ts +24 -0
  95. package/dist/components/Skeleton.svelte +25 -0
  96. package/dist/components/Skeleton.svelte.d.ts +9 -0
  97. package/dist/components/Slider.svelte +121 -0
  98. package/dist/components/Slider.svelte.d.ts +16 -0
  99. package/dist/components/Spinner.svelte +30 -0
  100. package/dist/components/Spinner.svelte.d.ts +9 -0
  101. package/dist/components/SplitButton.svelte +113 -0
  102. package/dist/components/SplitButton.svelte.d.ts +14 -0
  103. package/dist/components/SplitPane.svelte +106 -0
  104. package/dist/components/SplitPane.svelte.d.ts +16 -0
  105. package/dist/components/Stepper.svelte +73 -0
  106. package/dist/components/Stepper.svelte.d.ts +26 -0
  107. package/dist/components/Switch.svelte +21 -0
  108. package/dist/components/Switch.svelte.d.ts +10 -0
  109. package/dist/components/Tabs.svelte +74 -0
  110. package/dist/components/Tabs.svelte.d.ts +18 -0
  111. package/dist/components/Tag.svelte +49 -0
  112. package/dist/components/Tag.svelte.d.ts +16 -0
  113. package/dist/components/TagInput.svelte +72 -0
  114. package/dist/components/TagInput.svelte.d.ts +17 -0
  115. package/dist/components/Textarea.svelte +37 -0
  116. package/dist/components/Textarea.svelte.d.ts +11 -0
  117. package/dist/components/TimeList.svelte +76 -0
  118. package/dist/components/TimeList.svelte.d.ts +10 -0
  119. package/dist/components/TimePicker.svelte +79 -0
  120. package/dist/components/TimePicker.svelte.d.ts +15 -0
  121. package/dist/components/TimeRangePicker.svelte +44 -0
  122. package/dist/components/TimeRangePicker.svelte.d.ts +17 -0
  123. package/dist/components/Timeline.svelte +38 -0
  124. package/dist/components/Timeline.svelte.d.ts +17 -0
  125. package/dist/components/Toaster.svelte +35 -0
  126. package/dist/components/Toaster.svelte.d.ts +18 -0
  127. package/dist/components/Tooltip.svelte +66 -0
  128. package/dist/components/Tooltip.svelte.d.ts +11 -0
  129. package/dist/components/Tree.svelte +147 -0
  130. package/dist/components/Tree.svelte.d.ts +16 -0
  131. package/dist/date.d.ts +19 -0
  132. package/dist/date.js +43 -0
  133. package/dist/duration.d.ts +11 -0
  134. package/dist/duration.js +44 -0
  135. package/dist/fonts/LICENSE-Inter.txt +93 -0
  136. package/dist/fonts/LICENSE-JetBrainsMono.txt +93 -0
  137. package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
  138. package/dist/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
  139. package/dist/icons/Icon.svelte +30 -0
  140. package/dist/icons/Icon.svelte.d.ts +9 -0
  141. package/dist/icons/paths.d.ts +39 -0
  142. package/dist/icons/paths.js +43 -0
  143. package/dist/index.d.ts +69 -0
  144. package/dist/index.js +65 -0
  145. package/dist/styles/base.css +71 -0
  146. package/dist/styles/fonts.css +21 -0
  147. package/dist/styles/index.css +3 -0
  148. package/dist/styles/tokens.css +143 -0
  149. package/dist/time.d.ts +7 -0
  150. package/dist/time.js +30 -0
  151. package/dist/toast.svelte.d.ts +22 -0
  152. package/dist/toast.svelte.js +19 -0
  153. package/dist/types.d.ts +70 -0
  154. package/dist/types.js +1 -0
  155. package/package.json +76 -5
@@ -0,0 +1,93 @@
1
+ Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) Inter-Italic[opsz,wght].ttf: Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono) JetBrainsMono-Italic[wght].ttf: Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,30 @@
1
+ <script lang="ts">
2
+ import { icons, type IconName } from './paths.js';
3
+
4
+ let { name, size = 16, title }: { name: IconName; size?: 16 | 20; title?: string } = $props();
5
+ </script>
6
+
7
+ <svg
8
+ class="tr-icon"
9
+ width={size}
10
+ height={size}
11
+ viewBox="0 0 16 16"
12
+ fill="none"
13
+ stroke="currentColor"
14
+ stroke-width="1.5"
15
+ stroke-linecap="square"
16
+ stroke-linejoin="miter"
17
+ role={title ? 'img' : undefined}
18
+ aria-hidden={title ? undefined : 'true'}
19
+ focusable="false"
20
+ >
21
+ {#if title}<title>{title}</title>{/if}
22
+ {@html icons[name]}
23
+ </svg>
24
+
25
+ <style>
26
+ .tr-icon {
27
+ flex: none;
28
+ display: inline-block;
29
+ }
30
+ </style>
@@ -0,0 +1,9 @@
1
+ import { type IconName } from './paths.js';
2
+ type $$ComponentProps = {
3
+ name: IconName;
4
+ size?: 16 | 20;
5
+ title?: string;
6
+ };
7
+ declare const Icon: import("svelte").Component<$$ComponentProps, {}, "">;
8
+ type Icon = ReturnType<typeof Icon>;
9
+ export default Icon;
@@ -0,0 +1,39 @@
1
+ export declare const icons: {
2
+ readonly 'chevron-down': "<path d=\"M3.5 6l4.5 4.5L12.5 6\"/>";
3
+ readonly 'chevron-up': "<path d=\"M3.5 10L8 5.5l4.5 4.5\"/>";
4
+ readonly 'chevron-left': "<path d=\"M10 3.5L5.5 8l4.5 4.5\"/>";
5
+ readonly 'chevron-right': "<path d=\"M6 3.5L10.5 8 6 12.5\"/>";
6
+ readonly 'caret-down': "<path d=\"M4 6h8L8 10.5z\" fill=\"currentColor\"/>";
7
+ readonly 'chevrons-left': "<path d=\"M8 3.5L3.5 8 8 12.5M12.5 3.5L8 8l4.5 4.5\"/>";
8
+ readonly 'chevrons-right': "<path d=\"M8 3.5L12.5 8 8 12.5M3.5 3.5L8 8l-4.5 4.5\"/>";
9
+ readonly calendar: "<rect x=\"2.5\" y=\"3.5\" width=\"11\" height=\"10\"/><path d=\"M2.5 6.5h11M5.5 2v3M10.5 2v3\"/>";
10
+ readonly clock: "<circle cx=\"8\" cy=\"8\" r=\"6\"/><path d=\"M8 4.5V8l2.5 1.5\"/>";
11
+ readonly expand: "<path d=\"M2.5 6V2.5H6M10 2.5h3.5V6M13.5 10v3.5H10M6 13.5H2.5V10\"/>";
12
+ readonly edit: "<path d=\"M10.5 2.5l3 3-8 8H2.5v-3z\"/>";
13
+ readonly upload: "<path d=\"M8 11V3M4.5 6.5L8 3l3.5 3.5M2.5 13.5h11\"/>";
14
+ readonly file: "<path d=\"M3.5 1.5h6l3 3v10h-9z\"/><path d=\"M9.5 1.5v3h3\"/>";
15
+ readonly folder: "<path d=\"M1.5 3.5h5l1.5 2h6.5v8h-13z\"/>";
16
+ readonly menu: "<path d=\"M2 4h12M2 8h12M2 12h12\"/>";
17
+ readonly home: "<path d=\"M2 8l6-5.5L14 8M3.5 7v6.5h9V7\"/>";
18
+ readonly user: "<circle cx=\"8\" cy=\"5.5\" r=\"2.75\"/><path d=\"M2.5 14c0-3 2.5-4.5 5.5-4.5s5.5 1.5 5.5 4.5\"/>";
19
+ readonly trash: "<path d=\"M2.5 4h11M6 4V2h4v2M4 4l.75 9.5h6.5L12 4\"/>";
20
+ readonly copy: "<rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8\"/><path d=\"M10.5 5.5v-3h-8v8h3\"/>";
21
+ readonly dropper: "<path d=\"M10 2.5l3.5 3.5-2 2-3.5-3.5zM8 4.5l-5.5 5.5v3.5H6l5.5-5.5\"/>";
22
+ readonly search: "<circle cx=\"7\" cy=\"7\" r=\"4.25\"/><path d=\"M10.2 10.2L14 14\"/>";
23
+ readonly cross: "<path d=\"M3.5 3.5l9 9M12.5 3.5l-9 9\"/>";
24
+ readonly tick: "<path d=\"M3 8.5l3.5 3.5L13 4.5\"/>";
25
+ readonly plus: "<path d=\"M8 3v10M3 8h10\"/>";
26
+ readonly minus: "<path d=\"M3 8h10\"/>";
27
+ readonly info: "<circle cx=\"8\" cy=\"8\" r=\"6\"/><path d=\"M8 7.25v4.25M8 4.75v.5\"/>";
28
+ readonly warning: "<path d=\"M8 2l6.5 11.5h-13z\"/><path d=\"M8 6.5v3.25M8 11.75v.25\"/>";
29
+ readonly error: "<circle cx=\"8\" cy=\"8\" r=\"6\"/><path d=\"M5.75 5.75l4.5 4.5M10.25 5.75l-4.5 4.5\"/>";
30
+ readonly success: "<circle cx=\"8\" cy=\"8\" r=\"6\"/><path d=\"M5 8.25l2 2 3.75-4\"/>";
31
+ readonly 'sort-asc': "<path d=\"M8 13V3M4 7l4-4 4 4\"/>";
32
+ readonly 'sort-desc': "<path d=\"M8 3v10M4 9l4 4 4-4\"/>";
33
+ readonly filter: "<path d=\"M2 3h12L9.5 8.5V13l-3-1.5V8.5z\"/>";
34
+ readonly more: string;
35
+ readonly download: "<path d=\"M8 2v8M4.5 6.5L8 10l3.5-3.5M2.5 13.5h11\"/>";
36
+ readonly refresh: "<path d=\"M13 8a5 5 0 11-1.5-3.55M13 2.5v3h-3\"/>";
37
+ readonly cog: "<circle cx=\"8\" cy=\"8\" r=\"2.25\"/><path d=\"M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.4 3.4l1.4 1.4M11.2 11.2l1.4 1.4M12.6 3.4l-1.4 1.4M4.8 11.2l-1.4 1.4\"/>";
38
+ };
39
+ export type IconName = keyof typeof icons;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Geometric 16×16 glyphs: 1.5px stroke, square caps, mitered joins (Blueprint-style, data-oriented).
3
+ * Rendered at 16 or 20px from the same viewBox so strokes stay crisp.
4
+ */
5
+ const dot = (cx) => `<circle cx="${cx}" cy="8" r="1" fill="currentColor" stroke="none"/>`;
6
+ export const icons = {
7
+ 'chevron-down': '<path d="M3.5 6l4.5 4.5L12.5 6"/>',
8
+ 'chevron-up': '<path d="M3.5 10L8 5.5l4.5 4.5"/>',
9
+ 'chevron-left': '<path d="M10 3.5L5.5 8l4.5 4.5"/>',
10
+ 'chevron-right': '<path d="M6 3.5L10.5 8 6 12.5"/>',
11
+ 'caret-down': '<path d="M4 6h8L8 10.5z" fill="currentColor"/>',
12
+ 'chevrons-left': '<path d="M8 3.5L3.5 8 8 12.5M12.5 3.5L8 8l4.5 4.5"/>',
13
+ 'chevrons-right': '<path d="M8 3.5L12.5 8 8 12.5M3.5 3.5L8 8l-4.5 4.5"/>',
14
+ calendar: '<rect x="2.5" y="3.5" width="11" height="10"/><path d="M2.5 6.5h11M5.5 2v3M10.5 2v3"/>',
15
+ clock: '<circle cx="8" cy="8" r="6"/><path d="M8 4.5V8l2.5 1.5"/>',
16
+ expand: '<path d="M2.5 6V2.5H6M10 2.5h3.5V6M13.5 10v3.5H10M6 13.5H2.5V10"/>',
17
+ edit: '<path d="M10.5 2.5l3 3-8 8H2.5v-3z"/>',
18
+ upload: '<path d="M8 11V3M4.5 6.5L8 3l3.5 3.5M2.5 13.5h11"/>',
19
+ file: '<path d="M3.5 1.5h6l3 3v10h-9z"/><path d="M9.5 1.5v3h3"/>',
20
+ folder: '<path d="M1.5 3.5h5l1.5 2h6.5v8h-13z"/>',
21
+ menu: '<path d="M2 4h12M2 8h12M2 12h12"/>',
22
+ home: '<path d="M2 8l6-5.5L14 8M3.5 7v6.5h9V7"/>',
23
+ user: '<circle cx="8" cy="5.5" r="2.75"/><path d="M2.5 14c0-3 2.5-4.5 5.5-4.5s5.5 1.5 5.5 4.5"/>',
24
+ trash: '<path d="M2.5 4h11M6 4V2h4v2M4 4l.75 9.5h6.5L12 4"/>',
25
+ copy: '<rect x="5.5" y="5.5" width="8" height="8"/><path d="M10.5 5.5v-3h-8v8h3"/>',
26
+ dropper: '<path d="M10 2.5l3.5 3.5-2 2-3.5-3.5zM8 4.5l-5.5 5.5v3.5H6l5.5-5.5"/>',
27
+ search: '<circle cx="7" cy="7" r="4.25"/><path d="M10.2 10.2L14 14"/>',
28
+ cross: '<path d="M3.5 3.5l9 9M12.5 3.5l-9 9"/>',
29
+ tick: '<path d="M3 8.5l3.5 3.5L13 4.5"/>',
30
+ plus: '<path d="M8 3v10M3 8h10"/>',
31
+ minus: '<path d="M3 8h10"/>',
32
+ info: '<circle cx="8" cy="8" r="6"/><path d="M8 7.25v4.25M8 4.75v.5"/>',
33
+ warning: '<path d="M8 2l6.5 11.5h-13z"/><path d="M8 6.5v3.25M8 11.75v.25"/>',
34
+ error: '<circle cx="8" cy="8" r="6"/><path d="M5.75 5.75l4.5 4.5M10.25 5.75l-4.5 4.5"/>',
35
+ success: '<circle cx="8" cy="8" r="6"/><path d="M5 8.25l2 2 3.75-4"/>',
36
+ 'sort-asc': '<path d="M8 13V3M4 7l4-4 4 4"/>',
37
+ 'sort-desc': '<path d="M8 3v10M4 9l4 4 4-4"/>',
38
+ filter: '<path d="M2 3h12L9.5 8.5V13l-3-1.5V8.5z"/>',
39
+ more: dot(3.5) + dot(8) + dot(12.5),
40
+ download: '<path d="M8 2v8M4.5 6.5L8 10l3.5-3.5M2.5 13.5h11"/>',
41
+ refresh: '<path d="M13 8a5 5 0 11-1.5-3.55M13 2.5v3h-3"/>',
42
+ cog: '<circle cx="8" cy="8" r="2.25"/><path d="M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.4 3.4l1.4 1.4M11.2 11.2l1.4 1.4M12.6 3.4l-1.4 1.4M4.8 11.2l-1.4 1.4"/>'
43
+ };
@@ -0,0 +1,69 @@
1
+ export { default as Button } from './components/Button.svelte';
2
+ export { default as SplitButton } from './components/SplitButton.svelte';
3
+ export { default as Input } from './components/Input.svelte';
4
+ export { default as Select } from './components/Select.svelte';
5
+ export { default as Calendar } from './components/Calendar.svelte';
6
+ export { default as DatePicker } from './components/DatePicker.svelte';
7
+ export { default as DateRangePicker } from './components/DateRangePicker.svelte';
8
+ export { default as TimePicker } from './components/TimePicker.svelte';
9
+ export { default as DateTimePicker } from './components/DateTimePicker.svelte';
10
+ export { default as DateTimeRangePicker } from './components/DateTimeRangePicker.svelte';
11
+ export { default as TimeRangePicker } from './components/TimeRangePicker.svelte';
12
+ export { default as DurationInput } from './components/DurationInput.svelte';
13
+ export { default as Slider } from './components/Slider.svelte';
14
+ export { default as Combobox } from './components/Combobox.svelte';
15
+ export { default as MultiSelect } from './components/MultiSelect.svelte';
16
+ export { default as Checkbox } from './components/Checkbox.svelte';
17
+ export { default as Switch } from './components/Switch.svelte';
18
+ export { default as RadioGroup } from './components/RadioGroup.svelte';
19
+ export { default as Textarea } from './components/Textarea.svelte';
20
+ export { default as NumberInput } from './components/NumberInput.svelte';
21
+ export { default as Popover } from './components/Popover.svelte';
22
+ export { default as Tabs } from './components/Tabs.svelte';
23
+ export { default as Accordion } from './components/Accordion.svelte';
24
+ export { default as SplitPane } from './components/SplitPane.svelte';
25
+ export { default as Tooltip } from './components/Tooltip.svelte';
26
+ export { default as Spinner } from './components/Spinner.svelte';
27
+ export { default as ProgressBar } from './components/ProgressBar.svelte';
28
+ export { default as Skeleton } from './components/Skeleton.svelte';
29
+ export { default as Callout } from './components/Callout.svelte';
30
+ export { default as Tag } from './components/Tag.svelte';
31
+ export { default as Divider } from './components/Divider.svelte';
32
+ export { default as Avatar } from './components/Avatar.svelte';
33
+ export { default as AvatarGroup } from './components/AvatarGroup.svelte';
34
+ export { default as ButtonGroup } from './components/ButtonGroup.svelte';
35
+ export { default as SegmentedControl } from './components/SegmentedControl.svelte';
36
+ export { default as Card } from './components/Card.svelte';
37
+ export { default as Section } from './components/Section.svelte';
38
+ export { default as EmptyState } from './components/EmptyState.svelte';
39
+ export { default as FormGroup } from './components/FormGroup.svelte';
40
+ export { default as Menu } from './components/Menu.svelte';
41
+ export { default as MenuButton } from './components/MenuButton.svelte';
42
+ export { default as ContextMenu } from './components/ContextMenu.svelte';
43
+ export { default as Alert } from './components/Alert.svelte';
44
+ export { default as Drawer } from './components/Drawer.svelte';
45
+ export { default as Breadcrumbs } from './components/Breadcrumbs.svelte';
46
+ export { default as Navbar } from './components/Navbar.svelte';
47
+ export { default as Sidebar } from './components/Sidebar.svelte';
48
+ export { default as TagInput } from './components/TagInput.svelte';
49
+ export { default as Tree } from './components/Tree.svelte';
50
+ export { default as Stepper } from './components/Stepper.svelte';
51
+ export { default as EditableText } from './components/EditableText.svelte';
52
+ export { default as FileUpload } from './components/FileUpload.svelte';
53
+ export { default as Timeline } from './components/Timeline.svelte';
54
+ export { default as ColorPicker } from './components/ColorPicker.svelte';
55
+ export { default as Shell } from './components/Shell.svelte';
56
+ export { default as InputGroup } from './components/InputGroup.svelte';
57
+ export { default as InputAddon } from './components/InputAddon.svelte';
58
+ export { default as Badge } from './components/Badge.svelte';
59
+ export { default as DataTable } from './components/DataTable.svelte';
60
+ export { default as Dialog } from './components/Dialog.svelte';
61
+ export { default as Toaster } from './components/Toaster.svelte';
62
+ export { default as Icon } from './icons/Icon.svelte';
63
+ export { toasts } from './toast.svelte.js';
64
+ export type { IconName } from './icons/paths.js';
65
+ export type { ColumnFilters, SortState, TreeNode, UploadItem, MenuEntry, Option, DateRange, Column, MenuItem, Intent } from './types.js';
66
+ export type { Toast, ToastIntent } from './toast.svelte.js';
67
+ export { parseDuration, formatDuration } from './duration.js';
68
+ export type { DurationUnit } from './duration.js';
69
+ export { parseHex, toHex, contrast } from './color.js';
package/dist/index.js ADDED
@@ -0,0 +1,65 @@
1
+ export { default as Button } from './components/Button.svelte';
2
+ export { default as SplitButton } from './components/SplitButton.svelte';
3
+ export { default as Input } from './components/Input.svelte';
4
+ export { default as Select } from './components/Select.svelte';
5
+ export { default as Calendar } from './components/Calendar.svelte';
6
+ export { default as DatePicker } from './components/DatePicker.svelte';
7
+ export { default as DateRangePicker } from './components/DateRangePicker.svelte';
8
+ export { default as TimePicker } from './components/TimePicker.svelte';
9
+ export { default as DateTimePicker } from './components/DateTimePicker.svelte';
10
+ export { default as DateTimeRangePicker } from './components/DateTimeRangePicker.svelte';
11
+ export { default as TimeRangePicker } from './components/TimeRangePicker.svelte';
12
+ export { default as DurationInput } from './components/DurationInput.svelte';
13
+ export { default as Slider } from './components/Slider.svelte';
14
+ export { default as Combobox } from './components/Combobox.svelte';
15
+ export { default as MultiSelect } from './components/MultiSelect.svelte';
16
+ export { default as Checkbox } from './components/Checkbox.svelte';
17
+ export { default as Switch } from './components/Switch.svelte';
18
+ export { default as RadioGroup } from './components/RadioGroup.svelte';
19
+ export { default as Textarea } from './components/Textarea.svelte';
20
+ export { default as NumberInput } from './components/NumberInput.svelte';
21
+ export { default as Popover } from './components/Popover.svelte';
22
+ export { default as Tabs } from './components/Tabs.svelte';
23
+ export { default as Accordion } from './components/Accordion.svelte';
24
+ export { default as SplitPane } from './components/SplitPane.svelte';
25
+ export { default as Tooltip } from './components/Tooltip.svelte';
26
+ export { default as Spinner } from './components/Spinner.svelte';
27
+ export { default as ProgressBar } from './components/ProgressBar.svelte';
28
+ export { default as Skeleton } from './components/Skeleton.svelte';
29
+ export { default as Callout } from './components/Callout.svelte';
30
+ export { default as Tag } from './components/Tag.svelte';
31
+ export { default as Divider } from './components/Divider.svelte';
32
+ export { default as Avatar } from './components/Avatar.svelte';
33
+ export { default as AvatarGroup } from './components/AvatarGroup.svelte';
34
+ export { default as ButtonGroup } from './components/ButtonGroup.svelte';
35
+ export { default as SegmentedControl } from './components/SegmentedControl.svelte';
36
+ export { default as Card } from './components/Card.svelte';
37
+ export { default as Section } from './components/Section.svelte';
38
+ export { default as EmptyState } from './components/EmptyState.svelte';
39
+ export { default as FormGroup } from './components/FormGroup.svelte';
40
+ export { default as Menu } from './components/Menu.svelte';
41
+ export { default as MenuButton } from './components/MenuButton.svelte';
42
+ export { default as ContextMenu } from './components/ContextMenu.svelte';
43
+ export { default as Alert } from './components/Alert.svelte';
44
+ export { default as Drawer } from './components/Drawer.svelte';
45
+ export { default as Breadcrumbs } from './components/Breadcrumbs.svelte';
46
+ export { default as Navbar } from './components/Navbar.svelte';
47
+ export { default as Sidebar } from './components/Sidebar.svelte';
48
+ export { default as TagInput } from './components/TagInput.svelte';
49
+ export { default as Tree } from './components/Tree.svelte';
50
+ export { default as Stepper } from './components/Stepper.svelte';
51
+ export { default as EditableText } from './components/EditableText.svelte';
52
+ export { default as FileUpload } from './components/FileUpload.svelte';
53
+ export { default as Timeline } from './components/Timeline.svelte';
54
+ export { default as ColorPicker } from './components/ColorPicker.svelte';
55
+ export { default as Shell } from './components/Shell.svelte';
56
+ export { default as InputGroup } from './components/InputGroup.svelte';
57
+ export { default as InputAddon } from './components/InputAddon.svelte';
58
+ export { default as Badge } from './components/Badge.svelte';
59
+ export { default as DataTable } from './components/DataTable.svelte';
60
+ export { default as Dialog } from './components/Dialog.svelte';
61
+ export { default as Toaster } from './components/Toaster.svelte';
62
+ export { default as Icon } from './icons/Icon.svelte';
63
+ export { toasts } from './toast.svelte.js';
64
+ export { parseDuration, formatDuration } from './duration.js';
65
+ export { parseHex, toHex, contrast } from './color.js';
@@ -0,0 +1,71 @@
1
+ .tr-root,
2
+ body {
3
+ font-family: var(--tr-font-sans);
4
+ font-size: var(--tr-text-md);
5
+ line-height: 1.4;
6
+ color: var(--tr-on-surface);
7
+ background: var(--tr-surface);
8
+ -webkit-font-smoothing: antialiased;
9
+ }
10
+ body { margin: 0; }
11
+ *,
12
+ *::before,
13
+ *::after {
14
+ box-sizing: border-box;
15
+ }
16
+ .tr-label {
17
+ display: block;
18
+ margin-bottom: 4px;
19
+ font-size: var(--tr-text-sm);
20
+ font-weight: 600;
21
+ color: var(--tr-on-surface-variant);
22
+ }
23
+ .tr-hint {
24
+ margin-top: 4px;
25
+ font-size: var(--tr-text-sm);
26
+ color: var(--tr-on-surface-variant);
27
+ }
28
+ .tr-hint[data-error='true'] {
29
+ color: var(--tr-danger);
30
+ }
31
+ .tr-visually-hidden {
32
+ position: absolute !important;
33
+ width: 1px;
34
+ height: 1px;
35
+ overflow: hidden;
36
+ clip: rect(0 0 0 0);
37
+ white-space: nowrap;
38
+ }
39
+ @media (prefers-reduced-motion: reduce) {
40
+ * {
41
+ transition-duration: 0.01ms !important;
42
+ animation-duration: 0.01ms !important;
43
+ }
44
+ }
45
+
46
+ /* ---- Shared field primitives (used by pickers, comboboxes, etc.) ---- */
47
+ .tr-field { position: relative; }
48
+ .tr-anchor { position: relative; }
49
+ .tr-control {
50
+ --ring: var(--tr-primary);
51
+ display: flex; align-items: center; gap: 6px;
52
+ min-height: var(--tr-control-h); padding: 0 10px;
53
+ background: var(--tr-surface-container-low);
54
+ border: 1px solid var(--tr-outline-variant);
55
+ border-radius: var(--tr-radius-sm);
56
+ color: var(--tr-on-surface-variant);
57
+ transition: background-color var(--tr-dur) var(--tr-ease), box-shadow var(--tr-dur) var(--tr-ease), border-color var(--tr-dur) var(--tr-ease);
58
+ }
59
+ .tr-control[data-trail='true'] { padding-right: 3px; }
60
+ .tr-control:hover:not([data-disabled='true']) { background: var(--tr-surface-container); border-color: var(--tr-outline); }
61
+ .tr-control:focus-within { background: var(--tr-surface-container); border-color: var(--ring); box-shadow: inset 0 -2px 0 var(--ring), var(--tr-focus-ring); }
62
+ .tr-control[data-invalid='true'] { --ring: var(--tr-danger); border-color: var(--tr-danger); }
63
+ .tr-control[data-invalid='true']:focus-within { box-shadow: inset 0 -2px 0 var(--ring), 0 0 0 3px color-mix(in srgb, var(--tr-danger) 30%, transparent); }
64
+ .tr-control[data-disabled='true'] { opacity: 0.5; cursor: not-allowed; }
65
+ .tr-bare {
66
+ flex: 1; min-width: 0; height: calc(var(--tr-control-h) - 2px); padding: 0; border: 0; outline: 0;
67
+ background: none; color: var(--tr-on-surface); font: inherit;
68
+ }
69
+ .tr-bare::placeholder { color: var(--tr-placeholder); opacity: 1; }
70
+ /* trailing icon buttons never exceed the field's inner height, whatever --tr-control-h is in effect */
71
+ .tr-control .tr-btn.tr-btn[data-size='sm'] { height: min(var(--tr-control-h-sm), calc(var(--tr-control-h) - 2px)); min-width: min(var(--tr-control-h-sm), calc(var(--tr-control-h) - 2px)); }
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Bundled variable fonts (SIL OFL 1.1, see ../fonts/LICENSE-*.txt), Latin subset.
3
+ * url() paths are relative so the consuming app's bundler (Vite) hashes, emits and
4
+ * serves them as part of its own build — nothing is fetched from a CDN.
5
+ */
6
+ @font-face {
7
+ font-family: 'Inter Variable';
8
+ font-style: normal;
9
+ font-display: swap;
10
+ font-weight: 100 900;
11
+ src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
12
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
13
+ }
14
+ @font-face {
15
+ font-family: 'JetBrains Mono Variable';
16
+ font-style: normal;
17
+ font-display: swap;
18
+ font-weight: 100 800;
19
+ src: url('../fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
20
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
21
+ }
@@ -0,0 +1,3 @@
1
+ @import './fonts.css';
2
+ @import './tokens.css';
3
+ @import './base.css';