Skip to content

Commit

Permalink
Merge pull request #1900 from Kajabi/develop
Browse files Browse the repository at this point in the history
chore: next version bump
  • Loading branch information
ju-Skinner authored Jun 21, 2024
2 parents 4ee755c + 32944c7 commit 8cd95f6
Show file tree
Hide file tree
Showing 15 changed files with 54 additions and 5 deletions.
30 changes: 27 additions & 3 deletions packages/sage-react/.storybook/preview-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,31 @@
Need local instance of Pine CORE running. not PINE ICONS
Make sure that the port here matches what is running in your local instance.
-->
<script type="module" src="https://localhost:7300/build/pine-core.esm.js"></script>
<script nomodule src="https://localhost:7300/build/index.esm.js"></script>
<script>
const LOCAL_PORT = 7301;
const host = window.location.host;
const timestamp = new Date().getTime(); // Generate a unique timestamp

if ( host.includes('localhost') ) {
window.PINE_CORE_URL = `https://localhost:${LOCAL_PORT}/build`;
} else {
window.PINE_CORE_URL = 'https://cdn.jsdelivr.net/npm/@pine-ds/core/dist/pine-core';
}

function setScriptLinks() {
const scriptModule = document.getElementById("scriptModule");
const scriptNoModule = document.getElementById("scriptNoModule");
const linkStyleSheet = document.getElementById("linkStyleSheet");

scriptModule.src = `${window.PINE_CORE_URL}/pine-core.esm.js?v=${timestamp}`;
scriptNoModule.src = `${window.PINE_CORE_URL}/index.esm.js?v=${timestamp}`;
linkStyleSheet.href = `${window.PINE_CORE_URL}/pine-core.css?v=${timestamp}`;
}

document.addEventListener('DOMContentLoaded', setScriptLinks);
</script>

<script id="scriptNoModule" nomodule></script>
<script id="scriptModule" type="module"></script>
<link id="linkStyleSheet" rel="stylesheet" />

<link rel="stylesheet" href="https://localhost:7300/build/pine-core.css" />
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Drawer/Drawer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import {
DRAWER_END_COLLAPSE,
} from './configs';

/* eslint-disable react-hooks/exhaustive-deps */

export const Drawer = ({
active,
children,
Expand Down
3 changes: 2 additions & 1 deletion packages/sage-react/lib/Icon/Icon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const Icon = ({
icon,
label,
size,
...rest
}) => {
const classNames = classnames(
className,
Expand Down Expand Up @@ -57,7 +58,7 @@ export const Icon = ({
};

const renderIcon = () => (
<pds-icon name={icon} class={`t-sage--color-${color} ${classNames}`} size={sizeMapping[size]} />
<pds-icon name={icon} class={`t-sage--color-${color} ${classNames}`} size={sizeMapping[size]} {...rest} />
);

const setBackgroundDimensions = () => {
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Input/Input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {
INPUT_TYPE
} from './configs';

/* eslint-disable react-hooks/exhaustive-deps */

export const Input = React.forwardRef(({
autocomplete,
className,
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Input/Input.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { SageTokens } from '../configs';
import { Input } from './Input';
import { Popover } from '../Popover';

/* eslint-disable no-console */

export default {
title: 'Sage/Input',
component: Input,
Expand Down
2 changes: 1 addition & 1 deletion packages/sage-react/lib/Label/Label.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const Label = React.forwardRef(({
</TagName>
{interactiveType === LABEL_INTERACTIVE_TYPES.SECONDARY_BUTTON && secondaryButton}
{(interactiveType === LABEL_INTERACTIVE_TYPES.DROPDOWN) && (
<span className="sage-label__decor-icon sage-label__decor-icon--down-small" />
<pds-icon className="sage-label__decor-icon" name="down-small" />
)}
</span>
);
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/PanelControls/PanelControls.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { Table } from '../Table';
import { getNews } from '../services/newsapi';
import { PanelControls } from './PanelControls';

/* eslint-disable react-hooks/exhaustive-deps */

// TODO: Consider how select all affects all items
// when only one page is currently selected

Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Table/Table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { TableRow } from './TableRow';
import { SELECTION_TYPES } from '../PanelControls/configs';
import { Checkbox } from '../Toggle';

/* eslint-disable react-hooks/exhaustive-deps */

//
// Tables are built out from a provided set of rows.
// These rows can be provided in a variety of formats,
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Table/TableRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { cellPropTypes } from './configs';
import { TableHelpers } from '../helpers';
import { Checkbox } from '../Toggle';

/* eslint-disable react-hooks/exhaustive-deps */

export const TableRow = ({
className,
cells,
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Toast/Toast.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { SageTokens } from '../configs';
import { Icon } from '../Icon';
import { TOAST_TYPES } from './configs';

/* eslint-disable react-hooks/exhaustive-deps */

export const Toast = ({
className,
description,
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Toggle/Switch.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { disableArgs, selectArgs } from '../story-support/helpers';
import { Switch } from './Switch';
import { Toggle } from './Toggle';

/* eslint-disable react/forbid-foreign-prop-types */

export default {
title: 'Sage/Switch',
component: Switch,
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Tooltip/TooltipElement.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import {
TOOLTIP_POSITIONS
} from './configs';

/* eslint-disable react-hooks/exhaustive-deps */

const TOOLTIP_DISTANCE = 8;

export const TooltipElement = ({
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Typeahead/Typeahead.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { Search } from '../Search';
import { useFocusTrap, useDebounceEffect } from '../common/hooks';
import { TypeaheadPanel } from './TypeaheadPanel';

/* eslint-disable react-hooks/exhaustive-deps */

const A11Y_ID = uuid();

export const Typeahead = ({
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/common/hooks/useDebounceEffect.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { useEffect, useCallback } from 'react';

/* eslint-disable react-hooks/exhaustive-deps */

export const useDebounceEffect = (effect, deps, delay = 250) => {
const callback = useCallback(effect, deps);

Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/common/hooks/useFocusTrap.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { useEffect } from 'react';
import { createFocusTrap } from 'focus-trap';

/* eslint-disable react-hooks/exhaustive-deps */

/**
*
* @param {Boolean} active - React boolean state
Expand Down

0 comments on commit 8cd95f6

Please sign in to comment.