@galaxy-io/dls 1.5.0 → 1.5.2

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.
@@ -0,0 +1,3 @@
1
+ import type { SVGProps } from "react";
2
+ declare const SvgGalaxyFilamentWordmarkDark: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
3
+ export default SvgGalaxyFilamentWordmarkDark;
@@ -0,0 +1,14 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ //#region src/assets/components/GalaxyFilamentWordmarkDark.tsx
3
+ var SvgGalaxyFilamentWordmarkDark = (props) => /* @__PURE__ */ jsx("svg", {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ fill: "none",
6
+ viewBox: "0 0 4513 1200",
7
+ ...props,
8
+ children: /* @__PURE__ */ jsx("path", {
9
+ fill: "#000",
10
+ d: "M181.814 1141.98 159.701 1200 0 985.717l292.377-774.718 70.759-59.34h338.665l-41.276 102.197H517.432l-49.379 131.852h149.481l-37.837 101.538H429.725zm538.618-805.707 46.19-123.955h238.818l-46.498 123.955zM505.694 910.552l196.064-526.148h239.307L745.001 910.552zm320.218 0 283.538-758.893 21.61-58.681 159.71 214.284-225.06 603.29zm626.528-190.548-32.93 88.352h91.4l33.41-88.352zm129.72-102.196 48.65-130.549h-91.4l-29 76.484h-239.3l45.21-120.658 43.24-58.681h505.15l21.62 58.681-174.93 467.467h-525.79l-21.62-58.68 86.97-234.064zm434.51 292.744h-228.62l195.57-525.489h758.71l21.62 58.022L2590 910.552h-228.62l158.23-423.293h-62.17l-158.23 423.293h-216.93l157.73-423.293h-66.1zm981.66-245.931-54.53 143.735h90.9l40.3-104.834h239.3l-56.01 149.009-43.25 58.021H2709.9l-21.63-58.021 152.33-409.446 43.24-58.022h505.15l21.63 58.022-80.59 222.196h-239.8v-.66zm129.74-101.538 27.02-75.824h-91.89l-27.52 75.824zm425.05 347.469h-239.8l195.58-525.489h524.3l21.63 58.022-174.45 467.467h-239.79l158.22-423.293h-88.45zm567.26-429.226 37.84-101.538 85.5-230.107L4265.34 91l159.7 213.625-27.51 75.163H4513l-42.26 101.538h-111.05l-121.86 327.03h105.37l-44.03 102.196h-295.25l-23.1-56.042z"
11
+ })
12
+ });
13
+ //#endregion
14
+ export { SvgGalaxyFilamentWordmarkDark as default };
@@ -0,0 +1,3 @@
1
+ import type { SVGProps } from "react";
2
+ declare const SvgGalaxyFilamentWordmarkLight: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
3
+ export default SvgGalaxyFilamentWordmarkLight;
@@ -0,0 +1,14 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ //#region src/assets/components/GalaxyFilamentWordmarkLight.tsx
3
+ var SvgGalaxyFilamentWordmarkLight = (props) => /* @__PURE__ */ jsx("svg", {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ fill: "none",
6
+ viewBox: "0 0 4513 1200",
7
+ ...props,
8
+ children: /* @__PURE__ */ jsx("path", {
9
+ fill: "#fff",
10
+ d: "M181.814 1141.98 159.701 1200 0 985.717l292.377-774.718 70.759-59.34h338.665l-41.276 102.197H517.432l-49.379 131.852h149.481l-37.837 101.538H429.725zm538.618-805.707 46.19-123.955h238.818l-46.498 123.955zM505.694 910.552l196.064-526.148h239.307L745.001 910.552zm320.218 0 283.538-758.893 21.61-58.681 159.71 214.284-225.06 603.29zm626.528-190.548-32.93 88.352h91.4l33.41-88.352zm129.72-102.196 48.65-130.549h-91.4l-29 76.484h-239.3l45.21-120.658 43.24-58.681h505.15l21.62 58.681-174.93 467.467h-525.79l-21.62-58.68 86.97-234.064zm434.51 292.744h-228.62l195.57-525.489h758.71l21.62 58.022L2590 910.552h-228.62l158.23-423.293h-62.17l-158.23 423.293h-216.93l157.73-423.293h-66.1zm981.66-245.931-54.53 143.735h90.9l40.3-104.834h239.3l-56.01 149.009-43.25 58.021H2709.9l-21.63-58.021 152.33-409.446 43.24-58.022h505.15l21.63 58.022-80.59 222.196h-239.8v-.66zm129.74-101.538 27.02-75.824h-91.89l-27.52 75.824zm425.05 347.469h-239.8l195.58-525.489h524.3l21.63 58.022-174.45 467.467h-239.79l158.22-423.293h-88.45zm567.26-429.226 37.84-101.538 85.5-230.107L4265.34 91l159.7 213.625-27.51 75.163H4513l-42.26 101.538h-111.05l-121.86 327.03h105.37l-44.03 102.196h-295.25l-23.1-56.042z"
11
+ })
12
+ });
13
+ //#endregion
14
+ export { SvgGalaxyFilamentWordmarkLight as default };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The Galaxy wordmark, in the variant that reads against the active theme.
3
+ * Use `GalaxyLogomark` when you need just the mark without the word.
4
+ */
5
+ declare const GalaxyFilamentWordmark: ({ height, isDark, }: {
6
+ /** Rendered height in px. Width follows the aspect ratio. */
7
+ height: number;
8
+ /** Force the light artwork instead of following the theme. */
9
+ isDark?: boolean;
10
+ }) => import("react").JSX.Element;
11
+ export default GalaxyFilamentWordmark;
@@ -0,0 +1,25 @@
1
+ import { GalaxyTheme } from "../theme/types.js";
2
+ import { useGalaxyTheme } from "../theme/GalaxyTheme.js";
3
+ import SvgGalaxyFilamentWordmarkDark from "../assets/components/GalaxyFilamentWordmarkDark.js";
4
+ import SvgGalaxyFilamentWordmarkLight from "../assets/components/GalaxyFilamentWordmarkLight.js";
5
+ import { match } from "ts-pattern";
6
+ import { useMemo } from "react";
7
+ import { jsx } from "react/jsx-runtime";
8
+ //#region src/icons/GalaxyFilamentWordmark.tsx
9
+ /**
10
+ * The Galaxy wordmark, in the variant that reads against the active theme.
11
+ * Use `GalaxyLogomark` when you need just the mark without the word.
12
+ */
13
+ var GalaxyFilamentWordmark = ({ height, isDark }) => {
14
+ const { activeTheme } = useGalaxyTheme();
15
+ return useMemo(() => {
16
+ if (isDark) return /* @__PURE__ */ jsx(SvgGalaxyFilamentWordmarkLight, { height });
17
+ return match(activeTheme).with(GalaxyTheme.DARK, () => /* @__PURE__ */ jsx(SvgGalaxyFilamentWordmarkLight, { height })).with(GalaxyTheme.LIGHT, () => /* @__PURE__ */ jsx(SvgGalaxyFilamentWordmarkDark, { height })).exhaustive();
18
+ }, [
19
+ height,
20
+ isDark,
21
+ activeTheme
22
+ ]);
23
+ };
24
+ //#endregion
25
+ export { GalaxyFilamentWordmark as default };
@@ -5,7 +5,7 @@ import Text, { TextSize, TextVariant } from "../text/Text.js";
5
5
  import FlexItem from "../containers/FlexItem.js";
