@sharadox/graphical-user-interface-web-library 0.2.0-fields.9 → 0.2.0-interface-refinement.34

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 (252) hide show
  1. package/README.md +45 -7
  2. package/distribution/accordion/index.d.ts +11 -0
  3. package/distribution/accordion/index.d.ts.map +1 -0
  4. package/distribution/accordion/index.js +36 -0
  5. package/distribution/accordion/index.js.map +1 -0
  6. package/distribution/accordion/index.module.css +1 -0
  7. package/distribution/accordion/index.module.scss +56 -0
  8. package/distribution/accordion/type.d.ts +21 -0
  9. package/distribution/accordion/type.d.ts.map +1 -0
  10. package/distribution/accordion/type.js +2 -0
  11. package/distribution/accordion/type.js.map +1 -0
  12. package/distribution/avatar/index.d.ts +20 -0
  13. package/distribution/avatar/index.d.ts.map +1 -0
  14. package/distribution/avatar/index.js +35 -0
  15. package/distribution/avatar/index.js.map +1 -0
  16. package/distribution/avatar/index.module.css +1 -0
  17. package/distribution/avatar/index.module.scss +16 -0
  18. package/distribution/avatar/type.d.ts +9 -0
  19. package/distribution/avatar/type.d.ts.map +1 -0
  20. package/distribution/avatar/type.js +2 -0
  21. package/distribution/avatar/type.js.map +1 -0
  22. package/distribution/badge/index.d.ts +10 -0
  23. package/distribution/badge/index.d.ts.map +1 -0
  24. package/distribution/badge/index.js +15 -0
  25. package/distribution/badge/index.js.map +1 -0
  26. package/distribution/badge/index.module.css +1 -0
  27. package/distribution/badge/index.module.scss +7 -0
  28. package/distribution/badge/type.d.ts +4 -0
  29. package/distribution/badge/type.d.ts.map +1 -0
  30. package/distribution/badge/type.js +2 -0
  31. package/distribution/badge/type.js.map +1 -0
  32. package/distribution/box/index.d.ts +2 -1
  33. package/distribution/box/index.d.ts.map +1 -1
  34. package/distribution/box/index.js +11 -4
  35. package/distribution/box/index.js.map +1 -1
  36. package/distribution/box/index.module.css +1 -1
  37. package/distribution/box/index.module.scss +37 -3
  38. package/distribution/box/type.d.ts +18 -3
  39. package/distribution/box/type.d.ts.map +1 -1
  40. package/distribution/box-axis/index.d.ts +3 -1
  41. package/distribution/box-axis/index.d.ts.map +1 -1
  42. package/distribution/box-axis/index.js +70 -16
  43. package/distribution/box-axis/index.js.map +1 -1
  44. package/distribution/button/index.d.ts +2 -2
  45. package/distribution/button/index.d.ts.map +1 -1
  46. package/distribution/button/index.js +6 -5
  47. package/distribution/button/index.js.map +1 -1
  48. package/distribution/button/type.d.ts +4 -1
  49. package/distribution/button/type.d.ts.map +1 -1
  50. package/distribution/button-axis/index.d.ts +1 -1
  51. package/distribution/button-axis/index.js +1 -1
  52. package/distribution/button-axis/index.js.map +1 -1
  53. package/distribution/card/index.d.ts +11 -0
  54. package/distribution/card/index.d.ts.map +1 -0
  55. package/distribution/card/index.js +18 -0
  56. package/distribution/card/index.js.map +1 -0
  57. package/distribution/card/index.module.css +1 -0
  58. package/distribution/card/index.module.scss +22 -0
  59. package/distribution/card/type.d.ts +15 -0
  60. package/distribution/card/type.d.ts.map +1 -0
  61. package/distribution/card/type.js +2 -0
  62. package/distribution/card/type.js.map +1 -0
  63. package/distribution/code-boxes/index.d.ts +11 -0
  64. package/distribution/code-boxes/index.d.ts.map +1 -0
  65. package/distribution/code-boxes/index.js +64 -0
  66. package/distribution/code-boxes/index.js.map +1 -0
  67. package/distribution/code-boxes/index.module.css +1 -0
  68. package/distribution/code-boxes/index.module.scss +28 -0
  69. package/distribution/code-boxes/type.d.ts +17 -0
  70. package/distribution/code-boxes/type.d.ts.map +1 -0
  71. package/distribution/code-boxes/type.js +2 -0
  72. package/distribution/code-boxes/type.js.map +1 -0
  73. package/distribution/combobox/index.d.ts +18 -0
  74. package/distribution/combobox/index.d.ts.map +1 -0
  75. package/distribution/combobox/index.js +105 -0
  76. package/distribution/combobox/index.js.map +1 -0
  77. package/distribution/combobox/index.module.css +1 -0
  78. package/distribution/combobox/index.module.scss +25 -0
  79. package/distribution/combobox/type.d.ts +8 -0
  80. package/distribution/combobox/type.d.ts.map +1 -0
  81. package/distribution/combobox/type.js +2 -0
  82. package/distribution/combobox/type.js.map +1 -0
  83. package/distribution/copy-button/index.d.ts +10 -0
  84. package/distribution/copy-button/index.d.ts.map +1 -0
  85. package/distribution/copy-button/index.js +26 -0
  86. package/distribution/copy-button/index.js.map +1 -0
  87. package/distribution/copy-button/type.d.ts +11 -0
  88. package/distribution/copy-button/type.d.ts.map +1 -0
  89. package/distribution/copy-button/type.js +2 -0
  90. package/distribution/copy-button/type.js.map +1 -0
  91. package/distribution/date-picker/index.d.ts +35 -0
  92. package/distribution/date-picker/index.d.ts.map +1 -0
  93. package/distribution/date-picker/index.js +161 -0
  94. package/distribution/date-picker/index.js.map +1 -0
  95. package/distribution/date-picker/index.module.css +1 -0
  96. package/distribution/date-picker/index.module.scss +70 -0
  97. package/distribution/date-picker/type.d.ts +41 -0
  98. package/distribution/date-picker/type.d.ts.map +1 -0
  99. package/distribution/date-picker/type.js +2 -0
  100. package/distribution/date-picker/type.js.map +1 -0
  101. package/distribution/dialog/index.d.ts +12 -0
  102. package/distribution/dialog/index.d.ts.map +1 -0
  103. package/distribution/dialog/index.js +56 -0
  104. package/distribution/dialog/index.js.map +1 -0
  105. package/distribution/dialog/index.module.css +1 -0
  106. package/distribution/dialog/index.module.scss +59 -0
  107. package/distribution/dialog/type.d.ts +11 -0
  108. package/distribution/dialog/type.d.ts.map +1 -0
  109. package/distribution/dialog/type.js +2 -0
  110. package/distribution/dialog/type.js.map +1 -0
  111. package/distribution/field/index.d.ts +1 -1
  112. package/distribution/field/index.d.ts.map +1 -1
  113. package/distribution/field/index.js +2 -2
  114. package/distribution/field/index.js.map +1 -1
  115. package/distribution/glow-layer/index.d.ts +13 -0
  116. package/distribution/glow-layer/index.d.ts.map +1 -0
  117. package/distribution/glow-layer/index.js +38 -0
  118. package/distribution/glow-layer/index.js.map +1 -0
  119. package/distribution/glow-layer/index.module.css +1 -0
  120. package/distribution/glow-layer/index.module.scss +31 -0
  121. package/distribution/glow-layer/type.d.ts +5 -0
  122. package/distribution/glow-layer/type.d.ts.map +1 -0
  123. package/distribution/glow-layer/type.js +2 -0
  124. package/distribution/glow-layer/type.js.map +1 -0
  125. package/distribution/interface-configuration/index.d.ts +1 -1
  126. package/distribution/interface-configuration/index.d.ts.map +1 -1
  127. package/distribution/interface-configuration/index.js +16 -4
  128. package/distribution/interface-configuration/index.js.map +1 -1
  129. package/distribution/interface-configuration/type.d.ts +10 -2
  130. package/distribution/interface-configuration/type.d.ts.map +1 -1
  131. package/distribution/listbox/index.d.ts +11 -0
  132. package/distribution/listbox/index.d.ts.map +1 -0
  133. package/distribution/listbox/index.js +21 -0
  134. package/distribution/listbox/index.js.map +1 -0
  135. package/distribution/listbox/index.module.css +1 -0
  136. package/distribution/listbox/index.module.scss +38 -0
  137. package/distribution/listbox/type.d.ts +22 -0
  138. package/distribution/listbox/type.d.ts.map +1 -0
  139. package/distribution/listbox/type.js +2 -0
  140. package/distribution/listbox/type.js.map +1 -0
  141. package/distribution/navigation/index.d.ts +13 -0
  142. package/distribution/navigation/index.d.ts.map +1 -0
  143. package/distribution/navigation/index.js +27 -0
  144. package/distribution/navigation/index.js.map +1 -0
  145. package/distribution/navigation/index.module.css +1 -0
  146. package/distribution/navigation/index.module.scss +64 -0
  147. package/distribution/navigation/type.d.ts +24 -0
  148. package/distribution/navigation/type.d.ts.map +1 -0
  149. package/distribution/navigation/type.js +2 -0
  150. package/distribution/navigation/type.js.map +1 -0
  151. package/distribution/notification/index.d.ts +19 -0
  152. package/distribution/notification/index.d.ts.map +1 -0
  153. package/distribution/notification/index.js +48 -0
  154. package/distribution/notification/index.js.map +1 -0
  155. package/distribution/notification/index.module.css +1 -0
  156. package/distribution/notification/index.module.scss +35 -0
  157. package/distribution/notification/type.d.ts +23 -0
  158. package/distribution/notification/type.d.ts.map +1 -0
  159. package/distribution/notification/type.js +2 -0
  160. package/distribution/notification/type.js.map +1 -0
  161. package/distribution/number-field/index.d.ts +10 -0
  162. package/distribution/number-field/index.d.ts.map +1 -0
  163. package/distribution/number-field/index.js +46 -0
  164. package/distribution/number-field/index.js.map +1 -0
  165. package/distribution/number-field/index.module.css +1 -0
  166. package/distribution/number-field/index.module.scss +29 -0
  167. package/distribution/number-field/type.d.ts +29 -0
  168. package/distribution/number-field/type.d.ts.map +1 -0
  169. package/distribution/number-field/type.js +2 -0
  170. package/distribution/number-field/type.js.map +1 -0
  171. package/distribution/select/index.d.ts +13 -0
  172. package/distribution/select/index.d.ts.map +1 -0
  173. package/distribution/select/index.js +102 -0
  174. package/distribution/select/index.js.map +1 -0
  175. package/distribution/select/index.module.css +1 -0
  176. package/distribution/select/index.module.scss +42 -0
  177. package/distribution/select/type.d.ts +25 -0
  178. package/distribution/select/type.d.ts.map +1 -0
  179. package/distribution/select/type.js +2 -0
  180. package/distribution/select/type.js.map +1 -0
  181. package/distribution/separator/index.d.ts +11 -0
  182. package/distribution/separator/index.d.ts.map +1 -0
  183. package/distribution/separator/index.js +16 -0
  184. package/distribution/separator/index.js.map +1 -0
  185. package/distribution/separator/index.module.css +1 -0
  186. package/distribution/separator/index.module.scss +12 -0
  187. package/distribution/separator/type.d.ts +7 -0
  188. package/distribution/separator/type.d.ts.map +1 -0
  189. package/distribution/separator/type.js +2 -0
  190. package/distribution/separator/type.js.map +1 -0
  191. package/distribution/skeleton/index.d.ts +11 -0
  192. package/distribution/skeleton/index.d.ts.map +1 -0
  193. package/distribution/skeleton/index.js +20 -0
  194. package/distribution/skeleton/index.js.map +1 -0
  195. package/distribution/skeleton/index.module.css +1 -0
  196. package/distribution/skeleton/index.module.scss +96 -0
  197. package/distribution/skeleton/type.d.ts +16 -0
  198. package/distribution/skeleton/type.d.ts.map +1 -0
  199. package/distribution/skeleton/type.js +2 -0
  200. package/distribution/skeleton/type.js.map +1 -0
  201. package/distribution/skeleton-value/index.d.ts +10 -0
  202. package/distribution/skeleton-value/index.d.ts.map +1 -0
  203. package/distribution/skeleton-value/index.js +15 -0
  204. package/distribution/skeleton-value/index.js.map +1 -0
  205. package/distribution/skeleton-value/index.module.css +1 -0
  206. package/distribution/skeleton-value/index.module.scss +35 -0
  207. package/distribution/skeleton-value/type.d.ts +9 -0
  208. package/distribution/skeleton-value/type.d.ts.map +1 -0
  209. package/distribution/skeleton-value/type.js +2 -0
  210. package/distribution/skeleton-value/type.js.map +1 -0
  211. package/distribution/style-sheet/index.d.ts.map +1 -1
  212. package/distribution/style-sheet/index.js +109 -28
  213. package/distribution/style-sheet/index.js.map +1 -1
  214. package/distribution/switch/index.js +1 -1
  215. package/distribution/switch/index.js.map +1 -1
  216. package/distribution/switch/index.module.css +1 -1
  217. package/distribution/switch/index.module.scss +5 -3
  218. package/distribution/tabs/index.d.ts +11 -0
  219. package/distribution/tabs/index.d.ts.map +1 -0
  220. package/distribution/tabs/index.js +45 -0
  221. package/distribution/tabs/index.js.map +1 -0
  222. package/distribution/tabs/index.module.css +1 -0
  223. package/distribution/tabs/index.module.scss +13 -0
  224. package/distribution/tabs/type.d.ts +19 -0
  225. package/distribution/tabs/type.d.ts.map +1 -0
  226. package/distribution/tabs/type.js +2 -0
  227. package/distribution/tabs/type.js.map +1 -0
  228. package/distribution/text-field/index.js +1 -1
  229. package/distribution/text-field/index.js.map +1 -1
  230. package/distribution/tip/index.d.ts +10 -0
  231. package/distribution/tip/index.d.ts.map +1 -0
  232. package/distribution/tip/index.js +22 -0
  233. package/distribution/tip/index.js.map +1 -0
  234. package/distribution/tip/index.module.css +1 -0
  235. package/distribution/tip/index.module.scss +24 -0
  236. package/distribution/tip/type.d.ts +7 -0
  237. package/distribution/tip/type.d.ts.map +1 -0
  238. package/distribution/tip/type.js +2 -0
  239. package/distribution/tip/type.js.map +1 -0
  240. package/distribution/toggle-mark/index.js +1 -1
  241. package/distribution/toggle-mark/index.js.map +1 -1
  242. package/distribution/wrapper/index.d.ts +11 -0
  243. package/distribution/wrapper/index.d.ts.map +1 -0
  244. package/distribution/wrapper/index.js +16 -0
  245. package/distribution/wrapper/index.js.map +1 -0
  246. package/distribution/wrapper/index.module.css +1 -0
  247. package/distribution/wrapper/index.module.scss +9 -0
  248. package/distribution/wrapper/type.d.ts +4 -0
  249. package/distribution/wrapper/type.d.ts.map +1 -0
  250. package/distribution/wrapper/type.js +2 -0
  251. package/distribution/wrapper/type.js.map +1 -0
  252. package/package.json +4 -2
