@oscarpalmer/oui 0.39.0 → 0.40.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 (182) hide show
  1. package/README.md +1 -1
  2. package/dist/js/color-picker/color-picker.constants.d.mts +2 -0
  3. package/dist/js/color-picker/{constants.color-picker.mjs → color-picker.constants.mjs} +5 -4
  4. package/dist/js/color-picker/{dom.color-picker.d.mts → color-picker.dom.d.mts} +2 -2
  5. package/dist/js/color-picker/{dom.color-picker.mjs → color-picker.dom.mjs} +3 -3
  6. package/dist/js/color-picker/{event.color-picker.d.mts → color-picker.event.d.mts} +2 -2
  7. package/dist/js/color-picker/{event.color-picker.mjs → color-picker.event.mjs} +1 -1
  8. package/dist/js/color-picker/{form.color-picker.d.mts → color-picker.form.d.mts} +2 -2
  9. package/dist/js/color-picker/{form.color-picker.mjs → color-picker.form.mjs} +9 -6
  10. package/dist/js/color-picker/color-picker.misc.d.mts +2 -0
  11. package/dist/js/color-picker/{misc.color-picker.mjs → color-picker.misc.mjs} +1 -1
  12. package/dist/js/color-picker/color-picker.model.d.mts +2 -0
  13. package/dist/js/color-picker/{models.color-picker.mjs → color-picker.model.mjs} +1 -1
  14. package/dist/js/color-picker/{output.color-picker.d.mts → color-picker.output.d.mts} +2 -2
  15. package/dist/js/color-picker/{output.color-picker.mjs → color-picker.output.mjs} +13 -11
  16. package/dist/js/color-picker/color-picker.state.d.mts +8 -0
  17. package/dist/js/color-picker/color-picker.state.mjs +2 -0
  18. package/dist/js/color-picker/index.d.mts +180 -2
  19. package/dist/js/color-picker/index.mjs +59 -57
  20. package/dist/js/color-picker.constants-D1mxw_Le.d.mts +179 -0
  21. package/dist/js/{event.color-picker-BEpq0Adu.mjs → color-picker.event-Cksj5TvS.mjs} +105 -90
  22. package/dist/js/color-picker.misc-CtsXGrOe.d.mts +27 -0
  23. package/dist/js/combobox/combobox.constants.d.mts +2 -0
  24. package/dist/js/combobox/{constants.combobox.mjs → combobox.constants.mjs} +21 -21
  25. package/dist/js/combobox/{dom.combobox.d.mts → combobox.dom.d.mts} +3 -3
  26. package/dist/js/combobox/{dom.combobox.mjs → combobox.dom.mjs} +40 -36
  27. package/dist/js/combobox/{event.combobox.d.mts → combobox.event.d.mts} +3 -3
  28. package/dist/js/combobox/{event.combobox.mjs → combobox.event.mjs} +1 -1
  29. package/dist/js/combobox/combobox.misc.d.mts +2 -0
  30. package/dist/js/combobox/{misc.combobox.mjs → combobox.misc.mjs} +1 -1
  31. package/dist/js/combobox/combobox.model.d.mts +2 -0
  32. package/dist/js/combobox/combobox.state.d.mts +10 -0
  33. package/dist/js/combobox/combobox.state.mjs +2 -0
  34. package/dist/js/combobox/index.d.mts +163 -2
  35. package/dist/js/combobox/index.mjs +53 -52
  36. package/dist/js/combobox.constants-DZVkMP5g.d.mts +19 -0
  37. package/dist/js/combobox.misc-C1tPZZDi.d.mts +22 -0
  38. package/dist/js/combobox.model-oDV06XCN.d.mts +44 -0
  39. package/dist/js/{state.combobox-BWDFHwoi.mjs → combobox.state-BfJ3Hxg8.mjs} +94 -80
  40. package/dist/js/constants.listbox-C5Ap6Ag_.d.mts +9 -0
  41. package/dist/js/dialog/dialog.model.d.mts +2 -0
  42. package/dist/js/dialog/dialog.model.mjs +11 -0
  43. package/dist/js/dialog/index.d.mts +12 -0
  44. package/dist/js/dialog/index.mjs +123 -0
  45. package/dist/js/dialog.model-DX2mndMh.d.mts +45 -0
  46. package/dist/js/floatable/floatable.embedded.d.mts +2 -2
  47. package/dist/js/floatable/floatable.embedded.mjs +64 -92
  48. package/dist/js/floatable/floatable.model.d.mts +2 -0
  49. package/dist/js/floatable/floatable.model.mjs +23 -0
  50. package/dist/js/floatable/floatable.standalone.d.mts +2 -1
  51. package/dist/js/floatable.embedded-MeTyXjFn.d.mts +17 -0
  52. package/dist/js/{floatable.embedded-DQYkXt8X.d.mts → floatable.model-DXsQgoU7.d.mts} +13 -20
  53. package/dist/js/focus-trap/focus-trap.embedded.d.mts +2 -2
  54. package/dist/js/focus-trap/focus-trap.embedded.mjs +113 -135
  55. package/dist/js/focus-trap/focus-trap.model.d.mts +2 -0
  56. package/dist/js/focus-trap/focus-trap.model.mjs +15 -0
  57. package/dist/js/focus-trap/focus-trap.standalone.d.mts +2 -1
  58. package/dist/js/focus-trap.embedded-DIU05m1z.d.mts +13 -0
  59. package/dist/js/{focus-trap.embedded-CjyFQYow.d.mts → focus-trap.model-BeX6UYlw.d.mts} +16 -18
  60. package/dist/js/index.d.mts +26 -14
  61. package/dist/js/index.mjs +18 -17
  62. package/dist/js/internal/attributable.mjs +3 -2
  63. package/dist/js/internal/draggable/draggable.model.d.mts +2 -0
  64. package/dist/js/internal/draggable/draggable.model.mjs +37 -0
  65. package/dist/js/internal/draggable/index.d.mts +13 -0
  66. package/dist/js/internal/{draggable.mjs → draggable/index.mjs} +82 -113
  67. package/dist/js/internal/listbox/listbox.constants.d.mts +1 -1
  68. package/dist/js/internal/listbox/listbox.data.d.mts +1 -1
  69. package/dist/js/internal/listbox/listbox.data.mjs +1 -1
  70. package/dist/js/internal/listbox/listbox.dom.d.mts +1 -1
  71. package/dist/js/internal/listbox/listbox.dom.mjs +1 -1
  72. package/dist/js/internal/listbox/listbox.event.d.mts +1 -1
  73. package/dist/js/internal/listbox/listbox.event.mjs +20 -17
  74. package/dist/js/internal/listbox/listbox.form.d.mts +1 -1
  75. package/dist/js/internal/listbox/listbox.form.mjs +15 -12
  76. package/dist/js/internal/listbox/listbox.misc.d.mts +1 -1
  77. package/dist/js/internal/listbox/listbox.misc.mjs +1 -1
  78. package/dist/js/internal/listbox/listbox.model.d.mts +2 -2
  79. package/dist/js/internal/listbox/listbox.state.d.mts +4 -4
  80. package/dist/js/internal/listbox/listbox.state.mjs +19 -20
  81. package/dist/js/internal/misc.d.mts +1 -0
  82. package/dist/js/internal/misc.mjs +4 -6
  83. package/dist/js/internal/navigable/index.d.mts +6 -0
  84. package/dist/js/internal/navigable/index.mjs +125 -0
  85. package/dist/js/internal/navigable/navigable.model.d.mts +2 -0
  86. package/dist/js/internal/navigable/navigable.model.mjs +18 -0
  87. package/dist/js/l10n/index.d.mts +9 -0
  88. package/dist/js/{l10n.mjs → l10n/index.mjs} +50 -23
  89. package/dist/js/l10n/l10n.model.d.mts +2 -0
  90. package/dist/js/l10n/l10n.model.mjs +9 -0
  91. package/dist/js/l10n.model-D6a9frgl.d.mts +26 -0
  92. package/dist/js/listbox/constants.listbox.d.mts +2 -2
  93. package/dist/js/listbox/constants.listbox.mjs +10 -14
  94. package/dist/js/listbox/event.listbox.d.mts +1 -1
  95. package/dist/js/listbox/event.listbox.mjs +47 -1
  96. package/dist/js/listbox/index.d.mts +6 -4
  97. package/dist/js/listbox/index.mjs +47 -49
  98. package/dist/js/listbox/misc.listbox.d.mts +1 -1
  99. package/dist/js/listbox/misc.listbox.mjs +1 -1
  100. package/dist/js/listbox/state.listbox.d.mts +4 -5
  101. package/dist/js/listbox/state.listbox.mjs +2 -2
  102. package/dist/js/{listbox.data-DQ7-x2uY.mjs → listbox.data-BQyZGKgr.mjs} +87 -70
  103. package/dist/js/{listbox.model-BHPA7GM4.d.mts → listbox.model-CuBOj4qe.d.mts} +12 -8
  104. package/dist/js/menu/index.mjs +167 -0
  105. package/dist/js/menu/menu.model.d.mts +33 -0
  106. package/dist/js/menu/menu.model.mjs +15 -0
  107. package/dist/js/{misc.listbox-DKB-j0UK.mjs → misc.listbox-CjfBUbHD.mjs} +25 -67
  108. package/dist/js/{misc.listbox-mZMuYOxg.d.mts → misc.listbox-CtoGvXQo.d.mts} +2 -2
  109. package/dist/js/movable/movable.embedded.d.mts +2 -2
  110. package/dist/js/movable/movable.embedded.mjs +60 -72
  111. package/dist/js/movable/movable.model.d.mts +2 -0
  112. package/dist/js/movable/movable.model.mjs +12 -0
  113. package/dist/js/movable/movable.standalone.d.mts +2 -1
  114. package/dist/js/movable.embedded-DoyXLegc.d.mts +11 -0
  115. package/dist/js/{draggable-B5-70SZm.d.mts → movable.model-BHaK_mKw.d.mts} +81 -50
  116. package/dist/js/navigable.model-BPOM8DZk.d.mts +44 -0
  117. package/dist/js/popover/index.d.mts +12 -0
  118. package/dist/js/{popover.mjs → popover/index.mjs} +41 -51
  119. package/dist/js/popover/popover.model.d.mts +2 -0
  120. package/dist/js/popover/popover.model.mjs +12 -0
  121. package/dist/js/popover.model-ubKNG612.d.mts +38 -0
  122. package/dist/js/resizable/resizable.embedded.d.mts +2 -2
  123. package/dist/js/resizable/resizable.embedded.mjs +43 -58
  124. package/dist/js/resizable/resizable.model.d.mts +2 -0
  125. package/dist/js/resizable/resizable.model.mjs +21 -0
  126. package/dist/js/resizable/resizable.standalone.d.mts +2 -1
  127. package/dist/js/resizable.embedded-Bf1qBUdt.d.mts +11 -0
  128. package/dist/js/resizable.model-BwzJcTVJ.d.mts +46 -0
  129. package/dist/js/sortable/sortable.embedded.d.mts +2 -2
  130. package/dist/js/sortable/sortable.embedded.mjs +69 -82
  131. package/dist/js/sortable/sortable.model.d.mts +2 -0
  132. package/dist/js/sortable/sortable.model.mjs +24 -0
  133. package/dist/js/sortable/sortable.standalone.d.mts +2 -1
  134. package/dist/js/sortable.embedded-DzBKAwSG.d.mts +11 -0
  135. package/dist/js/{splitter.d.mts → splitter/index.d.mts} +6 -4
  136. package/dist/js/{splitter.mjs → splitter/index.mjs} +90 -128
  137. package/dist/js/splitter/splitter.model.d.mts +2 -0
  138. package/dist/js/splitter/splitter.model.mjs +37 -0
  139. package/dist/js/splitter.model-DOLNjLVS.d.mts +57 -0
  140. package/dist/js/{tabs.d.mts → tabs/index.d.mts} +7 -7
  141. package/dist/js/{tabs.mjs → tabs/index.mjs} +58 -58
  142. package/dist/js/tabs/tabs.model.d.mts +2 -0
  143. package/dist/js/tabs/tabs.model.mjs +18 -0
  144. package/dist/js/tabs.model-DRBX_JtI.d.mts +40 -0
  145. package/dist/js/toolbar/index.mjs +27 -0
  146. package/dist/js/toolbar/toolbar.model.d.mts +11 -0
  147. package/dist/js/toolbar/toolbar.model.mjs +7 -0
  148. package/dist/js/tooltip/index.d.mts +19 -0
  149. package/dist/js/{tooltip.mjs → tooltip/index.mjs} +61 -86
  150. package/dist/js/tooltip/tooltip.model.d.mts +2 -0
  151. package/dist/js/tooltip/tooltip.model.mjs +15 -0
  152. package/dist/js/tooltip.model-DRkY_BsL.d.mts +37 -0
  153. package/package.json +30 -24
  154. package/dist/js/color-picker/constants.color-picker.d.mts +0 -2
  155. package/dist/js/color-picker/misc.color-picker.d.mts +0 -2
  156. package/dist/js/color-picker/models.color-picker.d.mts +0 -2
  157. package/dist/js/color-picker/state.color-picker.d.mts +0 -8
  158. package/dist/js/color-picker/state.color-picker.mjs +0 -2
  159. package/dist/js/combobox/constants.combobox.d.mts +0 -2
  160. package/dist/js/combobox/misc.combobox.d.mts +0 -2
  161. package/dist/js/combobox/models.combobox.d.mts +0 -43
  162. package/dist/js/combobox/state.combobox.d.mts +0 -11
  163. package/dist/js/combobox/state.combobox.mjs +0 -2
  164. package/dist/js/constants.color-picker-B-gFjL8m.d.mts +0 -364
  165. package/dist/js/constants.combobox-8EMRmv09.d.mts +0 -18
  166. package/dist/js/constants.listbox-DGnX32kv.d.mts +0 -8
  167. package/dist/js/dialog.d.mts +0 -47
  168. package/dist/js/dialog.mjs +0 -131
  169. package/dist/js/index-C5D3-oiI.d.mts +0 -177
  170. package/dist/js/internal/draggable.d.mts +0 -2
  171. package/dist/js/internal/navigable.d.mts +0 -36
  172. package/dist/js/internal/navigable.mjs +0 -135
  173. package/dist/js/l10n-Bn-7RcwR.d.mts +0 -20
  174. package/dist/js/l10n.d.mts +0 -2
  175. package/dist/js/menu.mjs +0 -172
  176. package/dist/js/popover.d.mts +0 -38
  177. package/dist/js/resizable.embedded-dvhdfQgt.d.mts +0 -34
  178. package/dist/js/toolbar.mjs +0 -31
  179. package/dist/js/tooltip.d.mts +0 -45
  180. /package/dist/js/combobox/{models.combobox.mjs → combobox.model.mjs} +0 -0
  181. /package/dist/js/{menu.d.mts → menu/index.d.mts} +0 -0
  182. /package/dist/js/{toolbar.d.mts → toolbar/index.d.mts} +0 -0
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm](https://badge.fury.io/js/@oscarpalmer%2Foui.svg)](https://www.npmjs.com/package/@oscarpalmer/oui)
4
4
 
5
- _Oui_ _(Oscar UI)_ is a collection of styles, components, and related thingamjigs for designing websites and applications, which I often use to build prototypes and proof-of-concepts for myself and at work.
5
+ _Oui_ _(Oscar UI)_ is a collection of styles, components, and related whatchamacallits for designing websites and applications, which I often use to build prototypes and proof-of-concepts for myself and at work.
6
6
 
7
7
  ## License
8
8
 
@@ -0,0 +1,2 @@
1
+ import { _ as COLOR_PICKER_SELECTOR_WELL, a as COLOR_PICKER_ATTRIBUTE_OUTPUT_INPUT, b as COLOR_PICKER_TAGNAME, c as COLOR_PICKER_EXPRESSION_HEX_PREFIX, d as COLOR_PICKER_MESSAGE_INPUT, f as COLOR_PICKER_MESSAGE_LABEL, g as COLOR_PICKER_SELECTOR_OUTPUT_INPUT, h as COLOR_PICKER_SELECTOR_INPUT, i as COLOR_PICKER_ATTRIBUTE_INPUT, l as COLOR_PICKER_INPUT_TYPES, m as COLOR_PICKER_SELECTOR_COPY, n as COLOR_PICKER_ATTRIBUTE_COPY_ERROR, o as COLOR_PICKER_ATTRIBUTE_WELL, p as COLOR_PICKER_OUTPUTS, r as COLOR_PICKER_ATTRIBUTE_COPY_SUCCESS, s as COLOR_PICKER_ATTRIBUTE_WELL_KNOB, t as COLOR_PICKER_ATTRIBUTE_COPY, u as COLOR_PICKER_KEYS, v as COLOR_PICKER_SELECTOR_WELL_KNOB, x as colorPickerLocalizations, y as COLOR_PICKER_SYMBOL } from "../color-picker.constants-D1mxw_Le.mjs";
2
+ export { COLOR_PICKER_ATTRIBUTE_COPY, COLOR_PICKER_ATTRIBUTE_COPY_ERROR, COLOR_PICKER_ATTRIBUTE_COPY_SUCCESS, COLOR_PICKER_ATTRIBUTE_INPUT, COLOR_PICKER_ATTRIBUTE_OUTPUT_INPUT, COLOR_PICKER_ATTRIBUTE_WELL, COLOR_PICKER_ATTRIBUTE_WELL_KNOB, COLOR_PICKER_EXPRESSION_HEX_PREFIX, COLOR_PICKER_INPUT_TYPES, COLOR_PICKER_KEYS, COLOR_PICKER_MESSAGE_INPUT, COLOR_PICKER_MESSAGE_LABEL, COLOR_PICKER_OUTPUTS, COLOR_PICKER_SELECTOR_COPY, COLOR_PICKER_SELECTOR_INPUT, COLOR_PICKER_SELECTOR_OUTPUT_INPUT, COLOR_PICKER_SELECTOR_WELL, COLOR_PICKER_SELECTOR_WELL_KNOB, COLOR_PICKER_SYMBOL, COLOR_PICKER_TAGNAME, colorPickerLocalizations };
@@ -1,6 +1,6 @@
1
- import { getLocalizations } from "../l10n.mjs";
1
+ import { createLocalizations } from "../l10n/index.mjs";
2
2
  import { round } from "@oscarpalmer/atoms/math";
3
- //#region src/js/color-picker/constants.color-picker.ts
3
+ //#region src/js/color-picker/color-picker.constants.ts
4
4
  const COLOR_PICKER_TAGNAME = "oui-color-picker";
5
5
  const COLOR_PICKER_ATTRIBUTE_COPY = `${COLOR_PICKER_TAGNAME}-copy`;
6
6
  const COLOR_PICKER_ATTRIBUTE_COPY_ERROR = `${COLOR_PICKER_ATTRIBUTE_COPY}-error`;
@@ -34,7 +34,8 @@ const COLOR_PICKER_SELECTOR_INPUT = `[${COLOR_PICKER_ATTRIBUTE_INPUT}]`;
34
34
  const COLOR_PICKER_SELECTOR_OUTPUT_INPUT = `[${COLOR_PICKER_ATTRIBUTE_OUTPUT_INPUT}]`;
35
35
  const COLOR_PICKER_SELECTOR_WELL = `[${COLOR_PICKER_ATTRIBUTE_WELL}]`;
36
36
  const COLOR_PICKER_SELECTOR_WELL_KNOB = `[${COLOR_PICKER_ATTRIBUTE_WELL_KNOB}]`;
37
- const colorPickerLocalizations = getLocalizations({
37
+ const COLOR_PICKER_SYMBOL = Symbol(COLOR_PICKER_TAGNAME);
38
+ const colorPickerLocalizations = createLocalizations({
38
39
  blackness: "Blackness",
39
40
  blue: "Blue",
40
41
  copy: "Copy",
@@ -56,4 +57,4 @@ const colorPickerLocalizations = getLocalizations({
56
57
  whiteness: "Whiteness"
57
58
  });
58
59
  //#endregion
59
- export { COLOR_PICKER_ATTRIBUTE_COPY, COLOR_PICKER_ATTRIBUTE_COPY_ERROR, COLOR_PICKER_ATTRIBUTE_COPY_SUCCESS, COLOR_PICKER_ATTRIBUTE_INPUT, COLOR_PICKER_ATTRIBUTE_OUTPUT_INPUT, COLOR_PICKER_ATTRIBUTE_WELL, COLOR_PICKER_ATTRIBUTE_WELL_KNOB, COLOR_PICKER_EXPRESSION_HEX_PREFIX, COLOR_PICKER_INPUT_TYPES, COLOR_PICKER_KEYS, COLOR_PICKER_MESSAGE_INPUT, COLOR_PICKER_MESSAGE_LABEL, COLOR_PICKER_OUTPUTS, COLOR_PICKER_SELECTOR_COPY, COLOR_PICKER_SELECTOR_INPUT, COLOR_PICKER_SELECTOR_OUTPUT_INPUT, COLOR_PICKER_SELECTOR_WELL, COLOR_PICKER_SELECTOR_WELL_KNOB, COLOR_PICKER_TAGNAME, colorPickerLocalizations };
60
+ export { COLOR_PICKER_ATTRIBUTE_COPY, COLOR_PICKER_ATTRIBUTE_COPY_ERROR, COLOR_PICKER_ATTRIBUTE_COPY_SUCCESS, COLOR_PICKER_ATTRIBUTE_INPUT, COLOR_PICKER_ATTRIBUTE_OUTPUT_INPUT, COLOR_PICKER_ATTRIBUTE_WELL, COLOR_PICKER_ATTRIBUTE_WELL_KNOB, COLOR_PICKER_EXPRESSION_HEX_PREFIX, COLOR_PICKER_INPUT_TYPES, COLOR_PICKER_KEYS, COLOR_PICKER_MESSAGE_INPUT, COLOR_PICKER_MESSAGE_LABEL, COLOR_PICKER_OUTPUTS, COLOR_PICKER_SELECTOR_COPY, COLOR_PICKER_SELECTOR_INPUT, COLOR_PICKER_SELECTOR_OUTPUT_INPUT, COLOR_PICKER_SELECTOR_WELL, COLOR_PICKER_SELECTOR_WELL_KNOB, COLOR_PICKER_SYMBOL, COLOR_PICKER_TAGNAME, colorPickerLocalizations };
@@ -1,5 +1,5 @@
1
- import { C as OuiColorPickerContent, D as OuiColorPickerContentWell, T as OuiColorPickerContentOpacity, k as OuiColorPickerCreateParameters, w as OuiColorPickerContentHue, x as OuiColorPickerAnchor } from "../constants.color-picker-B-gFjL8m.mjs";
2
- //#region src/js/color-picker/dom.color-picker.d.ts
1
+ import { C as OuiColorPickerAnchor, D as OuiColorPickerContentOpacity, E as OuiColorPickerContentHue, T as OuiColorPickerContent, j as OuiColorPickerCreateParameters, k as OuiColorPickerContentWell } from "../color-picker.constants-D1mxw_Le.mjs";
2
+ //#region src/js/color-picker/color-picker.dom.d.ts
3
3
  export declare function createColorPickerAnchor(parameters: OuiColorPickerCreateParameters): OuiColorPickerAnchor;
4
4
  export declare function createColorPickerContent(parameters: OuiColorPickerCreateParameters): OuiColorPickerContent;
5
5
  export declare function createColorPickerHue(parameters: OuiColorPickerCreateParameters): OuiColorPickerContentHue;
@@ -1,7 +1,7 @@
1
- import { COLOR_PICKER_ATTRIBUTE_COPY, COLOR_PICKER_ATTRIBUTE_WELL, COLOR_PICKER_ATTRIBUTE_WELL_KNOB, COLOR_PICKER_TAGNAME, colorPickerLocalizations } from "./constants.color-picker.mjs";
2
- import { createColorPickerOutput } from "./output.color-picker.mjs";
1
+ import { COLOR_PICKER_ATTRIBUTE_COPY, COLOR_PICKER_ATTRIBUTE_WELL, COLOR_PICKER_ATTRIBUTE_WELL_KNOB, COLOR_PICKER_TAGNAME, colorPickerLocalizations } from "./color-picker.constants.mjs";
2
+ import { createColorPickerOutput } from "./color-picker.output.mjs";
3
3
  import { createElement } from "@oscarpalmer/toretto/create";
4
- //#region src/js/color-picker/dom.color-picker.ts
4
+ //#region src/js/color-picker/color-picker.dom.ts
5
5
  function createColorPickerAnchor(parameters) {
6
6
  const { alpha, color, id, inline } = parameters;
7
7
  const container = createElement("div", { attribute: { [`${COLOR_PICKER_TAGNAME}-anchor`]: "" } });
@@ -1,5 +1,5 @@
1
- import { L as OuiColorPickerState, M as OuiColorPickerMovement } from "../constants.color-picker-B-gFjL8m.mjs";
2
- //#region src/js/color-picker/event.color-picker.d.ts
1
+ import { P as OuiColorPickerMovement, z as OuiColorPickerState } from "../color-picker.constants-D1mxw_Le.mjs";
2
+ //#region src/js/color-picker/color-picker.event.d.ts
3
3
  export declare function onColorPickerHue(state: OuiColorPickerState): void;
4
4
  export declare function onColorPickerInput(state: OuiColorPickerState): void;
5
5
  export declare function onColorPickerOpacity(state: OuiColorPickerState): void;
@@ -1,2 +1,2 @@
1
- import { a as onColorPickerOutputFormat, i as onColorPickerOpacity, n as onColorPickerHue, o as onColorPickerOutputValue, r as onColorPickerInput, t as colorPickerMovement } from "../event.color-picker-BEpq0Adu.mjs";
1
+ import { a as onColorPickerOutputFormat, i as onColorPickerOpacity, n as onColorPickerHue, o as onColorPickerOutputValue, r as onColorPickerInput, t as colorPickerMovement } from "../color-picker.event-Cksj5TvS.mjs";
2
2
  export { colorPickerMovement, onColorPickerHue, onColorPickerInput, onColorPickerOpacity, onColorPickerOutputFormat, onColorPickerOutputValue };
@@ -1,5 +1,5 @@
1
- import { L as OuiColorPickerState } from "../constants.color-picker-B-gFjL8m.mjs";
2
- //#region src/js/color-picker/form.color-picker.d.ts
1
+ import { z as OuiColorPickerState } from "../color-picker.constants-D1mxw_Le.mjs";
2
+ //#region src/js/color-picker/color-picker.form.d.ts
3
3
  export declare function updateColorPickerForm(state: OuiColorPickerState, valid: boolean): void;
4
4
  export declare function updateColorPickerValidity(state: OuiColorPickerState, valid: boolean): void;
5
5
  //#endregion
@@ -1,15 +1,18 @@
1
- import { getLocalization, localize } from "../l10n.mjs";
2
- import { OuiColorPickerEvent } from "./models.color-picker.mjs";
1
+ import { getLocalization, localize } from "../l10n/index.mjs";
2
+ import { OuiColorPickerEvent } from "./color-picker.model.mjs";
3
3
  import { dispatch } from "@oscarpalmer/toretto/event";
4
- //#region src/js/color-picker/form.color-picker.ts
4
+ //#region src/js/color-picker/color-picker.form.ts
5
5
  function updateColorPickerForm(state, valid) {
6
- const { color, host, internals, value } = state;
7
- internals.setFormValue(valid ? value.current : "");
6
+ const { component, form } = state;
7
+ const { color, host, value } = component;
8
+ form.internals.setFormValue(valid ? value.current : "");
8
9
  updateColorPickerValidity(state, valid);
9
10
  dispatch(host, new OuiColorPickerEvent("oui:change", color.value, valid));
10
11
  }
11
12
  function updateColorPickerValidity(state, valid) {
12
- const { anchor, host, internals, localizations } = state;
13
+ const { component, form } = state;
14
+ const { anchor, host, localizations } = component;
15
+ const { internals } = form;
13
16
  if (valid) {
14
17
  internals.setValidity({});
15
18
  internals.checkValidity();
@@ -0,0 +1,2 @@
1
+ import { a as setColorPickerLocalizations, c as setColorPickerValues, i as setColorPickerDisabled, l as updateColorPickerLabels, n as getColorPickerOutput, o as setColorPickerRequired, r as getColorPickerValueType, s as setColorPickerValue, t as getColorPickerId, u as updateColorPickerLocalizations } from "../color-picker.misc-CtsXGrOe.mjs";
2
+ export { getColorPickerId, getColorPickerOutput, getColorPickerValueType, setColorPickerDisabled, setColorPickerLocalizations, setColorPickerRequired, setColorPickerValue, setColorPickerValues, updateColorPickerLabels, updateColorPickerLocalizations };
@@ -1,2 +1,2 @@
1
- import { c as getColorPickerOutput, d as setColorPickerLocalizations, f as setColorPickerRequired, g as updateColorPickerLocalizations, h as updateColorPickerLabels, l as getColorPickerValueType, m as setColorPickerValues, p as setColorPickerValue, s as getColorPickerId, u as setColorPickerDisabled } from "../event.color-picker-BEpq0Adu.mjs";
1
+ import { c as getColorPickerOutput, d as setColorPickerLocalizations, f as setColorPickerRequired, g as updateColorPickerLocalizations, h as updateColorPickerLabels, l as getColorPickerValueType, m as setColorPickerValues, p as setColorPickerValue, s as getColorPickerId, u as setColorPickerDisabled } from "../color-picker.event-Cksj5TvS.mjs";
2
2
  export { getColorPickerId, getColorPickerOutput, getColorPickerValueType, setColorPickerDisabled, setColorPickerLocalizations, setColorPickerRequired, setColorPickerValue, setColorPickerValues, updateColorPickerLabels, updateColorPickerLocalizations };
@@ -0,0 +1,2 @@
1
+ import { A as OuiColorPickerCopy, B as OuiColorPickerStateComponent, C as OuiColorPickerAnchor, D as OuiColorPickerContentOpacity, E as OuiColorPickerContentHue, F as OuiColorPickerMovementParameters, H as OuiColorPickerValueType, I as OuiColorPickerOutputColor, L as OuiColorPickerOutputColorProperty, M as OuiColorPickerEvent, N as OuiColorPickerLocalizations, O as OuiColorPickerContentOutput, P as OuiColorPickerMovement, R as OuiColorPickerOutputType, S as GenericOuiColorPickerElement, T as OuiColorPickerContent, V as OuiColorPickerStateLocalizations, j as OuiColorPickerCreateParameters, k as OuiColorPickerContentWell, w as OuiColorPickerColor, z as OuiColorPickerState } from "../color-picker.constants-D1mxw_Le.mjs";
2
+ export { GenericOuiColorPickerElement, OuiColorPickerAnchor, OuiColorPickerColor, OuiColorPickerContent, OuiColorPickerContentHue, OuiColorPickerContentOpacity, OuiColorPickerContentOutput, OuiColorPickerContentWell, OuiColorPickerCopy, OuiColorPickerCreateParameters, OuiColorPickerEvent, OuiColorPickerLocalizations, OuiColorPickerMovement, OuiColorPickerMovementParameters, OuiColorPickerOutputColor, OuiColorPickerOutputColorProperty, OuiColorPickerOutputType, OuiColorPickerState, OuiColorPickerStateComponent, OuiColorPickerStateLocalizations, OuiColorPickerValueType };
@@ -1,4 +1,4 @@
1
- //#region src/js/color-picker/models.color-picker.ts
1
+ //#region src/js/color-picker/color-picker.model.ts
2
2
  var OuiColorPickerEvent = class extends Event {
3
3
  valid;
4
4
  value;
@@ -1,5 +1,5 @@
1
- import { E as OuiColorPickerContentOutput, L as OuiColorPickerState, O as OuiColorPickerCopy, P as OuiColorPickerOutputColor, k as OuiColorPickerCreateParameters } from "../constants.color-picker-B-gFjL8m.mjs";
2
- //#region src/js/color-picker/output.color-picker.d.ts
1
+ import { A as OuiColorPickerCopy, I as OuiColorPickerOutputColor, O as OuiColorPickerContentOutput, j as OuiColorPickerCreateParameters, z as OuiColorPickerState } from "../color-picker.constants-D1mxw_Le.mjs";
2
+ //#region src/js/color-picker/color-picker.output.d.ts
3
3
  export declare function createColorPickerOutput(parameters: OuiColorPickerCreateParameters, copy: OuiColorPickerCopy | undefined): OuiColorPickerContentOutput | undefined;
4
4
  export declare function getColorPickerOutputFormat(state: OuiColorPickerState): OuiColorPickerOutputColor | undefined;
5
5
  export declare function updateColorPickerOutputCopyLabel(state: OuiColorPickerState, button: HTMLButtonElement): void;
@@ -1,9 +1,9 @@
1
- import { getLocalization, localize } from "../l10n.mjs";
2
- import { COLOR_PICKER_ATTRIBUTE_OUTPUT_INPUT, COLOR_PICKER_TAGNAME, colorPickerLocalizations } from "./constants.color-picker.mjs";
1
+ import { getLocalization, localize } from "../l10n/index.mjs";
2
+ import { COLOR_PICKER_ATTRIBUTE_OUTPUT_INPUT, COLOR_PICKER_TAGNAME, colorPickerLocalizations } from "./color-picker.constants.mjs";
3
3
  import { setAria } from "@oscarpalmer/toretto/aria";
4
- import { round } from "@oscarpalmer/atoms/math";
5
4
  import { createElement } from "@oscarpalmer/toretto/create";
6
- //#region src/js/color-picker/output.color-picker.ts
5
+ import { round } from "@oscarpalmer/atoms/math";
6
+ //#region src/js/color-picker/color-picker.output.ts
7
7
  function createColorPickerOutput(parameters, copy) {
8
8
  if (parameters.output === "none") return;
9
9
  const container = createElement("div", { attribute: { [`${COLOR_PICKER_TAGNAME}-output`]: "" } });
@@ -137,14 +137,15 @@ function createOutputItems(parameters, copy) {
137
137
  ];
138
138
  }
139
139
  function getColorPickerOutputFormat(state) {
140
- if (state.output === "none") return;
140
+ const { component } = state;
141
+ if (component.output === "none") return;
141
142
  let color;
142
- if (state.output === "all") color = state.content.output?.toggle?.value;
143
- else color = state.output;
143
+ if (component.output === "all") color = component.content.output?.toggle?.value;
144
+ else color = component.output;
144
145
  return color;
145
146
  }
146
147
  function updateColorPickerOutputCopyLabel(state, button) {
147
- const { host, localizations } = state;
148
+ const { host, localizations } = state.component;
148
149
  const prefix = localize(getLocalization(localizations.global, host, "copy", localizations.component), {}, []);
149
150
  const color = getColorPickerOutputFormat(state);
150
151
  let content;
@@ -154,7 +155,8 @@ function updateColorPickerOutputCopyLabel(state, button) {
154
155
  button.textContent = prefix;
155
156
  }
156
157
  function updateColorPickerOutputInputs(state) {
157
- const { content } = state;
158
+ const { component } = state;
159
+ const { content } = component;
158
160
  if (content.output?.inputs == null) return;
159
161
  const inputs = content.output.inputs;
160
162
  const { length } = inputs;
@@ -162,11 +164,11 @@ function updateColorPickerOutputInputs(state) {
162
164
  const input = inputs[index];
163
165
  const color = input.dataset.color;
164
166
  const property = input.dataset.property;
165
- if (color != null && property != null) input.valueAsNumber = color in state.color.value && property in state.color.value[color] ? round(state.color.value[color][property]) : 0;
167
+ if (color != null && property != null) input.valueAsNumber = color in component.color.value && property in component.color.value[color] ? round(component.color.value[color][property]) : 0;
166
168
  }
167
169
  }
168
170
  function updateColorPickerOutputLabels(state) {
169
- const { content, host, localizations } = state;
171
+ const { content, host, localizations } = state.component;
170
172
  if (content.output == null) return;
171
173
  if (content.output.copy?.button != null) updateColorPickerOutputCopyLabel(state, content.output.copy.button);
172
174
  for (let labelsIndex = 0; labelsIndex < labelsLength; labelsIndex += 1) {
@@ -0,0 +1,8 @@
1
+ import { B as OuiColorPickerStateComponent, S as GenericOuiColorPickerElement, z as OuiColorPickerState } from "../color-picker.constants-D1mxw_Le.mjs";
2
+ //#region src/js/color-picker/color-picker.state.d.ts
3
+ export declare function attachColorPicker(state: OuiColorPickerState): void;
4
+ export declare function detachColorPicker(state: OuiColorPickerState): void;
5
+ export declare function initializeColorPicker(colorPicker: GenericOuiColorPickerElement): void;
6
+ export declare function initializeColorPickerComponent(element: GenericOuiColorPickerElement, state: OuiColorPickerState): OuiColorPickerStateComponent;
7
+ export declare const colorPickers: Set<OuiColorPickerState>;
8
+ //#endregion
@@ -0,0 +1,2 @@
1
+ import { _ as attachColorPicker, b as initializeColorPicker, v as colorPickers, x as initializeColorPickerComponent, y as detachColorPicker } from "../color-picker.event-Cksj5TvS.mjs";
2
+ export { attachColorPicker, colorPickers, detachColorPicker, initializeColorPicker, initializeColorPickerComponent };
@@ -1,2 +1,180 @@
1
- import { A as OuiColorPickerEvent, B as OuiColorPickerElement, G as setColorPickerLocalizations } from "../constants.color-picker-B-gFjL8m.mjs";
2
- export { OuiColorPickerElement, OuiColorPickerEvent, setColorPickerLocalizations };
1
+ import { M as OuiColorPickerEvent, N as OuiColorPickerLocalizations, b as COLOR_PICKER_TAGNAME, y as COLOR_PICKER_SYMBOL, z as OuiColorPickerState } from "../color-picker.constants-D1mxw_Le.mjs";
2
+ import { a as setColorPickerLocalizations } from "../color-picker.misc-CtsXGrOe.mjs";
3
+ import { HSLAColor, HSLColor, HWBAColor, HWBColor, RGBAColor, RGBColor } from "@oscarpalmer/atoms/color";
4
+ //#region src/js/color-picker/index.d.ts
5
+ declare global {
6
+ interface HTMLElementTagNameMap {
7
+ [COLOR_PICKER_TAGNAME]: OuiColorPickerElement;
8
+ }
9
+ }
10
+ export interface OuiColorPickerElement {
11
+ [COLOR_PICKER_SYMBOL]: OuiColorPickerState;
12
+ }
13
+ export declare class OuiColorPickerElement extends HTMLElement {
14
+ static formAssociated: boolean;
15
+ static observedAttributes: string[];
16
+ /**
17
+ * Is the color picker disabled?
18
+ */
19
+ get disabled(): boolean;
20
+ /**
21
+ * Should the color picker be disabled?
22
+ */
23
+ set disabled(value: boolean);
24
+ /**
25
+ * Form element associated with the color picker
26
+ */
27
+ get form(): HTMLFormElement | null;
28
+ /**
29
+ * Color value as hexadecimal string
30
+ */
31
+ get hex(): string;
32
+ /**
33
+ * Set color value from a hexadecimal string
34
+ */
35
+ set hex(value: string);
36
+ /**
37
+ * Color value as hexadecimal string with alpha channel
38
+ */
39
+ get hexa(): string;
40
+ /**
41
+ * Set color value from a hexadecimal string with alpha channel
42
+ */
43
+ set hexa(value: string);
44
+ /**
45
+ * Color value as an _HSL_ color object
46
+ */
47
+ get hsl(): HSLColor;
48
+ /**
49
+ * Set color value from an _HSL_ color object
50
+ */
51
+ set hsl(value: HSLColor);
52
+ /**
53
+ * Color value as an _HSLA_ color object _(HSL with alpha channel)_
54
+ */
55
+ get hsla(): HSLAColor;
56
+ /**
57
+ * Set color value from an _HSLA_ color object _(HSL with alpha channel)_
58
+ */
59
+ set hsla(value: HSLAColor);
60
+ /**
61
+ * Color value as an _HWB_ color object
62
+ */
63
+ get hwb(): HWBColor;
64
+ /**
65
+ * Set color value from an _HWB_ color object
66
+ */
67
+ set hwb(value: HWBColor);
68
+ /**
69
+ * Color value as an _HWBA_ color object _(HWB with alpha channel)_
70
+ */
71
+ get hwba(): HWBAColor;
72
+ /**
73
+ * Set color value from an _HWBA_ color object _(HWB with alpha channel)_
74
+ */
75
+ set hwba(value: HWBAColor);
76
+ /**
77
+ * Text input value
78
+ */
79
+ get input(): string;
80
+ /**
81
+ * Label elements associated with the color picker
82
+ */
83
+ get labels(): NodeList;
84
+ /**
85
+ * Is the color picker readonly?
86
+ */
87
+ get readonly(): boolean;
88
+ /**
89
+ * Should the color picker be readonly?
90
+ */
91
+ set readonly(value: boolean);
92
+ /**
93
+ * Is the color picker required?
94
+ */
95
+ get required(): boolean;
96
+ /**
97
+ * Should the color picker be required?
98
+ */
99
+ set required(value: boolean);
100
+ /**
101
+ * Color value as an _RGB_ color object
102
+ */
103
+ get rgb(): RGBColor;
104
+ /**
105
+ * Set color value from an _RGB_ color object
106
+ */
107
+ set rgb(value: RGBColor);
108
+ /**
109
+ * Color value as an _RGBA_ color object _(RGB with alpha channel)_
110
+ */
111
+ get rgba(): RGBAColor;
112
+ /**
113
+ * Set color value from an _RGBA_ color object _(RGB with alpha channel)_
114
+ */
115
+ set rgba(value: RGBAColor);
116
+ /**
117
+ * Validation message for the color picker
118
+ */
119
+ get validationMessage(): string;
120
+ /**
121
+ * Validity state for the color picker
122
+ */
123
+ get validity(): ValidityState;
124
+ /**
125
+ * Current color value
126
+ */
127
+ get value(): string;
128
+ /**
129
+ * Set color value from a string, _HSL(A)_, _HWB(A)_, or _RGB(A)_ color object
130
+ */
131
+ set value(value: string | HSLColor | HSLAColor | HWBColor | HWBAColor | RGBColor | RGBAColor);
132
+ /**
133
+ * Can the color picker be validated?
134
+ */
135
+ get willValidate(): boolean;
136
+ constructor();
137
+ attributeChangedCallback(name: string, _: string | null, value: string | null): void;
138
+ /**
139
+ * Check if the color picker is valid
140
+ *
141
+ * @returns `true` if the color picker is valid, otherwise `false`
142
+ */
143
+ checkValidity(): boolean;
144
+ /**
145
+ * Clear the color picker's value
146
+ */
147
+ clear(): void;
148
+ connectedCallback(): void;
149
+ disconnectedCallback(): void;
150
+ formDisabledCallback(disabled: boolean): void;
151
+ formResetCallback(): void;
152
+ formStateRestoreCallback(state: unknown, reason: unknown): void;
153
+ /**
154
+ * Check if the color picker is valid and report any validation errors
155
+ *
156
+ * @returns `true` if the color picker is valid, otherwise `false`
157
+ */
158
+ reportValidity(): boolean;
159
+ /**
160
+ * Set a custom validation message for the color picker
161
+ *
162
+ * @param message Validation message
163
+ */
164
+ setCustomValidity(message: string): void;
165
+ /**
166
+ * Set localizations for a specific language
167
+ *
168
+ * @param language Language code
169
+ * @param localizations Localizations for language
170
+ */
171
+ setLocalizations(language: string, localizations: Partial<OuiColorPickerLocalizations>): void;
172
+ /**
173
+ * Set localizations for one or more languages
174
+ *
175
+ * @param localizations Localizations for one or more languages
176
+ */
177
+ setLocalizations(localizations: Record<string, Partial<OuiColorPickerLocalizations>>): void;
178
+ }
179
+ //#endregion
180
+ export { OuiColorPickerEvent, setColorPickerLocalizations };