@emuanalytics/flow-rdf-ui 0.0.2 → 0.0.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 (235) hide show
  1. package/dist/custom-elements.json +8391 -7539
  2. package/dist/flow-rdf-ui.d.ts +3566 -0
  3. package/dist/flow-rdf-ui.js +2407 -1432
  4. package/dist/flow-rdf-ui.umd.cjs +2417 -1440
  5. package/dist/themes/dark.css +13 -0
  6. package/dist/themes/dark.styles.js +13 -0
  7. package/dist/themes/light.css +13 -0
  8. package/dist/themes/light.styles.js +13 -0
  9. package/dist/vscode.html-custom-data.json +327 -369
  10. package/package.json +7 -3
  11. package/dist/types/components/alert/alert.d.ts +0 -71
  12. package/dist/types/components/alert/alert.stories.d.ts +0 -5
  13. package/dist/types/components/alert/alert.styles.d.ts +0 -2
  14. package/dist/types/components/animation/animation.d.ts +0 -81
  15. package/dist/types/components/animation/animation.stories.d.ts +0 -5
  16. package/dist/types/components/animation/animation.styles.d.ts +0 -2
  17. package/dist/types/components/animation/animations.d.ts +0 -6
  18. package/dist/types/components/animation/index.d.ts +0 -1
  19. package/dist/types/components/avatar/avatar.d.ts +0 -40
  20. package/dist/types/components/avatar/avatar.stories.d.ts +0 -5
  21. package/dist/types/components/avatar/avatar.styles.d.ts +0 -2
  22. package/dist/types/components/badge/badge.d.ts +0 -27
  23. package/dist/types/components/badge/badge.stories.d.ts +0 -5
  24. package/dist/types/components/badge/badge.styles.d.ts +0 -2
  25. package/dist/types/components/breadcrumb/breadcrumb.d.ts +0 -35
  26. package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +0 -5
  27. package/dist/types/components/breadcrumb/breadcrumb.styles.d.ts +0 -2
  28. package/dist/types/components/breadcrumb-item/breadcrumb-item.d.ts +0 -39
  29. package/dist/types/components/breadcrumb-item/breadcrumb-item.styles.d.ts +0 -2
  30. package/dist/types/components/button/button.d.ts +0 -133
  31. package/dist/types/components/button/button.stories.d.ts +0 -6
  32. package/dist/types/components/button/button.styles.d.ts +0 -2
  33. package/dist/types/components/button-group/button-group.d.ts +0 -33
  34. package/dist/types/components/button-group/button-group.stories.d.ts +0 -5
  35. package/dist/types/components/button-group/button-group.styles.d.ts +0 -2
  36. package/dist/types/components/card/card.d.ts +0 -34
  37. package/dist/types/components/card/card.stories.d.ts +0 -5
  38. package/dist/types/components/card/card.styles.d.ts +0 -2
  39. package/dist/types/components/carousel/autoplay-controller.d.ts +0 -20
  40. package/dist/types/components/carousel/carousel.d.ts +0 -105
  41. package/dist/types/components/carousel/carousel.styles.d.ts +0 -2
  42. package/dist/types/components/carousel/scroll-controller.d.ts +0 -28
  43. package/dist/types/components/carousel-item/carousel-item.d.ts +0 -24
  44. package/dist/types/components/carousel-item/carousel-item.styles.d.ts +0 -2
  45. package/dist/types/components/checkbox/checkbox.d.ts +0 -94
  46. package/dist/types/components/checkbox/checkbox.styles.d.ts +0 -2
  47. package/dist/types/components/checkbox/index.d.ts +0 -1
  48. package/dist/types/components/color-mapper/color-mapper.component.d.ts +0 -39
  49. package/dist/types/components/color-mapper/color-mapper.stories.d.ts +0 -68
  50. package/dist/types/components/color-mapper/color-mapper.styles.d.ts +0 -2
  51. package/dist/types/components/color-mapper/color-stop.component.d.ts +0 -54
  52. package/dist/types/components/color-mapper/color-stop.styles.d.ts +0 -2
  53. package/dist/types/components/color-mapper/helpers.d.ts +0 -3
  54. package/dist/types/components/color-mapper/index.d.ts +0 -4
  55. package/dist/types/components/color-mapper/types.d.ts +0 -54
  56. package/dist/types/components/color-picker/color-picker.d.ts +0 -193
  57. package/dist/types/components/color-picker/color-picker.stories.d.ts +0 -5
  58. package/dist/types/components/color-picker/color-picker.styles.d.ts +0 -2
  59. package/dist/types/components/details/details.d.ts +0 -60
  60. package/dist/types/components/details/details.stories.d.ts +0 -5
  61. package/dist/types/components/details/details.styles.d.ts +0 -2
  62. package/dist/types/components/dialog/dialog.d.ts +0 -91
  63. package/dist/types/components/dialog/dialog.styles.d.ts +0 -2
  64. package/dist/types/components/divider/divider.d.ts +0 -24
  65. package/dist/types/components/divider/divider.styles.d.ts +0 -2
  66. package/dist/types/components/drawer/drawer.d.ts +0 -106
  67. package/dist/types/components/drawer/drawer.styles.d.ts +0 -2
  68. package/dist/types/components/dropdown/dropdown.d.ts +0 -98
  69. package/dist/types/components/dropdown/dropdown.styles.d.ts +0 -2
  70. package/dist/types/components/icon/icon.d.ts +0 -45
  71. package/dist/types/components/icon/icon.stories.d.ts +0 -5
  72. package/dist/types/components/icon/icon.styles.d.ts +0 -2
  73. package/dist/types/components/icon/library.d.ts +0 -21
  74. package/dist/types/components/icon/library.default.d.ts +0 -3
  75. package/dist/types/components/icon/library.system.d.ts +0 -3
  76. package/dist/types/components/icon-button/icon-button.d.ts +0 -92
  77. package/dist/types/components/icon-button/icon-button.stories.d.ts +0 -29
  78. package/dist/types/components/icon-button/icon-button.styles.d.ts +0 -2
  79. package/dist/types/components/icon-button/index.d.ts +0 -1
  80. package/dist/types/components/input/input.d.ts +0 -176
  81. package/dist/types/components/input/input.styles.d.ts +0 -2
  82. package/dist/types/components/menu/menu.d.ts +0 -44
  83. package/dist/types/components/menu/menu.styles.d.ts +0 -2
  84. package/dist/types/components/menu-item/menu-item.d.ts +0 -50
  85. package/dist/types/components/menu-item/menu-item.styles.d.ts +0 -2
  86. package/dist/types/components/menu-label/menu-label.d.ts +0 -21
  87. package/dist/types/components/menu-label/menu-label.styles.d.ts +0 -2
  88. package/dist/types/components/mutation-observer/mutation-observer.d.ts +0 -44
  89. package/dist/types/components/mutation-observer/mutation-observer.styles.d.ts +0 -2
  90. package/dist/types/components/option/option.d.ts +0 -52
  91. package/dist/types/components/option/option.stories.d.ts +0 -7
  92. package/dist/types/components/option/option.styles.d.ts +0 -2
  93. package/dist/types/components/popup/popup.d.ts +0 -140
  94. package/dist/types/components/popup/popup.stories.d.ts +0 -5
  95. package/dist/types/components/popup/popup.styles.d.ts +0 -2
  96. package/dist/types/components/progress-bar/progress-bar.d.ts +0 -35
  97. package/dist/types/components/progress-bar/progress-bar.styles.d.ts +0 -2
  98. package/dist/types/components/progress-ring/progress-ring.d.ts +0 -37
  99. package/dist/types/components/progress-ring/progress-ring.styles.d.ts +0 -2
  100. package/dist/types/components/radio/radio.d.ts +0 -53
  101. package/dist/types/components/radio/radio.stories.d.ts +0 -5
  102. package/dist/types/components/radio/radio.styles.d.ts +0 -2
  103. package/dist/types/components/radio-button/radio-button.d.ts +0 -60
  104. package/dist/types/components/radio-button/radio-button.stories.d.ts +0 -5
  105. package/dist/types/components/radio-button/radio-button.styles.d.ts +0 -2
  106. package/dist/types/components/radio-group/radio-group.d.ts +0 -89
  107. package/dist/types/components/radio-group/radio-group.stories.d.ts +0 -5
  108. package/dist/types/components/radio-group/radio-group.styles.d.ts +0 -2
  109. package/dist/types/components/range/range.d.ts +0 -116
  110. package/dist/types/components/range/range.styles.d.ts +0 -2
  111. package/dist/types/components/resize-observer/resize-observer.d.ts +0 -31
  112. package/dist/types/components/resize-observer/resize-observer.styles.d.ts +0 -2
  113. package/dist/types/components/select/select.d.ts +0 -174
  114. package/dist/types/components/select/select.stories.d.ts +0 -5
  115. package/dist/types/components/select/select.styles.d.ts +0 -2
  116. package/dist/types/components/spinner/spinner.d.ts +0 -25
  117. package/dist/types/components/spinner/spinner.stories.d.ts +0 -5
  118. package/dist/types/components/spinner/spinner.styles.d.ts +0 -2
  119. package/dist/types/components/split-panel/split-panel.d.ts +0 -74
  120. package/dist/types/components/split-panel/split-panel.stories.d.ts +0 -5
  121. package/dist/types/components/split-panel/split-panel.styles.d.ts +0 -2
  122. package/dist/types/components/switch/switch.d.ts +0 -86
  123. package/dist/types/components/switch/switch.stories.d.ts +0 -5
  124. package/dist/types/components/switch/switch.styles.d.ts +0 -2
  125. package/dist/types/components/tab/tab.d.ts +0 -47
  126. package/dist/types/components/tab/tab.styles.d.ts +0 -2
  127. package/dist/types/components/tab-group/tab-group.d.ts +0 -76
  128. package/dist/types/components/tab-group/tab-group.stories.d.ts +0 -5
  129. package/dist/types/components/tab-group/tab-group.styles.d.ts +0 -2
  130. package/dist/types/components/tab-panel/tab-panel.d.ts +0 -31
  131. package/dist/types/components/tab-panel/tab-panel.styles.d.ts +0 -2
  132. package/dist/types/components/tag/tag.d.ts +0 -38
  133. package/dist/types/components/tag/tag.stories.d.ts +0 -5
  134. package/dist/types/components/tag/tag.styles.d.ts +0 -2
  135. package/dist/types/components/textarea/textarea.d.ts +0 -138
  136. package/dist/types/components/textarea/textarea.stories.d.ts +0 -5
  137. package/dist/types/components/textarea/textarea.styles.d.ts +0 -2
  138. package/dist/types/components/tooltip/tooltip.d.ts +0 -89
  139. package/dist/types/components/tooltip/tooltip.stories.d.ts +0 -5
  140. package/dist/types/components/tooltip/tooltip.styles.d.ts +0 -2
  141. package/dist/types/components/tree/tree.d.ts +0 -65
  142. package/dist/types/components/tree/tree.stories.d.ts +0 -5
  143. package/dist/types/components/tree/tree.styles.d.ts +0 -2
  144. package/dist/types/components/tree-item/tree-item.d.ts +0 -89
  145. package/dist/types/components/tree-item/tree-item.styles.d.ts +0 -2
  146. package/dist/types/components/visually-hidden/visually-hidden.d.ts +0 -19
  147. package/dist/types/components/visually-hidden/visually-hidden.stories.d.ts +0 -5
  148. package/dist/types/components/visually-hidden/visually-hidden.styles.d.ts +0 -2
  149. package/dist/types/events/events.d.ts +0 -34
  150. package/dist/types/events/flow-after-collapse.d.ts +0 -7
  151. package/dist/types/events/flow-after-expand.d.ts +0 -7
  152. package/dist/types/events/flow-after-hide.d.ts +0 -7
  153. package/dist/types/events/flow-after-show.d.ts +0 -7
  154. package/dist/types/events/flow-blur.d.ts +0 -7
  155. package/dist/types/events/flow-cancel.d.ts +0 -7
  156. package/dist/types/events/flow-change.d.ts +0 -7
  157. package/dist/types/events/flow-clear.d.ts +0 -7
  158. package/dist/types/events/flow-close.d.ts +0 -7
  159. package/dist/types/events/flow-collapse.d.ts +0 -7
  160. package/dist/types/events/flow-error.d.ts +0 -9
  161. package/dist/types/events/flow-expand.d.ts +0 -7
  162. package/dist/types/events/flow-finish.d.ts +0 -7
  163. package/dist/types/events/flow-focus.d.ts +0 -7
  164. package/dist/types/events/flow-hide.d.ts +0 -7
  165. package/dist/types/events/flow-hover.d.ts +0 -10
  166. package/dist/types/events/flow-initial-focus.d.ts +0 -7
  167. package/dist/types/events/flow-input.d.ts +0 -7
  168. package/dist/types/events/flow-invalid.d.ts +0 -7
  169. package/dist/types/events/flow-lazy-change.d.ts +0 -7
  170. package/dist/types/events/flow-lazy-load.d.ts +0 -7
  171. package/dist/types/events/flow-load.d.ts +0 -7
  172. package/dist/types/events/flow-mutation.d.ts +0 -9
  173. package/dist/types/events/flow-remove.d.ts +0 -7
  174. package/dist/types/events/flow-reposition.d.ts +0 -7
  175. package/dist/types/events/flow-request-close.d.ts +0 -9
  176. package/dist/types/events/flow-resize.d.ts +0 -9
  177. package/dist/types/events/flow-select.d.ts +0 -10
  178. package/dist/types/events/flow-selection-change.d.ts +0 -10
  179. package/dist/types/events/flow-show.d.ts +0 -7
  180. package/dist/types/events/flow-slide-change.d.ts +0 -11
  181. package/dist/types/events/flow-start.d.ts +0 -7
  182. package/dist/types/events/flow-tab-hide.d.ts +0 -9
  183. package/dist/types/events/flow-tab-show.d.ts +0 -9
  184. package/dist/types/flow-autoloader.d.ts +0 -4
  185. package/dist/types/index.d.ts +0 -52
  186. package/dist/types/internal/animate.d.ts +0 -22
  187. package/dist/types/internal/checks.util.d.ts +0 -28
  188. package/dist/types/internal/debounce.d.ts +0 -1
  189. package/dist/types/internal/default-value.d.ts +0 -2
  190. package/dist/types/internal/drag.d.ts +0 -15
  191. package/dist/types/internal/event.d.ts +0 -2
  192. package/dist/types/internal/flow-ui-rdf-element.d.ts +0 -43
  193. package/dist/types/internal/form.d.ts +0 -73
  194. package/dist/types/internal/math.d.ts +0 -2
  195. package/dist/types/internal/modal.d.ts +0 -12
  196. package/dist/types/internal/offset.d.ts +0 -11
  197. package/dist/types/internal/orderby.d.ts +0 -1
  198. package/dist/types/internal/scroll.d.ts +0 -11
  199. package/dist/types/internal/slot.d.ts +0 -23
  200. package/dist/types/internal/string.d.ts +0 -2
  201. package/dist/types/internal/tabbable.d.ts +0 -8
  202. package/dist/types/internal/test/data-testid-helpers.d.ts +0 -12
  203. package/dist/types/internal/test/element-visible-overflow.d.ts +0 -11
  204. package/dist/types/internal/test/form-control-base-tests.d.ts +0 -7
  205. package/dist/types/internal/test/wait-for-scrolling.d.ts +0 -9
  206. package/dist/types/internal/test.d.ts +0 -28
  207. package/dist/types/internal/throttle.d.ts +0 -1
  208. package/dist/types/internal/watch.d.ts +0 -26
  209. package/dist/types/styles/component.styles.d.ts +0 -2
  210. package/dist/types/styles/form-control.styles.d.ts +0 -2
  211. package/dist/types/translations/da.d.ts +0 -3
  212. package/dist/types/translations/de-ch.d.ts +0 -3
  213. package/dist/types/translations/de.d.ts +0 -3
  214. package/dist/types/translations/en-gb.d.ts +0 -3
  215. package/dist/types/translations/en.d.ts +0 -3
  216. package/dist/types/translations/es.d.ts +0 -3
  217. package/dist/types/translations/fa.d.ts +0 -3
  218. package/dist/types/translations/fr.d.ts +0 -3
  219. package/dist/types/translations/he.d.ts +0 -3
  220. package/dist/types/translations/hu.d.ts +0 -3
  221. package/dist/types/translations/ja.d.ts +0 -3
  222. package/dist/types/translations/nl.d.ts +0 -3
  223. package/dist/types/translations/pl.d.ts +0 -3
  224. package/dist/types/translations/pt.d.ts +0 -3
  225. package/dist/types/translations/ru.d.ts +0 -3
  226. package/dist/types/translations/sv.d.ts +0 -3
  227. package/dist/types/translations/tr.d.ts +0 -3
  228. package/dist/types/translations/zh-tw.d.ts +0 -3
  229. package/dist/types/utilities/animation-registry.d.ts +0 -24
  230. package/dist/types/utilities/animation.d.ts +0 -1
  231. package/dist/types/utilities/announce.d.ts +0 -1
  232. package/dist/types/utilities/base-path.d.ts +0 -18
  233. package/dist/types/utilities/form.d.ts +0 -11
  234. package/dist/types/utilities/icon-library.d.ts +0 -1
  235. package/dist/types/utilities/localize.d.ts +0 -30