@@ -0,0 +1,42 @@
1
+ :where(.anchor) {
2
+ position: relative;
3
+ display: flex;
4
+ flex-direction: column;
5
+ }
6
+
7
+ // A select is pressed, not typed into: a pointer, with weight over the field box's text cursor.
8
+ :where(.anchor) > .field {
9
+ cursor: pointer;
10
+ }
11
+
12
+ :where(.button) {
13
+ display: flex;
14
+ align-items: center;
15
+ inline-size: 100%;
16
+ min-block-size: var(--section-minimum-size);
17
+ margin: 0;
18
+ padding: 0;
19
+ border: 0;
20
+ outline: 0;
21
+ background: none;
22
+ color: inherit;
23
+ font: inherit;
24
+ text-align: start;
25
+ cursor: inherit;
26
+ }
27
+
28
+ :where(.field:not([data-variant="filled"])) :where(.button) {
29
+ color: var(--current-hover-color);
30
+ }
31
+
32
+ :where(.placeholder) {
33
+ opacity: 0.6;
34
+ }
35
+
36
+ :where(.chevron) {
37
+ transition: transform var(--duration) var(--easing);
38
+ }
39
+
40
+ :where(.open) {
41
+ transform: rotate(180deg);
42
+ }
@@ -0,0 +1,25 @@
1
+ import type { ReactNode } from "react";
2
+ import type { BoxLook, BoxState } from "@sharadox/graphical-user-interface-web-library/box/type";
3
+ import type { ListboxOption } from "@sharadox/graphical-user-interface-web-library/listbox/type";
4
+ export interface SelectProperties extends Pick<BoxLook, "variant" | "color" | "colorStyle" | "corner" | "line" | "size"> {
5
+ label: ReactNode;
6
+ hideLabel?: boolean;
7
+ hint?: ReactNode;
8
+ error?: ReactNode;
9
+ options: readonly ListboxOption[];
10
+ /** Controlled: the chosen value. */
11
+ value?: string;
12
+ /** Uncontrolled: the value chosen at first. */
13
+ defaultValue?: string;
14
+ onChange?: (value: string) => void;
15
+ /** With a name, the value goes in a hidden field for forms. */
16
+ name?: string;
17
+ /** Shown while nothing is chosen. */
18
+ placeholder?: ReactNode;
19
+ disabled?: boolean;
20
+ /** Forces a state (for the design system). */
21
+ state?: BoxState;
22
+ id?: string;
23
+ className?: string;
24
+ }
25
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../source/select/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,yDAAyD,CAAC;AACjG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6DAA6D,CAAC;AAEjG,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAC5C,OAAO,EACP,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAChE;IACC,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,SAAS,aAAa,EAAE,CAAC;IAClC,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.js","sourceRoot":"","sources":["../../source/select/type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import type { SeparatorProperties } from "@sharadox/graphical-user-interface-web-library/separator/type";
2
+ /**
3
+ * A line between things: a horizontal rule by default, or vertical between items in a row. It is the color's border
4
+ * color (foreground's by default), in the line style and thickness.
5
+ *
6
+ * @example
7
+ * <Separator />
8
+ * <Separator orientation="vertical" line="dashed" />
9
+ */
10
+ export declare function Separator({ orientation, color, line, className }: SeparatorProperties): import("react").JSX.Element;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/separator/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+DAA+D,CAAC;AAGzG;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,EAAE,WAA0B,EAAE,KAAoB,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,mBAAmB,+BASnH"}
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { classNames } from "@sharadox/web-library/class-name";
3
+ import { lookAttributes } from "@sharadox/graphical-user-interface-web-library/box";
4
+ import styles from "./index.module.css";
5
+ /**
6
+ * A line between things: a horizontal rule by default, or vertical between items in a row. It is the color's border
7
+ * color (foreground's by default), in the line style and thickness.
8
+ *
9
+ * @example
10
+ * <Separator />
11
+ * <Separator orientation="vertical" line="dashed" />
12
+ */
13
+ export function Separator({ orientation = "horizontal", color = "foreground", line, className }) {
14
+ return (_jsx("hr", { ...lookAttributes({ color, line }), ...(orientation === "vertical" && { "aria-orientation": "vertical" }), "data-orientation": orientation, className: classNames(styles.separator, className) }));
15
+ }
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/separator/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AAEpF,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,EAAE,WAAW,GAAG,YAAY,EAAE,KAAK,GAAG,YAAY,EAAE,IAAI,EAAE,SAAS,EAAuB;IAClH,OAAO,CACL,gBACM,cAAc,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,KAC/B,CAAC,WAAW,KAAK,UAAU,IAAI,EAAE,kBAAkB,EAAE,UAAU,EAAE,CAAC,sBACpD,WAAW,EAC7B,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,GAClD,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1 @@
1
+ :where(.separator){flex:none;align-self:stretch;margin:0;border:0;border-block-start:var(--line-thickness) var(--line-style) var(--current-border-color)}:where(.separator[data-orientation=vertical]){border-block-start:0;border-inline-start:var(--line-thickness) var(--line-style) var(--current-border-color)}
@@ -0,0 +1,12 @@
1
+ :where(.separator) {
2
+ flex: none;
3
+ align-self: stretch;
4
+ margin: 0;
5
+ border: 0;
6
+ border-block-start: var(--line-thickness) var(--line-style) var(--current-border-color);
7
+ }
8
+
9
+ :where(.separator[data-orientation="vertical"]) {
10
+ border-block-start: 0;
11
+ border-inline-start: var(--line-thickness) var(--line-style) var(--current-border-color);
12
+ }
@@ -0,0 +1,7 @@
1
+ import type { BoxLook } from "@sharadox/graphical-user-interface-web-library/box/type";
2
+ export interface SeparatorProperties extends Pick<BoxLook, "color" | "line"> {
3
+ /** Across a column (`horizontal`, by default) or between items in a row (`vertical`). */
4
+ orientation?: "horizontal" | "vertical";
5
+ className?: string;
6
+ }
7
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../source/separator/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yDAAyD,CAAC;AAEvF,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1E,yFAAyF;IACzF,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.js","sourceRoot":"","sources":["../../source/separator/type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import type { SkeletonProperties } from "@sharadox/graphical-user-interface-web-library/skeleton/type";
2
+ /**
3
+ * Where data is still loading: soft shapes like what will come (lines, a card, a list of rows, a profile, a grid of
4
+ * cards), in the foreground's transparent color, gently shimmering, so a page shows at once and fills in. Screen
5
+ * readers hear `label` once.
6
+ *
7
+ * @example
8
+ * <Suspense fallback={<Skeleton label="Loading devices…" shape="list" rows={3} />}><DeviceList /></Suspense>
9
+ */
10
+ export declare function Skeleton({ label, shape, lines, rows, height }: SkeletonProperties): import("react").JSX.Element;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/skeleton/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8DAA8D,CAAC;AAuBvG;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,KAAe,EAAE,KAAS,EAAE,IAAQ,EAAE,MAAM,EAAE,EAAE,kBAAkB,+BA6CnG"}
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { classNames } from "@sharadox/web-library/class-name";
3
+ import { Box } from "@sharadox/graphical-user-interface-web-library/box";
4
+ import styles from "./index.module.css";
5
+ const Line = ({ short }) => (_jsx("span", { "data-part": "line", className: classNames(styles.shape, styles.line, short && styles.short) }));
6
+ /** A card as the interface draws them: an outlined foreground box. */
7
+ const Card = ({ children, className }) => (_jsx(Box, { as: "span", "data-part": "card", variant: "outlined", color: "foreground", direction: "top-to-bottom", align: "stretch", gap: 12, padding: 24, className: classNames(styles.card, className), children: children }));
8
+ /**
9
+ * Where data is still loading: soft shapes like what will come (lines, a card, a list of rows, a profile, a grid of
10
+ * cards), in the foreground's transparent color, gently shimmering, so a page shows at once and fills in. Screen
11
+ * readers hear `label` once.
12
+ *
13
+ * @example
14
+ * <Suspense fallback={<Skeleton label="Loading devices…" shape="list" rows={3} />}><DeviceList /></Suspense>
15
+ */
16
+ export function Skeleton({ label, shape = "lines", lines = 3, rows = 3, height }) {
17
+ const text = Array.from({ length: lines }, (_, index) => (_jsx(Line, { short: index === lines - 1 && index > 0 }, index)));
18
+ return (_jsx("div", { className: styles.skeleton, role: "status", "aria-label": label, children: height ? (_jsx("span", { className: classNames(styles.shape, styles.block), style: { height } })) : shape === "lines" ? (text) : shape === "card" ? (_jsx(Card, { children: text })) : shape === "profile" ? (_jsxs(Card, { className: styles.profile, children: [_jsx("span", { "data-part": "circle", className: classNames(styles.shape, styles.circle) }), _jsxs("span", { className: styles.stack, children: [_jsx(Line, { short: true }), _jsx(Line, {})] })] })) : shape === "cards" ? (_jsx("span", { className: styles.grid, children: Array.from({ length: rows }, (_, index) => (_jsxs(Card, { children: [_jsx(Line, { short: true }), _jsx(Line, {})] }, index))) })) : (_jsx(Card, { children: Array.from({ length: rows }, (_, index) => (_jsxs("span", { "data-part": "row", className: styles.row, children: [_jsx("span", { className: classNames(styles.shape, styles.dot) }), _jsxs("span", { className: styles.stack, children: [_jsx(Line, {}), _jsx(Line, { short: true })] }), _jsx("span", { className: classNames(styles.shape, styles.button) })] }, index))) })) }));
19
+ }
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":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,SAAS,EAAE,MAAM,CAAC,GAAG,aACrD,eAAM,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,GAAI,EACzD,gBAAM,SAAS,EAAE,MAAM,CAAC,KAAK,aAC3B,KAAC,IAAI,KAAG,EACR,KAAC,IAAI,IAAC,KAAK,SAAG,IACT,EACP,eAAM,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,GAAI,KANnD,KAAK,CAOT,CACR,CAAC,GACG,CACR,GACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1 @@
1
+ :where(.skeleton){display:flex;flex-direction:column;gap:var(--scale-12);inline-size:100%}:where(.shape){display:block;border-radius:var(--corner-radius);background:linear-gradient(90deg, transparent 0%, rgb(var(--foreground-color-rgb)/6%) 50%, transparent 100%) 0 0/200% 100% no-repeat,var(--foreground-transparent-color);animation:shimmer 1.6s linear infinite}:where(.line){block-size:.9em}:where(.short){inline-size:60%}:where(.block){inline-size:100%}.card{inline-size:100%}:where(.profile){flex-direction:row;align-items:center}:where(.circle){flex:none;inline-size:var(--scale-64);block-size:var(--scale-64);border-radius:10000px}:where(.stack){display:flex;flex:1;flex-direction:column;gap:var(--scale-8)}:where(.grid){display:grid;grid-template-columns:repeat(auto-fill, minmax(min(100%, 240px), 1fr));gap:var(--scale-16)}:where(.row){display:flex;align-items:center;gap:var(--scale-12)}:where(.dot){flex:none;inline-size:var(--scale-32);block-size:var(--scale-32)}:where(.button){flex:none;inline-size:var(--scale-64);block-size:var(--scale-32)}@keyframes shimmer{from{background-position:100% 0,0 0}to{background-position:-100% 0,0 0}}@media(prefers-reduced-motion: reduce){:where(.shape){animation:none}}
@@ -0,0 +1,96 @@
1
+ :where(.skeleton) {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: var(--scale-12);
5
+ inline-size: 100%;
6
+ }
7
+
8
+ // Every shape: the foreground's transparent color with a light passing over it.
9
+ :where(.shape) {
10
+ display: block;
11
+ border-radius: var(--corner-radius);
12
+ background:
13
+ linear-gradient(90deg, transparent 0%, rgb(var(--foreground-color-rgb) / 6%) 50%, transparent 100%) 0 0 / 200% 100%
14
+ no-repeat,
15
+ var(--foreground-transparent-color);
16
+ animation: shimmer 1.6s linear infinite;
17
+ }
18
+
19
+ :where(.line) {
20
+ block-size: 0.9em;
21
+ }
22
+
23
+ :where(.short) {
24
+ inline-size: 60%;
25
+ }
26
+
27
+ :where(.block) {
28
+ inline-size: 100%;
29
+ }
30
+
31
+ .card {
32
+ inline-size: 100%;
33
+ }
34
+
35
+ :where(.profile) {
36
+ flex-direction: row;
37
+ align-items: center;
38
+ }
39
+
40
+ :where(.circle) {
41
+ flex: none;
42
+ inline-size: var(--scale-64);
43
+ block-size: var(--scale-64);
44
+ border-radius: 10000px;
45
+ }
46
+
47
+ :where(.stack) {
48
+ display: flex;
49
+ flex: 1;
50
+ flex-direction: column;
51
+ gap: var(--scale-8);
52
+ }
53
+
54
+ :where(.grid) {
55
+ display: grid;
56
+ grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
57
+ gap: var(--scale-16);
58
+ }
59
+
60
+ :where(.row) {
61
+ display: flex;
62
+ align-items: center;
63
+ gap: var(--scale-12);
64
+ }
65
+
66
+ :where(.dot) {
67
+ flex: none;
68
+ inline-size: var(--scale-32);
69
+ block-size: var(--scale-32);
70
+ }
71
+
72
+ :where(.button) {
73
+ flex: none;
74
+ inline-size: var(--scale-64);
75
+ block-size: var(--scale-32);
76
+ }
77
+
78
+ @keyframes shimmer {
79
+ from {
80
+ background-position:
81
+ 100% 0,
82
+ 0 0;
83
+ }
84
+
85
+ to {
86
+ background-position:
87
+ -100% 0,
88
+ 0 0;
89
+ }
90
+ }
91
+
92
+ @media (prefers-reduced-motion: reduce) {
93
+ :where(.shape) {
94
+ animation: none;
95
+ }
96
+ }
@@ -0,0 +1,16 @@
1
+ export interface SkeletonProperties {
2
+ /** What is loading, read aloud once ("Loading devices…"). */
3
+ label: string;
4
+ /**
5
+ * What it stands for: `lines` of text (the default), a `card` of lines, a `list` of rows (an icon, two lines and a
6
+ * button each), a `profile` (a picture and a name), or a grid of `cards`.
7
+ */
8
+ shape?: "lines" | "card" | "list" | "profile" | "cards";
9
+ /** How many lines of text (3 by default). */
10
+ lines?: number;
11
+ /** How many rows or cards (3 by default). */
12
+ rows?: number;
13
+ /** A block (a picture, a card) instead of lines, this many pixels tall. */
14
+ height?: number;
15
+ }
16
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../source/skeleton/type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACxD,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.js","sourceRoot":"","sources":["../../source/skeleton/type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import type { SkeletonValueProperties } from "@sharadox/graphical-user-interface-web-library/skeleton-value/type";
2
+ /**
3
+ * A skeleton for one value, not a whole card: an inline shimmering shape as wide as the awaited text (a name, a
4
+ * count) or a circle (a picture), so everything around it (labels, buttons) shows at once.
5
+ *
6
+ * @example
7
+ * <p>Devices: <Suspense fallback={<SkeletonValue width="2ch" label="Loading…" />}><DeviceCount /></Suspense></p>
8
+ */
9
+ export declare function SkeletonValue({ label, width, circle }: SkeletonValueProperties): import("react").JSX.Element;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/skeleton-value/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oEAAoE,CAAC;AAGlH;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,KAAa,EAAE,MAAM,EAAE,EAAE,uBAAuB,+BAStF"}
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { classNames } from "@sharadox/web-library/class-name";
3
+ import styles from "./index.module.css";
4
+ /**
5
+ * A skeleton for one value, not a whole card: an inline shimmering shape as wide as the awaited text (a name, a
6
+ * count) or a circle (a picture), so everything around it (labels, buttons) shows at once.
7
+ *
8
+ * @example
9
+ * <p>Devices: <Suspense fallback={<SkeletonValue width="2ch" label="Loading…" />}><DeviceCount /></Suspense></p>
10
+ */
11
+ export function SkeletonValue({ label, width = "8ch", circle }) {
12
+ const size = circle ? { width: `${circle}px`, height: `${circle}px` } : { width };
13
+ return (_jsx("span", { className: classNames(styles.value, circle !== undefined && styles.circle), style: size, ...(label ? { role: "status", "aria-label": label } : { "aria-hidden": true }) }));
14
+ }
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/skeleton-value/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,EAAE,KAAK,EAAE,KAAK,GAAG,KAAK,EAAE,MAAM,EAA2B;IACrF,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;IAClF,OAAO,CACL,eACE,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,MAAM,CAAC,EAC1E,KAAK,EAAE,IAAI,KACP,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,GAC/E,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1 @@
1
+ :where(.value){display:inline-block;block-size:1em;vertical-align:middle;border-radius:var(--corner-radius);background:linear-gradient(90deg, transparent 0%, rgb(var(--foreground-color-rgb)/6%) 50%, transparent 100%) 0 0/200% 100% no-repeat,var(--foreground-transparent-color);animation:shimmer 1.6s linear infinite}:where(.circle){border-radius:10000px}@keyframes shimmer{from{background-position:100% 0,0 0}to{background-position:-100% 0,0 0}}@media(prefers-reduced-motion: reduce){:where(.value){animation:none}}
@@ -0,0 +1,35 @@
1
+ :where(.value) {
2
+ display: inline-block;
3
+ block-size: 1em;
4
+ vertical-align: middle;
5
+ border-radius: var(--corner-radius);
6
+ background:
7
+ linear-gradient(90deg, transparent 0%, rgb(var(--foreground-color-rgb) / 6%) 50%, transparent 100%) 0 0 / 200% 100%
8
+ no-repeat,
9
+ var(--foreground-transparent-color);
10
+ animation: shimmer 1.6s linear infinite;
11
+ }
12
+
13
+ :where(.circle) {
14
+ border-radius: 10000px;
15
+ }
16
+
17
+ @keyframes shimmer {
18
+ from {
19
+ background-position:
20
+ 100% 0,
21
+ 0 0;
22
+ }
23
+
24
+ to {
25
+ background-position:
26
+ -100% 0,
27
+ 0 0;
28
+ }
29
+ }
30
+
31
+ @media (prefers-reduced-motion: reduce) {
32
+ :where(.value) {
33
+ animation: none;
34
+ }
35
+ }
@@ -0,0 +1,9 @@
1
+ export interface SkeletonValueProperties {
2
+ /** What is loading, read aloud ("Loading your name…"); without it the shape is silent (a parent says it). */
3
+ label?: string;
4
+ /** How wide the awaited text is, in any CSS length ("8ch" by default). */
5
+ width?: string;
6
+ /** A round shape this many pixels wide instead (a picture). */
7
+ circle?: number;
8
+ }
9
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../source/skeleton-value/type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,6GAA6G;IAC7G,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.js","sourceRoot":"","sources":["../../source/skeleton-value/type.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/style-sheet/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAEV,sBAAsB,EACvB,MAAM,6EAA6E,CAAC;AA6IrF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,sBAAsB,GAAG,MAAM,CAoDjF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/style-sheet/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAEV,sBAAsB,EACvB,MAAM,6EAA6E,CAAC;AAsNrF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,sBAAsB,GAAG,MAAM,CA4DjF"}