6
6
  import Icon, { IconVariant } from "../icons/Icon.js";
7
7
  import FlexWrapper, { AlignItems, FlexDirection } from "../containers/FlexWrapper.js";
8
- import { InputLabel, InputSize, InputVariant, getInputBorderColor, getInputFontSize, getInputHeight, getInputIconSize, getInputLineHeight, getInputPadding, getInputSurfaceColor, getInputTextSize } from "./Input.js";
8
+ import { InputLabel, InputSize, InputVariant, getInputBorderColor, getInputControlSize, getInputFontSize, getInputHeight, getInputIconSize, getInputLineHeight, getInputPadding, getInputSurfaceColor, getInputTextSize } from "./Input.js";
9
9
  import CheckboxInput from "./CheckboxInput.js";
10
10
  import Dropdown, { DropdownPosition, DropdownVariant } from "../dropdown/Dropdown.js";
11
11
  import HorizontalDivider from "../dividers/HorizontalDivider.js";
@@ -121,6 +121,13 @@ var OptionIconSlot = /*#__PURE__*/ styled("span")({
121
121
  class: "o16no7ck",
122
122
  propsAsIs: false
123
123
  });
124
+ var _exp22 = () => ({ $size }) => getInputControlSize($size);
125
+ var ResetIconSlot = /*#__PURE__*/ styled("span")({
126
+ name: "ResetIconSlot",
127
+ class: "roazm1",
128
+ propsAsIs: false,
129
+ vars: { "roazm1-0": [_exp22()] }
130
+ });
124
131
  /**
125
132
  * Multi-choice dropdown. Same option shape and search contract as `SelectInput`,
126
133
  * but the panel stays open across picks and the trigger summarizes what's chosen.
@@ -325,6 +332,7 @@ var MultiSelectInput = ({ label, icon, variant = InputVariant.PRIMARY, size = In
325
332
  optionsRefs.current[index] = el;
326
333
  },
327
334
  $isFocused: isPinnedOptionFocused(index),
335
+ $size: size,
328
336
  onClick: (e) => {
329
337
  e.preventDefault();
330
338
  handlePinnedOptionToggle(pinnedOption);
@@ -344,7 +352,7 @@ var MultiSelectInput = ({ label, icon, variant = InputVariant.PRIMARY, size = In
344
352
  shrink: 1,
345
353
  minWidth: 0,
346
354
  children: /* @__PURE__ */ jsx(Text, {
347
- variant: TextVariant.PRIMARY,
355
+ variant: isPinnedOptionSelected(pinnedOption) ? TextVariant.PRIMARY : TextVariant.SECONDARY,
348
356
  size: getInputTextSize(size),
349
357
  cursor: !effectiveIsDisabled ? "pointer" : "not-allowed",
350
358
  isEllipsis: true,
@@ -413,15 +421,19 @@ var MultiSelectInput = ({ label, icon, variant = InputVariant.PRIMARY, size = In
413
421
  }), /* @__PURE__ */ jsx(PinnedOptionButton, {
414
422
  onClick: handleReset,
415
423
  $isFocused: false,
424
+ $size: size,
416
425
  children: /* @__PURE__ */ jsxs(FlexWrapper, {
417
426
  alignItems: AlignItems.CENTER,
418
427
  gap: 8,
419
- children: [/* @__PURE__ */ jsx(Icon, {
420
- component: ArrowCounterClockwiseIcon,
421
- variant: IconVariant.TERTIARY,
422
- size: getInputIconSize(size)
428
+ children: [/* @__PURE__ */ jsx(ResetIconSlot, {
429
+ $size: size,
430
+ children: /* @__PURE__ */ jsx(Icon, {
431
+ component: ArrowCounterClockwiseIcon,
432
+ variant: IconVariant.TERTIARY,
433
+ size: getInputIconSize(size)
434
+ })
423
435
  }), /* @__PURE__ */ jsx(Text, {
424
- variant: TextVariant.PRIMARY,
436
+ variant: TextVariant.SECONDARY,
425
437
  size: getInputTextSize(size),
426
438
  cursor: !effectiveIsDisabled ? "pointer" : "not-allowed",
427
439
  children: "Reset"
@@ -1,5 +1,5 @@
1
1
  import { withTheme } from "../theme/GalaxyTheme.js";
2
- import Text, { TextWeight } from "../text/Text.js";
2
+ import Text, { TextVariant, TextWeight } from "../text/Text.js";
3
3
  import { InputSize, InputVariant, getInputBorderColor, getInputHeight, getInputSurfaceColor, getInputTextSize } from "./Input.js";
4
4
  /* empty css */
5
5
  import { styled } from "@linaria/react";
@@ -26,7 +26,7 @@ var StyledSwitcherInput = withTheme(/*#__PURE__*/ styled("div")({
26
26
  var _exp5 = () => ({ $size }) => {
27
27
  return match($size).with(InputSize.SMALL, () => "2px 8px").with(InputSize.MEDIUM, () => "3px 10px").with(InputSize.LARGE, () => "5px 12px").exhaustive();
28
28
  };
29
- var _exp6 = () => ({ theme, $isSelected }) => $isSelected ? theme.color.background.secondary : "transparent";
29
+ var _exp6 = () => ({ theme, $isSelected }) => $isSelected ? theme.color.background.primaryAlt : "transparent";
30
30
  var _exp7 = () => ({ theme, $isSelected }) => $isSelected ? theme.color.border.primary : "transparent";
31
31
  var StyledSwitcherInputItem = withTheme(/*#__PURE__*/ styled("div")({
32
32
  name: "StyledSwitcherInputItem",
@@ -52,6 +52,7 @@ var SwitcherInput = ({ variant = InputVariant.PRIMARY, size = InputSize.MEDIUM,
52
52
  $size: size,
53
53
  children: /* @__PURE__ */ jsx(Text, {
54
54
  size: getInputTextSize(size),
55
+ variant: item.id === selectedId ? TextVariant.PRIMARY_ALT : TextVariant.SECONDARY,
55
56
  weight: item.id === selectedId ? TextWeight.MEDIUM : TextWeight.REGULAR,
56
57
  cursor: "pointer",
57
58
  children: item.label
package/dist/styles.css CHANGED
@@ -107,6 +107,7 @@
107
107
  .m78p4ib{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;padding:8px;background:var(--m78p4ib-0);border-radius:4px;cursor:pointer;}.m78p4ib:hover{background-color:var(--m78p4ib-1);}
108
108
  .p6xdmgb{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:space-between;-webkit-justify-content:space-between;justify-content:space-between;width:100%;padding:8px;background:var(--p6xdmgb-0);border-radius:4px;border:none;cursor:pointer;}.p6xdmgb:hover{background-color:var(--p6xdmgb-1);}.p6xdmgb:focus{outline:none;background-color:var(--p6xdmgb-1);}
109
109
  .o16no7ck{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}
110
+ .roazm1{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;width:var(--roazm1-0);}
110
111
  .m19ovajc{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex-wrap:wrap;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;min-height:var(--m19ovajc-0);width:var(--m19ovajc-1);background-color:var(--m19ovajc-2);border:0.5px solid var(--m19ovajc-3);border-radius:4px;padding:var(--m19ovajc-4);-webkit-transition:border-color 0.075s ease-in-out;transition:border-color 0.075s ease-in-out;cursor:var(--m19ovajc-5);opacity:var(--m19ovajc-6);}.m19ovajc:hover:not([data-disabled="true"]){border-color:var(--m19ovajc-7);}
111
112
  .s190irv4{-webkit-flex:1;-ms-flex:1;flex:1;min-width:80px;border:none;outline:none;background:transparent;color:var(--s190irv4-0);font-size:var(--s190irv4-1);line-height:var(--s190irv4-2);font-weight:var(--s190irv4-3);font-family:var(--s190irv4-4);}.s190irv4:disabled{cursor:not-allowed;}.s190irv4::-webkit-input-placeholder{color:var(--s190irv4-5);}.s190irv4::-moz-placeholder{color:var(--s190irv4-5);}.s190irv4:-ms-input-placeholder{color:var(--s190irv4-5);}.s190irv4::placeholder{color:var(--s190irv4-5);}
112
113
  .r1pzr59l{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;cursor:var(--r1pzr59l-0);opacity:var(--r1pzr59l-1);}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galaxy-io/dls",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Galaxy Design Language System",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",