@@ -1,193 +0,0 @@
1
- import type { CSSResultGroup } from 'lit';
2
- import type { FlowRdfFormControl } from '../../internal/flow-ui-rdf-element';
3
- import FlowRdfElement from '../../internal/flow-ui-rdf-element';
4
- import type FlowDropdown from '../dropdown/dropdown';
5
- import type FlowInput from '../input/input';
6
- /**
7
- * @summary Color pickers allow the user to select a color.
8
- * @documentation https://developer.emu-analytics.net/docs/flow-ui-rdf/components/color-picker
9
- * @status stable
10
- * @since 2.0
11
- *
12
- * @dependency flow-ui-button
13
- * @dependency flow-ui-button-group
14
- * @dependency flow-ui-dropdown
15
- * @dependency flow-ui-input
16
- * @dependency flow-ui-visually-hidden
17
- *
18
- * @slot label - The color picker's form label. Alternatively, you can use the `label` attribute.
19
- *
20
- * @event flow-ui-blur - Emitted when the color picker loses focus.
21
- * @event flow-ui-change - Emitted when the color picker's value changes.
22
- * @event flow-ui-focus - Emitted when the color picker receives focus.
23
- * @event flow-ui-input - Emitted when the color picker receives input.
24
- * @event flow-ui-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.
25
- *
26
- * @csspart base - The component's base wrapper.
27
- * @csspart trigger - The color picker's dropdown trigger.
28
- * @csspart swatches - The container that holds the swatches.
29
- * @csspart swatch - Each individual swatch.
30
- * @csspart grid - The color grid.
31
- * @csspart grid-handle - The color grid's handle.
32
- * @csspart slider - Hue and opacity sliders.
33
- * @csspart slider-handle - Hue and opacity slider handles.
34
- * @csspart hue-slider - The hue slider.
35
- * @csspart hue-slider-handle - The hue slider's handle.
36
- * @csspart opacity-slider - The opacity slider.
37
- * @csspart opacity-slider-handle - The opacity slider's handle.
38
- * @csspart preview - The preview color.
39
- * @csspart input - The text input.
40
- * @csspart eye-dropper-button - The eye dropper button.
41
- * @csspart eye-dropper-button__base - The eye dropper button's exported `button` part.
42
- * @csspart eye-dropper-button__prefix - The eye dropper button's exported `prefix` part.
43
- * @csspart eye-dropper-button__label - The eye dropper button's exported `label` part.
44
- * @csspart eye-dropper-button__suffix - The eye dropper button's exported `suffix` part.
45
- * @csspart eye-dropper-button__caret - The eye dropper button's exported `caret` part.
46
- * @csspart format-button - The format button.
47
- * @csspart format-button__base - The format button's exported `button` part.
48
- * @csspart format-button__prefix - The format button's exported `prefix` part.
49
- * @csspart format-button__label - The format button's exported `label` part.
50
- * @csspart format-button__suffix - The format button's exported `suffix` part.
51
- * @csspart format-button__caret - The format button's exported `caret` part.
52
- *
53
- * @cssproperty --grid-width - The width of the color grid.
54
- * @cssproperty --grid-height - The height of the color grid.
55
- * @cssproperty --grid-handle-size - The size of the color grid's handle.
56
- * @cssproperty --slider-height - The height of the hue and alpha sliders.
57
- * @cssproperty --slider-handle-size - The diameter of the slider's handle.
58
- * @cssproperty --swatch-size - The size of each predefined color swatch.
59
- */
60
- export default class FlowColorPicker extends FlowRdfElement implements FlowRdfFormControl {
61
- static styles: CSSResultGroup;
62
- private readonly formControlController;
63
- private isSafeValue;
64
- private readonly localize;
65
- base: HTMLElement;
66
- input: FlowInput;
67
- dropdown: FlowDropdown;
68
- previewButton: HTMLButtonElement;
69
- trigger: HTMLButtonElement;
70
- private hasFocus;
71
- private isDraggingGridHandle;
72
- private isEmpty;
73
- private inputValue;
74
- private hue;
75
- private saturation;
76
- private brightness;
77
- private alpha;
78
- /**
79
- * The current value of the color picker. The value's format will vary based the `format` attribute. To get the value
80
- * in a specific format, use the `getFormattedValue()` method. The value is submitted as a name/value pair with form
81
- * data.
82
- */
83
- value: string;
84
- /** The default value of the form control. Primarily used for resetting the form control. */
85
- defaultValue: string;
86
- /**
87
- * The color picker's label. This will not be displayed, but it will be announced by assistive devices. If you need to
88
- * display HTML, you can use the `label` slot` instead.
89
- */
90
- label: string;
91
- /**
92
- * The format to use. If opacity is enabled, these will translate to HEXA, RGBA, HSLA, and HSVA respectively. The color
93
- * picker will accept user input in any format (including CSS color names) and convert it to the desired format.
94
- */
95
- format: 'hex' | 'rgb' | 'hsl' | 'hsv';
96
- /** Renders the color picker inline rather than in a dropdown. */
97
- inline: boolean;
98
- /** Determines the size of the color picker's trigger. This has no effect on inline color pickers. */
99
- size: 'small' | 'medium' | 'large';
100
- /** Removes the button that lets users toggle between format. */
101
- noFormatToggle: boolean;
102
- /** The name of the form control, submitted as a name/value pair with form data. */
103
- name: string;
104
- /** Disables the color picker. */
105
- disabled: boolean;
106
- /**
107
- * The preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel
108
- * inside of the viewport.
109
- */
110
- placement: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
111
- /** The distance in pixels from which to offset the panel away from its trigger. */
112
- distance: number;
113
- /** The distance in pixels from which to offset the panel along its trigger. */
114
- skidding: number;
115
- /**
116
- * Enable this option to prevent the panel from being clipped when the component is placed inside a container with
117
- * `overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.
118
- */
119
- hoist: boolean;
120
- /** Shows the opacity slider. Enabling this will cause the formatted value to be HEXA, RGBA, or HSLA. */
121
- opacity: boolean;
122
- /** By default, values are lowercase. With this attribute, values will be uppercase instead. */
123
- uppercase: boolean;
124
- /**
125
- * One or more predefined color swatches to display as presets in the color picker. Can include any format the color
126
- * picker can parse, including HEX(A), RGB(A), HSL(A), HSV(A), and CSS color names. Each color must be separated by a
127
- * semicolon (`;`). Alternatively, you can pass an array of color values to this property using JavaScript.
128
- */
129
- swatches: string | string[];
130
- /**
131
- * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you
132
- * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in
133
- * the same document or shadow root for this to work.
134
- */
135
- form: string;
136
- /** Makes the color picker a required field. */
137
- required: boolean;
138
- /** Gets the validity state object */
139
- get validity(): ValidityState;
140
- /** Gets the validation message */
141
- get validationMessage(): string;
142
- connectedCallback(): void;
143
- disconnectedCallback(): void;
144
- firstUpdated(): void;
145
- private handleCopy;
146
- private handleFocusIn;
147
- private handleFocusOut;
148
- private handleFormatToggle;
149
- private handleAlphaDrag;
150
- private handleHueDrag;
151
- private handleGridDrag;
152
- private handleAlphaKeyDown;
153
- private handleHueKeyDown;
154
- private handleGridKeyDown;
155
- private handleInputChange;
156
- private handleInputInput;
157
- private handleInputKeyDown;
158
- private handleInputInvalid;
159
- private handleTouchMove;
160
- private parseColor;
161
- private setColor;
162
- private setLetterCase;
163
- private syncValues;
164
- private handleAfterHide;
165
- private handleEyeDropper;
166
- private selectSwatch;
167
- /** Generates a hex string from HSV values. Hue must be 0-360. All other arguments must be 0-100. */
168
- private getHexString;
169
- private stopNestedEventPropagation;
170
- handleFormatChange(): void;
171
- handleOpacityChange(): void;
172
- handleValueChange(oldValue: string | undefined, newValue: string): void;
173
- /** Sets focus on the color picker. */
174
- focus(options?: FocusOptions): void;
175
- /** Removes focus from the color picker. */
176
- blur(): void;
177
- /** Returns the current value as a string in the specified format. */
178
- getFormattedValue(format?: 'hex' | 'hexa' | 'rgb' | 'rgba' | 'hsl' | 'hsla' | 'hsv' | 'hsva'): string;
179
- /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
180
- checkValidity(): boolean;
181
- /** Gets the associated form, if one exists. */
182
- getForm(): HTMLFormElement | null;
183
- /** Checks for validity and shows the browser's validation message if the control is invalid. */
184
- reportValidity(): boolean;
185
- /** Sets a custom validation message. Pass an empty string to restore validity. */
186
- setCustomValidity(message: string): void;
187
- render(): import("lit").TemplateResult<1>;
188
- }
189
- declare global {
190
- interface HTMLElementTagNameMap {
191
- 'flow-ui-color-picker': FlowColorPicker;
192
- }
193
- }
@@ -1,5 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/web-components';
2
- declare const meta: Meta;
3
- export default meta;
4
- type Story = StoryObj;
5
- export declare const Default: Story;
@@ -1,2 +0,0 @@
1
- declare const _default: import("lit").CSSResult;
2
- export default _default;
@@ -1,60 +0,0 @@
1
- import type { CSSResultGroup } from 'lit';
2
- import FlowRdfElement from '../../internal/flow-ui-rdf-element';
3
- /**
4
- * @summary Details show a brief summary and expand to show additional content.
5
- * @documentation https://developer.emu-analytics.net/docs/flow-ui-rdf/components/details
6
- * @status stable
7
- * @since 2.0
8
- *
9
- * @dependency flow-ui-icon
10
- *
11
- * @slot - The details' main content.
12
- * @slot summary - The details' summary. Alternatively, you can use the `summary` attribute.
13
- * @slot expand-icon - Optional expand icon to use instead of the default. Works best with `<flow-ui-icon>`.
14
- * @slot collapse-icon - Optional collapse icon to use instead of the default. Works best with `<flow-ui-icon>`.
15
- *
16
- * @event flow-ui-show - Emitted when the details opens.
17
- * @event flow-ui-after-show - Emitted after the details opens and all animations are complete.
18
- * @event flow-ui-hide - Emitted when the details closes.
19
- * @event flow-ui-after-hide - Emitted after the details closes and all animations are complete.
20
- *
21
- * @csspart base - The component's base wrapper.
22
- * @csspart header - The header that wraps both the summary and the expand/collapse icon.
23
- * @csspart summary - The container that wraps the summary.
24
- * @csspart summary-icon - The container that wraps the expand/collapse icons.
25
- * @csspart content - The details content.
26
- *
27
- * @animation details.show - The animation to use when showing details. You can use `height: auto` with this animation.
28
- * @animation details.hide - The animation to use when hiding details. You can use `height: auto` with this animation.
29
- */
30
- export default class FlowDetails extends FlowRdfElement {
31
- static styles: CSSResultGroup;
32
- private readonly localize;
33
- details: HTMLElement;
34
- header: HTMLElement;
35
- body: HTMLElement;
36
- expandIconSlot: HTMLSlotElement;
37
- /**
38
- * Indicates whether or not the details is open. You can toggle this attribute to show and hide the details, or you
39
- * can use the `show()` and `hide()` methods and this attribute will reflect the details' open state.
40
- */
41
- open: boolean;
42
- /** The summary to show in the header. If you need to display HTML, use the `summary` slot instead. */
43
- summary: string;
44
- /** Disables the details so it can't be toggled. */
45
- disabled: boolean;
46
- firstUpdated(): void;
47
- private handleSummaryClick;
48
- private handleSummaryKeyDown;
49
- handleOpenChange(): Promise<void>;
50
- /** Shows the details. */
51
- show(): Promise<void>;
52
- /** Hides the details */
53
- hide(): Promise<void>;
54
- render(): import("lit").TemplateResult<1>;
55
- }
56
- declare global {
57
- interface HTMLElementTagNameMap {
58
- 'flow-ui-details': FlowDetails;
59
- }
60
- }
@@ -1,5 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/web-components';
2
- declare const meta: Meta;
3
- export default meta;
4
- type Story = StoryObj;
5
- export declare const Primary: Story;
@@ -1,2 +0,0 @@
1
- declare const _default: import("lit").CSSResult;
2
- export default _default;
@@ -1,91 +0,0 @@
1
- import type { CSSResultGroup } from 'lit';
2
- import FlowRdfElement from '../../internal/flow-ui-rdf-element';
3
- /**
4
- * @summary Dialogs, sometimes called "modals", appear above the page and require the user's immediate attention.
5
- * @documentation https://developer.emu-analytics.net/docs/flow-ui-rdf/components/dialog
6
- * @status stable
7
- * @since 2.0
8
- *
9
- * @dependency flow-ui-icon-button
10
- *
11
- * @slot - The dialog's main content.
12
- * @slot label - The dialog's label. Alternatively, you can use the `label` attribute.
13
- * @slot header-actions - Optional actions to add to the header. Works best with `<flow-ui-icon-button>`.
14
- * @slot footer - The dialog's footer, usually one or more buttons representing various options.
15
- *
16
- * @event flow-ui-show - Emitted when the dialog opens.
17
- * @event flow-ui-after-show - Emitted after the dialog opens and all animations are complete.
18
- * @event flow-ui-hide - Emitted when the dialog closes.
19
- * @event flow-ui-after-hide - Emitted after the dialog closes and all animations are complete.
20
- * @event flow-ui-initial-focus - Emitted when the dialog opens and is ready to receive focus. Calling
21
- * `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.
22
- * @event {{ source: 'close-button' | 'keyboard' | 'overlay' }} flow-ui-request-close - Emitted when the user attempts to
23
- * close the dialog by clicking the close button, clicking the overlay, or pressing escape. Calling
24
- * `event.preventDefault()` will keep the dialog open. Avoid using this unless closing the dialog will result in
25
- * destructive behavior such as data loss.
26
- *
27
- * @csspart base - The component's base wrapper.
28
- * @csspart overlay - The overlay that covers the screen behind the dialog.
29
- * @csspart panel - The dialog's panel (where the dialog and its content are rendered).
30
- * @csspart header - The dialog's header. This element wraps the title and header actions.
31
- * @csspart header-actions - Optional actions to add to the header. Works best with `<flow-ui-icon-button>`.
32
- * @csspart title - The dialog's title.
33
- * @csspart close-button - The close button, an `<flow-ui-icon-button>`.
34
- * @csspart close-button__base - The close button's exported `base` part.
35
- * @csspart body - The dialog's body.
36
- * @csspart footer - The dialog's footer.
37
- *
38
- * @cssproperty --width - The preferred width of the dialog. Note that the dialog will shrink to accommodate smaller screens.
39
- * @cssproperty --header-spacing - The amount of padding to use for the header.
40
- * @cssproperty --body-spacing - The amount of padding to use for the body.
41
- * @cssproperty --footer-spacing - The amount of padding to use for the footer.
42
- *
43
- * @animation dialog.show - The animation to use when showing the dialog.
44
- * @animation dialog.hide - The animation to use when hiding the dialog.
45
- * @animation dialog.denyClose - The animation to use when a request to close the dialog is denied.
46
- * @animation dialog.overlay.show - The animation to use when showing the dialog's overlay.
47
- * @animation dialog.overlay.hide - The animation to use when hiding the dialog's overlay.
48
- */
49
- export default class FlowDialog extends FlowRdfElement {
50
- static styles: CSSResultGroup;
51
- private readonly hasSlotController;
52
- private readonly localize;
53
- private modal;
54
- private originalTrigger;
55
- dialog: HTMLElement;
56
- panel: HTMLElement;
57
- overlay: HTMLElement;
58
- /**
59
- * Indicates whether or not the dialog is open. You can toggle this attribute to show and hide the dialog, or you can
60
- * use the `show()` and `hide()` methods and this attribute will reflect the dialog's open state.
61
- */
62
- open: boolean;
63
- /**
64
- * The dialog's label as displayed in the header. You should always include a relevant label even when using
65
- * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.
66
- */
67
- label: string;
68
- /**
69
- * Disables the header. This will also remove the default close button, so please ensure you provide an easy,
70
- * accessible way for users to dismiss the dialog.
71
- */
72
- noHeader: boolean;
73
- connectedCallback(): void;
74
- firstUpdated(): void;
75
- disconnectedCallback(): void;
76
- private requestClose;
77
- private addOpenListeners;
78
- private removeOpenListeners;
79
- private handleDocumentKeyDown;
80
- handleOpenChange(): Promise<void>;
81
- /** Shows the dialog. */
82
- show(): Promise<void>;
83
- /** Hides the dialog */
84
- hide(): Promise<void>;
85
- render(): import("lit").TemplateResult<1>;
86
- }
87
- declare global {
88
- interface HTMLElementTagNameMap {
89
- 'flow-ui-dialog': FlowDialog;
90
- }
91
- }
@@ -1,2 +0,0 @@
1
- declare const _default: import("lit").CSSResult;
2
- export default _default;
@@ -1,24 +0,0 @@
1
- import type { CSSResultGroup } from 'lit';
2
- import FlowRdfElement from '../../internal/flow-ui-rdf-element';
3
- /**
4
- * @summary Dividers are used to visually separate or group elements.
5
- * @documentation https://developer.emu-analytics.net/docs/flow-ui-rdf/components/divider
6
- * @status stable
7
- * @since 2.0
8
- *
9
- * @cssproperty --color - The color of the divider.
10
- * @cssproperty --width - The width of the divider.
11
- * @cssproperty --spacing - The spacing of the divider.
12
- */
13
- export default class FlowDivider extends FlowRdfElement {
14
- static styles: CSSResultGroup;
15
- /** Draws the divider in a vertical orientation. */
16
- vertical: boolean;
17
- connectedCallback(): void;
18
- handleVerticalChange(): void;
19
- }
20
- declare global {
21
- interface HTMLElementTagNameMap {
22
- 'flow-ui-divider': FlowDivider;
23
- }
24
- }
@@ -1,2 +0,0 @@
1
- declare const _default: import("lit").CSSResult;
2
- export default _default;
@@ -1,106 +0,0 @@
1
- import type { CSSResultGroup } from 'lit';
2
- import FlowRdfElement from '../../internal/flow-ui-rdf-element';
3
- /**
4
- * @summary Drawers slide in from a container to expose additional options and information.
5
- * @documentation https://developer.emu-analytics.net/docs/flow-ui-rdf/components/drawer
6
- * @status stable
7
- * @since 2.0
8
- *
9
- * @dependency flow-ui-icon-button
10
- *
11
- * @slot - The drawer's main content.
12
- * @slot label - The drawer's label. Alternatively, you can use the `label` attribute.
13
- * @slot header-actions - Optional actions to add to the header. Works best with `<flow-ui-icon-button>`.
14
- * @slot footer - The drawer's footer, usually one or more buttons representing various options.
15
- *
16
- * @event flow-ui-show - Emitted when the drawer opens.
17
- * @event flow-ui-after-show - Emitted after the drawer opens and all animations are complete.
18
- * @event flow-ui-hide - Emitted when the drawer closes.
19
- * @event flow-ui-after-hide - Emitted after the drawer closes and all animations are complete.
20
- * @event flow-ui-initial-focus - Emitted when the drawer opens and is ready to receive focus. Calling
21
- * `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.
22
- * @event {{ source: 'close-button' | 'keyboard' | 'overlay' }} flow-ui-request-close - Emitted when the user attempts to
23
- * close the drawer by clicking the close button, clicking the overlay, or pressing escape. Calling
24
- * `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer will result in
25
- * destructive behavior such as data loss.
26
- *
27
- * @csspart base - The component's base wrapper.
28
- * @csspart overlay - The overlay that covers the screen behind the drawer.
29
- * @csspart panel - The drawer's panel (where the drawer and its content are rendered).
30
- * @csspart header - The drawer's header. This element wraps the title and header actions.
31
- * @csspart header-actions - Optional actions to add to the header. Works best with `<flow-ui-icon-button>`.
32
- * @csspart title - The drawer's title.
33
- * @csspart close-button - The close button, an `<flow-ui-icon-button>`.
34
- * @csspart close-button__base - The close button's exported `base` part.
35
- * @csspart body - The drawer's body.
36
- * @csspart footer - The drawer's footer.
37
- *
38
- * @cssproperty --size - The preferred size of the drawer. This will be applied to the drawer's width or height
39
- * depending on its `placement`. Note that the drawer will shrink to accommodate smaller screens.
40
- * @cssproperty --header-spacing - The amount of padding to use for the header.
41
- * @cssproperty --body-spacing - The amount of padding to use for the body.
42
- * @cssproperty --footer-spacing - The amount of padding to use for the footer.
43
- *
44
- * @animation drawer.showTop - The animation to use when showing a drawer with `top` placement.
45
- * @animation drawer.showEnd - The animation to use when showing a drawer with `end` placement.
46
- * @animation drawer.showBottom - The animation to use when showing a drawer with `bottom` placement.
47
- * @animation drawer.showStart - The animation to use when showing a drawer with `start` placement.
48
- * @animation drawer.hideTop - The animation to use when hiding a drawer with `top` placement.
49
- * @animation drawer.hideEnd - The animation to use when hiding a drawer with `end` placement.
50
- * @animation drawer.hideBottom - The animation to use when hiding a drawer with `bottom` placement.
51
- * @animation drawer.hideStart - The animation to use when hiding a drawer with `start` placement.
52
- * @animation drawer.denyClose - The animation to use when a request to close the drawer is denied.
53
- * @animation drawer.overlay.show - The animation to use when showing the drawer's overlay.
54
- * @animation drawer.overlay.hide - The animation to use when hiding the drawer's overlay.
55
- */
56
- export default class FlowDrawer extends FlowRdfElement {
57
- static styles: CSSResultGroup;
58
- private readonly hasSlotController;
59
- private readonly localize;
60
- private modal;
61
- private originalTrigger;
62
- drawer: HTMLElement;
63
- panel: HTMLElement;
64
- overlay: HTMLElement;
65
- /**
66
- * Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can
67
- * use the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.
68
- */
69
- open: boolean;
70
- /**
71
- * The drawer's label as displayed in the header. You should always include a relevant label even when using
72
- * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.
73
- */
74
- label: string;
75
- /** The direction from which the drawer will open. */
76
- placement: 'top' | 'end' | 'bottom' | 'start';
77
- /**
78
- * By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of
79
- * its parent element, set this attribute and add `position: relative` to the parent.
80
- */
81
- contained: boolean;
82
- /**
83
- * Removes the header. This will also remove the default close button, so please ensure you provide an easy,
84
- * accessible way for users to dismiss the drawer.
85
- */
86
- noHeader: boolean;
87
- connectedCallback(): void;
88
- firstUpdated(): void;
89
- disconnectedCallback(): void;
90
- private requestClose;
91
- private addOpenListeners;
92
- private removeOpenListeners;
93
- private handleDocumentKeyDown;
94
- handleOpenChange(): Promise<void>;
95
- handleNoModalChange(): void;
96
- /** Shows the drawer. */
97
- show(): Promise<void>;
98
- /** Hides the drawer */
99
- hide(): Promise<void>;
100
- render(): import("lit").TemplateResult<1>;
101
- }
102
- declare global {
103
- interface HTMLElementTagNameMap {
104
- 'flow-ui-drawer': FlowDrawer;
105
- }
106
- }
@@ -1,2 +0,0 @@
1
- declare const _default: import("lit").CSSResult;
2
- export default _default;
@@ -1,98 +0,0 @@
1
- import type { CSSResultGroup } from 'lit';
2
- import type FlowSelectEvent from '../../events/flow-select';
3
- import FlowRdfElement from '../../internal/flow-ui-rdf-element';
4
- import type FlowMenu from '../menu/menu';
5
- import type FlowPopup from '../popup/popup';
6
- /**
7
- * @summary Dropdowns expose additional content that "drops down" in a panel.
8
- * @documentation https://developer.emu-analytics.net/docs/flow-ui-rdf/components/dropdown
9
- * @status stable
10
- * @since 2.0
11
- *
12
- * @dependency flow-ui-popup
13
- *
14
- * @slot - The dropdown's main content.
15
- * @slot trigger - The dropdown's trigger, usually a `<flow-ui-button>` element.
16
- *
17
- * @event flow-ui-show - Emitted when the dropdown opens.
18
- * @event flow-ui-after-show - Emitted after the dropdown opens and all animations are complete.
19
- * @event flow-ui-hide - Emitted when the dropdown closes.
20
- * @event flow-ui-after-hide - Emitted after the dropdown closes and all animations are complete.
21
- *
22
- * @csspart base - The component's base wrapper.
23
- * @csspart trigger - The container that wraps the trigger.
24
- * @csspart panel - The panel that gets shown when the dropdown is open.
25
- *
26
- * @animation dropdown.show - The animation to use when showing the dropdown.
27
- * @animation dropdown.hide - The animation to use when hiding the dropdown.
28
- */
29
- export default class FlowDropdown extends FlowRdfElement {
30
- static styles: CSSResultGroup;
31
- popup: FlowPopup;
32
- trigger: HTMLSlotElement;
33
- panel: HTMLSlotElement;
34
- private readonly localize;
35
- /**
36
- * Indicates whether or not the dropdown is open. You can toggle this attribute to show and hide the dropdown, or you
37
- * can use the `show()` and `hide()` methods and this attribute will reflect the dropdown's open state.
38
- */
39
- open: boolean;
40
- /**
41
- * The preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel
42
- * inside of the viewport.
43
- */
44
- placement: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
45
- /** Disables the dropdown so the panel will not open. */
46
- disabled: boolean;
47
- /**
48
- * By default, the dropdown is closed when an item is selected. This attribute will keep it open instead. Useful for
49
- * dropdowns that allow for multiple interactions.
50
- */
51
- stayOpenOnSelect: boolean;
52
- /**
53
- * The dropdown will close when the user interacts outside of this element (e.g. clicking). Useful for composing other
54
- * components that use a dropdown internally.
55
- */
56
- containingElement?: HTMLElement;
57
- /** The distance in pixels from which to offset the panel away from its trigger. */
58
- distance: number;
59
- /** The distance in pixels from which to offset the panel along its trigger. */
60
- skidding: number;
61
- /**
62
- * Enable this option to prevent the panel from being clipped when the component is placed inside a container with
63
- * `overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.
64
- */
65
- hoist: boolean;
66
- connectedCallback(): void;
67
- firstUpdated(): void;
68
- disconnectedCallback(): void;
69
- focusOnTrigger(): void;
70
- getMenu(): FlowMenu | undefined;
71
- handleKeyDown(event: KeyboardEvent): void;
72
- handleDocumentKeyDown(event: KeyboardEvent): void;
73
- handleDocumentMouseDown(event: MouseEvent): void;
74
- handlePanelSelect(event: FlowSelectEvent): void;
75
- handleTriggerClick(): void;
76
- handleTriggerKeyDown(event: KeyboardEvent): void;
77
- handleTriggerKeyUp(event: KeyboardEvent): void;
78
- handleTriggerSlotChange(): void;
79
- updateAccessibleTrigger(): void;
80
- /** Shows the dropdown panel. */
81
- show(): Promise<void>;
82
- /** Hides the dropdown panel */
83
- hide(): Promise<void>;
84
- /**
85
- * Instructs the dropdown menu to reposition. Useful when the position or size of the trigger changes when the menu
86
- * is activated.
87
- */
88
- reposition(): void;
89
- addOpenListeners(): void;
90
- removeOpenListeners(): void;
91
- handleOpenChange(): Promise<void>;
92
- render(): import("lit").TemplateResult<1>;
93
- }
94
- declare global {
95
- interface HTMLElementTagNameMap {
96
- 'flow-ui-dropdown': FlowDropdown;
97
- }
98
- }
@@ -1,2 +0,0 @@
1
- declare const _default: import("lit").CSSResult;
2
- export default _default;
@@ -1,45 +0,0 @@
1
- import type { CSSResultGroup } from 'lit';
2
- import FlowRdfElement from '../../internal/flow-ui-rdf-element';
3
- /**
4
- * @summary Icons are symbols that can be used to represent various options within an application.
5
- * @documentation https://developer.emu-analytics.net/docs/flow-ui-rdf/components/icon
6
- * @status stable
7
- * @since 2.0
8
- *
9
- * @event flow-ui-load - Emitted when the icon has loaded.
10
- * @event flow-ui-error - Emitted when the icon fails to load due to an error.
11
- *
12
- * @csspart svg - The internal SVG element.
13
- */
14
- export default class FlowIcon extends FlowRdfElement {
15
- static styles: CSSResultGroup;
16
- /** Given a URL, this function returns the resulting SVG element or an appropriate error symbol. */
17
- private static resolveIcon;
18
- private svg;
19
- /** The name of the icon to draw. Available names depend on the icon library being used. */
20
- name?: string;
21
- /**
22
- * An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and
23
- * can result in XSS attacks.
24
- */
25
- src?: string;
26
- /**
27
- * An alternate description to use for assistive devices. If omitted, the icon will be considered presentational and
28
- * ignored by assistive devices.
29
- */
30
- label: string;
31
- /** The name of a registered custom icon library. */
32
- library: string;
33
- connectedCallback(): void;
34
- firstUpdated(): void;
35
- disconnectedCallback(): void;
36
- private getUrl;
37
- handleLabelChange(): void;
38
- setIcon(): Promise<void>;
39
- render(): SVGElement | null;
40
- }
41
- declare global {
42
- interface HTMLElementTagNameMap {
43
- 'flow-ui-icon': FlowIcon;
44
- }
45
- }
@@ -1,5 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/web-components';
2
- declare const meta: Meta;
3
- export default meta;
4
- type Story = StoryObj;
5
- export declare const Primary: Story;